philipp-zettl commited on
Commit
594a251
1 Parent(s): b4b5934

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ unigram.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: []
3
+ library_name: sentence-transformers
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:665
10
+ - loss:CoSENTLoss
11
+ base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
12
+ datasets: []
13
+ metrics:
14
+ - pearson_cosine
15
+ - spearman_cosine
16
+ - pearson_manhattan
17
+ - spearman_manhattan
18
+ - pearson_euclidean
19
+ - spearman_euclidean
20
+ - pearson_dot
21
+ - spearman_dot
22
+ - pearson_max
23
+ - spearman_max
24
+ widget:
25
+ - source_sentence: Is there a free return policy?
26
+ sentences:
27
+ - general query
28
+ - faq query
29
+ - product query
30
+ - source_sentence: Quiero reservar un vuelo a Madrid
31
+ sentences:
32
+ - faq query
33
+ - general query
34
+ - product query
35
+ - source_sentence: Bestell mir einen Bluetooth-Lautsprecher
36
+ sentences:
37
+ - faq query
38
+ - general query
39
+ - general query
40
+ - source_sentence: Kann ich meinen Account auf Premium upgraden?
41
+ sentences:
42
+ - faq query
43
+ - product query
44
+ - faq query
45
+ - source_sentence: Was kostet der Versand nach Kanada?
46
+ sentences:
47
+ - product query
48
+ - faq query
49
+ - faq query
50
+ pipeline_tag: sentence-similarity
51
+ model-index:
52
+ - name: SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
53
+ results:
54
+ - task:
55
+ type: semantic-similarity
56
+ name: Semantic Similarity
57
+ dataset:
58
+ name: MiniLM dev
59
+ type: MiniLM-dev
60
+ metrics:
61
+ - type: pearson_cosine
62
+ value: 0.7060858093148971
63
+ name: Pearson Cosine
64
+ - type: spearman_cosine
65
+ value: 0.7122657953703283
66
+ name: Spearman Cosine
67
+ - type: pearson_manhattan
68
+ value: 0.5850353380261794
69
+ name: Pearson Manhattan
70
+ - type: spearman_manhattan
71
+ value: 0.6010204119883696
72
+ name: Spearman Manhattan
73
+ - type: pearson_euclidean
74
+ value: 0.5997691394008732
75
+ name: Pearson Euclidean
76
+ - type: spearman_euclidean
77
+ value: 0.6079117189235353
78
+ name: Spearman Euclidean
79
+ - type: pearson_dot
80
+ value: 0.7251159526734934
81
+ name: Pearson Dot
82
+ - type: spearman_dot
83
+ value: 0.732939716175825
84
+ name: Spearman Dot
85
+ - type: pearson_max
86
+ value: 0.7251159526734934
87
+ name: Pearson Max
88
+ - type: spearman_max
89
+ value: 0.732939716175825
90
+ name: Spearman Max
91
+ - task:
92
+ type: semantic-similarity
93
+ name: Semantic Similarity
94
+ dataset:
95
+ name: MiniLM test
96
+ type: MiniLM-test
97
+ metrics:
98
+ - type: pearson_cosine
99
+ value: 0.8232712880664017
100
+ name: Pearson Cosine
101
+ - type: spearman_cosine
102
+ value: 0.822196399839697
103
+ name: Spearman Cosine
104
+ - type: pearson_manhattan
105
+ value: 0.7831863345453927
106
+ name: Pearson Manhattan
107
+ - type: spearman_manhattan
108
+ value: 0.8000293400400974
109
+ name: Spearman Manhattan
110
+ - type: pearson_euclidean
111
+ value: 0.792921493930252
112
+ name: Pearson Euclidean
113
+ - type: spearman_euclidean
114
+ value: 0.80506730817637
115
+ name: Spearman Euclidean
116
+ - type: pearson_dot
117
+ value: 0.8011854727667188
118
+ name: Pearson Dot
119
+ - type: spearman_dot
120
+ value: 0.8151432444489153
121
+ name: Spearman Dot
122
+ - type: pearson_max
123
+ value: 0.8232712880664017
124
+ name: Pearson Max
125
+ - type: spearman_max
126
+ value: 0.822196399839697
127
+ name: Spearman Max
128
+ ---
129
+
130
+ # SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
131
+
132
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
133
+
134
+ ## Model Details
135
+
136
+ ### Model Description
137
+ - **Model Type:** Sentence Transformer
138
+ - **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision bf3bf13ab40c3157080a7ab344c831b9ad18b5eb -->
139
+ - **Maximum Sequence Length:** 128 tokens
140
+ - **Output Dimensionality:** 384 tokens
141
+ - **Similarity Function:** Cosine Similarity
142
+ <!-- - **Training Dataset:** Unknown -->
143
+ <!-- - **Language:** Unknown -->
144
+ <!-- - **License:** Unknown -->
145
+
146
+ ### Model Sources
147
+
148
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
149
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
150
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
151
+
152
+ ### Full Model Architecture
153
+
154
+ ```
155
+ SentenceTransformer(
156
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
157
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
158
+ )
159
+ ```
160
+
161
+ ## Usage
162
+
163
+ ### Direct Usage (Sentence Transformers)
164
+
165
+ First install the Sentence Transformers library:
166
+
167
+ ```bash
168
+ pip install -U sentence-transformers
169
+ ```
170
+
171
+ Then you can load this model and run inference.
172
+ ```python
173
+ from sentence_transformers import SentenceTransformer
174
+
175
+ # Download from the 🤗 Hub
176
+ model = SentenceTransformer("philipp-zettl/MiniLM-similarity-small")
177
+ # Run inference
178
+ sentences = [
179
+ 'Was kostet der Versand nach Kanada?',
180
+ 'faq query',
181
+ 'product query',
182
+ ]
183
+ embeddings = model.encode(sentences)
184
+ print(embeddings.shape)
185
+ # [3, 384]
186
+
187
+ # Get the similarity scores for the embeddings
188
+ similarities = model.similarity(embeddings, embeddings)
189
+ print(similarities.shape)
190
+ # [3, 3]
191
+ ```
192
+
193
+ <!--
194
+ ### Direct Usage (Transformers)
195
+
196
+ <details><summary>Click to see the direct usage in Transformers</summary>
197
+
198
+ </details>
199
+ -->
200
+
201
+ <!--
202
+ ### Downstream Usage (Sentence Transformers)
203
+
204
+ You can finetune this model on your own dataset.
205
+
206
+ <details><summary>Click to expand</summary>
207
+
208
+ </details>
209
+ -->
210
+
211
+ <!--
212
+ ### Out-of-Scope Use
213
+
214
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
215
+ -->
216
+
217
+ ## Evaluation
218
+
219
+ ### Metrics
220
+
221
+ #### Semantic Similarity
222
+ * Dataset: `MiniLM-dev`
223
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
224
+
225
+ | Metric | Value |
226
+ |:--------------------|:-----------|
227
+ | pearson_cosine | 0.7061 |
228
+ | **spearman_cosine** | **0.7123** |
229
+ | pearson_manhattan | 0.585 |
230
+ | spearman_manhattan | 0.601 |
231
+ | pearson_euclidean | 0.5998 |
232
+ | spearman_euclidean | 0.6079 |
233
+ | pearson_dot | 0.7251 |
234
+ | spearman_dot | 0.7329 |
235
+ | pearson_max | 0.7251 |
236
+ | spearman_max | 0.7329 |
237
+
238
+ #### Semantic Similarity
239
+ * Dataset: `MiniLM-test`
240
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
241
+
242
+ | Metric | Value |
243
+ |:--------------------|:-----------|
244
+ | pearson_cosine | 0.8233 |
245
+ | **spearman_cosine** | **0.8222** |
246
+ | pearson_manhattan | 0.7832 |
247
+ | spearman_manhattan | 0.8 |
248
+ | pearson_euclidean | 0.7929 |
249
+ | spearman_euclidean | 0.8051 |
250
+ | pearson_dot | 0.8012 |
251
+ | spearman_dot | 0.8151 |
252
+ | pearson_max | 0.8233 |
253
+ | spearman_max | 0.8222 |
254
+
255
+ <!--
256
+ ## Bias, Risks and Limitations
257
+
258
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
259
+ -->
260
+
261
+ <!--
262
+ ### Recommendations
263
+
264
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
265
+ -->
266
+
267
+ ## Training Details
268
+
269
+ ### Training Dataset
270
+
271
+ #### Unnamed Dataset
272
+
273
+
274
+ * Size: 665 training samples
275
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
276
+ * Approximate statistics based on the first 1000 samples:
277
+ | | sentence1 | sentence2 | score |
278
+ |:--------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:--------------------------------------------------------------|
279
+ | type | string | string | float |
280
+ | details | <ul><li>min: 7 tokens</li><li>mean: 11.29 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 5.31 tokens</li><li>max: 6 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.5</li><li>max: 1.0</li></ul> |
281
+ * Samples:
282
+ | sentence1 | sentence2 | score |
283
+ |:---------------------------------------------------------------------|:---------------------------|:-----------------|
284
+ | <code>Send me deals on gaming accessories</code> | <code>product query</code> | <code>1.0</code> |
285
+ | <code>Aidez-moi à synchroniser mes contacts sur mon téléphone</code> | <code>faq query</code> | <code>0.0</code> |
286
+ | <code>Какие у вас есть предложения по ноутбукам?</code> | <code>faq query</code> | <code>0.0</code> |
287
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
288
+ ```json
289
+ {
290
+ "scale": 20.0,
291
+ "similarity_fct": "pairwise_cos_sim"
292
+ }
293
+ ```
294
+
295
+ ### Evaluation Dataset
296
+
297
+ #### Unnamed Dataset
298
+
299
+
300
+ * Size: 84 evaluation samples
301
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
302
+ * Approximate statistics based on the first 1000 samples:
303
+ | | sentence1 | sentence2 | score |
304
+ |:--------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:---------------------------------------------------------------|
305
+ | type | string | string | float |
306
+ | details | <ul><li>min: 7 tokens</li><li>mean: 11.32 tokens</li><li>max: 17 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 5.42 tokens</li><li>max: 6 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.46</li><li>max: 1.0</li></ul> |
307
+ * Samples:
308
+ | sentence1 | sentence2 | score |
309
+ |:-----------------------------------------------------------------------------|:---------------------------|:-----------------|
310
+ | <code>كيف يمكنني تتبع شحنتي؟</code> | <code>support query</code> | <code>0.0</code> |
311
+ | <code>Aidez-moi à configurer une nouvelle adresse e-mail</code> | <code>support query</code> | <code>1.0</code> |
312
+ | <code>Envoyez-moi les dernières promotions sur les montres connectées</code> | <code>product query</code> | <code>1.0</code> |
313
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
314
+ ```json
315
+ {
316
+ "scale": 20.0,
317
+ "similarity_fct": "pairwise_cos_sim"
318
+ }
319
+ ```
320
+
321
+ ### Training Hyperparameters
322
+ #### Non-Default Hyperparameters
323
+
324
+ - `eval_strategy`: steps
325
+ - `per_device_train_batch_size`: 32
326
+ - `per_device_eval_batch_size`: 32
327
+ - `learning_rate`: 2e-05
328
+ - `num_train_epochs`: 8
329
+ - `warmup_ratio`: 0.1
330
+ - `fp16`: True
331
+ - `batch_sampler`: no_duplicates
332
+
333
+ #### All Hyperparameters
334
+ <details><summary>Click to expand</summary>
335
+
336
+ - `overwrite_output_dir`: False
337
+ - `do_predict`: False
338
+ - `eval_strategy`: steps
339
+ - `prediction_loss_only`: True
340
+ - `per_device_train_batch_size`: 32
341
+ - `per_device_eval_batch_size`: 32
342
+ - `per_gpu_train_batch_size`: None
343
+ - `per_gpu_eval_batch_size`: None
344
+ - `gradient_accumulation_steps`: 1
345
+ - `eval_accumulation_steps`: None
346
+ - `learning_rate`: 2e-05
347
+ - `weight_decay`: 0.0
348
+ - `adam_beta1`: 0.9
349
+ - `adam_beta2`: 0.999
350
+ - `adam_epsilon`: 1e-08
351
+ - `max_grad_norm`: 1.0
352
+ - `num_train_epochs`: 8
353
+ - `max_steps`: -1
354
+ - `lr_scheduler_type`: linear
355
+ - `lr_scheduler_kwargs`: {}
356
+ - `warmup_ratio`: 0.1
357
+ - `warmup_steps`: 0
358
+ - `log_level`: passive
359
+ - `log_level_replica`: warning
360
+ - `log_on_each_node`: True
361
+ - `logging_nan_inf_filter`: True
362
+ - `save_safetensors`: True
363
+ - `save_on_each_node`: False
364
+ - `save_only_model`: False
365
+ - `restore_callback_states_from_checkpoint`: False
366
+ - `no_cuda`: False
367
+ - `use_cpu`: False
368
+ - `use_mps_device`: False
369
+ - `seed`: 42
370
+ - `data_seed`: None
371
+ - `jit_mode_eval`: False
372
+ - `use_ipex`: False
373
+ - `bf16`: False
374
+ - `fp16`: True
375
+ - `fp16_opt_level`: O1
376
+ - `half_precision_backend`: auto
377
+ - `bf16_full_eval`: False
378
+ - `fp16_full_eval`: False
379
+ - `tf32`: None
380
+ - `local_rank`: 0
381
+ - `ddp_backend`: None
382
+ - `tpu_num_cores`: None
383
+ - `tpu_metrics_debug`: False
384
+ - `debug`: []
385
+ - `dataloader_drop_last`: False
386
+ - `dataloader_num_workers`: 0
387
+ - `dataloader_prefetch_factor`: None
388
+ - `past_index`: -1
389
+ - `disable_tqdm`: False
390
+ - `remove_unused_columns`: True
391
+ - `label_names`: None
392
+ - `load_best_model_at_end`: False
393
+ - `ignore_data_skip`: False
394
+ - `fsdp`: []
395
+ - `fsdp_min_num_params`: 0
396
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
397
+ - `fsdp_transformer_layer_cls_to_wrap`: None
398
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
399
+ - `deepspeed`: None
400
+ - `label_smoothing_factor`: 0.0
401
+ - `optim`: adamw_torch
402
+ - `optim_args`: None
403
+ - `adafactor`: False
404
+ - `group_by_length`: False
405
+ - `length_column_name`: length
406
+ - `ddp_find_unused_parameters`: None
407
+ - `ddp_bucket_cap_mb`: None
408
+ - `ddp_broadcast_buffers`: False
409
+ - `dataloader_pin_memory`: True
410
+ - `dataloader_persistent_workers`: False
411
+ - `skip_memory_metrics`: True
412
+ - `use_legacy_prediction_loop`: False
413
+ - `push_to_hub`: False
414
+ - `resume_from_checkpoint`: None
415
+ - `hub_model_id`: None
416
+ - `hub_strategy`: every_save
417
+ - `hub_private_repo`: False
418
+ - `hub_always_push`: False
419
+ - `gradient_checkpointing`: False
420
+ - `gradient_checkpointing_kwargs`: None
421
+ - `include_inputs_for_metrics`: False
422
+ - `eval_do_concat_batches`: True
423
+ - `fp16_backend`: auto
424
+ - `push_to_hub_model_id`: None
425
+ - `push_to_hub_organization`: None
426
+ - `mp_parameters`:
427
+ - `auto_find_batch_size`: False
428
+ - `full_determinism`: False
429
+ - `torchdynamo`: None
430
+ - `ray_scope`: last
431
+ - `ddp_timeout`: 1800
432
+ - `torch_compile`: False
433
+ - `torch_compile_backend`: None
434
+ - `torch_compile_mode`: None
435
+ - `dispatch_batches`: None
436
+ - `split_batches`: None
437
+ - `include_tokens_per_second`: False
438
+ - `include_num_input_tokens_seen`: False
439
+ - `neftune_noise_alpha`: None
440
+ - `optim_target_modules`: None
441
+ - `batch_eval_metrics`: False
442
+ - `batch_sampler`: no_duplicates
443
+ - `multi_dataset_batch_sampler`: proportional
444
+
445
+ </details>
446
+
447
+ ### Training Logs
448
+ | Epoch | Step | Training Loss | loss | MiniLM-dev_spearman_cosine | MiniLM-test_spearman_cosine |
449
+ |:------:|:----:|:-------------:|:------:|:--------------------------:|:---------------------------:|
450
+ | 0.4762 | 10 | 1.3639 | 0.8946 | 0.0665 | - |
451
+ | 0.9524 | 20 | 0.8488 | 0.7608 | 0.2318 | - |
452
+ | 1.4286 | 30 | 0.6629 | 1.0463 | 0.3736 | - |
453
+ | 1.9048 | 40 | 1.1413 | 1.1547 | 0.4159 | - |
454
+ | 2.3810 | 50 | 1.8156 | 1.2059 | 0.4760 | - |
455
+ | 2.8571 | 60 | 2.0179 | 0.8129 | 0.5794 | - |
456
+ | 3.3333 | 70 | 0.3202 | 0.6236 | 0.6217 | - |
457
+ | 3.8095 | 80 | 0.1437 | 0.6061 | 0.6404 | - |
458
+ | 4.2857 | 90 | 1.1623 | 0.7312 | 0.6424 | - |
459
+ | 4.7619 | 100 | 0.4376 | 0.5987 | 0.6621 | - |
460
+ | 5.2381 | 110 | 0.5832 | 0.4848 | 0.6837 | - |
461
+ | 5.7143 | 120 | 0.1749 | 0.3367 | 0.6896 | - |
462
+ | 6.1905 | 130 | 0.0192 | 0.2607 | 0.6936 | - |
463
+ | 6.6667 | 140 | 0.2047 | 0.2564 | 0.6995 | - |
464
+ | 7.1429 | 150 | 0.404 | 0.2747 | 0.7103 | - |
465
+ | 7.6190 | 160 | 0.0008 | 0.2764 | 0.7123 | - |
466
+ | 8.0 | 168 | - | - | - | 0.8222 |
467
+
468
+
469
+ ### Framework Versions
470
+ - Python: 3.10.14
471
+ - Sentence Transformers: 3.0.1
472
+ - Transformers: 4.41.2
473
+ - PyTorch: 2.3.1+cu121
474
+ - Accelerate: 0.33.0
475
+ - Datasets: 2.21.0
476
+ - Tokenizers: 0.19.1
477
+
478
+ ## Citation
479
+
480
+ ### BibTeX
481
+
482
+ #### Sentence Transformers
483
+ ```bibtex
484
+ @inproceedings{reimers-2019-sentence-bert,
485
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
486
+ author = "Reimers, Nils and Gurevych, Iryna",
487
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
488
+ month = "11",
489
+ year = "2019",
490
+ publisher = "Association for Computational Linguistics",
491
+ url = "https://arxiv.org/abs/1908.10084",
492
+ }
493
+ ```
494
+
495
+ #### CoSENTLoss
496
+ ```bibtex
497
+ @online{kexuefm-8847,
498
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
499
+ author={Su Jianlin},
500
+ year={2022},
501
+ month={Jan},
502
+ url={https://kexue.fm/archives/8847},
503
+ }
504
+ ```
505
+
506
+ <!--
507
+ ## Glossary
508
+
509
+ *Clearly define terms in order to be accessible across audiences.*
510
+ -->
511
+
512
+ <!--
513
+ ## Model Card Authors
514
+
515
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
516
+ -->
517
+
518
+ <!--
519
+ ## Model Card Contact
520
+
521
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
522
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.2",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 250037
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.3.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f93e7a04af4cede03ff8facfb35e603c3269ab0d128fa7c1216b44d2ed3b40f9
3
+ size 470637416
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 128,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
3
+ size 17082987
tokenizer_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "do_lower_case": true,
48
+ "eos_token": "</s>",
49
+ "mask_token": "<mask>",
50
+ "max_length": 128,
51
+ "model_max_length": 128,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "<pad>",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "</s>",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "<unk>"
64
+ }
unigram.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
3
+ size 14763260