sud-962081 commited on
Commit
91eca6c
·
verified ·
1 Parent(s): 7837b14

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": 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,720 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:6300
11
+ - loss:MatryoshkaLoss
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: BAAI/bge-base-en-v1.5
14
+ widget:
15
+ - source_sentence: As of the end of 2023, Hilton's development pipeline included projects
16
+ in 118 countries and territories.
17
+ sentences:
18
+ - What was the total net income attributed to AT&T common stockholders in 2023?
19
+ - How many countries and territories did Hilton's development pipeline encompass
20
+ as of the end of 2023?
21
+ - What caused the increase in Medicare receivables in 2023 compared to 2022?
22
+ - source_sentence: Alex G. Balazs was appointed as the Executive Vice President and
23
+ Chief Technology Officer effective September 5, 2023.
24
+ sentences:
25
+ - What page of IBM's Form 10-K contains the Financial Statement Schedule?
26
+ - When was Alex G. Balazs appointed as the Executive Vice President and Chief Technology
27
+ Officer?
28
+ - How much were the valuation allowances provided for deferred tax assets related
29
+ to loss carryforwards as of December 31, 2023?
30
+ - source_sentence: 'HP''s global wellness program emphasizes five pillars of wellness:
31
+ physical, financial, emotional, life balance, and social/community.'
32
+ sentences:
33
+ - What are the five pillars of wellness emphasized in HP's global wellness program?
34
+ - What was the fair value of money market mutual funds measured at as of January
35
+ 31, 2023 and how was it categorized in the fair value hierarchy?
36
+ - What amount was authorized for future share repurchases by the company as of October
37
+ 31, 2023?
38
+ - source_sentence: Item 3, titled 'Legal Proceedings' in a 10-K filing, directs to
39
+ Note 16 where specific information is further detailed in Item 8 of Part II.
40
+ sentences:
41
+ - What was the grant date fair value of options vested for HP in fiscal years 2023,
42
+ 2022, and 2021?
43
+ - What is the balance at the end of the year for Comcast's Total Equity in 2023?
44
+ - What is indicated by Item 3, 'Legal Proceedings', in a 10-K filing?
45
+ - source_sentence: During 2023, we received approximately $220 of cash collateral,
46
+ on a net basis.
47
+ sentences:
48
+ - How much cash collateral did AT&T receive on a net basis during 2023?
49
+ - What percentage of FedEx Corporation's consolidated revenues did jet fuel costs
50
+ represent in 2023?
51
+ - What measures has Bank of America taken to streamline its organizational structure?
52
+ pipeline_tag: sentence-similarity
53
+ library_name: sentence-transformers
54
+ metrics:
55
+ - cosine_accuracy@1
56
+ - cosine_accuracy@3
57
+ - cosine_accuracy@5
58
+ - cosine_accuracy@10
59
+ - cosine_precision@1
60
+ - cosine_precision@3
61
+ - cosine_precision@5
62
+ - cosine_precision@10
63
+ - cosine_recall@1
64
+ - cosine_recall@3
65
+ - cosine_recall@5
66
+ - cosine_recall@10
67
+ - cosine_ndcg@10
68
+ - cosine_mrr@10
69
+ - cosine_map@100
70
+ model-index:
71
+ - name: BGE base Financial Matryoshka
72
+ results:
73
+ - task:
74
+ type: information-retrieval
75
+ name: Information Retrieval
76
+ dataset:
77
+ name: dim 768
78
+ type: dim_768
79
+ metrics:
80
+ - type: cosine_accuracy@1
81
+ value: 0.7128571428571429
82
+ name: Cosine Accuracy@1
83
+ - type: cosine_accuracy@3
84
+ value: 0.8428571428571429
85
+ name: Cosine Accuracy@3
86
+ - type: cosine_accuracy@5
87
+ value: 0.8842857142857142
88
+ name: Cosine Accuracy@5
89
+ - type: cosine_accuracy@10
90
+ value: 0.92
91
+ name: Cosine Accuracy@10
92
+ - type: cosine_precision@1
93
+ value: 0.7128571428571429
94
+ name: Cosine Precision@1
95
+ - type: cosine_precision@3
96
+ value: 0.28095238095238095
97
+ name: Cosine Precision@3
98
+ - type: cosine_precision@5
99
+ value: 0.17685714285714288
100
+ name: Cosine Precision@5
101
+ - type: cosine_precision@10
102
+ value: 0.09199999999999998
103
+ name: Cosine Precision@10
104
+ - type: cosine_recall@1
105
+ value: 0.7128571428571429
106
+ name: Cosine Recall@1
107
+ - type: cosine_recall@3
108
+ value: 0.8428571428571429
109
+ name: Cosine Recall@3
110
+ - type: cosine_recall@5
111
+ value: 0.8842857142857142
112
+ name: Cosine Recall@5
113
+ - type: cosine_recall@10
114
+ value: 0.92
115
+ name: Cosine Recall@10
116
+ - type: cosine_ndcg@10
117
+ value: 0.8195233962517928
118
+ name: Cosine Ndcg@10
119
+ - type: cosine_mrr@10
120
+ value: 0.7870022675736963
121
+ name: Cosine Mrr@10
122
+ - type: cosine_map@100
123
+ value: 0.7905145024165581
124
+ name: Cosine Map@100
125
+ - task:
126
+ type: information-retrieval
127
+ name: Information Retrieval
128
+ dataset:
129
+ name: dim 512
130
+ type: dim_512
131
+ metrics:
132
+ - type: cosine_accuracy@1
133
+ value: 0.7157142857142857
134
+ name: Cosine Accuracy@1
135
+ - type: cosine_accuracy@3
136
+ value: 0.8457142857142858
137
+ name: Cosine Accuracy@3
138
+ - type: cosine_accuracy@5
139
+ value: 0.8814285714285715
140
+ name: Cosine Accuracy@5
141
+ - type: cosine_accuracy@10
142
+ value: 0.9228571428571428
143
+ name: Cosine Accuracy@10
144
+ - type: cosine_precision@1
145
+ value: 0.7157142857142857
146
+ name: Cosine Precision@1
147
+ - type: cosine_precision@3
148
+ value: 0.2819047619047619
149
+ name: Cosine Precision@3
150
+ - type: cosine_precision@5
151
+ value: 0.1762857142857143
152
+ name: Cosine Precision@5
153
+ - type: cosine_precision@10
154
+ value: 0.09228571428571428
155
+ name: Cosine Precision@10
156
+ - type: cosine_recall@1
157
+ value: 0.7157142857142857
158
+ name: Cosine Recall@1
159
+ - type: cosine_recall@3
160
+ value: 0.8457142857142858
161
+ name: Cosine Recall@3
162
+ - type: cosine_recall@5
163
+ value: 0.8814285714285715
164
+ name: Cosine Recall@5
165
+ - type: cosine_recall@10
166
+ value: 0.9228571428571428
167
+ name: Cosine Recall@10
168
+ - type: cosine_ndcg@10
169
+ value: 0.821183673183428
170
+ name: Cosine Ndcg@10
171
+ - type: cosine_mrr@10
172
+ value: 0.7884829931972789
173
+ name: Cosine Mrr@10
174
+ - type: cosine_map@100
175
+ value: 0.7916656681436871
176
+ name: Cosine Map@100
177
+ - task:
178
+ type: information-retrieval
179
+ name: Information Retrieval
180
+ dataset:
181
+ name: dim 256
182
+ type: dim_256
183
+ metrics:
184
+ - type: cosine_accuracy@1
185
+ value: 0.7114285714285714
186
+ name: Cosine Accuracy@1
187
+ - type: cosine_accuracy@3
188
+ value: 0.8414285714285714
189
+ name: Cosine Accuracy@3
190
+ - type: cosine_accuracy@5
191
+ value: 0.8842857142857142
192
+ name: Cosine Accuracy@5
193
+ - type: cosine_accuracy@10
194
+ value: 0.9157142857142857
195
+ name: Cosine Accuracy@10
196
+ - type: cosine_precision@1
197
+ value: 0.7114285714285714
198
+ name: Cosine Precision@1
199
+ - type: cosine_precision@3
200
+ value: 0.28047619047619043
201
+ name: Cosine Precision@3
202
+ - type: cosine_precision@5
203
+ value: 0.17685714285714285
204
+ name: Cosine Precision@5
205
+ - type: cosine_precision@10
206
+ value: 0.09157142857142858
207
+ name: Cosine Precision@10
208
+ - type: cosine_recall@1
209
+ value: 0.7114285714285714
210
+ name: Cosine Recall@1
211
+ - type: cosine_recall@3
212
+ value: 0.8414285714285714
213
+ name: Cosine Recall@3
214
+ - type: cosine_recall@5
215
+ value: 0.8842857142857142
216
+ name: Cosine Recall@5
217
+ - type: cosine_recall@10
218
+ value: 0.9157142857142857
219
+ name: Cosine Recall@10
220
+ - type: cosine_ndcg@10
221
+ value: 0.8157881706696753
222
+ name: Cosine Ndcg@10
223
+ - type: cosine_mrr@10
224
+ value: 0.7834812925170066
225
+ name: Cosine Mrr@10
226
+ - type: cosine_map@100
227
+ value: 0.7870779881453726
228
+ name: Cosine Map@100
229
+ - task:
230
+ type: information-retrieval
231
+ name: Information Retrieval
232
+ dataset:
233
+ name: dim 128
234
+ type: dim_128
235
+ metrics:
236
+ - type: cosine_accuracy@1
237
+ value: 0.6957142857142857
238
+ name: Cosine Accuracy@1
239
+ - type: cosine_accuracy@3
240
+ value: 0.82
241
+ name: Cosine Accuracy@3
242
+ - type: cosine_accuracy@5
243
+ value: 0.8685714285714285
244
+ name: Cosine Accuracy@5
245
+ - type: cosine_accuracy@10
246
+ value: 0.9057142857142857
247
+ name: Cosine Accuracy@10
248
+ - type: cosine_precision@1
249
+ value: 0.6957142857142857
250
+ name: Cosine Precision@1
251
+ - type: cosine_precision@3
252
+ value: 0.2733333333333333
253
+ name: Cosine Precision@3
254
+ - type: cosine_precision@5
255
+ value: 0.1737142857142857
256
+ name: Cosine Precision@5
257
+ - type: cosine_precision@10
258
+ value: 0.09057142857142857
259
+ name: Cosine Precision@10
260
+ - type: cosine_recall@1
261
+ value: 0.6957142857142857
262
+ name: Cosine Recall@1
263
+ - type: cosine_recall@3
264
+ value: 0.82
265
+ name: Cosine Recall@3
266
+ - type: cosine_recall@5
267
+ value: 0.8685714285714285
268
+ name: Cosine Recall@5
269
+ - type: cosine_recall@10
270
+ value: 0.9057142857142857
271
+ name: Cosine Recall@10
272
+ - type: cosine_ndcg@10
273
+ value: 0.8018105093606251
274
+ name: Cosine Ndcg@10
275
+ - type: cosine_mrr@10
276
+ value: 0.7683497732426302
277
+ name: Cosine Mrr@10
278
+ - type: cosine_map@100
279
+ value: 0.7722509873826792
280
+ name: Cosine Map@100
281
+ - task:
282
+ type: information-retrieval
283
+ name: Information Retrieval
284
+ dataset:
285
+ name: dim 64
286
+ type: dim_64
287
+ metrics:
288
+ - type: cosine_accuracy@1
289
+ value: 0.6528571428571428
290
+ name: Cosine Accuracy@1
291
+ - type: cosine_accuracy@3
292
+ value: 0.7942857142857143
293
+ name: Cosine Accuracy@3
294
+ - type: cosine_accuracy@5
295
+ value: 0.8314285714285714
296
+ name: Cosine Accuracy@5
297
+ - type: cosine_accuracy@10
298
+ value: 0.8757142857142857
299
+ name: Cosine Accuracy@10
300
+ - type: cosine_precision@1
301
+ value: 0.6528571428571428
302
+ name: Cosine Precision@1
303
+ - type: cosine_precision@3
304
+ value: 0.26476190476190475
305
+ name: Cosine Precision@3
306
+ - type: cosine_precision@5
307
+ value: 0.1662857142857143
308
+ name: Cosine Precision@5
309
+ - type: cosine_precision@10
310
+ value: 0.08757142857142856
311
+ name: Cosine Precision@10
312
+ - type: cosine_recall@1
313
+ value: 0.6528571428571428
314
+ name: Cosine Recall@1
315
+ - type: cosine_recall@3
316
+ value: 0.7942857142857143
317
+ name: Cosine Recall@3
318
+ - type: cosine_recall@5
319
+ value: 0.8314285714285714
320
+ name: Cosine Recall@5
321
+ - type: cosine_recall@10
322
+ value: 0.8757142857142857
323
+ name: Cosine Recall@10
324
+ - type: cosine_ndcg@10
325
+ value: 0.7667522193115596
326
+ name: Cosine Ndcg@10
327
+ - type: cosine_mrr@10
328
+ value: 0.7315833333333331
329
+ name: Cosine Mrr@10
330
+ - type: cosine_map@100
331
+ value: 0.7359673420065519
332
+ name: Cosine Map@100
333
+ ---
334
+
335
+ # BGE base Financial Matryoshka
336
+
337
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) on the json 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.
338
+
339
+ ## Model Details
340
+
341
+ ### Model Description
342
+ - **Model Type:** Sentence Transformer
343
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
344
+ - **Maximum Sequence Length:** 512 tokens
345
+ - **Output Dimensionality:** 768 dimensions
346
+ - **Similarity Function:** Cosine Similarity
347
+ - **Training Dataset:**
348
+ - json
349
+ - **Language:** en
350
+ - **License:** apache-2.0
351
+
352
+ ### Model Sources
353
+
354
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
355
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
356
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
357
+
358
+ ### Full Model Architecture
359
+
360
+ ```
361
+ SentenceTransformer(
362
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
363
+ (1): Pooling({'word_embedding_dimension': 768, '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})
364
+ (2): Normalize()
365
+ )
366
+ ```
367
+
368
+ ## Usage
369
+
370
+ ### Direct Usage (Sentence Transformers)
371
+
372
+ First install the Sentence Transformers library:
373
+
374
+ ```bash
375
+ pip install -U sentence-transformers
376
+ ```
377
+
378
+ Then you can load this model and run inference.
379
+ ```python
380
+ from sentence_transformers import SentenceTransformer
381
+
382
+ # Download from the 🤗 Hub
383
+ model = SentenceTransformer("sud-962081/bge-base-financial-matryoshka")
384
+ # Run inference
385
+ sentences = [
386
+ 'During 2023, we received approximately $220 of cash collateral, on a net basis.',
387
+ 'How much cash collateral did AT&T receive on a net basis during 2023?',
388
+ "What percentage of FedEx Corporation's consolidated revenues did jet fuel costs represent in 2023?",
389
+ ]
390
+ embeddings = model.encode(sentences)
391
+ print(embeddings.shape)
392
+ # [3, 768]
393
+
394
+ # Get the similarity scores for the embeddings
395
+ similarities = model.similarity(embeddings, embeddings)
396
+ print(similarities.shape)
397
+ # [3, 3]
398
+ ```
399
+
400
+ <!--
401
+ ### Direct Usage (Transformers)
402
+
403
+ <details><summary>Click to see the direct usage in Transformers</summary>
404
+
405
+ </details>
406
+ -->
407
+
408
+ <!--
409
+ ### Downstream Usage (Sentence Transformers)
410
+
411
+ You can finetune this model on your own dataset.
412
+
413
+ <details><summary>Click to expand</summary>
414
+
415
+ </details>
416
+ -->
417
+
418
+ <!--
419
+ ### Out-of-Scope Use
420
+
421
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
422
+ -->
423
+
424
+ ## Evaluation
425
+
426
+ ### Metrics
427
+
428
+ #### Information Retrieval
429
+
430
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
431
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
432
+
433
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
434
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
435
+ | cosine_accuracy@1 | 0.7129 | 0.7157 | 0.7114 | 0.6957 | 0.6529 |
436
+ | cosine_accuracy@3 | 0.8429 | 0.8457 | 0.8414 | 0.82 | 0.7943 |
437
+ | cosine_accuracy@5 | 0.8843 | 0.8814 | 0.8843 | 0.8686 | 0.8314 |
438
+ | cosine_accuracy@10 | 0.92 | 0.9229 | 0.9157 | 0.9057 | 0.8757 |
439
+ | cosine_precision@1 | 0.7129 | 0.7157 | 0.7114 | 0.6957 | 0.6529 |
440
+ | cosine_precision@3 | 0.281 | 0.2819 | 0.2805 | 0.2733 | 0.2648 |
441
+ | cosine_precision@5 | 0.1769 | 0.1763 | 0.1769 | 0.1737 | 0.1663 |
442
+ | cosine_precision@10 | 0.092 | 0.0923 | 0.0916 | 0.0906 | 0.0876 |
443
+ | cosine_recall@1 | 0.7129 | 0.7157 | 0.7114 | 0.6957 | 0.6529 |
444
+ | cosine_recall@3 | 0.8429 | 0.8457 | 0.8414 | 0.82 | 0.7943 |
445
+ | cosine_recall@5 | 0.8843 | 0.8814 | 0.8843 | 0.8686 | 0.8314 |
446
+ | cosine_recall@10 | 0.92 | 0.9229 | 0.9157 | 0.9057 | 0.8757 |
447
+ | **cosine_ndcg@10** | **0.8195** | **0.8212** | **0.8158** | **0.8018** | **0.7668** |
448
+ | cosine_mrr@10 | 0.787 | 0.7885 | 0.7835 | 0.7683 | 0.7316 |
449
+ | cosine_map@100 | 0.7905 | 0.7917 | 0.7871 | 0.7723 | 0.736 |
450
+
451
+ <!--
452
+ ## Bias, Risks and Limitations
453
+
454
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
455
+ -->
456
+
457
+ <!--
458
+ ### Recommendations
459
+
460
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
461
+ -->
462
+
463
+ ## Training Details
464
+
465
+ ### Training Dataset
466
+
467
+ #### json
468
+
469
+ * Dataset: json
470
+ * Size: 6,300 training samples
471
+ * Columns: <code>positive</code> and <code>anchor</code>
472
+ * Approximate statistics based on the first 1000 samples:
473
+ | | positive | anchor |
474
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
475
+ | type | string | string |
476
+ | details | <ul><li>min: 4 tokens</li><li>mean: 44.47 tokens</li><li>max: 260 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.17 tokens</li><li>max: 43 tokens</li></ul> |
477
+ * Samples:
478
+ | positive | anchor |
479
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|
480
+ | <code>SmartFlex benefits and the 'Best of Both' work model at The Hershey Company allow employees to balance professional and personal demands through flexible work arrangements.</code> | <code>How does The Hershey Company ensure flexibility and work-life balance for its employees?</code> |
481
+ | <code>In February 2024, our Board authorized an additional $2.0 billion stock repurchase program, with no expiration from the date of authorization.</code> | <code>What amount was authorized for common stock repurchase by the company's Board in February 2024?</code> |
482
+ | <code>Beginning in 2025, the first GM EVs will be constructed using the North American Charging Standard (NACS) hardware.</code> | <code>What significant change is set for General Motors' EVs starting in 2025 regarding charging hardware?</code> |
483
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
484
+ ```json
485
+ {
486
+ "loss": "MultipleNegativesRankingLoss",
487
+ "matryoshka_dims": [
488
+ 768,
489
+ 512,
490
+ 256,
491
+ 128,
492
+ 64
493
+ ],
494
+ "matryoshka_weights": [
495
+ 1,
496
+ 1,
497
+ 1,
498
+ 1,
499
+ 1
500
+ ],
501
+ "n_dims_per_step": -1
502
+ }
503
+ ```
504
+
505
+ ### Training Hyperparameters
506
+ #### Non-Default Hyperparameters
507
+
508
+ - `eval_strategy`: epoch
509
+ - `per_device_train_batch_size`: 32
510
+ - `per_device_eval_batch_size`: 16
511
+ - `gradient_accumulation_steps`: 16
512
+ - `learning_rate`: 2e-05
513
+ - `num_train_epochs`: 4
514
+ - `lr_scheduler_type`: cosine
515
+ - `warmup_ratio`: 0.1
516
+ - `bf16`: True
517
+ - `load_best_model_at_end`: True
518
+ - `optim`: adamw_torch_fused
519
+ - `batch_sampler`: no_duplicates
520
+
521
+ #### All Hyperparameters
522
+ <details><summary>Click to expand</summary>
523
+
524
+ - `overwrite_output_dir`: False
525
+ - `do_predict`: False
526
+ - `eval_strategy`: epoch
527
+ - `prediction_loss_only`: True
528
+ - `per_device_train_batch_size`: 32
529
+ - `per_device_eval_batch_size`: 16
530
+ - `per_gpu_train_batch_size`: None
531
+ - `per_gpu_eval_batch_size`: None
532
+ - `gradient_accumulation_steps`: 16
533
+ - `eval_accumulation_steps`: None
534
+ - `torch_empty_cache_steps`: None
535
+ - `learning_rate`: 2e-05
536
+ - `weight_decay`: 0.0
537
+ - `adam_beta1`: 0.9
538
+ - `adam_beta2`: 0.999
539
+ - `adam_epsilon`: 1e-08
540
+ - `max_grad_norm`: 1.0
541
+ - `num_train_epochs`: 4
542
+ - `max_steps`: -1
543
+ - `lr_scheduler_type`: cosine
544
+ - `lr_scheduler_kwargs`: {}
545
+ - `warmup_ratio`: 0.1
546
+ - `warmup_steps`: 0
547
+ - `log_level`: passive
548
+ - `log_level_replica`: warning
549
+ - `log_on_each_node`: True
550
+ - `logging_nan_inf_filter`: True
551
+ - `save_safetensors`: True
552
+ - `save_on_each_node`: False
553
+ - `save_only_model`: False
554
+ - `restore_callback_states_from_checkpoint`: False
555
+ - `no_cuda`: False
556
+ - `use_cpu`: False
557
+ - `use_mps_device`: False
558
+ - `seed`: 42
559
+ - `data_seed`: None
560
+ - `jit_mode_eval`: False
561
+ - `use_ipex`: False
562
+ - `bf16`: True
563
+ - `fp16`: False
564
+ - `fp16_opt_level`: O1
565
+ - `half_precision_backend`: auto
566
+ - `bf16_full_eval`: False
567
+ - `fp16_full_eval`: False
568
+ - `tf32`: None
569
+ - `local_rank`: 0
570
+ - `ddp_backend`: None
571
+ - `tpu_num_cores`: None
572
+ - `tpu_metrics_debug`: False
573
+ - `debug`: []
574
+ - `dataloader_drop_last`: False
575
+ - `dataloader_num_workers`: 0
576
+ - `dataloader_prefetch_factor`: None
577
+ - `past_index`: -1
578
+ - `disable_tqdm`: False
579
+ - `remove_unused_columns`: True
580
+ - `label_names`: None
581
+ - `load_best_model_at_end`: True
582
+ - `ignore_data_skip`: False
583
+ - `fsdp`: []
584
+ - `fsdp_min_num_params`: 0
585
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
586
+ - `fsdp_transformer_layer_cls_to_wrap`: None
587
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
588
+ - `deepspeed`: None
589
+ - `label_smoothing_factor`: 0.0
590
+ - `optim`: adamw_torch_fused
591
+ - `optim_args`: None
592
+ - `adafactor`: False
593
+ - `group_by_length`: False
594
+ - `length_column_name`: length
595
+ - `ddp_find_unused_parameters`: None
596
+ - `ddp_bucket_cap_mb`: None
597
+ - `ddp_broadcast_buffers`: False
598
+ - `dataloader_pin_memory`: True
599
+ - `dataloader_persistent_workers`: False
600
+ - `skip_memory_metrics`: True
601
+ - `use_legacy_prediction_loop`: False
602
+ - `push_to_hub`: False
603
+ - `resume_from_checkpoint`: None
604
+ - `hub_model_id`: None
605
+ - `hub_strategy`: every_save
606
+ - `hub_private_repo`: None
607
+ - `hub_always_push`: False
608
+ - `gradient_checkpointing`: False
609
+ - `gradient_checkpointing_kwargs`: None
610
+ - `include_inputs_for_metrics`: False
611
+ - `include_for_metrics`: []
612
+ - `eval_do_concat_batches`: True
613
+ - `fp16_backend`: auto
614
+ - `push_to_hub_model_id`: None
615
+ - `push_to_hub_organization`: None
616
+ - `mp_parameters`:
617
+ - `auto_find_batch_size`: False
618
+ - `full_determinism`: False
619
+ - `torchdynamo`: None
620
+ - `ray_scope`: last
621
+ - `ddp_timeout`: 1800
622
+ - `torch_compile`: False
623
+ - `torch_compile_backend`: None
624
+ - `torch_compile_mode`: None
625
+ - `dispatch_batches`: None
626
+ - `split_batches`: None
627
+ - `include_tokens_per_second`: False
628
+ - `include_num_input_tokens_seen`: False
629
+ - `neftune_noise_alpha`: None
630
+ - `optim_target_modules`: None
631
+ - `batch_eval_metrics`: False
632
+ - `eval_on_start`: False
633
+ - `use_liger_kernel`: False
634
+ - `eval_use_gather_object`: False
635
+ - `average_tokens_across_devices`: False
636
+ - `prompts`: None
637
+ - `batch_sampler`: no_duplicates
638
+ - `multi_dataset_batch_sampler`: proportional
639
+
640
+ </details>
641
+
642
+ ### Training Logs
643
+ | Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
644
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
645
+ | 1.0 | 7 | - | 0.8036 | 0.8049 | 0.7942 | 0.7726 | 0.7375 |
646
+ | 1.4848 | 10 | 2.2028 | - | - | - | - | - |
647
+ | 2.0 | 14 | - | 0.8169 | 0.8173 | 0.8127 | 0.8000 | 0.7602 |
648
+ | 2.9697 | 20 | 0.9836 | - | - | - | - | - |
649
+ | 3.0 | 21 | - | 0.8187 | 0.8214 | 0.8142 | 0.8017 | 0.7658 |
650
+ | **3.4848** | **24** | **-** | **0.8195** | **0.8212** | **0.8158** | **0.8018** | **0.7668** |
651
+
652
+ * The bold row denotes the saved checkpoint.
653
+
654
+ ### Framework Versions
655
+ - Python: 3.10.12
656
+ - Sentence Transformers: 3.3.1
657
+ - Transformers: 4.47.0
658
+ - PyTorch: 2.5.1+cu121
659
+ - Accelerate: 1.2.1
660
+ - Datasets: 3.2.0
661
+ - Tokenizers: 0.21.0
662
+
663
+ ## Citation
664
+
665
+ ### BibTeX
666
+
667
+ #### Sentence Transformers
668
+ ```bibtex
669
+ @inproceedings{reimers-2019-sentence-bert,
670
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
671
+ author = "Reimers, Nils and Gurevych, Iryna",
672
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
673
+ month = "11",
674
+ year = "2019",
675
+ publisher = "Association for Computational Linguistics",
676
+ url = "https://arxiv.org/abs/1908.10084",
677
+ }
678
+ ```
679
+
680
+ #### MatryoshkaLoss
681
+ ```bibtex
682
+ @misc{kusupati2024matryoshka,
683
+ title={Matryoshka Representation Learning},
684
+ 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},
685
+ year={2024},
686
+ eprint={2205.13147},
687
+ archivePrefix={arXiv},
688
+ primaryClass={cs.LG}
689
+ }
690
+ ```
691
+
692
+ #### MultipleNegativesRankingLoss
693
+ ```bibtex
694
+ @misc{henderson2017efficient,
695
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
696
+ 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},
697
+ year={2017},
698
+ eprint={1705.00652},
699
+ archivePrefix={arXiv},
700
+ primaryClass={cs.CL}
701
+ }
702
+ ```
703
+
704
+ <!--
705
+ ## Glossary
706
+
707
+ *Clearly define terms in order to be accessible across audiences.*
708
+ -->
709
+
710
+ <!--
711
+ ## Model Card Authors
712
+
713
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
714
+ -->
715
+
716
+ <!--
717
+ ## Model Card Contact
718
+
719
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
720
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-base-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
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": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.47.0",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.47.0",
5
+ "pytorch": "2.5.1+cu121"
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:bf2d0de70c620aee90e36e5b497c390b63592bdba559a262c8d4922bb1178aa6
3
+ size 437951328
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