Shivam1311 commited on
Commit
e7a7abb
·
verified ·
1 Parent(s): 8946d2f

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,749 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 'The fair value of consideration transferred of $212.1 million
16
+ consisted of: (1) cash consideration paid of $211.3 million, net of cash acquired,
17
+ and (2) non-cash consideration of $0.8 million representing the portion of the
18
+ replacement equity awards issued in connection with the acquisition that was associated
19
+ with services rendered through the date of the acquisition.'
20
+ sentences:
21
+ - What is the monthly cost of a Connected Fitness Subscription if it includes a
22
+ combination of a Bike, Tread, Guide, or Row product in the same household as of
23
+ June 2022?
24
+ - What was the fair value of the total consideration transferred for the acquisition
25
+ discussed, and how was it composed?
26
+ - How did the Tax Court rule on November 18, 2020, regarding the company's dispute
27
+ with the IRS?
28
+ - source_sentence: Each of the UK LSA members has agreed, on a several and not joint
29
+ basis, to compensate the Company for certain losses which may be incurred by the
30
+ Company, Visa Europe or their affiliates as a result of certain existing and potential
31
+ litigation relating to the setting and implementation of domestic multilateral
32
+ interchange fee rates in the United Kingdom prior to the closing of the Visa Europe
33
+ acquisition (Closing), subject to the terms and conditions set forth therein and,
34
+ with respect to each UK LSA member, up to a maximum amount of the up-front cash
35
+ consideration received by such UK LSA member. The UK LSA members’ obligations
36
+ under the UK loss sharing agreement are conditional upon, among other things,
37
+ either (a) losses valued in excess of the sterling equivalent on June 21, 2016
38
+ of €1.0 billion having arisen in UK covered claims (and such losses having reduced
39
+ the conversion rate of the series B preferred stock accordingly), or (b) the conversion
40
+ rate of the series B preferred stock having been reduced to zero pursuant to losses
41
+ arising in claims...
42
+ sentences:
43
+ - Are AbbVie's corporate governance materials available to the public, and if so,
44
+ where?
45
+ - What conditions must be met for the UK loss sharing agreement to compensate for
46
+ losses?
47
+ - How much did Delta Air Lines recognize in government grants from the Payroll Support
48
+ Programs during the year ended December 31, 2021?
49
+ - source_sentence: We provide our customers with an opportunity to trade-in their
50
+ pre-owned gaming, mobility, and other products at our stores in exchange for cash
51
+ or credit which can be applied towards the purchase of other products.
52
+ sentences:
53
+ - What is GameStop's trade-in program?
54
+ - What were the total unrealized losses on U.S. Treasury securities as of the last
55
+ reporting date?
56
+ - What methods can a refinery use to meet its Environmental Protection Agency (EPA)
57
+ requirements for blending renewable fuels?
58
+ - source_sentence: Diluted earnings per share is calculated using our weighted-average
59
+ outstanding common shares including the dilutive effect of stock awards as determined
60
+ under the treasury stock method.
61
+ sentences:
62
+ - How do changes in the assumed long-term rate of return affect AbbVie's net periodic
63
+ benefit cost for pension plans?
64
+ - What are the primary factors discussed in the Management’s Discussion and Analysis
65
+ that affect the financial statements year-to-year changes?
66
+ - What is the method used to calculate diluted earnings per share?
67
+ - source_sentence: Item 8 in the document covers 'Financial Statements and Supplementary
68
+ Data'.
69
+ sentences:
70
+ - What type of information does Item 8 in the document cover?
71
+ - What are some of the potential consequences for Meta Platforms, Inc. from inquiries
72
+ or investigations as noted in the provided text?
73
+ - How is the take rate calculated and what does it represent?
74
+ pipeline_tag: sentence-similarity
75
+ library_name: sentence-transformers
76
+ metrics:
77
+ - cosine_accuracy@1
78
+ - cosine_accuracy@3
79
+ - cosine_accuracy@5
80
+ - cosine_accuracy@10
81
+ - cosine_precision@1
82
+ - cosine_precision@3
83
+ - cosine_precision@5
84
+ - cosine_precision@10
85
+ - cosine_recall@1
86
+ - cosine_recall@3
87
+ - cosine_recall@5
88
+ - cosine_recall@10
89
+ - cosine_ndcg@10
90
+ - cosine_mrr@10
91
+ - cosine_map@100
92
+ model-index:
93
+ - name: BGE base Financial Matryoshka
94
+ results:
95
+ - task:
96
+ type: information-retrieval
97
+ name: Information Retrieval
98
+ dataset:
99
+ name: dim 768
100
+ type: dim_768
101
+ metrics:
102
+ - type: cosine_accuracy@1
103
+ value: 0.68
104
+ name: Cosine Accuracy@1
105
+ - type: cosine_accuracy@3
106
+ value: 0.8242857142857143
107
+ name: Cosine Accuracy@3
108
+ - type: cosine_accuracy@5
109
+ value: 0.8571428571428571
110
+ name: Cosine Accuracy@5
111
+ - type: cosine_accuracy@10
112
+ value: 0.8985714285714286
113
+ name: Cosine Accuracy@10
114
+ - type: cosine_precision@1
115
+ value: 0.68
116
+ name: Cosine Precision@1
117
+ - type: cosine_precision@3
118
+ value: 0.27476190476190476
119
+ name: Cosine Precision@3
120
+ - type: cosine_precision@5
121
+ value: 0.1714285714285714
122
+ name: Cosine Precision@5
123
+ - type: cosine_precision@10
124
+ value: 0.08985714285714284
125
+ name: Cosine Precision@10
126
+ - type: cosine_recall@1
127
+ value: 0.68
128
+ name: Cosine Recall@1
129
+ - type: cosine_recall@3
130
+ value: 0.8242857142857143
131
+ name: Cosine Recall@3
132
+ - type: cosine_recall@5
133
+ value: 0.8571428571428571
134
+ name: Cosine Recall@5
135
+ - type: cosine_recall@10
136
+ value: 0.8985714285714286
137
+ name: Cosine Recall@10
138
+ - type: cosine_ndcg@10
139
+ value: 0.7931022011968226
140
+ name: Cosine Ndcg@10
141
+ - type: cosine_mrr@10
142
+ value: 0.759021541950113
143
+ name: Cosine Mrr@10
144
+ - type: cosine_map@100
145
+ value: 0.7627727073081649
146
+ name: Cosine Map@100
147
+ - task:
148
+ type: information-retrieval
149
+ name: Information Retrieval
150
+ dataset:
151
+ name: dim 512
152
+ type: dim_512
153
+ metrics:
154
+ - type: cosine_accuracy@1
155
+ value: 0.6685714285714286
156
+ name: Cosine Accuracy@1
157
+ - type: cosine_accuracy@3
158
+ value: 0.82
159
+ name: Cosine Accuracy@3
160
+ - type: cosine_accuracy@5
161
+ value: 0.86
162
+ name: Cosine Accuracy@5
163
+ - type: cosine_accuracy@10
164
+ value: 0.9042857142857142
165
+ name: Cosine Accuracy@10
166
+ - type: cosine_precision@1
167
+ value: 0.6685714285714286
168
+ name: Cosine Precision@1
169
+ - type: cosine_precision@3
170
+ value: 0.2733333333333333
171
+ name: Cosine Precision@3
172
+ - type: cosine_precision@5
173
+ value: 0.172
174
+ name: Cosine Precision@5
175
+ - type: cosine_precision@10
176
+ value: 0.09042857142857141
177
+ name: Cosine Precision@10
178
+ - type: cosine_recall@1
179
+ value: 0.6685714285714286
180
+ name: Cosine Recall@1
181
+ - type: cosine_recall@3
182
+ value: 0.82
183
+ name: Cosine Recall@3
184
+ - type: cosine_recall@5
185
+ value: 0.86
186
+ name: Cosine Recall@5
187
+ - type: cosine_recall@10
188
+ value: 0.9042857142857142
189
+ name: Cosine Recall@10
190
+ - type: cosine_ndcg@10
191
+ value: 0.7907009828560375
192
+ name: Cosine Ndcg@10
193
+ - type: cosine_mrr@10
194
+ value: 0.7540430839002267
195
+ name: Cosine Mrr@10
196
+ - type: cosine_map@100
197
+ value: 0.7572918009226873
198
+ name: Cosine Map@100
199
+ - task:
200
+ type: information-retrieval
201
+ name: Information Retrieval
202
+ dataset:
203
+ name: dim 256
204
+ type: dim_256
205
+ metrics:
206
+ - type: cosine_accuracy@1
207
+ value: 0.6771428571428572
208
+ name: Cosine Accuracy@1
209
+ - type: cosine_accuracy@3
210
+ value: 0.8142857142857143
211
+ name: Cosine Accuracy@3
212
+ - type: cosine_accuracy@5
213
+ value: 0.8571428571428571
214
+ name: Cosine Accuracy@5
215
+ - type: cosine_accuracy@10
216
+ value: 0.8857142857142857
217
+ name: Cosine Accuracy@10
218
+ - type: cosine_precision@1
219
+ value: 0.6771428571428572
220
+ name: Cosine Precision@1
221
+ - type: cosine_precision@3
222
+ value: 0.2714285714285714
223
+ name: Cosine Precision@3
224
+ - type: cosine_precision@5
225
+ value: 0.1714285714285714
226
+ name: Cosine Precision@5
227
+ - type: cosine_precision@10
228
+ value: 0.08857142857142855
229
+ name: Cosine Precision@10
230
+ - type: cosine_recall@1
231
+ value: 0.6771428571428572
232
+ name: Cosine Recall@1
233
+ - type: cosine_recall@3
234
+ value: 0.8142857142857143
235
+ name: Cosine Recall@3
236
+ - type: cosine_recall@5
237
+ value: 0.8571428571428571
238
+ name: Cosine Recall@5
239
+ - type: cosine_recall@10
240
+ value: 0.8857142857142857
241
+ name: Cosine Recall@10
242
+ - type: cosine_ndcg@10
243
+ value: 0.7870155634206691
244
+ name: Cosine Ndcg@10
245
+ - type: cosine_mrr@10
246
+ value: 0.7548027210884352
247
+ name: Cosine Mrr@10
248
+ - type: cosine_map@100
249
+ value: 0.7592885578023618
250
+ name: Cosine Map@100
251
+ - task:
252
+ type: information-retrieval
253
+ name: Information Retrieval
254
+ dataset:
255
+ name: dim 128
256
+ type: dim_128
257
+ metrics:
258
+ - type: cosine_accuracy@1
259
+ value: 0.6542857142857142
260
+ name: Cosine Accuracy@1
261
+ - type: cosine_accuracy@3
262
+ value: 0.8071428571428572
263
+ name: Cosine Accuracy@3
264
+ - type: cosine_accuracy@5
265
+ value: 0.8514285714285714
266
+ name: Cosine Accuracy@5
267
+ - type: cosine_accuracy@10
268
+ value: 0.8857142857142857
269
+ name: Cosine Accuracy@10
270
+ - type: cosine_precision@1
271
+ value: 0.6542857142857142
272
+ name: Cosine Precision@1
273
+ - type: cosine_precision@3
274
+ value: 0.26904761904761904
275
+ name: Cosine Precision@3
276
+ - type: cosine_precision@5
277
+ value: 0.17028571428571426
278
+ name: Cosine Precision@5
279
+ - type: cosine_precision@10
280
+ value: 0.08857142857142856
281
+ name: Cosine Precision@10
282
+ - type: cosine_recall@1
283
+ value: 0.6542857142857142
284
+ name: Cosine Recall@1
285
+ - type: cosine_recall@3
286
+ value: 0.8071428571428572
287
+ name: Cosine Recall@3
288
+ - type: cosine_recall@5
289
+ value: 0.8514285714285714
290
+ name: Cosine Recall@5
291
+ - type: cosine_recall@10
292
+ value: 0.8857142857142857
293
+ name: Cosine Recall@10
294
+ - type: cosine_ndcg@10
295
+ value: 0.7751084647376248
296
+ name: Cosine Ndcg@10
297
+ - type: cosine_mrr@10
298
+ value: 0.73912925170068
299
+ name: Cosine Mrr@10
300
+ - type: cosine_map@100
301
+ value: 0.7430473786684797
302
+ name: Cosine Map@100
303
+ - task:
304
+ type: information-retrieval
305
+ name: Information Retrieval
306
+ dataset:
307
+ name: dim 64
308
+ type: dim_64
309
+ metrics:
310
+ - type: cosine_accuracy@1
311
+ value: 0.6157142857142858
312
+ name: Cosine Accuracy@1
313
+ - type: cosine_accuracy@3
314
+ value: 0.7771428571428571
315
+ name: Cosine Accuracy@3
316
+ - type: cosine_accuracy@5
317
+ value: 0.8214285714285714
318
+ name: Cosine Accuracy@5
319
+ - type: cosine_accuracy@10
320
+ value: 0.8728571428571429
321
+ name: Cosine Accuracy@10
322
+ - type: cosine_precision@1
323
+ value: 0.6157142857142858
324
+ name: Cosine Precision@1
325
+ - type: cosine_precision@3
326
+ value: 0.259047619047619
327
+ name: Cosine Precision@3
328
+ - type: cosine_precision@5
329
+ value: 0.16428571428571428
330
+ name: Cosine Precision@5
331
+ - type: cosine_precision@10
332
+ value: 0.08728571428571427
333
+ name: Cosine Precision@10
334
+ - type: cosine_recall@1
335
+ value: 0.6157142857142858
336
+ name: Cosine Recall@1
337
+ - type: cosine_recall@3
338
+ value: 0.7771428571428571
339
+ name: Cosine Recall@3
340
+ - type: cosine_recall@5
341
+ value: 0.8214285714285714
342
+ name: Cosine Recall@5
343
+ - type: cosine_recall@10
344
+ value: 0.8728571428571429
345
+ name: Cosine Recall@10
346
+ - type: cosine_ndcg@10
347
+ value: 0.7472883962433147
348
+ name: Cosine Ndcg@10
349
+ - type: cosine_mrr@10
350
+ value: 0.7067517006802716
351
+ name: Cosine Mrr@10
352
+ - type: cosine_map@100
353
+ value: 0.7111439006196084
354
+ name: Cosine Map@100
355
+ ---
356
+
357
+ # BGE base Financial Matryoshka
358
+
359
+ 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.
360
+
361
+ ## Model Details
362
+
363
+ ### Model Description
364
+ - **Model Type:** Sentence Transformer
365
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
366
+ - **Maximum Sequence Length:** 512 tokens
367
+ - **Output Dimensionality:** 768 dimensions
368
+ - **Similarity Function:** Cosine Similarity
369
+ - **Training Dataset:**
370
+ - json
371
+ - **Language:** en
372
+ - **License:** apache-2.0
373
+
374
+ ### Model Sources
375
+
376
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
377
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
378
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
379
+
380
+ ### Full Model Architecture
381
+
382
+ ```
383
+ SentenceTransformer(
384
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
385
+ (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})
386
+ (2): Normalize()
387
+ )
388
+ ```
389
+
390
+ ## Usage
391
+
392
+ ### Direct Usage (Sentence Transformers)
393
+
394
+ First install the Sentence Transformers library:
395
+
396
+ ```bash
397
+ pip install -U sentence-transformers
398
+ ```
399
+
400
+ Then you can load this model and run inference.
401
+ ```python
402
+ from sentence_transformers import SentenceTransformer
403
+
404
+ # Download from the 🤗 Hub
405
+ model = SentenceTransformer("Shivam1311/bge-base-financial-matryoshka")
406
+ # Run inference
407
+ sentences = [
408
+ "Item 8 in the document covers 'Financial Statements and Supplementary Data'.",
409
+ 'What type of information does Item 8 in the document cover?',
410
+ 'What are some of the potential consequences for Meta Platforms, Inc. from inquiries or investigations as noted in the provided text?',
411
+ ]
412
+ embeddings = model.encode(sentences)
413
+ print(embeddings.shape)
414
+ # [3, 768]
415
+
416
+ # Get the similarity scores for the embeddings
417
+ similarities = model.similarity(embeddings, embeddings)
418
+ print(similarities.shape)
419
+ # [3, 3]
420
+ ```
421
+
422
+ <!--
423
+ ### Direct Usage (Transformers)
424
+
425
+ <details><summary>Click to see the direct usage in Transformers</summary>
426
+
427
+ </details>
428
+ -->
429
+
430
+ <!--
431
+ ### Downstream Usage (Sentence Transformers)
432
+
433
+ You can finetune this model on your own dataset.
434
+
435
+ <details><summary>Click to expand</summary>
436
+
437
+ </details>
438
+ -->
439
+
440
+ <!--
441
+ ### Out-of-Scope Use
442
+
443
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
444
+ -->
445
+
446
+ ## Evaluation
447
+
448
+ ### Metrics
449
+
450
+ #### Information Retrieval
451
+
452
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
453
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
454
+
455
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
456
+ |:--------------------|:-----------|:-----------|:----------|:-----------|:-----------|
457
+ | cosine_accuracy@1 | 0.68 | 0.6686 | 0.6771 | 0.6543 | 0.6157 |
458
+ | cosine_accuracy@3 | 0.8243 | 0.82 | 0.8143 | 0.8071 | 0.7771 |
459
+ | cosine_accuracy@5 | 0.8571 | 0.86 | 0.8571 | 0.8514 | 0.8214 |
460
+ | cosine_accuracy@10 | 0.8986 | 0.9043 | 0.8857 | 0.8857 | 0.8729 |
461
+ | cosine_precision@1 | 0.68 | 0.6686 | 0.6771 | 0.6543 | 0.6157 |
462
+ | cosine_precision@3 | 0.2748 | 0.2733 | 0.2714 | 0.269 | 0.259 |
463
+ | cosine_precision@5 | 0.1714 | 0.172 | 0.1714 | 0.1703 | 0.1643 |
464
+ | cosine_precision@10 | 0.0899 | 0.0904 | 0.0886 | 0.0886 | 0.0873 |
465
+ | cosine_recall@1 | 0.68 | 0.6686 | 0.6771 | 0.6543 | 0.6157 |
466
+ | cosine_recall@3 | 0.8243 | 0.82 | 0.8143 | 0.8071 | 0.7771 |
467
+ | cosine_recall@5 | 0.8571 | 0.86 | 0.8571 | 0.8514 | 0.8214 |
468
+ | cosine_recall@10 | 0.8986 | 0.9043 | 0.8857 | 0.8857 | 0.8729 |
469
+ | **cosine_ndcg@10** | **0.7931** | **0.7907** | **0.787** | **0.7751** | **0.7473** |
470
+ | cosine_mrr@10 | 0.759 | 0.754 | 0.7548 | 0.7391 | 0.7068 |
471
+ | cosine_map@100 | 0.7628 | 0.7573 | 0.7593 | 0.743 | 0.7111 |
472
+
473
+ <!--
474
+ ## Bias, Risks and Limitations
475
+
476
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
477
+ -->
478
+
479
+ <!--
480
+ ### Recommendations
481
+
482
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
483
+ -->
484
+
485
+ ## Training Details
486
+
487
+ ### Training Dataset
488
+
489
+ #### json
490
+
491
+ * Dataset: json
492
+ * Size: 6,300 training samples
493
+ * Columns: <code>positive</code> and <code>anchor</code>
494
+ * Approximate statistics based on the first 1000 samples:
495
+ | | positive | anchor |
496
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
497
+ | type | string | string |
498
+ | details | <ul><li>min: 8 tokens</li><li>mean: 46.61 tokens</li><li>max: 439 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.72 tokens</li><li>max: 51 tokens</li></ul> |
499
+ * Samples:
500
+ | positive | anchor |
501
+ |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------|
502
+ | <code>Operating costs and expenses increased $80.3 million, or 7.1%, during the year ended December 31, 2023, compared to the year ended December 31, 2022 primarily due to increases in film exhibition and food and beverage costs.</code> | <code>What factors contributed to the escalation in operating costs and expenses in 2023?</code> |
503
+ | <code>In the United States, the company purchases HFCS to meet its and its bottlers’ requirements with the assistance of Coca-Cola Bottlers’ Sales & Services Company LLC, which is a procurement service provider for their North American operations.</code> | <code>How does the company source high fructose corn syrup (HFCS) in the United States?</code> |
504
+ | <code>Item 8. Financial Statements and Supplementary Data The index to Financial Statements and Supplementary Data is presented</code> | <code>What is presented in Item 8 according to Financial Statements and Supplementary Data?</code> |
505
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
506
+ ```json
507
+ {
508
+ "loss": "MultipleNegativesRankingLoss",
509
+ "matryoshka_dims": [
510
+ 768,
511
+ 512,
512
+ 256,
513
+ 128,
514
+ 64
515
+ ],
516
+ "matryoshka_weights": [
517
+ 1,
518
+ 1,
519
+ 1,
520
+ 1,
521
+ 1
522
+ ],
523
+ "n_dims_per_step": -1
524
+ }
525
+ ```
526
+
527
+ ### Training Hyperparameters
528
+ #### Non-Default Hyperparameters
529
+
530
+ - `eval_strategy`: epoch
531
+ - `per_device_train_batch_size`: 16
532
+ - `per_device_eval_batch_size`: 16
533
+ - `gradient_accumulation_steps`: 16
534
+ - `learning_rate`: 2e-05
535
+ - `num_train_epochs`: 4
536
+ - `lr_scheduler_type`: cosine
537
+ - `warmup_ratio`: 0.1
538
+ - `bf16`: True
539
+ - `tf32`: False
540
+ - `load_best_model_at_end`: True
541
+ - `optim`: adamw_torch_fused
542
+ - `batch_sampler`: no_duplicates
543
+
544
+ #### All Hyperparameters
545
+ <details><summary>Click to expand</summary>
546
+
547
+ - `overwrite_output_dir`: False
548
+ - `do_predict`: False
549
+ - `eval_strategy`: epoch
550
+ - `prediction_loss_only`: True
551
+ - `per_device_train_batch_size`: 16
552
+ - `per_device_eval_batch_size`: 16
553
+ - `per_gpu_train_batch_size`: None
554
+ - `per_gpu_eval_batch_size`: None
555
+ - `gradient_accumulation_steps`: 16
556
+ - `eval_accumulation_steps`: None
557
+ - `torch_empty_cache_steps`: None
558
+ - `learning_rate`: 2e-05
559
+ - `weight_decay`: 0.0
560
+ - `adam_beta1`: 0.9
561
+ - `adam_beta2`: 0.999
562
+ - `adam_epsilon`: 1e-08
563
+ - `max_grad_norm`: 1.0
564
+ - `num_train_epochs`: 4
565
+ - `max_steps`: -1
566
+ - `lr_scheduler_type`: cosine
567
+ - `lr_scheduler_kwargs`: {}
568
+ - `warmup_ratio`: 0.1
569
+ - `warmup_steps`: 0
570
+ - `log_level`: passive
571
+ - `log_level_replica`: warning
572
+ - `log_on_each_node`: True
573
+ - `logging_nan_inf_filter`: True
574
+ - `save_safetensors`: True
575
+ - `save_on_each_node`: False
576
+ - `save_only_model`: False
577
+ - `restore_callback_states_from_checkpoint`: False
578
+ - `no_cuda`: False
579
+ - `use_cpu`: False
580
+ - `use_mps_device`: False
581
+ - `seed`: 42
582
+ - `data_seed`: None
583
+ - `jit_mode_eval`: False
584
+ - `use_ipex`: False
585
+ - `bf16`: True
586
+ - `fp16`: False
587
+ - `fp16_opt_level`: O1
588
+ - `half_precision_backend`: auto
589
+ - `bf16_full_eval`: False
590
+ - `fp16_full_eval`: False
591
+ - `tf32`: False
592
+ - `local_rank`: 0
593
+ - `ddp_backend`: None
594
+ - `tpu_num_cores`: None
595
+ - `tpu_metrics_debug`: False
596
+ - `debug`: []
597
+ - `dataloader_drop_last`: False
598
+ - `dataloader_num_workers`: 0
599
+ - `dataloader_prefetch_factor`: None
600
+ - `past_index`: -1
601
+ - `disable_tqdm`: False
602
+ - `remove_unused_columns`: True
603
+ - `label_names`: None
604
+ - `load_best_model_at_end`: True
605
+ - `ignore_data_skip`: False
606
+ - `fsdp`: []
607
+ - `fsdp_min_num_params`: 0
608
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
609
+ - `fsdp_transformer_layer_cls_to_wrap`: None
610
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
611
+ - `deepspeed`: None
612
+ - `label_smoothing_factor`: 0.0
613
+ - `optim`: adamw_torch_fused
614
+ - `optim_args`: None
615
+ - `adafactor`: False
616
+ - `group_by_length`: False
617
+ - `length_column_name`: length
618
+ - `ddp_find_unused_parameters`: None
619
+ - `ddp_bucket_cap_mb`: None
620
+ - `ddp_broadcast_buffers`: False
621
+ - `dataloader_pin_memory`: True
622
+ - `dataloader_persistent_workers`: False
623
+ - `skip_memory_metrics`: True
624
+ - `use_legacy_prediction_loop`: False
625
+ - `push_to_hub`: False
626
+ - `resume_from_checkpoint`: None
627
+ - `hub_model_id`: None
628
+ - `hub_strategy`: every_save
629
+ - `hub_private_repo`: None
630
+ - `hub_always_push`: False
631
+ - `gradient_checkpointing`: False
632
+ - `gradient_checkpointing_kwargs`: None
633
+ - `include_inputs_for_metrics`: False
634
+ - `include_for_metrics`: []
635
+ - `eval_do_concat_batches`: True
636
+ - `fp16_backend`: auto
637
+ - `push_to_hub_model_id`: None
638
+ - `push_to_hub_organization`: None
639
+ - `mp_parameters`:
640
+ - `auto_find_batch_size`: False
641
+ - `full_determinism`: False
642
+ - `torchdynamo`: None
643
+ - `ray_scope`: last
644
+ - `ddp_timeout`: 1800
645
+ - `torch_compile`: False
646
+ - `torch_compile_backend`: None
647
+ - `torch_compile_mode`: None
648
+ - `dispatch_batches`: None
649
+ - `split_batches`: None
650
+ - `include_tokens_per_second`: False
651
+ - `include_num_input_tokens_seen`: False
652
+ - `neftune_noise_alpha`: None
653
+ - `optim_target_modules`: None
654
+ - `batch_eval_metrics`: False
655
+ - `eval_on_start`: False
656
+ - `use_liger_kernel`: False
657
+ - `eval_use_gather_object`: False
658
+ - `average_tokens_across_devices`: False
659
+ - `prompts`: None
660
+ - `batch_sampler`: no_duplicates
661
+ - `multi_dataset_batch_sampler`: proportional
662
+
663
+ </details>
664
+
665
+ ### Training Logs
666
+ | 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 |
667
+ |:-------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
668
+ | 0.4061 | 10 | 16.0873 | - | - | - | - | - |
669
+ | 0.8122 | 20 | 8.3282 | - | - | - | - | - |
670
+ | 1.0 | 25 | - | 0.7841 | 0.7796 | 0.7774 | 0.7631 | 0.7320 |
671
+ | 1.2030 | 30 | 5.1781 | - | - | - | - | - |
672
+ | 1.6091 | 40 | 4.0947 | - | - | - | - | - |
673
+ | 2.0 | 50 | 3.9824 | 0.7888 | 0.7867 | 0.7851 | 0.7701 | 0.7401 |
674
+ | 2.4061 | 60 | 2.854 | - | - | - | - | - |
675
+ | 2.8122 | 70 | 2.9878 | - | - | - | - | - |
676
+ | **3.0** | **75** | **-** | **0.7913** | **0.7903** | **0.7869** | **0.7755** | **0.7469** |
677
+ | 3.2030 | 80 | 2.5653 | - | - | - | - | - |
678
+ | 3.6091 | 90 | 2.999 | - | - | - | - | - |
679
+ | 3.8528 | 96 | - | 0.7931 | 0.7907 | 0.7870 | 0.7751 | 0.7473 |
680
+
681
+ * The bold row denotes the saved checkpoint.
682
+
683
+ ### Framework Versions
684
+ - Python: 3.11.11
685
+ - Sentence Transformers: 3.4.1
686
+ - Transformers: 4.48.3
687
+ - PyTorch: 2.5.1+cu124
688
+ - Accelerate: 1.3.0
689
+ - Datasets: 3.3.2
690
+ - Tokenizers: 0.21.0
691
+
692
+ ## Citation
693
+
694
+ ### BibTeX
695
+
696
+ #### Sentence Transformers
697
+ ```bibtex
698
+ @inproceedings{reimers-2019-sentence-bert,
699
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
700
+ author = "Reimers, Nils and Gurevych, Iryna",
701
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
702
+ month = "11",
703
+ year = "2019",
704
+ publisher = "Association for Computational Linguistics",
705
+ url = "https://arxiv.org/abs/1908.10084",
706
+ }
707
+ ```
708
+
709
+ #### MatryoshkaLoss
710
+ ```bibtex
711
+ @misc{kusupati2024matryoshka,
712
+ title={Matryoshka Representation Learning},
713
+ 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},
714
+ year={2024},
715
+ eprint={2205.13147},
716
+ archivePrefix={arXiv},
717
+ primaryClass={cs.LG}
718
+ }
719
+ ```
720
+
721
+ #### MultipleNegativesRankingLoss
722
+ ```bibtex
723
+ @misc{henderson2017efficient,
724
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
725
+ 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},
726
+ year={2017},
727
+ eprint={1705.00652},
728
+ archivePrefix={arXiv},
729
+ primaryClass={cs.CL}
730
+ }
731
+ ```
732
+
733
+ <!--
734
+ ## Glossary
735
+
736
+ *Clearly define terms in order to be accessible across audiences.*
737
+ -->
738
+
739
+ <!--
740
+ ## Model Card Authors
741
+
742
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
743
+ -->
744
+
745
+ <!--
746
+ ## Model Card Contact
747
+
748
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
749
+ -->
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.48.3",
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.4.1",
4
+ "transformers": "4.48.3",
5
+ "pytorch": "2.5.1+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:ab357b2c5529fbd0569919e37e50a17b8913c664d77f54b172586ebfece97501
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