tomaarsen HF Staff commited on
Commit
ed48493
·
verified ·
1 Parent(s): e620aec

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,692 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:557850
10
+ - loss:MatryoshkaLoss
11
+ - loss:MultipleNegativesRankingLoss
12
+ base_model: microsoft/mpnet-base
13
+ widget:
14
+ - source_sentence: A man is jumping unto his filthy bed.
15
+ sentences:
16
+ - A young male is looking at a newspaper while 2 females walks past him.
17
+ - The bed is dirty.
18
+ - The man is on the moon.
19
+ - source_sentence: A carefully balanced male stands on one foot near a clean ocean
20
+ beach area.
21
+ sentences:
22
+ - A man is ouside near the beach.
23
+ - Three policemen patrol the streets on bikes
24
+ - A man is sitting on his couch.
25
+ - source_sentence: The man is wearing a blue shirt.
26
+ sentences:
27
+ - Near the trashcan the man stood and smoked
28
+ - A man in a blue shirt leans on a wall beside a road with a blue van and red car
29
+ with water in the background.
30
+ - A man in a black shirt is playing a guitar.
31
+ - source_sentence: The girls are outdoors.
32
+ sentences:
33
+ - Two girls riding on an amusement part ride.
34
+ - a guy laughs while doing laundry
35
+ - Three girls are standing together in a room, one is listening, one is writing
36
+ on a wall and the third is talking to them.
37
+ - source_sentence: A construction worker peeking out of a manhole while his coworker
38
+ sits on the sidewalk smiling.
39
+ sentences:
40
+ - A worker is looking out of a manhole.
41
+ - A man is giving a presentation.
42
+ - The workers are both inside the manhole.
43
+ datasets:
44
+ - sentence-transformers/all-nli
45
+ pipeline_tag: sentence-similarity
46
+ library_name: sentence-transformers
47
+ metrics:
48
+ - pearson_cosine
49
+ - spearman_cosine
50
+ co2_eq_emissions:
51
+ emissions: 205.739032893975
52
+ energy_consumed: 0.5292975927419334
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: 2.452
59
+ hardware_used: 1 x NVIDIA GeForce RTX 3090
60
+ model-index:
61
+ - name: SentenceTransformer based on microsoft/mpnet-base
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.8427806843466507
72
+ name: Pearson Cosine
73
+ - type: spearman_cosine
74
+ value: 0.8508672705970183
75
+ name: Spearman Cosine
76
+ - task:
77
+ type: semantic-similarity
78
+ name: Semantic Similarity
79
+ dataset:
80
+ name: sts dev 512
81
+ type: sts-dev-512
82
+ metrics:
83
+ - type: pearson_cosine
84
+ value: 0.8402650019702758
85
+ name: Pearson Cosine
86
+ - type: spearman_cosine
87
+ value: 0.8492501196021981
88
+ name: Spearman Cosine
89
+ - task:
90
+ type: semantic-similarity
91
+ name: Semantic Similarity
92
+ dataset:
93
+ name: sts dev 256
94
+ type: sts-dev-256
95
+ metrics:
96
+ - type: pearson_cosine
97
+ value: 0.8346871892249894
98
+ name: Pearson Cosine
99
+ - type: spearman_cosine
100
+ value: 0.8462852114011874
101
+ name: Spearman Cosine
102
+ - task:
103
+ type: semantic-similarity
104
+ name: Semantic Similarity
105
+ dataset:
106
+ name: sts dev 128
107
+ type: sts-dev-128
108
+ metrics:
109
+ - type: pearson_cosine
110
+ value: 0.8258126981506843
111
+ name: Pearson Cosine
112
+ - type: spearman_cosine
113
+ value: 0.8396442287070809
114
+ name: Spearman Cosine
115
+ - task:
116
+ type: semantic-similarity
117
+ name: Semantic Similarity
118
+ dataset:
119
+ name: sts dev 64
120
+ type: sts-dev-64
121
+ metrics:
122
+ - type: pearson_cosine
123
+ value: 0.8133510090549183
124
+ name: Pearson Cosine
125
+ - type: spearman_cosine
126
+ value: 0.8314093123007742
127
+ name: Spearman Cosine
128
+ - task:
129
+ type: semantic-similarity
130
+ name: Semantic Similarity
131
+ dataset:
132
+ name: sts test 768
133
+ type: sts-test-768
134
+ metrics:
135
+ - type: pearson_cosine
136
+ value: 0.8189065344720828
137
+ name: Pearson Cosine
138
+ - type: spearman_cosine
139
+ value: 0.8358553875433253
140
+ name: Spearman Cosine
141
+ - task:
142
+ type: semantic-similarity
143
+ name: Semantic Similarity
144
+ dataset:
145
+ name: sts test 512
146
+ type: sts-test-512
147
+ metrics:
148
+ - type: pearson_cosine
149
+ value: 0.8185683063331012
150
+ name: Pearson Cosine
151
+ - type: spearman_cosine
152
+ value: 0.8361687236813662
153
+ name: Spearman Cosine
154
+ - task:
155
+ type: semantic-similarity
156
+ name: Semantic Similarity
157
+ dataset:
158
+ name: sts test 256
159
+ type: sts-test-256
160
+ metrics:
161
+ - type: pearson_cosine
162
+ value: 0.8129602938883278
163
+ name: Pearson Cosine
164
+ - type: spearman_cosine
165
+ value: 0.8332021961323041
166
+ name: Spearman Cosine
167
+ - task:
168
+ type: semantic-similarity
169
+ name: Semantic Similarity
170
+ dataset:
171
+ name: sts test 128
172
+ type: sts-test-128
173
+ metrics:
174
+ - type: pearson_cosine
175
+ value: 0.8030325360463209
176
+ name: Pearson Cosine
177
+ - type: spearman_cosine
178
+ value: 0.826154869627039
179
+ name: Spearman Cosine
180
+ - task:
181
+ type: semantic-similarity
182
+ name: Semantic Similarity
183
+ dataset:
184
+ name: sts test 64
185
+ type: sts-test-64
186
+ metrics:
187
+ - type: pearson_cosine
188
+ value: 0.7903762214352186
189
+ name: Pearson Cosine
190
+ - type: spearman_cosine
191
+ value: 0.8193971659006509
192
+ name: Spearman Cosine
193
+ ---
194
+
195
+ # SentenceTransformer based on microsoft/mpnet-base
196
+
197
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) on the [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.
198
+
199
+ ## Model Details
200
+
201
+ ### Model Description
202
+ - **Model Type:** Sentence Transformer
203
+ - **Base model:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) <!-- at revision 6996ce1e91bd2a9c7d7f61daec37463394f73f09 -->
204
+ - **Maximum Sequence Length:** 512 tokens
205
+ - **Output Dimensionality:** 768 dimensions
206
+ - **Similarity Function:** Cosine Similarity
207
+ - **Training Dataset:**
208
+ - [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
209
+ - **Language:** en
210
+ <!-- - **License:** Unknown -->
211
+
212
+ ### Model Sources
213
+
214
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
215
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
216
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
217
+
218
+ ### Full Model Architecture
219
+
220
+ ```
221
+ SentenceTransformer(
222
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
223
+ (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})
224
+ )
225
+ ```
226
+
227
+ ## Usage
228
+
229
+ ### Direct Usage (Sentence Transformers)
230
+
231
+ First install the Sentence Transformers library:
232
+
233
+ ```bash
234
+ pip install -U sentence-transformers
235
+ ```
236
+
237
+ Then you can load this model and run inference.
238
+ ```python
239
+ from sentence_transformers import SentenceTransformer
240
+
241
+ # Download from the 🤗 Hub
242
+ model = SentenceTransformer("tomaarsen/mpnet-base-nli-matryoshka-reproduced")
243
+ # Run inference
244
+ sentences = [
245
+ 'A construction worker peeking out of a manhole while his coworker sits on the sidewalk smiling.',
246
+ 'A worker is looking out of a manhole.',
247
+ 'The workers are both inside the manhole.',
248
+ ]
249
+ embeddings = model.encode(sentences)
250
+ print(embeddings.shape)
251
+ # [3, 768]
252
+
253
+ # Get the similarity scores for the embeddings
254
+ similarities = model.similarity(embeddings, embeddings)
255
+ print(similarities.shape)
256
+ # [3, 3]
257
+ ```
258
+
259
+ <!--
260
+ ### Direct Usage (Transformers)
261
+
262
+ <details><summary>Click to see the direct usage in Transformers</summary>
263
+
264
+ </details>
265
+ -->
266
+
267
+ <!--
268
+ ### Downstream Usage (Sentence Transformers)
269
+
270
+ You can finetune this model on your own dataset.
271
+
272
+ <details><summary>Click to expand</summary>
273
+
274
+ </details>
275
+ -->
276
+
277
+ <!--
278
+ ### Out-of-Scope Use
279
+
280
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
281
+ -->
282
+
283
+ ## Evaluation
284
+
285
+ ### Metrics
286
+
287
+ #### Semantic Similarity
288
+
289
+ * Datasets: `sts-dev-768` and `sts-test-768`
290
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) with these parameters:
291
+ ```json
292
+ {
293
+ "truncate_dim": 768
294
+ }
295
+ ```
296
+
297
+ | Metric | sts-dev-768 | sts-test-768 |
298
+ |:--------------------|:------------|:-------------|
299
+ | pearson_cosine | 0.8428 | 0.8189 |
300
+ | **spearman_cosine** | **0.8509** | **0.8359** |
301
+
302
+ #### Semantic Similarity
303
+
304
+ * Datasets: `sts-dev-512` and `sts-test-512`
305
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) with these parameters:
306
+ ```json
307
+ {
308
+ "truncate_dim": 512
309
+ }
310
+ ```
311
+
312
+ | Metric | sts-dev-512 | sts-test-512 |
313
+ |:--------------------|:------------|:-------------|
314
+ | pearson_cosine | 0.8403 | 0.8186 |
315
+ | **spearman_cosine** | **0.8493** | **0.8362** |
316
+
317
+ #### Semantic Similarity
318
+
319
+ * Datasets: `sts-dev-256` and `sts-test-256`
320
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) with these parameters:
321
+ ```json
322
+ {
323
+ "truncate_dim": 256
324
+ }
325
+ ```
326
+
327
+ | Metric | sts-dev-256 | sts-test-256 |
328
+ |:--------------------|:------------|:-------------|
329
+ | pearson_cosine | 0.8347 | 0.813 |
330
+ | **spearman_cosine** | **0.8463** | **0.8332** |
331
+
332
+ #### Semantic Similarity
333
+
334
+ * Datasets: `sts-dev-128` and `sts-test-128`
335
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) with these parameters:
336
+ ```json
337
+ {
338
+ "truncate_dim": 128
339
+ }
340
+ ```
341
+
342
+ | Metric | sts-dev-128 | sts-test-128 |
343
+ |:--------------------|:------------|:-------------|
344
+ | pearson_cosine | 0.8258 | 0.803 |
345
+ | **spearman_cosine** | **0.8396** | **0.8262** |
346
+
347
+ #### Semantic Similarity
348
+
349
+ * Datasets: `sts-dev-64` and `sts-test-64`
350
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator) with these parameters:
351
+ ```json
352
+ {
353
+ "truncate_dim": 64
354
+ }
355
+ ```
356
+
357
+ | Metric | sts-dev-64 | sts-test-64 |
358
+ |:--------------------|:-----------|:------------|
359
+ | pearson_cosine | 0.8134 | 0.7904 |
360
+ | **spearman_cosine** | **0.8314** | **0.8194** |
361
+
362
+ <!--
363
+ ## Bias, Risks and Limitations
364
+
365
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
366
+ -->
367
+
368
+ <!--
369
+ ### Recommendations
370
+
371
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
372
+ -->
373
+
374
+ ## Training Details
375
+
376
+ ### Training Dataset
377
+
378
+ #### all-nli
379
+
380
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
381
+ * Size: 557,850 training samples
382
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
383
+ * Approximate statistics based on the first 1000 samples:
384
+ | | anchor | positive | negative |
385
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
386
+ | type | string | string | string |
387
+ | details | <ul><li>min: 7 tokens</li><li>mean: 10.46 tokens</li><li>max: 46 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.81 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.4 tokens</li><li>max: 50 tokens</li></ul> |
388
+ * Samples:
389
+ | anchor | positive | negative |
390
+ |:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
391
+ | <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> |
392
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
393
+ | <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> |
394
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
395
+ ```json
396
+ {
397
+ "loss": "MultipleNegativesRankingLoss",
398
+ "matryoshka_dims": [
399
+ 768,
400
+ 512,
401
+ 256,
402
+ 128,
403
+ 64
404
+ ],
405
+ "matryoshka_weights": [
406
+ 1,
407
+ 1,
408
+ 1,
409
+ 1,
410
+ 1
411
+ ],
412
+ "n_dims_per_step": -1
413
+ }
414
+ ```
415
+
416
+ ### Evaluation Dataset
417
+
418
+ #### all-nli
419
+
420
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
421
+ * Size: 6,584 evaluation samples
422
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
423
+ * Approximate statistics based on the first 1000 samples:
424
+ | | anchor | positive | negative |
425
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
426
+ | type | string | string | string |
427
+ | details | <ul><li>min: 6 tokens</li><li>mean: 17.95 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.78 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.35 tokens</li><li>max: 29 tokens</li></ul> |
428
+ * Samples:
429
+ | anchor | positive | negative |
430
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
431
+ | <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
432
+ | <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
433
+ | <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
434
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
435
+ ```json
436
+ {
437
+ "loss": "MultipleNegativesRankingLoss",
438
+ "matryoshka_dims": [
439
+ 768,
440
+ 512,
441
+ 256,
442
+ 128,
443
+ 64
444
+ ],
445
+ "matryoshka_weights": [
446
+ 1,
447
+ 1,
448
+ 1,
449
+ 1,
450
+ 1
451
+ ],
452
+ "n_dims_per_step": -1
453
+ }
454
+ ```
455
+
456
+ ### Training Hyperparameters
457
+ #### Non-Default Hyperparameters
458
+
459
+ - `eval_strategy`: steps
460
+ - `per_device_train_batch_size`: 16
461
+ - `per_device_eval_batch_size`: 16
462
+ - `num_train_epochs`: 1
463
+ - `warmup_ratio`: 0.1
464
+ - `fp16`: True
465
+ - `batch_sampler`: no_duplicates
466
+
467
+ #### All Hyperparameters
468
+ <details><summary>Click to expand</summary>
469
+
470
+ - `overwrite_output_dir`: False
471
+ - `do_predict`: False
472
+ - `eval_strategy`: steps
473
+ - `prediction_loss_only`: True
474
+ - `per_device_train_batch_size`: 16
475
+ - `per_device_eval_batch_size`: 16
476
+ - `per_gpu_train_batch_size`: None
477
+ - `per_gpu_eval_batch_size`: None
478
+ - `gradient_accumulation_steps`: 1
479
+ - `eval_accumulation_steps`: None
480
+ - `torch_empty_cache_steps`: None
481
+ - `learning_rate`: 5e-05
482
+ - `weight_decay`: 0.0
483
+ - `adam_beta1`: 0.9
484
+ - `adam_beta2`: 0.999
485
+ - `adam_epsilon`: 1e-08
486
+ - `max_grad_norm`: 1.0
487
+ - `num_train_epochs`: 1
488
+ - `max_steps`: -1
489
+ - `lr_scheduler_type`: linear
490
+ - `lr_scheduler_kwargs`: {}
491
+ - `warmup_ratio`: 0.1
492
+ - `warmup_steps`: 0
493
+ - `log_level`: passive
494
+ - `log_level_replica`: warning
495
+ - `log_on_each_node`: True
496
+ - `logging_nan_inf_filter`: True
497
+ - `save_safetensors`: True
498
+ - `save_on_each_node`: False
499
+ - `save_only_model`: False
500
+ - `restore_callback_states_from_checkpoint`: False
501
+ - `no_cuda`: False
502
+ - `use_cpu`: False
503
+ - `use_mps_device`: False
504
+ - `seed`: 42
505
+ - `data_seed`: None
506
+ - `jit_mode_eval`: False
507
+ - `use_ipex`: False
508
+ - `bf16`: False
509
+ - `fp16`: True
510
+ - `fp16_opt_level`: O1
511
+ - `half_precision_backend`: auto
512
+ - `bf16_full_eval`: False
513
+ - `fp16_full_eval`: False
514
+ - `tf32`: None
515
+ - `local_rank`: 0
516
+ - `ddp_backend`: None
517
+ - `tpu_num_cores`: None
518
+ - `tpu_metrics_debug`: False
519
+ - `debug`: []
520
+ - `dataloader_drop_last`: False
521
+ - `dataloader_num_workers`: 0
522
+ - `dataloader_prefetch_factor`: None
523
+ - `past_index`: -1
524
+ - `disable_tqdm`: False
525
+ - `remove_unused_columns`: True
526
+ - `label_names`: None
527
+ - `load_best_model_at_end`: False
528
+ - `ignore_data_skip`: False
529
+ - `fsdp`: []
530
+ - `fsdp_min_num_params`: 0
531
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
532
+ - `tp_size`: 0
533
+ - `fsdp_transformer_layer_cls_to_wrap`: None
534
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
535
+ - `deepspeed`: None
536
+ - `label_smoothing_factor`: 0.0
537
+ - `optim`: adamw_torch
538
+ - `optim_args`: None
539
+ - `adafactor`: False
540
+ - `group_by_length`: False
541
+ - `length_column_name`: length
542
+ - `ddp_find_unused_parameters`: None
543
+ - `ddp_bucket_cap_mb`: None
544
+ - `ddp_broadcast_buffers`: False
545
+ - `dataloader_pin_memory`: True
546
+ - `dataloader_persistent_workers`: False
547
+ - `skip_memory_metrics`: True
548
+ - `use_legacy_prediction_loop`: False
549
+ - `push_to_hub`: False
550
+ - `resume_from_checkpoint`: None
551
+ - `hub_model_id`: None
552
+ - `hub_strategy`: every_save
553
+ - `hub_private_repo`: None
554
+ - `hub_always_push`: False
555
+ - `gradient_checkpointing`: False
556
+ - `gradient_checkpointing_kwargs`: None
557
+ - `include_inputs_for_metrics`: False
558
+ - `include_for_metrics`: []
559
+ - `eval_do_concat_batches`: True
560
+ - `fp16_backend`: auto
561
+ - `push_to_hub_model_id`: None
562
+ - `push_to_hub_organization`: None
563
+ - `mp_parameters`:
564
+ - `auto_find_batch_size`: False
565
+ - `full_determinism`: False
566
+ - `torchdynamo`: None
567
+ - `ray_scope`: last
568
+ - `ddp_timeout`: 1800
569
+ - `torch_compile`: False
570
+ - `torch_compile_backend`: None
571
+ - `torch_compile_mode`: None
572
+ - `include_tokens_per_second`: False
573
+ - `include_num_input_tokens_seen`: False
574
+ - `neftune_noise_alpha`: None
575
+ - `optim_target_modules`: None
576
+ - `batch_eval_metrics`: False
577
+ - `eval_on_start`: False
578
+ - `use_liger_kernel`: False
579
+ - `eval_use_gather_object`: False
580
+ - `average_tokens_across_devices`: False
581
+ - `prompts`: None
582
+ - `batch_sampler`: no_duplicates
583
+ - `multi_dataset_batch_sampler`: proportional
584
+
585
+ </details>
586
+
587
+ ### Training Logs
588
+ | Epoch | Step | Training Loss | Validation Loss | sts-dev-768_spearman_cosine | sts-dev-512_spearman_cosine | sts-dev-256_spearman_cosine | sts-dev-128_spearman_cosine | sts-dev-64_spearman_cosine | sts-test-768_spearman_cosine | sts-test-512_spearman_cosine | sts-test-256_spearman_cosine | sts-test-128_spearman_cosine | sts-test-64_spearman_cosine |
589
+ |:------:|:-----:|:-------------:|:---------------:|:---------------------------:|:---------------------------:|:---------------------------:|:---------------------------:|:--------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:---------------------------:|
590
+ | 0.0459 | 1600 | 4.3243 | 1.5267 | 0.8525 | 0.8475 | 0.8438 | 0.8356 | 0.8155 | - | - | - | - | - |
591
+ | 0.0918 | 3200 | 2.4538 | 1.4448 | 0.8479 | 0.8439 | 0.8403 | 0.8346 | 0.8249 | - | - | - | - | - |
592
+ | 0.1377 | 4800 | 2.2829 | 1.5117 | 0.8507 | 0.8481 | 0.8429 | 0.8348 | 0.8203 | - | - | - | - | - |
593
+ | 0.1836 | 6400 | 2.0446 | 1.2684 | 0.8574 | 0.8541 | 0.8498 | 0.8413 | 0.8302 | - | - | - | - | - |
594
+ | 0.2294 | 8000 | 1.8867 | 1.3107 | 0.8452 | 0.8423 | 0.8400 | 0.8352 | 0.8255 | - | - | - | - | - |
595
+ | 0.2753 | 9600 | 1.747 | 1.1663 | 0.8456 | 0.8420 | 0.8384 | 0.8292 | 0.8229 | - | - | - | - | - |
596
+ | 0.3212 | 11200 | 1.6297 | 1.0809 | 0.8420 | 0.8388 | 0.8360 | 0.8294 | 0.8205 | - | - | - | - | - |
597
+ | 0.3671 | 12800 | 1.5974 | 1.0853 | 0.8374 | 0.8352 | 0.8310 | 0.8264 | 0.8184 | - | - | - | - | - |
598
+ | 0.4130 | 14400 | 1.5227 | 1.0440 | 0.8479 | 0.8457 | 0.8434 | 0.8380 | 0.8266 | - | - | - | - | - |
599
+ | 0.4589 | 16000 | 1.3835 | 1.0718 | 0.8365 | 0.8341 | 0.8310 | 0.8258 | 0.8172 | - | - | - | - | - |
600
+ | 0.5048 | 17600 | 1.3893 | 1.0140 | 0.8384 | 0.8363 | 0.8339 | 0.8275 | 0.8178 | - | - | - | - | - |
601
+ | 0.5507 | 19200 | 1.3203 | 1.0048 | 0.8418 | 0.8400 | 0.8364 | 0.8292 | 0.8204 | - | - | - | - | - |
602
+ | 0.5966 | 20800 | 1.2396 | 0.9407 | 0.8458 | 0.8439 | 0.8404 | 0.8353 | 0.8274 | - | - | - | - | - |
603
+ | 0.6425 | 22400 | 1.1842 | 0.9541 | 0.8435 | 0.8404 | 0.8384 | 0.8335 | 0.8257 | - | - | - | - | - |
604
+ | 0.6883 | 24000 | 1.1217 | 0.9000 | 0.8534 | 0.8512 | 0.8478 | 0.8408 | 0.8297 | - | - | - | - | - |
605
+ | 0.7342 | 25600 | 1.093 | 0.8731 | 0.8525 | 0.8503 | 0.8467 | 0.8406 | 0.8313 | - | - | - | - | - |
606
+ | 0.7801 | 27200 | 1.0609 | 0.8238 | 0.8528 | 0.8510 | 0.8469 | 0.8399 | 0.8312 | - | - | - | - | - |
607
+ | 0.8260 | 28800 | 0.9807 | 0.8264 | 0.8497 | 0.8478 | 0.8448 | 0.8384 | 0.8295 | - | - | - | - | - |
608
+ | 0.8719 | 30400 | 1.0061 | 0.8135 | 0.8455 | 0.8439 | 0.8405 | 0.8338 | 0.8256 | - | - | - | - | - |
609
+ | 0.9178 | 32000 | 0.9724 | 0.7965 | 0.8517 | 0.8499 | 0.8465 | 0.8401 | 0.8319 | - | - | - | - | - |
610
+ | 0.9637 | 33600 | 0.9057 | 0.7841 | 0.8509 | 0.8493 | 0.8463 | 0.8396 | 0.8314 | - | - | - | - | - |
611
+ | -1 | -1 | - | - | - | - | - | - | - | 0.8359 | 0.8362 | 0.8332 | 0.8262 | 0.8194 |
612
+
613
+
614
+ ### Environmental Impact
615
+ Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
616
+ - **Energy Consumed**: 0.529 kWh
617
+ - **Carbon Emitted**: 0.206 kg of CO2
618
+ - **Hours Used**: 2.452 hours
619
+
620
+ ### Training Hardware
621
+ - **On Cloud**: No
622
+ - **GPU Model**: 1 x NVIDIA GeForce RTX 3090
623
+ - **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
624
+ - **RAM Size**: 31.78 GB
625
+
626
+ ### Framework Versions
627
+ - Python: 3.11.6
628
+ - Sentence Transformers: 4.1.0.dev0
629
+ - Transformers: 4.51.1
630
+ - PyTorch: 2.6.0+cu124
631
+ - Accelerate: 1.5.1
632
+ - Datasets: 3.3.2
633
+ - Tokenizers: 0.21.1
634
+
635
+ ## Citation
636
+
637
+ ### BibTeX
638
+
639
+ #### Sentence Transformers
640
+ ```bibtex
641
+ @inproceedings{reimers-2019-sentence-bert,
642
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
643
+ author = "Reimers, Nils and Gurevych, Iryna",
644
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
645
+ month = "11",
646
+ year = "2019",
647
+ publisher = "Association for Computational Linguistics",
648
+ url = "https://arxiv.org/abs/1908.10084",
649
+ }
650
+ ```
651
+
652
+ #### MatryoshkaLoss
653
+ ```bibtex
654
+ @misc{kusupati2024matryoshka,
655
+ title={Matryoshka Representation Learning},
656
+ 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},
657
+ year={2024},
658
+ eprint={2205.13147},
659
+ archivePrefix={arXiv},
660
+ primaryClass={cs.LG}
661
+ }
662
+ ```
663
+
664
+ #### MultipleNegativesRankingLoss
665
+ ```bibtex
666
+ @misc{henderson2017efficient,
667
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
668
+ 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},
669
+ year={2017},
670
+ eprint={1705.00652},
671
+ archivePrefix={arXiv},
672
+ primaryClass={cs.CL}
673
+ }
674
+ ```
675
+
676
+ <!--
677
+ ## Glossary
678
+
679
+ *Clearly define terms in order to be accessible across audiences.*
680
+ -->
681
+
682
+ <!--
683
+ ## Model Card Authors
684
+
685
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
686
+ -->
687
+
688
+ <!--
689
+ ## Model Card Contact
690
+
691
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
692
+ -->
config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MPNetModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-05,
14
+ "max_position_embeddings": 514,
15
+ "model_type": "mpnet",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 1,
19
+ "relative_attention_num_buckets": 32,
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.51.1",
22
+ "vocab_size": 30527
23
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.1.0.dev0",
4
+ "transformers": "4.51.1",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f9ae885f211bb899aba131650508fc53fa73eed9c2d92a72be690d0279d73fc
3
+ size 437967672
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,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "104": {
36
+ "content": "[UNK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "30526": {
44
+ "content": "<mask>",
45
+ "lstrip": true,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ }
51
+ },
52
+ "bos_token": "<s>",
53
+ "clean_up_tokenization_spaces": false,
54
+ "cls_token": "<s>",
55
+ "do_lower_case": true,
56
+ "eos_token": "</s>",
57
+ "extra_special_tokens": {},
58
+ "mask_token": "<mask>",
59
+ "model_max_length": 512,
60
+ "pad_token": "<pad>",
61
+ "sep_token": "</s>",
62
+ "strip_accents": null,
63
+ "tokenize_chinese_chars": true,
64
+ "tokenizer_class": "MPNetTokenizer",
65
+ "unk_token": "[UNK]"
66
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff