tomaarsen HF staff commited on
Commit
fd1a504
1 Parent(s): d7d7f31

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,632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:MultipleNegativesRankingLoss
12
+ base_model: distilbert/distilroberta-base
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 writing something.
28
+ - A man helps a boy ride a bike.
29
+ - A group wading across a ditch
30
+ - source_sentence: A man shoots a man.
31
+ sentences:
32
+ - A man with a pistol shoots another man.
33
+ - Suicide bomber strikes in Syria
34
+ - China and Taiwan hold historic talks
35
+ - source_sentence: A boy is vacuuming.
36
+ sentences:
37
+ - A little boy is vacuuming the floor.
38
+ - 'Breivik: Jail term ''ridiculous'''
39
+ - Glorious triple-gold night for Britain
40
+ - source_sentence: A man is spitting.
41
+ sentences:
42
+ - A man is speaking.
43
+ - The boy is jumping into a lake.
44
+ - 10 Things to Know for Thursday
45
+ - source_sentence: A plane in the sky.
46
+ sentences:
47
+ - Two airplanes in the sky.
48
+ - Nelson Mandela undergoes surgery
49
+ - Nelson Mandela undergoes surgery
50
+ pipeline_tag: sentence-similarity
51
+ co2_eq_emissions:
52
+ emissions: 69.2573690422145
53
+ energy_consumed: 0.1781760038338226
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.626
60
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
61
+ model-index:
62
+ - name: SentenceTransformer based on distilbert/distilroberta-base
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.8395203447657347
73
+ name: Pearson Cosine
74
+ - type: spearman_cosine
75
+ value: 0.8424556124488326
76
+ name: Spearman Cosine
77
+ - type: pearson_manhattan
78
+ value: 0.8432537220190851
79
+ name: Pearson Manhattan
80
+ - type: spearman_manhattan
81
+ value: 0.8435994230515586
82
+ name: Spearman Manhattan
83
+ - type: pearson_euclidean
84
+ value: 0.8440900768179745
85
+ name: Pearson Euclidean
86
+ - type: spearman_euclidean
87
+ value: 0.8449067313707376
88
+ name: Spearman Euclidean
89
+ - type: pearson_dot
90
+ value: 0.763767029856877
91
+ name: Pearson Dot
92
+ - type: spearman_dot
93
+ value: 0.7569706383510251
94
+ name: Spearman Dot
95
+ - type: pearson_max
96
+ value: 0.8440900768179745
97
+ name: Pearson Max
98
+ - type: spearman_max
99
+ value: 0.8449067313707376
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.8186702838538092
110
+ name: Pearson Cosine
111
+ - type: spearman_cosine
112
+ value: 0.8170686920551
113
+ name: Spearman Cosine
114
+ - type: pearson_manhattan
115
+ value: 0.8117192659894803
116
+ name: Pearson Manhattan
117
+ - type: spearman_manhattan
118
+ value: 0.804879002947593
119
+ name: Spearman Manhattan
120
+ - type: pearson_euclidean
121
+ value: 0.8127154744140831
122
+ name: Pearson Euclidean
123
+ - type: spearman_euclidean
124
+ value: 0.8058410028545979
125
+ name: Spearman Euclidean
126
+ - type: pearson_dot
127
+ value: 0.7396245702595934
128
+ name: Pearson Dot
129
+ - type: spearman_dot
130
+ value: 0.7256120569318246
131
+ name: Spearman Dot
132
+ - type: pearson_max
133
+ value: 0.8186702838538092
134
+ name: Pearson Max
135
+ - type: spearman_max
136
+ value: 0.8170686920551
137
+ name: Spearman Max
138
+ ---
139
+
140
+ # SentenceTransformer based on distilbert/distilroberta-base
141
+
142
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) on the [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) 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/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) <!-- at revision fb53ab8802853c8e4fbdbcd0529f21fc6f459b2b -->
149
+ - **Maximum Sequence Length:** 512 tokens
150
+ - **Output Dimensionality:** 768 tokens
151
+ - **Similarity Function:** Cosine Similarity
152
+ - **Training Dataset:**
153
+ - [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
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: RobertaModel
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/distilroberta-base-nli-2d-matryoshka")
188
+ # Run inference
189
+ sentences = [
190
+ 'A plane in the sky.',
191
+ 'Two airplanes in the sky.',
192
+ 'Nelson Mandela undergoes surgery',
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.8395 |
239
+ | **spearman_cosine** | **0.8425** |
240
+ | pearson_manhattan | 0.8433 |
241
+ | spearman_manhattan | 0.8436 |
242
+ | pearson_euclidean | 0.8441 |
243
+ | spearman_euclidean | 0.8449 |
244
+ | pearson_dot | 0.7638 |
245
+ | spearman_dot | 0.757 |
246
+ | pearson_max | 0.8441 |
247
+ | spearman_max | 0.8449 |
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.8187 |
256
+ | **spearman_cosine** | **0.8171** |
257
+ | pearson_manhattan | 0.8117 |
258
+ | spearman_manhattan | 0.8049 |
259
+ | pearson_euclidean | 0.8127 |
260
+ | spearman_euclidean | 0.8058 |
261
+ | pearson_dot | 0.7396 |
262
+ | spearman_dot | 0.7256 |
263
+ | pearson_max | 0.8187 |
264
+ | spearman_max | 0.8171 |
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/all-nli
283
+
284
+ * Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [65dd388](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/65dd38867b600f42241d2066ba1a35fbd097fcfe)
285
+ * Size: 557,850 training samples
286
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
287
+ * Approximate statistics based on the first 1000 samples:
288
+ | | anchor | positive | negative |
289
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
290
+ | type | string | string | string |
291
+ | details | <ul><li>min: 7 tokens</li><li>mean: 10.38 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.8 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 13.4 tokens</li><li>max: 50 tokens</li></ul> |
292
+ * Samples:
293
+ | anchor | positive | negative |
294
+ |:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
295
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
296
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
297
+ | <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
298
+ * Loss: [<code>Matryoshka2dLoss</code>](https://sbert.net/docs/package_reference/losses.html#matryoshka2dloss) with these parameters:
299
+ ```json
300
+ {
301
+ "loss": "MultipleNegativesRankingLoss",
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.0 tokens</li><li>max: 44 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 14.99 tokens</li><li>max: 61 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": "MultipleNegativesRankingLoss",
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`: 128
375
+ - `per_device_eval_batch_size`: 128
376
+ - `num_train_epochs`: 1
377
+ - `warmup_ratio`: 0.1
378
+ - `fp16`: True
379
+ - `batch_sampler`: no_duplicates
380
+
381
+ #### All Hyperparameters
382
+ <details><summary>Click to expand</summary>
383
+
384
+ - `overwrite_output_dir`: False
385
+ - `do_predict`: False
386
+ - `eval_strategy`: steps
387
+ - `prediction_loss_only`: False
388
+ - `per_device_train_batch_size`: 128
389
+ - `per_device_eval_batch_size`: 128
390
+ - `per_gpu_train_batch_size`: None
391
+ - `per_gpu_eval_batch_size`: None
392
+ - `gradient_accumulation_steps`: 1
393
+ - `eval_accumulation_steps`: None
394
+ - `learning_rate`: 5e-05
395
+ - `weight_decay`: 0.0
396
+ - `adam_beta1`: 0.9
397
+ - `adam_beta2`: 0.999
398
+ - `adam_epsilon`: 1e-08
399
+ - `max_grad_norm`: 1.0
400
+ - `num_train_epochs`: 1
401
+ - `max_steps`: -1
402
+ - `lr_scheduler_type`: linear
403
+ - `lr_scheduler_kwargs`: {}
404
+ - `warmup_ratio`: 0.1
405
+ - `warmup_steps`: 0
406
+ - `log_level`: passive
407
+ - `log_level_replica`: warning
408
+ - `log_on_each_node`: True
409
+ - `logging_nan_inf_filter`: True
410
+ - `save_safetensors`: True
411
+ - `save_on_each_node`: False
412
+ - `save_only_model`: False
413
+ - `no_cuda`: False
414
+ - `use_cpu`: False
415
+ - `use_mps_device`: False
416
+ - `seed`: 42
417
+ - `data_seed`: None
418
+ - `jit_mode_eval`: False
419
+ - `use_ipex`: False
420
+ - `bf16`: False
421
+ - `fp16`: True
422
+ - `fp16_opt_level`: O1
423
+ - `half_precision_backend`: auto
424
+ - `bf16_full_eval`: False
425
+ - `fp16_full_eval`: False
426
+ - `tf32`: None
427
+ - `local_rank`: 0
428
+ - `ddp_backend`: None
429
+ - `tpu_num_cores`: None
430
+ - `tpu_metrics_debug`: False
431
+ - `debug`: []
432
+ - `dataloader_drop_last`: False
433
+ - `dataloader_num_workers`: 0
434
+ - `dataloader_prefetch_factor`: None
435
+ - `past_index`: -1
436
+ - `disable_tqdm`: False
437
+ - `remove_unused_columns`: True
438
+ - `label_names`: None
439
+ - `load_best_model_at_end`: False
440
+ - `ignore_data_skip`: False
441
+ - `fsdp`: []
442
+ - `fsdp_min_num_params`: 0
443
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
444
+ - `fsdp_transformer_layer_cls_to_wrap`: None
445
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
446
+ - `deepspeed`: None
447
+ - `label_smoothing_factor`: 0.0
448
+ - `optim`: adamw_torch
449
+ - `optim_args`: None
450
+ - `adafactor`: False
451
+ - `group_by_length`: False
452
+ - `length_column_name`: length
453
+ - `ddp_find_unused_parameters`: None
454
+ - `ddp_bucket_cap_mb`: None
455
+ - `ddp_broadcast_buffers`: None
456
+ - `dataloader_pin_memory`: True
457
+ - `dataloader_persistent_workers`: False
458
+ - `skip_memory_metrics`: True
459
+ - `use_legacy_prediction_loop`: False
460
+ - `push_to_hub`: False
461
+ - `resume_from_checkpoint`: None
462
+ - `hub_model_id`: None
463
+ - `hub_strategy`: every_save
464
+ - `hub_private_repo`: False
465
+ - `hub_always_push`: False
466
+ - `gradient_checkpointing`: False
467
+ - `gradient_checkpointing_kwargs`: None
468
+ - `include_inputs_for_metrics`: False
469
+ - `eval_do_concat_batches`: True
470
+ - `fp16_backend`: auto
471
+ - `push_to_hub_model_id`: None
472
+ - `push_to_hub_organization`: None
473
+ - `mp_parameters`:
474
+ - `auto_find_batch_size`: False
475
+ - `full_determinism`: False
476
+ - `torchdynamo`: None
477
+ - `ray_scope`: last
478
+ - `ddp_timeout`: 1800
479
+ - `torch_compile`: False
480
+ - `torch_compile_backend`: None
481
+ - `torch_compile_mode`: None
482
+ - `dispatch_batches`: None
483
+ - `split_batches`: None
484
+ - `include_tokens_per_second`: False
485
+ - `include_num_input_tokens_seen`: False
486
+ - `neftune_noise_alpha`: None
487
+ - `optim_target_modules`: None
488
+ - `batch_sampler`: no_duplicates
489
+ - `multi_dataset_batch_sampler`: proportional
490
+
491
+ </details>
492
+
493
+ ### Training Logs
494
+ | Epoch | Step | Training Loss | loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
495
+ |:------:|:----:|:-------------:|:------:|:-----------------------:|:------------------------:|
496
+ | 0.0229 | 100 | 6.2779 | 3.9959 | 0.8008 | - |
497
+ | 0.0459 | 200 | 4.3212 | 3.5818 | 0.7956 | - |
498
+ | 0.0688 | 300 | 3.7135 | 3.4422 | 0.7940 | - |
499
+ | 0.0918 | 400 | 3.5567 | 3.5458 | 0.7951 | - |
500
+ | 0.1147 | 500 | 3.1297 | 3.1253 | 0.8050 | - |
501
+ | 0.1376 | 600 | 2.7001 | 3.4366 | 0.7996 | - |
502
+ | 0.1606 | 700 | 2.8664 | 3.6609 | 0.8033 | - |
503
+ | 0.1835 | 800 | 2.6656 | 3.3736 | 0.7975 | - |
504
+ | 0.2065 | 900 | 2.633 | 3.3735 | 0.8076 | - |
505
+ | 0.2294 | 1000 | 2.4335 | 3.6499 | 0.7996 | - |
506
+ | 0.2524 | 1100 | 2.4165 | 3.6301 | 0.8015 | - |
507
+ | 0.2753 | 1200 | 2.2942 | 3.1541 | 0.7994 | - |
508
+ | 0.2982 | 1300 | 2.2402 | 3.4284 | 0.7977 | - |
509
+ | 0.3212 | 1400 | 2.2148 | 3.3775 | 0.7988 | - |
510
+ | 0.3441 | 1500 | 2.2285 | 3.6097 | 0.8016 | - |
511
+ | 0.3671 | 1600 | 2.0591 | 3.3839 | 0.7926 | - |
512
+ | 0.3900 | 1700 | 2.0253 | 3.1113 | 0.7981 | - |
513
+ | 0.4129 | 1800 | 2.0244 | 3.8289 | 0.7954 | - |
514
+ | 0.4359 | 1900 | 1.8582 | 3.3515 | 0.8000 | - |
515
+ | 0.4588 | 2000 | 1.977 | 3.3054 | 0.7917 | - |
516
+ | 0.4818 | 2100 | 1.9028 | 3.2166 | 0.7927 | - |
517
+ | 0.5047 | 2200 | 1.8316 | 3.6504 | 0.7955 | - |
518
+ | 0.5276 | 2300 | 1.8404 | 3.2822 | 0.7843 | - |
519
+ | 0.5506 | 2400 | 1.8455 | 3.2583 | 0.7941 | - |
520
+ | 0.5735 | 2500 | 1.9488 | 3.3970 | 0.7971 | - |
521
+ | 0.5965 | 2600 | 1.9403 | 2.8948 | 0.7959 | - |
522
+ | 0.6194 | 2700 | 1.8884 | 3.2227 | 0.8008 | - |
523
+ | 0.6423 | 2800 | 1.8655 | 3.1948 | 0.7920 | - |
524
+ | 0.6653 | 2900 | 1.8567 | 3.4374 | 0.7913 | - |
525
+ | 0.6882 | 3000 | 1.8423 | 3.1118 | 0.7949 | - |
526
+ | 0.7112 | 3100 | 1.7475 | 3.1359 | 0.8062 | - |
527
+ | 0.7341 | 3200 | 1.8166 | 2.9927 | 0.7984 | - |
528
+ | 0.7571 | 3300 | 1.5626 | 3.5143 | 0.8405 | - |
529
+ | 0.7800 | 3400 | 1.2038 | 3.3909 | 0.8411 | - |
530
+ | 0.8029 | 3500 | 1.1579 | 3.2458 | 0.8413 | - |
531
+ | 0.8259 | 3600 | 1.0978 | 3.1592 | 0.8404 | - |
532
+ | 0.8488 | 3700 | 1.0283 | 2.9557 | 0.8408 | - |
533
+ | 0.8718 | 3800 | 0.9993 | 3.4073 | 0.8430 | - |
534
+ | 0.8947 | 3900 | 0.9727 | 3.0570 | 0.8434 | - |
535
+ | 0.9176 | 4000 | 0.9692 | 2.9357 | 0.8439 | - |
536
+ | 0.9406 | 4100 | 0.9412 | 2.9494 | 0.8428 | - |
537
+ | 0.9635 | 4200 | 1.0063 | 3.4047 | 0.8422 | - |
538
+ | 0.9865 | 4300 | 0.9678 | 3.4299 | 0.8425 | - |
539
+ | 1.0 | 4359 | - | - | - | 0.8171 |
540
+
541
+
542
+ ### Environmental Impact
543
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
544
+ - **Energy Consumed**: 0.178 kWh
545
+ - **Carbon Emitted**: 0.069 kg of CO2
546
+ - **Hours Used**: 0.626 hours
547
+
548
+ ### Training Hardware
549
+ - **On Cloud**: No
550
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
551
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
552
+ - **RAM Size**: 31.78 GB
553
+
554
+ ### Framework Versions
555
+ - Python: 3.11.6
556
+ - Sentence Transformers: 3.0.0.dev0
557
+ - Transformers: 4.41.0.dev0
558
+ - PyTorch: 2.3.0+cu121
559
+ - Accelerate: 0.26.1
560
+ - Datasets: 2.18.0
561
+ - Tokenizers: 0.19.1
562
+
563
+ ## Citation
564
+
565
+ ### BibTeX
566
+
567
+ #### Sentence Transformers
568
+ ```bibtex
569
+ @inproceedings{reimers-2019-sentence-bert,
570
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
571
+ author = "Reimers, Nils and Gurevych, Iryna",
572
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
573
+ month = "11",
574
+ year = "2019",
575
+ publisher = "Association for Computational Linguistics",
576
+ url = "https://arxiv.org/abs/1908.10084",
577
+ }
578
+ ```
579
+
580
+ #### Matryoshka2dLoss
581
+ ```bibtex
582
+ @misc{li20242d,
583
+ title={2D Matryoshka Sentence Embeddings},
584
+ author={Xianming Li and Zongxi Li and Jing Li and Haoran Xie and Qing Li},
585
+ year={2024},
586
+ eprint={2402.14776},
587
+ archivePrefix={arXiv},
588
+ primaryClass={cs.CL}
589
+ }
590
+ ```
591
+
592
+ #### MatryoshkaLoss
593
+ ```bibtex
594
+ @misc{kusupati2024matryoshka,
595
+ title={Matryoshka Representation Learning},
596
+ 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},
597
+ year={2024},
598
+ eprint={2205.13147},
599
+ archivePrefix={arXiv},
600
+ primaryClass={cs.LG}
601
+ }
602
+ ```
603
+
604
+ #### MultipleNegativesRankingLoss
605
+ ```bibtex
606
+ @misc{henderson2017efficient,
607
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
608
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
609
+ year={2017},
610
+ eprint={1705.00652},
611
+ archivePrefix={arXiv},
612
+ primaryClass={cs.CL}
613
+ }
614
+ ```
615
+
616
+ <!--
617
+ ## Glossary
618
+
619
+ *Clearly define terms in order to be accessible across audiences.*
620
+ -->
621
+
622
+ <!--
623
+ ## Model Card Authors
624
+
625
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
626
+ -->
627
+
628
+ <!--
629
+ ## Model Card Contact
630
+
631
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
632
+ -->
config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilroberta-base",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "roberta",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 6,
20
+ "pad_token_id": 1,
21
+ "position_embedding_type": "absolute",
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.41.0.dev0",
24
+ "type_vocab_size": 1,
25
+ "use_cache": true,
26
+ "vocab_size": 50265
27
+ }
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
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:026cf20a013db893d3e033405596fd55842b46bd57cb057c0317d713299c7d45
3
+ size 328485128
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,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": {
6
+ "content": "<mask>",
7
+ "lstrip": true,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "pad_token": "<pad>",
13
+ "sep_token": "</s>",
14
+ "unk_token": "<unk>"
15
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "50264": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "bos_token": "<s>",
46
+ "clean_up_tokenization_spaces": true,
47
+ "cls_token": "<s>",
48
+ "eos_token": "</s>",
49
+ "errors": "replace",
50
+ "mask_token": "<mask>",
51
+ "model_max_length": 512,
52
+ "pad_token": "<pad>",
53
+ "sep_token": "</s>",
54
+ "tokenizer_class": "RobertaTokenizer",
55
+ "trim_offsets": true,
56
+ "unk_token": "<unk>"
57
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff