DannyAI commited on
Commit
492a375
·
verified ·
1 Parent(s): d60d1b5

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
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,663 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - dense
10
+ - generated_from_trainer
11
+ - dataset_size:200000
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: BAAI/bge-large-en-v1.5
15
+ widget:
16
+ - source_sentence: A man standing in front of a brick building.
17
+ sentences:
18
+ - The men are together.
19
+ - A man is outside.
20
+ - The man pushes a women on the ground.
21
+ - source_sentence: A football coach is walking on a football field.
22
+ sentences:
23
+ - Two girls are watching dolls.
24
+ - a baseball player walks on the field
25
+ - a football coach walks on the field
26
+ - source_sentence: A woman wearing gray pants, a white blouse and a black vest is
27
+ jumping with one hand in the air as she goes through an indoor stadium.
28
+ sentences:
29
+ - The girl wearing a dress skips down the sidewalk.
30
+ - They are outdoors.
31
+ - The jumping lady in slacks also has her hand raised.
32
+ - source_sentence: A light brown dog with his tail in the air jumps of a pontoon toward
33
+ the water.
34
+ sentences:
35
+ - A man is heading to his house of worship.
36
+ - A dog jumps toward the water.
37
+ - A cat is jumping in the air.
38
+ - source_sentence: Young boy kicks a soccer ball towards the goal as the crowd watches.
39
+ sentences:
40
+ - The boy is under the age of eighteen.
41
+ - The girl is running.
42
+ - The boy is alone in his backyard.
43
+ datasets:
44
+ - sentence-transformers/all-nli
45
+ pipeline_tag: sentence-similarity
46
+ library_name: sentence-transformers
47
+ metrics:
48
+ - cosine_accuracy
49
+ model-index:
50
+ - name: bge-large-en-v1.5
51
+ results:
52
+ - task:
53
+ type: triplet
54
+ name: Triplet
55
+ dataset:
56
+ name: all nli val 1024
57
+ type: all-nli-val-1024
58
+ metrics:
59
+ - type: cosine_accuracy
60
+ value: 0.9506666660308838
61
+ name: Cosine Accuracy
62
+ - task:
63
+ type: triplet
64
+ name: Triplet
65
+ dataset:
66
+ name: all nli val 768
67
+ type: all-nli-val-768
68
+ metrics:
69
+ - type: cosine_accuracy
70
+ value: 0.9496666789054871
71
+ name: Cosine Accuracy
72
+ - task:
73
+ type: triplet
74
+ name: Triplet
75
+ dataset:
76
+ name: all nli val 512
77
+ type: all-nli-val-512
78
+ metrics:
79
+ - type: cosine_accuracy
80
+ value: 0.9476666450500488
81
+ name: Cosine Accuracy
82
+ - task:
83
+ type: triplet
84
+ name: Triplet
85
+ dataset:
86
+ name: all nli val 256
87
+ type: all-nli-val-256
88
+ metrics:
89
+ - type: cosine_accuracy
90
+ value: 0.9453333616256714
91
+ name: Cosine Accuracy
92
+ - task:
93
+ type: triplet
94
+ name: Triplet
95
+ dataset:
96
+ name: all nli val 128
97
+ type: all-nli-val-128
98
+ metrics:
99
+ - type: cosine_accuracy
100
+ value: 0.9393333196640015
101
+ name: Cosine Accuracy
102
+ - task:
103
+ type: triplet
104
+ name: Triplet
105
+ dataset:
106
+ name: all nli val 64
107
+ type: all-nli-val-64
108
+ metrics:
109
+ - type: cosine_accuracy
110
+ value: 0.9309999942779541
111
+ name: Cosine Accuracy
112
+ - task:
113
+ type: triplet
114
+ name: Triplet
115
+ dataset:
116
+ name: all nli test 1024
117
+ type: all-nli-test-1024
118
+ metrics:
119
+ - type: cosine_accuracy
120
+ value: 0.9532455801963806
121
+ name: Cosine Accuracy
122
+ - task:
123
+ type: triplet
124
+ name: Triplet
125
+ dataset:
126
+ name: all nli test 768
127
+ type: all-nli-test-768
128
+ metrics:
129
+ - type: cosine_accuracy
130
+ value: 0.9515811800956726
131
+ name: Cosine Accuracy
132
+ - task:
133
+ type: triplet
134
+ name: Triplet
135
+ dataset:
136
+ name: all nli test 512
137
+ type: all-nli-test-512
138
+ metrics:
139
+ - type: cosine_accuracy
140
+ value: 0.950370728969574
141
+ name: Cosine Accuracy
142
+ - task:
143
+ type: triplet
144
+ name: Triplet
145
+ dataset:
146
+ name: all nli test 256
147
+ type: all-nli-test-256
148
+ metrics:
149
+ - type: cosine_accuracy
150
+ value: 0.9493115544319153
151
+ name: Cosine Accuracy
152
+ - task:
153
+ type: triplet
154
+ name: Triplet
155
+ dataset:
156
+ name: all nli test 128
157
+ type: all-nli-test-128
158
+ metrics:
159
+ - type: cosine_accuracy
160
+ value: 0.9452261924743652
161
+ name: Cosine Accuracy
162
+ - task:
163
+ type: triplet
164
+ name: Triplet
165
+ dataset:
166
+ name: all nli test 64
167
+ type: all-nli-test-64
168
+ metrics:
169
+ - type: cosine_accuracy
170
+ value: 0.9362989664077759
171
+ name: Cosine Accuracy
172
+ ---
173
+
174
+ # bge-large-en-v1.5
175
+
176
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) on the [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
177
+
178
+ ## Model Details
179
+
180
+ ### Model Description
181
+ - **Model Type:** Sentence Transformer
182
+ - **Base model:** [BAAI/bge-large-en-v1.5](https://huggingface.co/BAAI/bge-large-en-v1.5) <!-- at revision d4aa6901d3a41ba39fb536a557fa166f842b0e09 -->
183
+ - **Maximum Sequence Length:** 512 tokens
184
+ - **Output Dimensionality:** 1024 dimensions
185
+ - **Similarity Function:** Cosine Similarity
186
+ - **Training Dataset:**
187
+ - [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
188
+ - **Language:** en
189
+ - **License:** mit
190
+
191
+ ### Model Sources
192
+
193
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
194
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
195
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
196
+
197
+ ### Full Model Architecture
198
+
199
+ ```
200
+ SentenceTransformer(
201
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True, 'architecture': 'BertModel'})
202
+ (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
203
+ (2): Normalize()
204
+ )
205
+ ```
206
+
207
+ ## Usage
208
+
209
+ ### Direct Usage (Sentence Transformers)
210
+
211
+ First install the Sentence Transformers library:
212
+
213
+ ```bash
214
+ pip install -U sentence-transformers
215
+ ```
216
+
217
+ Then you can load this model and run inference.
218
+ ```python
219
+ from sentence_transformers import SentenceTransformer
220
+
221
+ # Download from the 🤗 Hub
222
+ model = SentenceTransformer("DannyAI/embedding_fine_tuning_matryoshka_loss_bge_large_en_v1.5")
223
+ # Run inference
224
+ sentences = [
225
+ 'Young boy kicks a soccer ball towards the goal as the crowd watches.',
226
+ 'The boy is under the age of eighteen.',
227
+ 'The boy is alone in his backyard.',
228
+ ]
229
+ embeddings = model.encode(sentences)
230
+ print(embeddings.shape)
231
+ # [3, 1024]
232
+
233
+ # Get the similarity scores for the embeddings
234
+ similarities = model.similarity(embeddings, embeddings)
235
+ print(similarities)
236
+ # tensor([[1.0000, 0.6018, 0.3989],
237
+ # [0.6018, 1.0000, 0.6269],
238
+ # [0.3989, 0.6269, 1.0000]])
239
+ ```
240
+
241
+ <!--
242
+ ### Direct Usage (Transformers)
243
+
244
+ <details><summary>Click to see the direct usage in Transformers</summary>
245
+
246
+ </details>
247
+ -->
248
+
249
+ <!--
250
+ ### Downstream Usage (Sentence Transformers)
251
+
252
+ You can finetune this model on your own dataset.
253
+
254
+ <details><summary>Click to expand</summary>
255
+
256
+ </details>
257
+ -->
258
+
259
+ <!--
260
+ ### Out-of-Scope Use
261
+
262
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
263
+ -->
264
+
265
+ ## Evaluation
266
+
267
+ ### Metrics
268
+
269
+ #### Triplet
270
+
271
+ * Datasets: `all-nli-val-1024` and `all-nli-test-1024`
272
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) with these parameters:
273
+ ```json
274
+ {
275
+ "truncate_dim": 1024
276
+ }
277
+ ```
278
+
279
+ | Metric | all-nli-val-1024 | all-nli-test-1024 |
280
+ |:--------------------|:-----------------|:------------------|
281
+ | **cosine_accuracy** | **0.9507** | **0.9532** |
282
+
283
+ #### Triplet
284
+
285
+ * Datasets: `all-nli-val-768` and `all-nli-test-768`
286
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) with these parameters:
287
+ ```json
288
+ {
289
+ "truncate_dim": 768
290
+ }
291
+ ```
292
+
293
+ | Metric | all-nli-val-768 | all-nli-test-768 |
294
+ |:--------------------|:----------------|:-----------------|
295
+ | **cosine_accuracy** | **0.9497** | **0.9516** |
296
+
297
+ #### Triplet
298
+
299
+ * Datasets: `all-nli-val-512` and `all-nli-test-512`
300
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) with these parameters:
301
+ ```json
302
+ {
303
+ "truncate_dim": 512
304
+ }
305
+ ```
306
+
307
+ | Metric | all-nli-val-512 | all-nli-test-512 |
308
+ |:--------------------|:----------------|:-----------------|
309
+ | **cosine_accuracy** | **0.9477** | **0.9504** |
310
+
311
+ #### Triplet
312
+
313
+ * Datasets: `all-nli-val-256` and `all-nli-test-256`
314
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) with these parameters:
315
+ ```json
316
+ {
317
+ "truncate_dim": 256
318
+ }
319
+ ```
320
+
321
+ | Metric | all-nli-val-256 | all-nli-test-256 |
322
+ |:--------------------|:----------------|:-----------------|
323
+ | **cosine_accuracy** | **0.9453** | **0.9493** |
324
+
325
+ #### Triplet
326
+
327
+ * Datasets: `all-nli-val-128` and `all-nli-test-128`
328
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) with these parameters:
329
+ ```json
330
+ {
331
+ "truncate_dim": 128
332
+ }
333
+ ```
334
+
335
+ | Metric | all-nli-val-128 | all-nli-test-128 |
336
+ |:--------------------|:----------------|:-----------------|
337
+ | **cosine_accuracy** | **0.9393** | **0.9452** |
338
+
339
+ #### Triplet
340
+
341
+ * Datasets: `all-nli-val-64` and `all-nli-test-64`
342
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator) with these parameters:
343
+ ```json
344
+ {
345
+ "truncate_dim": 64
346
+ }
347
+ ```
348
+
349
+ | Metric | all-nli-val-64 | all-nli-test-64 |
350
+ |:--------------------|:---------------|:----------------|
351
+ | **cosine_accuracy** | **0.931** | **0.9363** |
352
+
353
+ <!--
354
+ ## Bias, Risks and Limitations
355
+
356
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
357
+ -->
358
+
359
+ <!--
360
+ ### Recommendations
361
+
362
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
363
+ -->
364
+
365
+ ## Training Details
366
+
367
+ ### Training Dataset
368
+
369
+ #### all-nli
370
+
371
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
372
+ * Size: 200,000 training samples
373
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
374
+ * Approximate statistics based on the first 1000 samples:
375
+ | | anchor | positive | negative |
376
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
377
+ | type | string | string | string |
378
+ | 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> |
379
+ * Samples:
380
+ | anchor | positive | negative |
381
+ |:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
382
+ | <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> |
383
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
384
+ | <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> |
385
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
386
+ ```json
387
+ {
388
+ "loss": "MultipleNegativesRankingLoss",
389
+ "matryoshka_dims": [
390
+ 1024,
391
+ 768,
392
+ 512,
393
+ 256,
394
+ 128,
395
+ 64
396
+ ],
397
+ "matryoshka_weights": [
398
+ 1,
399
+ 1,
400
+ 1,
401
+ 1,
402
+ 1,
403
+ 1
404
+ ],
405
+ "n_dims_per_step": -1
406
+ }
407
+ ```
408
+
409
+ ### Evaluation Dataset
410
+
411
+ #### all-nli
412
+
413
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
414
+ * Size: 3,000 evaluation samples
415
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
416
+ * Approximate statistics based on the first 1000 samples:
417
+ | | anchor | positive | negative |
418
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
419
+ | type | string | string | string |
420
+ | 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> |
421
+ * Samples:
422
+ | anchor | positive | negative |
423
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
424
+ | <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> |
425
+ | <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> |
426
+ | <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> |
427
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
428
+ ```json
429
+ {
430
+ "loss": "MultipleNegativesRankingLoss",
431
+ "matryoshka_dims": [
432
+ 1024,
433
+ 768,
434
+ 512,
435
+ 256,
436
+ 128,
437
+ 64
438
+ ],
439
+ "matryoshka_weights": [
440
+ 1,
441
+ 1,
442
+ 1,
443
+ 1,
444
+ 1,
445
+ 1
446
+ ],
447
+ "n_dims_per_step": -1
448
+ }
449
+ ```
450
+
451
+ ### Training Hyperparameters
452
+ #### Non-Default Hyperparameters
453
+
454
+ - `eval_strategy`: steps
455
+ - `per_device_train_batch_size`: 5
456
+ - `per_device_eval_batch_size`: 5
457
+ - `learning_rate`: 2e-05
458
+ - `max_steps`: 100
459
+ - `warmup_ratio`: 0.1
460
+ - `seed`: 30
461
+ - `bf16`: True
462
+ - `load_best_model_at_end`: True
463
+ - `batch_sampler`: no_duplicates
464
+
465
+ #### All Hyperparameters
466
+ <details><summary>Click to expand</summary>
467
+
468
+ - `overwrite_output_dir`: False
469
+ - `do_predict`: False
470
+ - `eval_strategy`: steps
471
+ - `prediction_loss_only`: True
472
+ - `per_device_train_batch_size`: 5
473
+ - `per_device_eval_batch_size`: 5
474
+ - `per_gpu_train_batch_size`: None
475
+ - `per_gpu_eval_batch_size`: None
476
+ - `gradient_accumulation_steps`: 1
477
+ - `eval_accumulation_steps`: None
478
+ - `torch_empty_cache_steps`: None
479
+ - `learning_rate`: 2e-05
480
+ - `weight_decay`: 0.0
481
+ - `adam_beta1`: 0.9
482
+ - `adam_beta2`: 0.999
483
+ - `adam_epsilon`: 1e-08
484
+ - `max_grad_norm`: 1.0
485
+ - `num_train_epochs`: 3.0
486
+ - `max_steps`: 100
487
+ - `lr_scheduler_type`: linear
488
+ - `lr_scheduler_kwargs`: {}
489
+ - `warmup_ratio`: 0.1
490
+ - `warmup_steps`: 0
491
+ - `log_level`: passive
492
+ - `log_level_replica`: warning
493
+ - `log_on_each_node`: True
494
+ - `logging_nan_inf_filter`: True
495
+ - `save_safetensors`: True
496
+ - `save_on_each_node`: False
497
+ - `save_only_model`: False
498
+ - `restore_callback_states_from_checkpoint`: False
499
+ - `no_cuda`: False
500
+ - `use_cpu`: False
501
+ - `use_mps_device`: False
502
+ - `seed`: 30
503
+ - `data_seed`: None
504
+ - `jit_mode_eval`: False
505
+ - `use_ipex`: False
506
+ - `bf16`: True
507
+ - `fp16`: False
508
+ - `fp16_opt_level`: O1
509
+ - `half_precision_backend`: auto
510
+ - `bf16_full_eval`: False
511
+ - `fp16_full_eval`: False
512
+ - `tf32`: None
513
+ - `local_rank`: 0
514
+ - `ddp_backend`: None
515
+ - `tpu_num_cores`: None
516
+ - `tpu_metrics_debug`: False
517
+ - `debug`: []
518
+ - `dataloader_drop_last`: False
519
+ - `dataloader_num_workers`: 0
520
+ - `dataloader_prefetch_factor`: None
521
+ - `past_index`: -1
522
+ - `disable_tqdm`: False
523
+ - `remove_unused_columns`: True
524
+ - `label_names`: None
525
+ - `load_best_model_at_end`: True
526
+ - `ignore_data_skip`: False
527
+ - `fsdp`: []
528
+ - `fsdp_min_num_params`: 0
529
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
530
+ - `fsdp_transformer_layer_cls_to_wrap`: None
531
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
532
+ - `parallelism_config`: None
533
+ - `deepspeed`: None
534
+ - `label_smoothing_factor`: 0.0
535
+ - `optim`: adamw_torch_fused
536
+ - `optim_args`: None
537
+ - `adafactor`: False
538
+ - `group_by_length`: False
539
+ - `length_column_name`: length
540
+ - `ddp_find_unused_parameters`: None
541
+ - `ddp_bucket_cap_mb`: None
542
+ - `ddp_broadcast_buffers`: False
543
+ - `dataloader_pin_memory`: True
544
+ - `dataloader_persistent_workers`: False
545
+ - `skip_memory_metrics`: True
546
+ - `use_legacy_prediction_loop`: False
547
+ - `push_to_hub`: False
548
+ - `resume_from_checkpoint`: None
549
+ - `hub_model_id`: None
550
+ - `hub_strategy`: every_save
551
+ - `hub_private_repo`: None
552
+ - `hub_always_push`: False
553
+ - `hub_revision`: None
554
+ - `gradient_checkpointing`: False
555
+ - `gradient_checkpointing_kwargs`: None
556
+ - `include_inputs_for_metrics`: False
557
+ - `include_for_metrics`: []
558
+ - `eval_do_concat_batches`: True
559
+ - `fp16_backend`: auto
560
+ - `push_to_hub_model_id`: None
561
+ - `push_to_hub_organization`: None
562
+ - `mp_parameters`:
563
+ - `auto_find_batch_size`: False
564
+ - `full_determinism`: False
565
+ - `torchdynamo`: None
566
+ - `ray_scope`: last
567
+ - `ddp_timeout`: 1800
568
+ - `torch_compile`: False
569
+ - `torch_compile_backend`: None
570
+ - `torch_compile_mode`: None
571
+ - `include_tokens_per_second`: False
572
+ - `include_num_input_tokens_seen`: False
573
+ - `neftune_noise_alpha`: None
574
+ - `optim_target_modules`: None
575
+ - `batch_eval_metrics`: False
576
+ - `eval_on_start`: False
577
+ - `use_liger_kernel`: False
578
+ - `liger_kernel_config`: None
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
+ - `router_mapping`: {}
585
+ - `learning_rate_mapping`: {}
586
+
587
+ </details>
588
+
589
+ ### Training Logs
590
+ | Epoch | Step | Training Loss | Validation Loss | all-nli-val-1024_cosine_accuracy | all-nli-val-768_cosine_accuracy | all-nli-val-512_cosine_accuracy | all-nli-val-256_cosine_accuracy | all-nli-val-128_cosine_accuracy | all-nli-val-64_cosine_accuracy | all-nli-test-1024_cosine_accuracy | all-nli-test-768_cosine_accuracy | all-nli-test-512_cosine_accuracy | all-nli-test-256_cosine_accuracy | all-nli-test-128_cosine_accuracy | all-nli-test-64_cosine_accuracy |
591
+ |:----------:|:-------:|:-------------:|:---------------:|:--------------------------------:|:-------------------------------:|:-------------------------------:|:-------------------------------:|:-------------------------------:|:------------------------------:|:---------------------------------:|:--------------------------------:|:--------------------------------:|:--------------------------------:|:--------------------------------:|:-------------------------------:|
592
+ | **0.0025** | **100** | **2.4168** | **1.292** | **0.9507** | **0.9497** | **0.9477** | **0.9453** | **0.9393** | **0.931** | **-** | **-** | **-** | **-** | **-** | **-** |
593
+ | -1 | -1 | - | - | - | - | - | - | - | - | 0.9532 | 0.9516 | 0.9504 | 0.9493 | 0.9452 | 0.9363 |
594
+
595
+ * The bold row denotes the saved checkpoint.
596
+
597
+ ### Framework Versions
598
+ - Python: 3.12.11
599
+ - Sentence Transformers: 5.1.0
600
+ - Transformers: 4.56.1
601
+ - PyTorch: 2.8.0+cu126
602
+ - Accelerate: 1.10.1
603
+ - Datasets: 4.0.0
604
+ - Tokenizers: 0.22.0
605
+
606
+ ## Citation
607
+
608
+ ### BibTeX
609
+
610
+ #### Sentence Transformers
611
+ ```bibtex
612
+ @inproceedings{reimers-2019-sentence-bert,
613
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
614
+ author = "Reimers, Nils and Gurevych, Iryna",
615
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
616
+ month = "11",
617
+ year = "2019",
618
+ publisher = "Association for Computational Linguistics",
619
+ url = "https://arxiv.org/abs/1908.10084",
620
+ }
621
+ ```
622
+
623
+ #### MatryoshkaLoss
624
+ ```bibtex
625
+ @misc{kusupati2024matryoshka,
626
+ title={Matryoshka Representation Learning},
627
+ 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},
628
+ year={2024},
629
+ eprint={2205.13147},
630
+ archivePrefix={arXiv},
631
+ primaryClass={cs.LG}
632
+ }
633
+ ```
634
+
635
+ #### MultipleNegativesRankingLoss
636
+ ```bibtex
637
+ @misc{henderson2017efficient,
638
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
639
+ 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},
640
+ year={2017},
641
+ eprint={1705.00652},
642
+ archivePrefix={arXiv},
643
+ primaryClass={cs.CL}
644
+ }
645
+ ```
646
+
647
+ <!--
648
+ ## Glossary
649
+
650
+ *Clearly define terms in order to be accessible across audiences.*
651
+ -->
652
+
653
+ <!--
654
+ ## Model Card Authors
655
+
656
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
657
+ -->
658
+
659
+ <!--
660
+ ## Model Card Contact
661
+
662
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
663
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 1024,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 4096,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 16,
24
+ "num_hidden_layers": 24,
25
+ "output_hidden_states": true,
26
+ "pad_token_id": 0,
27
+ "position_embedding_type": "absolute",
28
+ "transformers_version": "4.56.1",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.0",
4
+ "transformers": "4.56.1",
5
+ "pytorch": "2.8.0+cu126"
6
+ },
7
+ "model_type": "SentenceTransformer",
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:709bbd602e5475fb4f17edda7d0573d87dac0cba928ce5b047fcd7de555e54f1
3
+ size 1340612432
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff