tomaarsen HF staff commited on
Commit
885e030
1 Parent(s): 0bcb6f6

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,1010 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: sentence-transformers
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - loss:MatryoshkaLoss
10
+ - loss:CoSENTLoss
11
+ base_model: distilbert/distilbert-base-uncased
12
+ metrics:
13
+ - pearson_cosine
14
+ - spearman_cosine
15
+ - pearson_manhattan
16
+ - spearman_manhattan
17
+ - pearson_euclidean
18
+ - spearman_euclidean
19
+ - pearson_dot
20
+ - spearman_dot
21
+ - pearson_max
22
+ - spearman_max
23
+ widget:
24
+ - source_sentence: The gate is yellow.
25
+ sentences:
26
+ - The gate is blue.
27
+ - The person is starting a fire.
28
+ - A woman is bungee jumping.
29
+ - source_sentence: A plane in the sky.
30
+ sentences:
31
+ - Two airplanes in the sky.
32
+ - A man is standing in the rain.
33
+ - There are two men near a wall.
34
+ - source_sentence: A woman is reading.
35
+ sentences:
36
+ - A woman is writing something.
37
+ - A woman is applying eye shadow.
38
+ - A dog and a red ball in the air.
39
+ - source_sentence: A baby is laughing.
40
+ sentences:
41
+ - The baby laughed in his car seat.
42
+ - Suicide bomber strikes in Syria
43
+ - Bangladesh Islamist execution upheld
44
+ - source_sentence: A woman is dancing.
45
+ sentences:
46
+ - A woman is dancing in railway station.
47
+ - The flag was moving in the air.
48
+ - three dogs growling On one another
49
+ pipeline_tag: sentence-similarity
50
+ co2_eq_emissions:
51
+ emissions: 7.871164130493101
52
+ energy_consumed: 0.020249867843471606
53
+ source: codecarbon
54
+ training_type: fine-tuning
55
+ on_cloud: false
56
+ cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
57
+ ram_total_size: 31.777088165283203
58
+ hours_used: 0.112
59
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
60
+ model-index:
61
+ - name: SentenceTransformer based on distilbert/distilbert-base-uncased
62
+ results:
63
+ - task:
64
+ type: semantic-similarity
65
+ name: Semantic Similarity
66
+ dataset:
67
+ name: sts dev 768
68
+ type: sts-dev-768
69
+ metrics:
70
+ - type: pearson_cosine
71
+ value: 0.8647737221000229
72
+ name: Pearson Cosine
73
+ - type: spearman_cosine
74
+ value: 0.8747521728687471
75
+ name: Spearman Cosine
76
+ - type: pearson_manhattan
77
+ value: 0.8627734228763478
78
+ name: Pearson Manhattan
79
+ - type: spearman_manhattan
80
+ value: 0.8657556253211545
81
+ name: Spearman Manhattan
82
+ - type: pearson_euclidean
83
+ value: 0.862712112144467
84
+ name: Pearson Euclidean
85
+ - type: spearman_euclidean
86
+ value: 0.8657615257280495
87
+ name: Spearman Euclidean
88
+ - type: pearson_dot
89
+ value: 0.7442745641899206
90
+ name: Pearson Dot
91
+ - type: spearman_dot
92
+ value: 0.7513830366520415
93
+ name: Spearman Dot
94
+ - type: pearson_max
95
+ value: 0.8647737221000229
96
+ name: Pearson Max
97
+ - type: spearman_max
98
+ value: 0.8747521728687471
99
+ name: Spearman Max
100
+ - task:
101
+ type: semantic-similarity
102
+ name: Semantic Similarity
103
+ dataset:
104
+ name: sts dev 512
105
+ type: sts-dev-512
106
+ metrics:
107
+ - type: pearson_cosine
108
+ value: 0.8628378541768764
109
+ name: Pearson Cosine
110
+ - type: spearman_cosine
111
+ value: 0.8741345340758229
112
+ name: Spearman Cosine
113
+ - type: pearson_manhattan
114
+ value: 0.8619744745534216
115
+ name: Pearson Manhattan
116
+ - type: spearman_manhattan
117
+ value: 0.8651450292937584
118
+ name: Spearman Manhattan
119
+ - type: pearson_euclidean
120
+ value: 0.8622841683977804
121
+ name: Pearson Euclidean
122
+ - type: spearman_euclidean
123
+ value: 0.8653280682431165
124
+ name: Spearman Euclidean
125
+ - type: pearson_dot
126
+ value: 0.746359236761633
127
+ name: Pearson Dot
128
+ - type: spearman_dot
129
+ value: 0.7540849763868891
130
+ name: Spearman Dot
131
+ - type: pearson_max
132
+ value: 0.8628378541768764
133
+ name: Pearson Max
134
+ - type: spearman_max
135
+ value: 0.8741345340758229
136
+ name: Spearman Max
137
+ - task:
138
+ type: semantic-similarity
139
+ name: Semantic Similarity
140
+ dataset:
141
+ name: sts dev 256
142
+ type: sts-dev-256
143
+ metrics:
144
+ - type: pearson_cosine
145
+ value: 0.8588975886507025
146
+ name: Pearson Cosine
147
+ - type: spearman_cosine
148
+ value: 0.8714341050301952
149
+ name: Spearman Cosine
150
+ - type: pearson_manhattan
151
+ value: 0.8590790006287132
152
+ name: Pearson Manhattan
153
+ - type: spearman_manhattan
154
+ value: 0.8634123185807864
155
+ name: Spearman Manhattan
156
+ - type: pearson_euclidean
157
+ value: 0.8591861535833625
158
+ name: Pearson Euclidean
159
+ - type: spearman_euclidean
160
+ value: 0.8628587088112977
161
+ name: Spearman Euclidean
162
+ - type: pearson_dot
163
+ value: 0.7185871795192371
164
+ name: Pearson Dot
165
+ - type: spearman_dot
166
+ value: 0.7288595287151053
167
+ name: Spearman Dot
168
+ - type: pearson_max
169
+ value: 0.8591861535833625
170
+ name: Pearson Max
171
+ - type: spearman_max
172
+ value: 0.8714341050301952
173
+ name: Spearman Max
174
+ - task:
175
+ type: semantic-similarity
176
+ name: Semantic Similarity
177
+ dataset:
178
+ name: sts dev 128
179
+ type: sts-dev-128
180
+ metrics:
181
+ - type: pearson_cosine
182
+ value: 0.8528583626543365
183
+ name: Pearson Cosine
184
+ - type: spearman_cosine
185
+ value: 0.8687502864484896
186
+ name: Spearman Cosine
187
+ - type: pearson_manhattan
188
+ value: 0.8509433708242649
189
+ name: Pearson Manhattan
190
+ - type: spearman_manhattan
191
+ value: 0.857615159782176
192
+ name: Spearman Manhattan
193
+ - type: pearson_euclidean
194
+ value: 0.8531616082767298
195
+ name: Pearson Euclidean
196
+ - type: spearman_euclidean
197
+ value: 0.8580823134153918
198
+ name: Spearman Euclidean
199
+ - type: pearson_dot
200
+ value: 0.697019210549756
201
+ name: Pearson Dot
202
+ - type: spearman_dot
203
+ value: 0.705924438927243
204
+ name: Spearman Dot
205
+ - type: pearson_max
206
+ value: 0.8531616082767298
207
+ name: Pearson Max
208
+ - type: spearman_max
209
+ value: 0.8687502864484896
210
+ name: Spearman Max
211
+ - task:
212
+ type: semantic-similarity
213
+ name: Semantic Similarity
214
+ dataset:
215
+ name: sts dev 64
216
+ type: sts-dev-64
217
+ metrics:
218
+ - type: pearson_cosine
219
+ value: 0.8340115410608493
220
+ name: Pearson Cosine
221
+ - type: spearman_cosine
222
+ value: 0.858682843519445
223
+ name: Spearman Cosine
224
+ - type: pearson_manhattan
225
+ value: 0.8351566362279711
226
+ name: Pearson Manhattan
227
+ - type: spearman_manhattan
228
+ value: 0.8445869885309296
229
+ name: Spearman Manhattan
230
+ - type: pearson_euclidean
231
+ value: 0.838674217877368
232
+ name: Pearson Euclidean
233
+ - type: spearman_euclidean
234
+ value: 0.8460894143343873
235
+ name: Spearman Euclidean
236
+ - type: pearson_dot
237
+ value: 0.6579249229659768
238
+ name: Pearson Dot
239
+ - type: spearman_dot
240
+ value: 0.6712615573330701
241
+ name: Spearman Dot
242
+ - type: pearson_max
243
+ value: 0.838674217877368
244
+ name: Pearson Max
245
+ - type: spearman_max
246
+ value: 0.858682843519445
247
+ name: Spearman Max
248
+ - task:
249
+ type: semantic-similarity
250
+ name: Semantic Similarity
251
+ dataset:
252
+ name: sts test 768
253
+ type: sts-test-768
254
+ metrics:
255
+ - type: pearson_cosine
256
+ value: 0.833720870548252
257
+ name: Pearson Cosine
258
+ - type: spearman_cosine
259
+ value: 0.8469501140979906
260
+ name: Spearman Cosine
261
+ - type: pearson_manhattan
262
+ value: 0.8484755252691695
263
+ name: Pearson Manhattan
264
+ - type: spearman_manhattan
265
+ value: 0.8470024066861298
266
+ name: Spearman Manhattan
267
+ - type: pearson_euclidean
268
+ value: 0.8492651445573072
269
+ name: Pearson Euclidean
270
+ - type: spearman_euclidean
271
+ value: 0.8475238481800537
272
+ name: Spearman Euclidean
273
+ - type: pearson_dot
274
+ value: 0.6701649984837568
275
+ name: Pearson Dot
276
+ - type: spearman_dot
277
+ value: 0.6526285131648061
278
+ name: Spearman Dot
279
+ - type: pearson_max
280
+ value: 0.8492651445573072
281
+ name: Pearson Max
282
+ - type: spearman_max
283
+ value: 0.8475238481800537
284
+ name: Spearman Max
285
+ - task:
286
+ type: semantic-similarity
287
+ name: Semantic Similarity
288
+ dataset:
289
+ name: sts test 512
290
+ type: sts-test-512
291
+ metrics:
292
+ - type: pearson_cosine
293
+ value: 0.8325595554355977
294
+ name: Pearson Cosine
295
+ - type: spearman_cosine
296
+ value: 0.8467500241650668
297
+ name: Spearman Cosine
298
+ - type: pearson_manhattan
299
+ value: 0.8474378528408064
300
+ name: Pearson Manhattan
301
+ - type: spearman_manhattan
302
+ value: 0.8462571021525837
303
+ name: Spearman Manhattan
304
+ - type: pearson_euclidean
305
+ value: 0.848182316243596
306
+ name: Pearson Euclidean
307
+ - type: spearman_euclidean
308
+ value: 0.8466275072216626
309
+ name: Spearman Euclidean
310
+ - type: pearson_dot
311
+ value: 0.6736686039338646
312
+ name: Pearson Dot
313
+ - type: spearman_dot
314
+ value: 0.6572299516736647
315
+ name: Spearman Dot
316
+ - type: pearson_max
317
+ value: 0.848182316243596
318
+ name: Pearson Max
319
+ - type: spearman_max
320
+ value: 0.8467500241650668
321
+ name: Spearman Max
322
+ - task:
323
+ type: semantic-similarity
324
+ name: Semantic Similarity
325
+ dataset:
326
+ name: sts test 256
327
+ type: sts-test-256
328
+ metrics:
329
+ - type: pearson_cosine
330
+ value: 0.8225923032714455
331
+ name: Pearson Cosine
332
+ - type: spearman_cosine
333
+ value: 0.8403145699624681
334
+ name: Spearman Cosine
335
+ - type: pearson_manhattan
336
+ value: 0.8420998942805191
337
+ name: Pearson Manhattan
338
+ - type: spearman_manhattan
339
+ value: 0.8419520394692916
340
+ name: Spearman Manhattan
341
+ - type: pearson_euclidean
342
+ value: 0.8434867831513
343
+ name: Pearson Euclidean
344
+ - type: spearman_euclidean
345
+ value: 0.8428522494561291
346
+ name: Spearman Euclidean
347
+ - type: pearson_dot
348
+ value: 0.6230179114374444
349
+ name: Pearson Dot
350
+ - type: spearman_dot
351
+ value: 0.6061595939729718
352
+ name: Spearman Dot
353
+ - type: pearson_max
354
+ value: 0.8434867831513
355
+ name: Pearson Max
356
+ - type: spearman_max
357
+ value: 0.8428522494561291
358
+ name: Spearman Max
359
+ - task:
360
+ type: semantic-similarity
361
+ name: Semantic Similarity
362
+ dataset:
363
+ name: sts test 128
364
+ type: sts-test-128
365
+ metrics:
366
+ - type: pearson_cosine
367
+ value: 0.8149976807930366
368
+ name: Pearson Cosine
369
+ - type: spearman_cosine
370
+ value: 0.8349547446101432
371
+ name: Spearman Cosine
372
+ - type: pearson_manhattan
373
+ value: 0.8351661617446753
374
+ name: Pearson Manhattan
375
+ - type: spearman_manhattan
376
+ value: 0.8360899024374612
377
+ name: Spearman Manhattan
378
+ - type: pearson_euclidean
379
+ value: 0.8375785243041524
380
+ name: Pearson Euclidean
381
+ - type: spearman_euclidean
382
+ value: 0.8375574347771609
383
+ name: Spearman Euclidean
384
+ - type: pearson_dot
385
+ value: 0.5958381414366161
386
+ name: Pearson Dot
387
+ - type: spearman_dot
388
+ value: 0.5793444545861678
389
+ name: Spearman Dot
390
+ - type: pearson_max
391
+ value: 0.8375785243041524
392
+ name: Pearson Max
393
+ - type: spearman_max
394
+ value: 0.8375574347771609
395
+ name: Spearman Max
396
+ - task:
397
+ type: semantic-similarity
398
+ name: Semantic Similarity
399
+ dataset:
400
+ name: sts test 64
401
+ type: sts-test-64
402
+ metrics:
403
+ - type: pearson_cosine
404
+ value: 0.7981336004264228
405
+ name: Pearson Cosine
406
+ - type: spearman_cosine
407
+ value: 0.8269913105115189
408
+ name: Spearman Cosine
409
+ - type: pearson_manhattan
410
+ value: 0.8238799955007295
411
+ name: Pearson Manhattan
412
+ - type: spearman_manhattan
413
+ value: 0.8289121477853545
414
+ name: Spearman Manhattan
415
+ - type: pearson_euclidean
416
+ value: 0.8278657744625194
417
+ name: Pearson Euclidean
418
+ - type: spearman_euclidean
419
+ value: 0.8314643517951371
420
+ name: Spearman Euclidean
421
+ - type: pearson_dot
422
+ value: 0.5206433480609991
423
+ name: Pearson Dot
424
+ - type: spearman_dot
425
+ value: 0.5067194535547845
426
+ name: Spearman Dot
427
+ - type: pearson_max
428
+ value: 0.8278657744625194
429
+ name: Pearson Max
430
+ - type: spearman_max
431
+ value: 0.8314643517951371
432
+ name: Spearman Max
433
+ ---
434
+
435
+ # SentenceTransformer based on distilbert/distilbert-base-uncased
436
+
437
+ 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.
438
+
439
+ ## Model Details
440
+
441
+ ### Model Description
442
+ - **Model Type:** Sentence Transformer
443
+ - **Base model:** [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) <!-- at revision 6cdc0aad91f5ae2e6712e91bc7b65d1cf5c05411 -->
444
+ - **Maximum Sequence Length:** 512 tokens
445
+ - **Output Dimensionality:** 768 tokens
446
+ - **Similarity Function:** Cosine Similarity
447
+ - **Training Dataset:**
448
+ - [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb)
449
+ - **Language:** en
450
+ <!-- - **License:** Unknown -->
451
+
452
+ ### Model Sources
453
+
454
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
455
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
456
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
457
+
458
+ ### Full Model Architecture
459
+
460
+ ```
461
+ SentenceTransformer(
462
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DistilBertModel
463
+ (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})
464
+ )
465
+ ```
466
+
467
+ ## Usage
468
+
469
+ ### Direct Usage (Sentence Transformers)
470
+
471
+ First install the Sentence Transformers library:
472
+
473
+ ```bash
474
+ pip install -U sentence-transformers
475
+ ```
476
+
477
+ Then you can load this model and run inference.
478
+ ```python
479
+ from sentence_transformers import SentenceTransformer
480
+
481
+ # Download from the 🤗 Hub
482
+ model = SentenceTransformer("sentence_transformers_model_id")
483
+ # Run inference
484
+ sentences = [
485
+ 'A woman is dancing.',
486
+ 'A woman is dancing in railway station.',
487
+ 'The flag was moving in the air.',
488
+ ]
489
+ embeddings = model.encode(sentences)
490
+ print(embeddings.shape)
491
+ # [3, 768]
492
+
493
+ # Get the similarity scores for the embeddings
494
+ similarities = model.similarity(embeddings)
495
+ print(similarities.shape)
496
+ # [3, 3]
497
+ ```
498
+
499
+ <!--
500
+ ### Direct Usage (Transformers)
501
+
502
+ <details><summary>Click to see the direct usage in Transformers</summary>
503
+
504
+ </details>
505
+ -->
506
+
507
+ <!--
508
+ ### Downstream Usage (Sentence Transformers)
509
+
510
+ You can finetune this model on your own dataset.
511
+
512
+ <details><summary>Click to expand</summary>
513
+
514
+ </details>
515
+ -->
516
+
517
+ <!--
518
+ ### Out-of-Scope Use
519
+
520
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
521
+ -->
522
+
523
+ ## Evaluation
524
+
525
+ ### Metrics
526
+
527
+ #### Semantic Similarity
528
+ * Dataset: `sts-dev-768`
529
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
530
+
531
+ | Metric | Value |
532
+ |:--------------------|:-----------|
533
+ | pearson_cosine | 0.8648 |
534
+ | **spearman_cosine** | **0.8748** |
535
+ | pearson_manhattan | 0.8628 |
536
+ | spearman_manhattan | 0.8658 |
537
+ | pearson_euclidean | 0.8627 |
538
+ | spearman_euclidean | 0.8658 |
539
+ | pearson_dot | 0.7443 |
540
+ | spearman_dot | 0.7514 |
541
+ | pearson_max | 0.8648 |
542
+ | spearman_max | 0.8748 |
543
+
544
+ #### Semantic Similarity
545
+ * Dataset: `sts-dev-512`
546
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
547
+
548
+ | Metric | Value |
549
+ |:--------------------|:-----------|
550
+ | pearson_cosine | 0.8628 |
551
+ | **spearman_cosine** | **0.8741** |
552
+ | pearson_manhattan | 0.862 |
553
+ | spearman_manhattan | 0.8651 |
554
+ | pearson_euclidean | 0.8623 |
555
+ | spearman_euclidean | 0.8653 |
556
+ | pearson_dot | 0.7464 |
557
+ | spearman_dot | 0.7541 |
558
+ | pearson_max | 0.8628 |
559
+ | spearman_max | 0.8741 |
560
+
561
+ #### Semantic Similarity
562
+ * Dataset: `sts-dev-256`
563
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
564
+
565
+ | Metric | Value |
566
+ |:--------------------|:-----------|
567
+ | pearson_cosine | 0.8589 |
568
+ | **spearman_cosine** | **0.8714** |
569
+ | pearson_manhattan | 0.8591 |
570
+ | spearman_manhattan | 0.8634 |
571
+ | pearson_euclidean | 0.8592 |
572
+ | spearman_euclidean | 0.8629 |
573
+ | pearson_dot | 0.7186 |
574
+ | spearman_dot | 0.7289 |
575
+ | pearson_max | 0.8592 |
576
+ | spearman_max | 0.8714 |
577
+
578
+ #### Semantic Similarity
579
+ * Dataset: `sts-dev-128`
580
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
581
+
582
+ | Metric | Value |
583
+ |:--------------------|:-----------|
584
+ | pearson_cosine | 0.8529 |
585
+ | **spearman_cosine** | **0.8688** |
586
+ | pearson_manhattan | 0.8509 |
587
+ | spearman_manhattan | 0.8576 |
588
+ | pearson_euclidean | 0.8532 |
589
+ | spearman_euclidean | 0.8581 |
590
+ | pearson_dot | 0.697 |
591
+ | spearman_dot | 0.7059 |
592
+ | pearson_max | 0.8532 |
593
+ | spearman_max | 0.8688 |
594
+
595
+ #### Semantic Similarity
596
+ * Dataset: `sts-dev-64`
597
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
598
+
599
+ | Metric | Value |
600
+ |:--------------------|:-----------|
601
+ | pearson_cosine | 0.834 |
602
+ | **spearman_cosine** | **0.8587** |
603
+ | pearson_manhattan | 0.8352 |
604
+ | spearman_manhattan | 0.8446 |
605
+ | pearson_euclidean | 0.8387 |
606
+ | spearman_euclidean | 0.8461 |
607
+ | pearson_dot | 0.6579 |
608
+ | spearman_dot | 0.6713 |
609
+ | pearson_max | 0.8387 |
610
+ | spearman_max | 0.8587 |
611
+
612
+ #### Semantic Similarity
613
+ * Dataset: `sts-test-768`
614
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
615
+
616
+ | Metric | Value |
617
+ |:--------------------|:----------|
618
+ | pearson_cosine | 0.8337 |
619
+ | **spearman_cosine** | **0.847** |
620
+ | pearson_manhattan | 0.8485 |
621
+ | spearman_manhattan | 0.847 |
622
+ | pearson_euclidean | 0.8493 |
623
+ | spearman_euclidean | 0.8475 |
624
+ | pearson_dot | 0.6702 |
625
+ | spearman_dot | 0.6526 |
626
+ | pearson_max | 0.8493 |
627
+ | spearman_max | 0.8475 |
628
+
629
+ #### Semantic Similarity
630
+ * Dataset: `sts-test-512`
631
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
632
+
633
+ | Metric | Value |
634
+ |:--------------------|:-----------|
635
+ | pearson_cosine | 0.8326 |
636
+ | **spearman_cosine** | **0.8468** |
637
+ | pearson_manhattan | 0.8474 |
638
+ | spearman_manhattan | 0.8463 |
639
+ | pearson_euclidean | 0.8482 |
640
+ | spearman_euclidean | 0.8466 |
641
+ | pearson_dot | 0.6737 |
642
+ | spearman_dot | 0.6572 |
643
+ | pearson_max | 0.8482 |
644
+ | spearman_max | 0.8468 |
645
+
646
+ #### Semantic Similarity
647
+ * Dataset: `sts-test-256`
648
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
649
+
650
+ | Metric | Value |
651
+ |:--------------------|:-----------|
652
+ | pearson_cosine | 0.8226 |
653
+ | **spearman_cosine** | **0.8403** |
654
+ | pearson_manhattan | 0.8421 |
655
+ | spearman_manhattan | 0.842 |
656
+ | pearson_euclidean | 0.8435 |
657
+ | spearman_euclidean | 0.8429 |
658
+ | pearson_dot | 0.623 |
659
+ | spearman_dot | 0.6062 |
660
+ | pearson_max | 0.8435 |
661
+ | spearman_max | 0.8429 |
662
+
663
+ #### Semantic Similarity
664
+ * Dataset: `sts-test-128`
665
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
666
+
667
+ | Metric | Value |
668
+ |:--------------------|:----------|
669
+ | pearson_cosine | 0.815 |
670
+ | **spearman_cosine** | **0.835** |
671
+ | pearson_manhattan | 0.8352 |
672
+ | spearman_manhattan | 0.8361 |
673
+ | pearson_euclidean | 0.8376 |
674
+ | spearman_euclidean | 0.8376 |
675
+ | pearson_dot | 0.5958 |
676
+ | spearman_dot | 0.5793 |
677
+ | pearson_max | 0.8376 |
678
+ | spearman_max | 0.8376 |
679
+
680
+ #### Semantic Similarity
681
+ * Dataset: `sts-test-64`
682
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
683
+
684
+ | Metric | Value |
685
+ |:--------------------|:----------|
686
+ | pearson_cosine | 0.7981 |
687
+ | **spearman_cosine** | **0.827** |
688
+ | pearson_manhattan | 0.8239 |
689
+ | spearman_manhattan | 0.8289 |
690
+ | pearson_euclidean | 0.8279 |
691
+ | spearman_euclidean | 0.8315 |
692
+ | pearson_dot | 0.5206 |
693
+ | spearman_dot | 0.5067 |
694
+ | pearson_max | 0.8279 |
695
+ | spearman_max | 0.8315 |
696
+
697
+ <!--
698
+ ## Bias, Risks and Limitations
699
+
700
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
701
+ -->
702
+
703
+ <!--
704
+ ### Recommendations
705
+
706
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
707
+ -->
708
+
709
+ ## Training Details
710
+
711
+ ### Training Dataset
712
+
713
+ #### sentence-transformers/stsb
714
+
715
+ * Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
716
+ * Size: 5,749 training samples
717
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
718
+ * Approximate statistics based on the first 1000 samples:
719
+ | | sentence1 | sentence2 | score |
720
+ |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
721
+ | type | string | string | float |
722
+ | 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> |
723
+ * Samples:
724
+ | sentence1 | sentence2 | score |
725
+ |:-----------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
726
+ | <code>A plane is taking off.</code> | <code>An air plane is taking off.</code> | <code>1.0</code> |
727
+ | <code>A man is playing a large flute.</code> | <code>A man is playing a flute.</code> | <code>0.76</code> |
728
+ | <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> |
729
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/losses.html#matryoshkaloss) with these parameters:
730
+ ```json
731
+ {
732
+ "loss": "CoSENTLoss",
733
+ "matryoshka_dims": [
734
+ 768,
735
+ 512,
736
+ 256,
737
+ 128,
738
+ 64
739
+ ],
740
+ "matryoshka_weights": [
741
+ 1,
742
+ 1,
743
+ 1,
744
+ 1,
745
+ 1
746
+ ],
747
+ "n_dims_per_step": -1
748
+ }
749
+ ```
750
+
751
+ ### Evaluation Dataset
752
+
753
+ #### sentence-transformers/stsb
754
+
755
+ * Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
756
+ * Size: 1,500 evaluation samples
757
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
758
+ * Approximate statistics based on the first 1000 samples:
759
+ | | sentence1 | sentence2 | score |
760
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
761
+ | type | string | string | float |
762
+ | 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> |
763
+ * Samples:
764
+ | sentence1 | sentence2 | score |
765
+ |:--------------------------------------------------|:------------------------------------------------------|:------------------|
766
+ | <code>A man with a hard hat is dancing.</code> | <code>A man wearing a hard hat is dancing.</code> | <code>1.0</code> |
767
+ | <code>A young child is riding a horse.</code> | <code>A child is riding a horse.</code> | <code>0.95</code> |
768
+ | <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> |
769
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/losses.html#matryoshkaloss) with these parameters:
770
+ ```json
771
+ {
772
+ "loss": "CoSENTLoss",
773
+ "matryoshka_dims": [
774
+ 768,
775
+ 512,
776
+ 256,
777
+ 128,
778
+ 64
779
+ ],
780
+ "matryoshka_weights": [
781
+ 1,
782
+ 1,
783
+ 1,
784
+ 1,
785
+ 1
786
+ ],
787
+ "n_dims_per_step": -1
788
+ }
789
+ ```
790
+
791
+ ### Training Hyperparameters
792
+ #### Non-Default Hyperparameters
793
+
794
+ - `eval_strategy`: steps
795
+ - `per_device_train_batch_size`: 16
796
+ - `per_device_eval_batch_size`: 16
797
+ - `num_train_epochs`: 4
798
+ - `warmup_ratio`: 0.1
799
+ - `fp16`: True
800
+
801
+ #### All Hyperparameters
802
+ <details><summary>Click to expand</summary>
803
+
804
+ - `overwrite_output_dir`: False
805
+ - `do_predict`: False
806
+ - `eval_strategy`: steps
807
+ - `prediction_loss_only`: False
808
+ - `per_device_train_batch_size`: 16
809
+ - `per_device_eval_batch_size`: 16
810
+ - `per_gpu_train_batch_size`: None
811
+ - `per_gpu_eval_batch_size`: None
812
+ - `gradient_accumulation_steps`: 1
813
+ - `eval_accumulation_steps`: None
814
+ - `learning_rate`: 5e-05
815
+ - `weight_decay`: 0.0
816
+ - `adam_beta1`: 0.9
817
+ - `adam_beta2`: 0.999
818
+ - `adam_epsilon`: 1e-08
819
+ - `max_grad_norm`: 1.0
820
+ - `num_train_epochs`: 4
821
+ - `max_steps`: -1
822
+ - `lr_scheduler_type`: linear
823
+ - `lr_scheduler_kwargs`: {}
824
+ - `warmup_ratio`: 0.1
825
+ - `warmup_steps`: 0
826
+ - `log_level`: passive
827
+ - `log_level_replica`: warning
828
+ - `log_on_each_node`: True
829
+ - `logging_nan_inf_filter`: True
830
+ - `save_safetensors`: True
831
+ - `save_on_each_node`: False
832
+ - `save_only_model`: False
833
+ - `no_cuda`: False
834
+ - `use_cpu`: False
835
+ - `use_mps_device`: False
836
+ - `seed`: 42
837
+ - `data_seed`: None
838
+ - `jit_mode_eval`: False
839
+ - `use_ipex`: False
840
+ - `bf16`: False
841
+ - `fp16`: True
842
+ - `fp16_opt_level`: O1
843
+ - `half_precision_backend`: auto
844
+ - `bf16_full_eval`: False
845
+ - `fp16_full_eval`: False
846
+ - `tf32`: None
847
+ - `local_rank`: 0
848
+ - `ddp_backend`: None
849
+ - `tpu_num_cores`: None
850
+ - `tpu_metrics_debug`: False
851
+ - `debug`: []
852
+ - `dataloader_drop_last`: False
853
+ - `dataloader_num_workers`: 0
854
+ - `dataloader_prefetch_factor`: None
855
+ - `past_index`: -1
856
+ - `disable_tqdm`: False
857
+ - `remove_unused_columns`: True
858
+ - `label_names`: None
859
+ - `load_best_model_at_end`: False
860
+ - `ignore_data_skip`: False
861
+ - `fsdp`: []
862
+ - `fsdp_min_num_params`: 0
863
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
864
+ - `fsdp_transformer_layer_cls_to_wrap`: None
865
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
866
+ - `deepspeed`: None
867
+ - `label_smoothing_factor`: 0.0
868
+ - `optim`: adamw_torch
869
+ - `optim_args`: None
870
+ - `adafactor`: False
871
+ - `group_by_length`: False
872
+ - `length_column_name`: length
873
+ - `ddp_find_unused_parameters`: None
874
+ - `ddp_bucket_cap_mb`: None
875
+ - `ddp_broadcast_buffers`: None
876
+ - `dataloader_pin_memory`: True
877
+ - `dataloader_persistent_workers`: False
878
+ - `skip_memory_metrics`: True
879
+ - `use_legacy_prediction_loop`: False
880
+ - `push_to_hub`: False
881
+ - `resume_from_checkpoint`: None
882
+ - `hub_model_id`: None
883
+ - `hub_strategy`: every_save
884
+ - `hub_private_repo`: False
885
+ - `hub_always_push`: False
886
+ - `gradient_checkpointing`: False
887
+ - `gradient_checkpointing_kwargs`: None
888
+ - `include_inputs_for_metrics`: False
889
+ - `eval_do_concat_batches`: True
890
+ - `fp16_backend`: auto
891
+ - `push_to_hub_model_id`: None
892
+ - `push_to_hub_organization`: None
893
+ - `mp_parameters`:
894
+ - `auto_find_batch_size`: False
895
+ - `full_determinism`: False
896
+ - `torchdynamo`: None
897
+ - `ray_scope`: last
898
+ - `ddp_timeout`: 1800
899
+ - `torch_compile`: False
900
+ - `torch_compile_backend`: None
901
+ - `torch_compile_mode`: None
902
+ - `dispatch_batches`: None
903
+ - `split_batches`: None
904
+ - `include_tokens_per_second`: False
905
+ - `include_num_input_tokens_seen`: False
906
+ - `neftune_noise_alpha`: None
907
+ - `optim_target_modules`: None
908
+ - `batch_sampler`: batch_sampler
909
+ - `multi_dataset_batch_sampler`: proportional
910
+
911
+ </details>
912
+
913
+ ### Training Logs
914
+ | Epoch | Step | Training Loss | loss | sts-dev-128_spearman_cosine | sts-dev-256_spearman_cosine | sts-dev-512_spearman_cosine | sts-dev-64_spearman_cosine | sts-dev-768_spearman_cosine | sts-test-128_spearman_cosine | sts-test-256_spearman_cosine | sts-test-512_spearman_cosine | sts-test-64_spearman_cosine | sts-test-768_spearman_cosine |
915
+ |:------:|:----:|:-------------:|:-------:|:---------------------------:|:---------------------------:|:---------------------------:|:--------------------------:|:---------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:---------------------------:|:----------------------------:|
916
+ | 0.2778 | 100 | 23.266 | 21.5517 | 0.8305 | 0.8355 | 0.8361 | 0.8157 | 0.8366 | - | - | - | - | - |
917
+ | 0.5556 | 200 | 21.8736 | 21.6172 | 0.8327 | 0.8388 | 0.8446 | 0.8206 | 0.8453 | - | - | - | - | - |
918
+ | 0.8333 | 300 | 21.6241 | 22.0565 | 0.8475 | 0.8538 | 0.8556 | 0.8345 | 0.8565 | - | - | - | - | - |
919
+ | 1.1111 | 400 | 21.075 | 23.6719 | 0.8545 | 0.8581 | 0.8634 | 0.8435 | 0.8644 | - | - | - | - | - |
920
+ | 1.3889 | 500 | 20.4122 | 22.5926 | 0.8592 | 0.8624 | 0.8650 | 0.8436 | 0.8656 | - | - | - | - | - |
921
+ | 1.6667 | 600 | 20.6586 | 22.5999 | 0.8514 | 0.8563 | 0.8595 | 0.8389 | 0.8597 | - | - | - | - | - |
922
+ | 1.9444 | 700 | 20.3262 | 22.2965 | 0.8582 | 0.8631 | 0.8666 | 0.8465 | 0.8667 | - | - | - | - | - |
923
+ | 2.2222 | 800 | 19.7948 | 23.1844 | 0.8621 | 0.8659 | 0.8688 | 0.8499 | 0.8694 | - | - | - | - | - |
924
+ | 2.5 | 900 | 19.2826 | 23.1351 | 0.8653 | 0.8687 | 0.8703 | 0.8547 | 0.8710 | - | - | - | - | - |
925
+ | 2.7778 | 1000 | 19.1063 | 23.7141 | 0.8641 | 0.8672 | 0.8691 | 0.8531 | 0.8695 | - | - | - | - | - |
926
+ | 3.0556 | 1100 | 19.4575 | 23.0055 | 0.8673 | 0.8702 | 0.8726 | 0.8574 | 0.8728 | - | - | - | - | - |
927
+ | 3.3333 | 1200 | 18.0727 | 24.9288 | 0.8659 | 0.8692 | 0.8715 | 0.8565 | 0.8722 | - | - | - | - | - |
928
+ | 3.6111 | 1300 | 18.1698 | 25.3114 | 0.8675 | 0.8701 | 0.8728 | 0.8576 | 0.8734 | - | - | - | - | - |
929
+ | 3.8889 | 1400 | 18.2321 | 25.3777 | 0.8688 | 0.8714 | 0.8741 | 0.8587 | 0.8748 | - | - | - | - | - |
930
+ | 4.0 | 1440 | - | - | - | - | - | - | - | 0.8350 | 0.8403 | 0.8468 | 0.8270 | 0.8470 |
931
+
932
+
933
+ ### Environmental Impact
934
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
935
+ - **Energy Consumed**: 0.020 kWh
936
+ - **Carbon Emitted**: 0.008 kg of CO2
937
+ - **Hours Used**: 0.112 hours
938
+
939
+ ### Training Hardware
940
+ - **On Cloud**: No
941
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
942
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
943
+ - **RAM Size**: 31.78 GB
944
+
945
+ ### Framework Versions
946
+ - Python: 3.11.6
947
+ - Sentence Transformers: 3.0.0.dev0
948
+ - Transformers: 4.41.0.dev0
949
+ - PyTorch: 2.3.0+cu121
950
+ - Accelerate: 0.26.1
951
+ - Datasets: 2.18.0
952
+ - Tokenizers: 0.19.1
953
+
954
+ ## Citation
955
+
956
+ ### BibTeX
957
+
958
+ #### Sentence Transformers
959
+ ```bibtex
960
+ @inproceedings{reimers-2019-sentence-bert,
961
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
962
+ author = "Reimers, Nils and Gurevych, Iryna",
963
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
964
+ month = "11",
965
+ year = "2019",
966
+ publisher = "Association for Computational Linguistics",
967
+ url = "https://arxiv.org/abs/1908.10084",
968
+ }
969
+ ```
970
+
971
+ #### MatryoshkaLoss
972
+ ```bibtex
973
+ @misc{kusupati2024matryoshka,
974
+ title={Matryoshka Representation Learning},
975
+ 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},
976
+ year={2024},
977
+ eprint={2205.13147},
978
+ archivePrefix={arXiv},
979
+ primaryClass={cs.LG}
980
+ }
981
+ ```
982
+
983
+ #### CoSENTLoss
984
+ ```bibtex
985
+ @online{kexuefm-8847,
986
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
987
+ author={Su Jianlin},
988
+ year={2022},
989
+ month={Jan},
990
+ url={https://kexue.fm/archives/8847},
991
+ }
992
+ ```
993
+
994
+ <!--
995
+ ## Glossary
996
+
997
+ *Clearly define terms in order to be accessible across audiences.*
998
+ -->
999
+
1000
+ <!--
1001
+ ## Model Card Authors
1002
+
1003
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
1004
+ -->
1005
+
1006
+ <!--
1007
+ ## Model Card Contact
1008
+
1009
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
1010
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "output\\matryoshka_sts_distilbert-base-uncased-2024-04-29_19-02-28\\final",
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:89dcd360a661db13521661871db4c52fe51b8f82f0daa18818d0be98996d2704
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,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 512,
49
+ "model_max_length": 512,
50
+ "pad_to_multiple_of": null,
51
+ "pad_token": "[PAD]",
52
+ "pad_token_type_id": 0,
53
+ "padding_side": "right",
54
+ "sep_token": "[SEP]",
55
+ "stride": 0,
56
+ "strip_accents": null,
57
+ "tokenize_chinese_chars": true,
58
+ "tokenizer_class": "DistilBertTokenizer",
59
+ "truncation_side": "right",
60
+ "truncation_strategy": "longest_first",
61
+ "unk_token": "[UNK]"
62
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff