tomaarsen HF staff commited on
Commit
089660d
1 Parent(s): e85b657

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
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,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: sentence-transformers
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - loss:Matryoshka2dLoss
10
+ - loss:MatryoshkaLoss
11
+ - loss:CoSENTLoss
12
+ base_model: distilbert/distilbert-base-uncased
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: A woman is reading.
26
+ sentences:
27
+ - A woman is taking a picture.
28
+ - Breivik complains of 'ridicule'
29
+ - The small dog protects its owner.
30
+ - source_sentence: A man shoots a man.
31
+ sentences:
32
+ - A man is shooting off guns.
33
+ - A tiger walks around aimlessly.
34
+ - A cat sleeps on purple sheet.
35
+ - source_sentence: A man is speaking.
36
+ sentences:
37
+ - A man is talking.
38
+ - 19 hurt in New Orleans shooting
39
+ - The dogs are chasing a black cat.
40
+ - source_sentence: A man is spitting.
41
+ sentences:
42
+ - Breivik complains of 'ridicule'
43
+ - The man is hiking in the woods.
44
+ - Eurozone agrees Greece bail-out
45
+ - source_sentence: A parrot is talking.
46
+ sentences:
47
+ - A parrot is talking into a microphone.
48
+ - A monkey pratices martial arts.
49
+ - The two men are wearing jeans.
50
+ pipeline_tag: sentence-similarity
51
+ co2_eq_emissions:
52
+ emissions: 5.379215660466108
53
+ energy_consumed: 0.013838919430479152
54
+ source: codecarbon
55
+ training_type: fine-tuning
56
+ on_cloud: false
57
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
58
+ ram_total_size: 31.777088165283203
59
+ hours_used: 0.072
60
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
61
+ model-index:
62
+ - name: SentenceTransformer based on distilbert/distilbert-base-uncased
63
+ results:
64
+ - task:
65
+ type: semantic-similarity
66
+ name: Semantic Similarity
67
+ dataset:
68
+ name: sts dev
69
+ type: sts-dev
70
+ metrics:
71
+ - type: pearson_cosine
72
+ value: 0.861868947947514
73
+ name: Pearson Cosine
74
+ - type: spearman_cosine
75
+ value: 0.8712617743584893
76
+ name: Spearman Cosine
77
+ - type: pearson_manhattan
78
+ value: 0.8611484157829896
79
+ name: Pearson Manhattan
80
+ - type: spearman_manhattan
81
+ value: 0.8619125760745536
82
+ name: Spearman Manhattan
83
+ - type: pearson_euclidean
84
+ value: 0.8615299857042606
85
+ name: Pearson Euclidean
86
+ - type: spearman_euclidean
87
+ value: 0.8623855766060573
88
+ name: Spearman Euclidean
89
+ - type: pearson_dot
90
+ value: 0.7716399182083511
91
+ name: Pearson Dot
92
+ - type: spearman_dot
93
+ value: 0.781574012832885
94
+ name: Spearman Dot
95
+ - type: pearson_max
96
+ value: 0.861868947947514
97
+ name: Pearson Max
98
+ - type: spearman_max
99
+ value: 0.8712617743584893
100
+ name: Spearman Max
101
+ - task:
102
+ type: semantic-similarity
103
+ name: Semantic Similarity
104
+ dataset:
105
+ name: sts test
106
+ type: sts-test
107
+ metrics:
108
+ - type: pearson_cosine
109
+ value: 0.8281542233533932
110
+ name: Pearson Cosine
111
+ - type: spearman_cosine
112
+ value: 0.8373087013752897
113
+ name: Spearman Cosine
114
+ - type: pearson_manhattan
115
+ value: 0.842468233222574
116
+ name: Pearson Manhattan
117
+ - type: spearman_manhattan
118
+ value: 0.8374178427964344
119
+ name: Spearman Manhattan
120
+ - type: pearson_euclidean
121
+ value: 0.8424571958251152
122
+ name: Pearson Euclidean
123
+ - type: spearman_euclidean
124
+ value: 0.8372826604544046
125
+ name: Spearman Euclidean
126
+ - type: pearson_dot
127
+ value: 0.6750086731901399
128
+ name: Pearson Dot
129
+ - type: spearman_dot
130
+ value: 0.656834541089774
131
+ name: Spearman Dot
132
+ - type: pearson_max
133
+ value: 0.842468233222574
134
+ name: Pearson Max
135
+ - type: spearman_max
136
+ value: 0.8374178427964344
137
+ name: Spearman Max
138
+ ---
139
+
140
+ # SentenceTransformer based on distilbert/distilbert-base-uncased
141
+
142
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
143
+
144
+ ## Model Details
145
+
146
+ ### Model Description
147
+ - **Model Type:** Sentence Transformer
148
+ - **Base model:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) <!-- at revision 6cdc0aad91f5ae2e6712e91bc7b65d1cf5c05411 -->
149
+ - **Maximum Sequence Length:** 512 tokens
150
+ - **Output Dimensionality:** 768 tokens
151
+ - **Similarity Function:** Cosine Similarity
152
+ - **Training Dataset:**
153
+ - [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb)
154
+ - **Language:** en
155
+ <!-- - **License:** Unknown -->
156
+
157
+ ### Model Sources
158
+
159
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
160
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
161
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
162
+
163
+ ### Full Model Architecture
164
+
165
+ ```
166
+ SentenceTransformer(
167
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DistilBertModel
168
+ (1): Pooling({'word_embedding_dimension': 768, '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})
169
+ )
170
+ ```
171
+
172
+ ## Usage
173
+
174
+ ### Direct Usage (Sentence Transformers)
175
+
176
+ First install the Sentence Transformers library:
177
+
178
+ ```bash
179
+ pip install -U sentence-transformers
180
+ ```
181
+
182
+ Then you can load this model and run inference.
183
+ ```python
184
+ from sentence_transformers import SentenceTransformer
185
+
186
+ # Download from the 🤗 Hub
187
+ model = SentenceTransformer("tomaarsen/distilbert-base-uncased-sts-2d-matryoshka")
188
+ # Run inference
189
+ sentences = [
190
+ 'A parrot is talking.',
191
+ 'A parrot is talking into a microphone.',
192
+ 'A monkey pratices martial arts.',
193
+ ]
194
+ embeddings = model.encode(sentences)
195
+ print(embeddings.shape)
196
+ # [3, 768]
197
+
198
+ # Get the similarity scores for the embeddings
199
+ similarities = model.similarity(embeddings)
200
+ print(similarities.shape)
201
+ # [3, 3]
202
+ ```
203
+
204
+ <!--
205
+ ### Direct Usage (Transformers)
206
+
207
+ <details><summary>Click to see the direct usage in Transformers</summary>
208
+
209
+ </details>
210
+ -->
211
+
212
+ <!--
213
+ ### Downstream Usage (Sentence Transformers)
214
+
215
+ You can finetune this model on your own dataset.
216
+
217
+ <details><summary>Click to expand</summary>
218
+
219
+ </details>
220
+ -->
221
+
222
+ <!--
223
+ ### Out-of-Scope Use
224
+
225
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
226
+ -->
227
+
228
+ ## Evaluation
229
+
230
+ ### Metrics
231
+
232
+ #### Semantic Similarity
233
+ * Dataset: `sts-dev`
234
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
235
+
236
+ | Metric | Value |
237
+ |:--------------------|:-----------|
238
+ | pearson_cosine | 0.8619 |
239
+ | **spearman_cosine** | **0.8713** |
240
+ | pearson_manhattan | 0.8611 |
241
+ | spearman_manhattan | 0.8619 |
242
+ | pearson_euclidean | 0.8615 |
243
+ | spearman_euclidean | 0.8624 |
244
+ | pearson_dot | 0.7716 |
245
+ | spearman_dot | 0.7816 |
246
+ | pearson_max | 0.8619 |
247
+ | spearman_max | 0.8713 |
248
+
249
+ #### Semantic Similarity
250
+ * Dataset: `sts-test`
251
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
252
+
253
+ | Metric | Value |
254
+ |:--------------------|:-----------|
255
+ | pearson_cosine | 0.8282 |
256
+ | **spearman_cosine** | **0.8373** |
257
+ | pearson_manhattan | 0.8425 |
258
+ | spearman_manhattan | 0.8374 |
259
+ | pearson_euclidean | 0.8425 |
260
+ | spearman_euclidean | 0.8373 |
261
+ | pearson_dot | 0.675 |
262
+ | spearman_dot | 0.6568 |
263
+ | pearson_max | 0.8425 |
264
+ | spearman_max | 0.8374 |
265
+
266
+ <!--
267
+ ## Bias, Risks and Limitations
268
+
269
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
270
+ -->
271
+
272
+ <!--
273
+ ### Recommendations
274
+
275
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
276
+ -->
277
+
278
+ ## Training Details
279
+
280
+ ### Training Dataset
281
+
282
+ #### sentence-transformers/stsb
283
+
284
+ * Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
285
+ * Size: 5,749 training samples
286
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
287
+ * Approximate statistics based on the first 1000 samples:
288
+ | | sentence1 | sentence2 | score |
289
+ |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
290
+ | type | string | string | float |
291
+ | details | <ul><li>min: 6 tokens</li><li>mean: 10.0 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 9.95 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
292
+ * Samples:
293
+ | sentence1 | sentence2 | score |
294
+ |:-----------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
295
+ | <code>A plane is taking off.</code> | <code>An air plane is taking off.</code> | <code>1.0</code> |
296
+ | <code>A man is playing a large flute.</code> | <code>A man is playing a flute.</code> | <code>0.76</code> |
297
+ | <code>A man is spreading shreded cheese on a pizza.</code> | <code>A man is spreading shredded cheese on an uncooked pizza.</code> | <code>0.76</code> |
298
+ * Loss: [<code>Matryoshka2dLoss</code>](https://sbert.net/docs/package_reference/losses.html#matryoshka2dloss) with these parameters:
299
+ ```json
300
+ {
301
+ "loss": "CoSENTLoss",
302
+ "n_layers_per_step": 1,
303
+ "last_layer_weight": 1.0,
304
+ "prior_layers_weight": 1.0,
305
+ "kl_div_weight": 1.0,
306
+ "kl_temperature": 0.3,
307
+ "matryoshka_dims": [
308
+ 768,
309
+ 512,
310
+ 256,
311
+ 128,
312
+ 64
313
+ ],
314
+ "matryoshka_weights": [
315
+ 1,
316
+ 1,
317
+ 1,
318
+ 1,
319
+ 1
320
+ ],
321
+ "n_dims_per_step": 1
322
+ }
323
+ ```
324
+
325
+ ### Evaluation Dataset
326
+
327
+ #### sentence-transformers/stsb
328
+
329
+ * Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
330
+ * Size: 1,500 evaluation samples
331
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
332
+ * Approximate statistics based on the first 1000 samples:
333
+ | | sentence1 | sentence2 | score |
334
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
335
+ | type | string | string | float |
336
+ | details | <ul><li>min: 5 tokens</li><li>mean: 15.1 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.11 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
337
+ * Samples:
338
+ | sentence1 | sentence2 | score |
339
+ |:--------------------------------------------------|:------------------------------------------------------|:------------------|
340
+ | <code>A man with a hard hat is dancing.</code> | <code>A man wearing a hard hat is dancing.</code> | <code>1.0</code> |
341
+ | <code>A young child is riding a horse.</code> | <code>A child is riding a horse.</code> | <code>0.95</code> |
342
+ | <code>A man is feeding a mouse to a snake.</code> | <code>The man is feeding a mouse to the snake.</code> | <code>1.0</code> |
343
+ * Loss: [<code>Matryoshka2dLoss</code>](https://sbert.net/docs/package_reference/losses.html#matryoshka2dloss) with these parameters:
344
+ ```json
345
+ {
346
+ "loss": "CoSENTLoss",
347
+ "n_layers_per_step": 1,
348
+ "last_layer_weight": 1.0,
349
+ "prior_layers_weight": 1.0,
350
+ "kl_div_weight": 1.0,
351
+ "kl_temperature": 0.3,
352
+ "matryoshka_dims": [
353
+ 768,
354
+ 512,
355
+ 256,
356
+ 128,
357
+ 64
358
+ ],
359
+ "matryoshka_weights": [
360
+ 1,
361
+ 1,
362
+ 1,
363
+ 1,
364
+ 1
365
+ ],
366
+ "n_dims_per_step": 1
367
+ }
368
+ ```
369
+
370
+ ### Training Hyperparameters
371
+ #### Non-Default Hyperparameters
372
+
373
+ - `eval_strategy`: steps
374
+ - `per_device_train_batch_size`: 16
375
+ - `per_device_eval_batch_size`: 16
376
+ - `num_train_epochs`: 4
377
+ - `warmup_ratio`: 0.1
378
+ - `fp16`: True
379
+
380
+ #### All Hyperparameters
381
+ <details><summary>Click to expand</summary>
382
+
383
+ - `overwrite_output_dir`: False
384
+ - `do_predict`: False
385
+ - `eval_strategy`: steps
386
+ - `prediction_loss_only`: False
387
+ - `per_device_train_batch_size`: 16
388
+ - `per_device_eval_batch_size`: 16
389
+ - `per_gpu_train_batch_size`: None
390
+ - `per_gpu_eval_batch_size`: None
391
+ - `gradient_accumulation_steps`: 1
392
+ - `eval_accumulation_steps`: None
393
+ - `learning_rate`: 5e-05
394
+ - `weight_decay`: 0.0
395
+ - `adam_beta1`: 0.9
396
+ - `adam_beta2`: 0.999
397
+ - `adam_epsilon`: 1e-08
398
+ - `max_grad_norm`: 1.0
399
+ - `num_train_epochs`: 4
400
+ - `max_steps`: -1
401
+ - `lr_scheduler_type`: linear
402
+ - `lr_scheduler_kwargs`: {}
403
+ - `warmup_ratio`: 0.1
404
+ - `warmup_steps`: 0
405
+ - `log_level`: passive
406
+ - `log_level_replica`: warning
407
+ - `log_on_each_node`: True
408
+ - `logging_nan_inf_filter`: True
409
+ - `save_safetensors`: True
410
+ - `save_on_each_node`: False
411
+ - `save_only_model`: False
412
+ - `no_cuda`: False
413
+ - `use_cpu`: False
414
+ - `use_mps_device`: False
415
+ - `seed`: 42
416
+ - `data_seed`: None
417
+ - `jit_mode_eval`: False
418
+ - `use_ipex`: False
419
+ - `bf16`: False
420
+ - `fp16`: True
421
+ - `fp16_opt_level`: O1
422
+ - `half_precision_backend`: auto
423
+ - `bf16_full_eval`: False
424
+ - `fp16_full_eval`: False
425
+ - `tf32`: None
426
+ - `local_rank`: 0
427
+ - `ddp_backend`: None
428
+ - `tpu_num_cores`: None
429
+ - `tpu_metrics_debug`: False
430
+ - `debug`: []
431
+ - `dataloader_drop_last`: False
432
+ - `dataloader_num_workers`: 0
433
+ - `dataloader_prefetch_factor`: None
434
+ - `past_index`: -1
435
+ - `disable_tqdm`: False
436
+ - `remove_unused_columns`: True
437
+ - `label_names`: None
438
+ - `load_best_model_at_end`: False
439
+ - `ignore_data_skip`: False
440
+ - `fsdp`: []
441
+ - `fsdp_min_num_params`: 0
442
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
443
+ - `fsdp_transformer_layer_cls_to_wrap`: None
444
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
445
+ - `deepspeed`: None
446
+ - `label_smoothing_factor`: 0.0
447
+ - `optim`: adamw_torch
448
+ - `optim_args`: None
449
+ - `adafactor`: False
450
+ - `group_by_length`: False
451
+ - `length_column_name`: length
452
+ - `ddp_find_unused_parameters`: None
453
+ - `ddp_bucket_cap_mb`: None
454
+ - `ddp_broadcast_buffers`: None
455
+ - `dataloader_pin_memory`: True
456
+ - `dataloader_persistent_workers`: False
457
+ - `skip_memory_metrics`: True
458
+ - `use_legacy_prediction_loop`: False
459
+ - `push_to_hub`: False
460
+ - `resume_from_checkpoint`: None
461
+ - `hub_model_id`: None
462
+ - `hub_strategy`: every_save
463
+ - `hub_private_repo`: False
464
+ - `hub_always_push`: False
465
+ - `gradient_checkpointing`: False
466
+ - `gradient_checkpointing_kwargs`: None
467
+ - `include_inputs_for_metrics`: False
468
+ - `eval_do_concat_batches`: True
469
+ - `fp16_backend`: auto
470
+ - `push_to_hub_model_id`: None
471
+ - `push_to_hub_organization`: None
472
+ - `mp_parameters`:
473
+ - `auto_find_batch_size`: False
474
+ - `full_determinism`: False
475
+ - `torchdynamo`: None
476
+ - `ray_scope`: last
477
+ - `ddp_timeout`: 1800
478
+ - `torch_compile`: False
479
+ - `torch_compile_backend`: None
480
+ - `torch_compile_mode`: None
481
+ - `dispatch_batches`: None
482
+ - `split_batches`: None
483
+ - `include_tokens_per_second`: False
484
+ - `include_num_input_tokens_seen`: False
485
+ - `neftune_noise_alpha`: None
486
+ - `optim_target_modules`: None
487
+ - `batch_sampler`: batch_sampler
488
+ - `multi_dataset_batch_sampler`: proportional
489
+
490
+ </details>
491
+
492
+ ### Training Logs
493
+ | Epoch | Step | Training Loss | loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
494
+ |:------:|:----:|:-------------:|:------:|:-----------------------:|:------------------------:|
495
+ | 0.2778 | 100 | 7.1781 | 6.6704 | 0.8345 | - |
496
+ | 0.5556 | 200 | 6.5316 | 6.7135 | 0.8439 | - |
497
+ | 0.8333 | 300 | 6.6267 | 6.8697 | 0.8551 | - |
498
+ | 1.1111 | 400 | 6.5709 | 6.7623 | 0.8568 | - |
499
+ | 1.3889 | 500 | 6.2898 | 6.4412 | 0.8644 | - |
500
+ | 1.6667 | 600 | 6.2021 | 6.7711 | 0.8595 | - |
501
+ | 1.9444 | 700 | 6.201 | 6.5252 | 0.8628 | - |
502
+ | 2.2222 | 800 | 6.0862 | 6.9795 | 0.8652 | - |
503
+ | 2.5 | 900 | 6.303 | 6.7339 | 0.8685 | - |
504
+ | 2.7778 | 1000 | 5.9031 | 6.7249 | 0.8694 | - |
505
+ | 3.0556 | 1100 | 6.0803 | 6.8350 | 0.8684 | - |
506
+ | 3.3333 | 1200 | 6.0564 | 6.9703 | 0.8695 | - |
507
+ | 3.6111 | 1300 | 5.8407 | 7.3822 | 0.8707 | - |
508
+ | 3.8889 | 1400 | 5.8229 | 7.0442 | 0.8713 | - |
509
+ | 4.0 | 1440 | - | - | - | 0.8373 |
510
+
511
+
512
+ ### Environmental Impact
513
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
514
+ - **Energy Consumed**: 0.014 kWh
515
+ - **Carbon Emitted**: 0.005 kg of CO2
516
+ - **Hours Used**: 0.072 hours
517
+
518
+ ### Training Hardware
519
+ - **On Cloud**: No
520
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
521
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
522
+ - **RAM Size**: 31.78 GB
523
+
524
+ ### Framework Versions
525
+ - Python: 3.11.6
526
+ - Sentence Transformers: 3.0.0.dev0
527
+ - Transformers: 4.41.0.dev0
528
+ - PyTorch: 2.3.0+cu121
529
+ - Accelerate: 0.26.1
530
+ - Datasets: 2.18.0
531
+ - Tokenizers: 0.19.1
532
+
533
+ ## Citation
534
+
535
+ ### BibTeX
536
+
537
+ #### Sentence Transformers
538
+ ```bibtex
539
+ @inproceedings{reimers-2019-sentence-bert,
540
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
541
+ author = "Reimers, Nils and Gurevych, Iryna",
542
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
543
+ month = "11",
544
+ year = "2019",
545
+ publisher = "Association for Computational Linguistics",
546
+ url = "https://arxiv.org/abs/1908.10084",
547
+ }
548
+ ```
549
+
550
+ #### Matryoshka2dLoss
551
+ ```bibtex
552
+ @misc{li20242d,
553
+ title={2D Matryoshka Sentence Embeddings},
554
+ author={Xianming Li and Zongxi Li and Jing Li and Haoran Xie and Qing Li},
555
+ year={2024},
556
+ eprint={2402.14776},
557
+ archivePrefix={arXiv},
558
+ primaryClass={cs.CL}
559
+ }
560
+ ```
561
+
562
+ #### MatryoshkaLoss
563
+ ```bibtex
564
+ @misc{kusupati2024matryoshka,
565
+ title={Matryoshka Representation Learning},
566
+ author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
567
+ year={2024},
568
+ eprint={2205.13147},
569
+ archivePrefix={arXiv},
570
+ primaryClass={cs.LG}
571
+ }
572
+ ```
573
+
574
+ #### CoSENTLoss
575
+ ```bibtex
576
+ @online{kexuefm-8847,
577
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
578
+ author={Su Jianlin},
579
+ year={2022},
580
+ month={Jan},
581
+ url={https://kexue.fm/archives/8847},
582
+ }
583
+ ```
584
+
585
+ <!--
586
+ ## Glossary
587
+
588
+ *Clearly define terms in order to be accessible across audiences.*
589
+ -->
590
+
591
+ <!--
592
+ ## Model Card Authors
593
+
594
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
595
+ -->
596
+
597
+ <!--
598
+ ## Model Card Contact
599
+
600
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
601
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilbert-base-uncased",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertModel"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "pad_token_id": 0,
17
+ "qa_dropout": 0.1,
18
+ "seq_classif_dropout": 0.2,
19
+ "sinusoidal_pos_embds": false,
20
+ "tie_weights_": true,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.0.dev0",
23
+ "vocab_size": 30522
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.0.dev0",
4
+ "transformers": "4.41.0.dev0",
5
+ "pytorch": "2.3.0+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:b890bc9327a9b1744c0975a4f9c8e40684ef88a9df16319772c9529b83988ebe
3
+ size 265462608
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": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "mask_token": "[MASK]",
48
+ "model_max_length": 1000000000000000019884624838656,
49
+ "pad_token": "[PAD]",
50
+ "sep_token": "[SEP]",
51
+ "strip_accents": null,
52
+ "tokenize_chinese_chars": true,
53
+ "tokenizer_class": "DistilBertTokenizer",
54
+ "unk_token": "[UNK]"
55
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff