WaheedLone commited on
Commit
41c4c2b
1 Parent(s): a59eb03

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,806 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: sentence-transformers
6
+ tags:
7
+ - sentence-transformers
8
+ - sentence-similarity
9
+ - feature-extraction
10
+ - generated_from_trainer
11
+ - dataset_size:6300
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: BAAI/bge-base-en-v1.5
15
+ datasets: []
16
+ metrics:
17
+ - cosine_accuracy@1
18
+ - cosine_accuracy@3
19
+ - cosine_accuracy@5
20
+ - cosine_accuracy@10
21
+ - cosine_precision@1
22
+ - cosine_precision@3
23
+ - cosine_precision@5
24
+ - cosine_precision@10
25
+ - cosine_recall@1
26
+ - cosine_recall@3
27
+ - cosine_recall@5
28
+ - cosine_recall@10
29
+ - cosine_ndcg@10
30
+ - cosine_mrr@10
31
+ - cosine_map@100
32
+ widget:
33
+ - source_sentence: The company hedges foreign currency exchange-based cash flow variability
34
+ of certain fees using forward contracts designated as hedging instruments. It
35
+ also holds short-term forward contracts to offset exposure to fluctuations in
36
+ certain of its foreign currency denominated cash balances and intercompany financing
37
+ arrangements, without designating these forward contracts as hedging instruments.
38
+ sentences:
39
+ - What was the total stockholders' equity at Amazon.com, Inc. as of December 31,
40
+ 2021?
41
+ - How does the company manage fluctuations in foreign currency exchange rates?
42
+ - What are some of the potential consequences for Meta Platforms, Inc. from inquiries
43
+ or investigations as noted in the provided text?
44
+ - source_sentence: The Financial Statement Schedule is located on page S-1 of IBM’s
45
+ 2023 Form 10-K.
46
+ sentences:
47
+ - How is Hewlett Packard addressing competition in the enterprise IT infrastructure
48
+ market?
49
+ - Where in IBM’s 2023 Form 10-K can the Financial Statement Schedule be found?
50
+ - What was Intuit's Net Income in fiscal year 2023?
51
+ - source_sentence: Sales of DARZALEX in 2023 showed a 22.2% increase over the previous
52
+ year.
53
+ sentences:
54
+ - How much did DARZALEX sales increase in 2023 compared to the previous year?
55
+ - What strategic focus does Etsy have for its marketplace?
56
+ - Since when has Mr. Goodarzi been the President and CEO of Intuit?
57
+ - source_sentence: Chubb Limited further advanced their goal of greater product, customer,
58
+ and geographical diversification with incremental purchases that led to a controlling
59
+ majority interest in Huatai Insurance Group Co. Ltd, owning about 76.5 percent
60
+ as of July 1, 2023.
61
+ sentences:
62
+ - What are the primary sources of revenue for Salesforce, Inc. as described in their
63
+ consolidated financial statements?
64
+ - What acquisitions did Hershey complete to expand its snacking portfolio, and when
65
+ did these occur?
66
+ - What percentage of the Huatai Insurance Group Co. Ltd does Chubb Limited own as
67
+ of July 1, 2023?
68
+ - source_sentence: The consolidated balance sheets of Visa Inc. as of September 30,
69
+ 2023, list the total current assets at $33,532 million.
70
+ sentences:
71
+ - What was the total of Visa Inc.'s current assets as of September 30, 2023?
72
+ - What was Garmin Ltd.'s net income for the fiscal year ended December 30, 2023?
73
+ - By what percentage did online sales grow in fiscal 2022 compared to fiscal 2021?
74
+ pipeline_tag: sentence-similarity
75
+ model-index:
76
+ - name: BGE base Financial Matryoshka
77
+ results:
78
+ - task:
79
+ type: information-retrieval
80
+ name: Information Retrieval
81
+ dataset:
82
+ name: dim 768
83
+ type: dim_768
84
+ metrics:
85
+ - type: cosine_accuracy@1
86
+ value: 0.6885714285714286
87
+ name: Cosine Accuracy@1
88
+ - type: cosine_accuracy@3
89
+ value: 0.8285714285714286
90
+ name: Cosine Accuracy@3
91
+ - type: cosine_accuracy@5
92
+ value: 0.8671428571428571
93
+ name: Cosine Accuracy@5
94
+ - type: cosine_accuracy@10
95
+ value: 0.9128571428571428
96
+ name: Cosine Accuracy@10
97
+ - type: cosine_precision@1
98
+ value: 0.6885714285714286
99
+ name: Cosine Precision@1
100
+ - type: cosine_precision@3
101
+ value: 0.27619047619047615
102
+ name: Cosine Precision@3
103
+ - type: cosine_precision@5
104
+ value: 0.1734285714285714
105
+ name: Cosine Precision@5
106
+ - type: cosine_precision@10
107
+ value: 0.09128571428571426
108
+ name: Cosine Precision@10
109
+ - type: cosine_recall@1
110
+ value: 0.6885714285714286
111
+ name: Cosine Recall@1
112
+ - type: cosine_recall@3
113
+ value: 0.8285714285714286
114
+ name: Cosine Recall@3
115
+ - type: cosine_recall@5
116
+ value: 0.8671428571428571
117
+ name: Cosine Recall@5
118
+ - type: cosine_recall@10
119
+ value: 0.9128571428571428
120
+ name: Cosine Recall@10
121
+ - type: cosine_ndcg@10
122
+ value: 0.8022848173323525
123
+ name: Cosine Ndcg@10
124
+ - type: cosine_mrr@10
125
+ value: 0.7666422902494329
126
+ name: Cosine Mrr@10
127
+ - type: cosine_map@100
128
+ value: 0.7696751281834099
129
+ name: Cosine Map@100
130
+ - task:
131
+ type: information-retrieval
132
+ name: Information Retrieval
133
+ dataset:
134
+ name: dim 512
135
+ type: dim_512
136
+ metrics:
137
+ - type: cosine_accuracy@1
138
+ value: 0.6928571428571428
139
+ name: Cosine Accuracy@1
140
+ - type: cosine_accuracy@3
141
+ value: 0.8228571428571428
142
+ name: Cosine Accuracy@3
143
+ - type: cosine_accuracy@5
144
+ value: 0.8642857142857143
145
+ name: Cosine Accuracy@5
146
+ - type: cosine_accuracy@10
147
+ value: 0.91
148
+ name: Cosine Accuracy@10
149
+ - type: cosine_precision@1
150
+ value: 0.6928571428571428
151
+ name: Cosine Precision@1
152
+ - type: cosine_precision@3
153
+ value: 0.27428571428571424
154
+ name: Cosine Precision@3
155
+ - type: cosine_precision@5
156
+ value: 0.17285714285714285
157
+ name: Cosine Precision@5
158
+ - type: cosine_precision@10
159
+ value: 0.09099999999999998
160
+ name: Cosine Precision@10
161
+ - type: cosine_recall@1
162
+ value: 0.6928571428571428
163
+ name: Cosine Recall@1
164
+ - type: cosine_recall@3
165
+ value: 0.8228571428571428
166
+ name: Cosine Recall@3
167
+ - type: cosine_recall@5
168
+ value: 0.8642857142857143
169
+ name: Cosine Recall@5
170
+ - type: cosine_recall@10
171
+ value: 0.91
172
+ name: Cosine Recall@10
173
+ - type: cosine_ndcg@10
174
+ value: 0.8016907244180009
175
+ name: Cosine Ndcg@10
176
+ - type: cosine_mrr@10
177
+ value: 0.7668412698412699
178
+ name: Cosine Mrr@10
179
+ - type: cosine_map@100
180
+ value: 0.770110214157224
181
+ name: Cosine Map@100
182
+ - task:
183
+ type: information-retrieval
184
+ name: Information Retrieval
185
+ dataset:
186
+ name: dim 256
187
+ type: dim_256
188
+ metrics:
189
+ - type: cosine_accuracy@1
190
+ value: 0.6871428571428572
191
+ name: Cosine Accuracy@1
192
+ - type: cosine_accuracy@3
193
+ value: 0.8185714285714286
194
+ name: Cosine Accuracy@3
195
+ - type: cosine_accuracy@5
196
+ value: 0.8628571428571429
197
+ name: Cosine Accuracy@5
198
+ - type: cosine_accuracy@10
199
+ value: 0.9014285714285715
200
+ name: Cosine Accuracy@10
201
+ - type: cosine_precision@1
202
+ value: 0.6871428571428572
203
+ name: Cosine Precision@1
204
+ - type: cosine_precision@3
205
+ value: 0.27285714285714285
206
+ name: Cosine Precision@3
207
+ - type: cosine_precision@5
208
+ value: 0.17257142857142854
209
+ name: Cosine Precision@5
210
+ - type: cosine_precision@10
211
+ value: 0.09014285714285712
212
+ name: Cosine Precision@10
213
+ - type: cosine_recall@1
214
+ value: 0.6871428571428572
215
+ name: Cosine Recall@1
216
+ - type: cosine_recall@3
217
+ value: 0.8185714285714286
218
+ name: Cosine Recall@3
219
+ - type: cosine_recall@5
220
+ value: 0.8628571428571429
221
+ name: Cosine Recall@5
222
+ - type: cosine_recall@10
223
+ value: 0.9014285714285715
224
+ name: Cosine Recall@10
225
+ - type: cosine_ndcg@10
226
+ value: 0.7962767797304091
227
+ name: Cosine Ndcg@10
228
+ - type: cosine_mrr@10
229
+ value: 0.7623021541950112
230
+ name: Cosine Mrr@10
231
+ - type: cosine_map@100
232
+ value: 0.7656765331908582
233
+ name: Cosine Map@100
234
+ - task:
235
+ type: information-retrieval
236
+ name: Information Retrieval
237
+ dataset:
238
+ name: dim 128
239
+ type: dim_128
240
+ metrics:
241
+ - type: cosine_accuracy@1
242
+ value: 0.6742857142857143
243
+ name: Cosine Accuracy@1
244
+ - type: cosine_accuracy@3
245
+ value: 0.8057142857142857
246
+ name: Cosine Accuracy@3
247
+ - type: cosine_accuracy@5
248
+ value: 0.8528571428571429
249
+ name: Cosine Accuracy@5
250
+ - type: cosine_accuracy@10
251
+ value: 0.8942857142857142
252
+ name: Cosine Accuracy@10
253
+ - type: cosine_precision@1
254
+ value: 0.6742857142857143
255
+ name: Cosine Precision@1
256
+ - type: cosine_precision@3
257
+ value: 0.26857142857142857
258
+ name: Cosine Precision@3
259
+ - type: cosine_precision@5
260
+ value: 0.17057142857142854
261
+ name: Cosine Precision@5
262
+ - type: cosine_precision@10
263
+ value: 0.08942857142857143
264
+ name: Cosine Precision@10
265
+ - type: cosine_recall@1
266
+ value: 0.6742857142857143
267
+ name: Cosine Recall@1
268
+ - type: cosine_recall@3
269
+ value: 0.8057142857142857
270
+ name: Cosine Recall@3
271
+ - type: cosine_recall@5
272
+ value: 0.8528571428571429
273
+ name: Cosine Recall@5
274
+ - type: cosine_recall@10
275
+ value: 0.8942857142857142
276
+ name: Cosine Recall@10
277
+ - type: cosine_ndcg@10
278
+ value: 0.7861958176742697
279
+ name: Cosine Ndcg@10
280
+ - type: cosine_mrr@10
281
+ value: 0.7513151927437639
282
+ name: Cosine Mrr@10
283
+ - type: cosine_map@100
284
+ value: 0.7548627394954026
285
+ name: Cosine Map@100
286
+ - task:
287
+ type: information-retrieval
288
+ name: Information Retrieval
289
+ dataset:
290
+ name: dim 64
291
+ type: dim_64
292
+ metrics:
293
+ - type: cosine_accuracy@1
294
+ value: 0.6428571428571429
295
+ name: Cosine Accuracy@1
296
+ - type: cosine_accuracy@3
297
+ value: 0.7971428571428572
298
+ name: Cosine Accuracy@3
299
+ - type: cosine_accuracy@5
300
+ value: 0.8185714285714286
301
+ name: Cosine Accuracy@5
302
+ - type: cosine_accuracy@10
303
+ value: 0.8685714285714285
304
+ name: Cosine Accuracy@10
305
+ - type: cosine_precision@1
306
+ value: 0.6428571428571429
307
+ name: Cosine Precision@1
308
+ - type: cosine_precision@3
309
+ value: 0.26571428571428574
310
+ name: Cosine Precision@3
311
+ - type: cosine_precision@5
312
+ value: 0.1637142857142857
313
+ name: Cosine Precision@5
314
+ - type: cosine_precision@10
315
+ value: 0.08685714285714284
316
+ name: Cosine Precision@10
317
+ - type: cosine_recall@1
318
+ value: 0.6428571428571429
319
+ name: Cosine Recall@1
320
+ - type: cosine_recall@3
321
+ value: 0.7971428571428572
322
+ name: Cosine Recall@3
323
+ - type: cosine_recall@5
324
+ value: 0.8185714285714286
325
+ name: Cosine Recall@5
326
+ - type: cosine_recall@10
327
+ value: 0.8685714285714285
328
+ name: Cosine Recall@10
329
+ - type: cosine_ndcg@10
330
+ value: 0.7590638034734002
331
+ name: Cosine Ndcg@10
332
+ - type: cosine_mrr@10
333
+ value: 0.7236972789115643
334
+ name: Cosine Mrr@10
335
+ - type: cosine_map@100
336
+ value: 0.7282650681776726
337
+ name: Cosine Map@100
338
+ ---
339
+
340
+ # BGE base Financial Matryoshka
341
+
342
+ 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). 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.
343
+
344
+ ## Model Details
345
+
346
+ ### Model Description
347
+ - **Model Type:** Sentence Transformer
348
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
349
+ - **Maximum Sequence Length:** 512 tokens
350
+ - **Output Dimensionality:** 768 tokens
351
+ - **Similarity Function:** Cosine Similarity
352
+ <!-- - **Training Dataset:** Unknown -->
353
+ - **Language:** en
354
+ - **License:** apache-2.0
355
+
356
+ ### Model Sources
357
+
358
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
359
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
360
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
361
+
362
+ ### Full Model Architecture
363
+
364
+ ```
365
+ SentenceTransformer(
366
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
367
+ (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})
368
+ (2): Normalize()
369
+ )
370
+ ```
371
+
372
+ ## Usage
373
+
374
+ ### Direct Usage (Sentence Transformers)
375
+
376
+ First install the Sentence Transformers library:
377
+
378
+ ```bash
379
+ pip install -U sentence-transformers
380
+ ```
381
+
382
+ Then you can load this model and run inference.
383
+ ```python
384
+ from sentence_transformers import SentenceTransformer
385
+
386
+ # Download from the 🤗 Hub
387
+ model = SentenceTransformer("WaheedLone/bge-base-financial-matryoshka")
388
+ # Run inference
389
+ sentences = [
390
+ 'The consolidated balance sheets of Visa Inc. as of September 30, 2023, list the total current assets at $33,532 million.',
391
+ "What was the total of Visa Inc.'s current assets as of September 30, 2023?",
392
+ "What was Garmin Ltd.'s net income for the fiscal year ended December 30, 2023?",
393
+ ]
394
+ embeddings = model.encode(sentences)
395
+ print(embeddings.shape)
396
+ # [3, 768]
397
+
398
+ # Get the similarity scores for the embeddings
399
+ similarities = model.similarity(embeddings, embeddings)
400
+ print(similarities.shape)
401
+ # [3, 3]
402
+ ```
403
+
404
+ <!--
405
+ ### Direct Usage (Transformers)
406
+
407
+ <details><summary>Click to see the direct usage in Transformers</summary>
408
+
409
+ </details>
410
+ -->
411
+
412
+ <!--
413
+ ### Downstream Usage (Sentence Transformers)
414
+
415
+ You can finetune this model on your own dataset.
416
+
417
+ <details><summary>Click to expand</summary>
418
+
419
+ </details>
420
+ -->
421
+
422
+ <!--
423
+ ### Out-of-Scope Use
424
+
425
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
426
+ -->
427
+
428
+ ## Evaluation
429
+
430
+ ### Metrics
431
+
432
+ #### Information Retrieval
433
+ * Dataset: `dim_768`
434
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
435
+
436
+ | Metric | Value |
437
+ |:--------------------|:-----------|
438
+ | cosine_accuracy@1 | 0.6886 |
439
+ | cosine_accuracy@3 | 0.8286 |
440
+ | cosine_accuracy@5 | 0.8671 |
441
+ | cosine_accuracy@10 | 0.9129 |
442
+ | cosine_precision@1 | 0.6886 |
443
+ | cosine_precision@3 | 0.2762 |
444
+ | cosine_precision@5 | 0.1734 |
445
+ | cosine_precision@10 | 0.0913 |
446
+ | cosine_recall@1 | 0.6886 |
447
+ | cosine_recall@3 | 0.8286 |
448
+ | cosine_recall@5 | 0.8671 |
449
+ | cosine_recall@10 | 0.9129 |
450
+ | cosine_ndcg@10 | 0.8023 |
451
+ | cosine_mrr@10 | 0.7666 |
452
+ | **cosine_map@100** | **0.7697** |
453
+
454
+ #### Information Retrieval
455
+ * Dataset: `dim_512`
456
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
457
+
458
+ | Metric | Value |
459
+ |:--------------------|:-----------|
460
+ | cosine_accuracy@1 | 0.6929 |
461
+ | cosine_accuracy@3 | 0.8229 |
462
+ | cosine_accuracy@5 | 0.8643 |
463
+ | cosine_accuracy@10 | 0.91 |
464
+ | cosine_precision@1 | 0.6929 |
465
+ | cosine_precision@3 | 0.2743 |
466
+ | cosine_precision@5 | 0.1729 |
467
+ | cosine_precision@10 | 0.091 |
468
+ | cosine_recall@1 | 0.6929 |
469
+ | cosine_recall@3 | 0.8229 |
470
+ | cosine_recall@5 | 0.8643 |
471
+ | cosine_recall@10 | 0.91 |
472
+ | cosine_ndcg@10 | 0.8017 |
473
+ | cosine_mrr@10 | 0.7668 |
474
+ | **cosine_map@100** | **0.7701** |
475
+
476
+ #### Information Retrieval
477
+ * Dataset: `dim_256`
478
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
479
+
480
+ | Metric | Value |
481
+ |:--------------------|:-----------|
482
+ | cosine_accuracy@1 | 0.6871 |
483
+ | cosine_accuracy@3 | 0.8186 |
484
+ | cosine_accuracy@5 | 0.8629 |
485
+ | cosine_accuracy@10 | 0.9014 |
486
+ | cosine_precision@1 | 0.6871 |
487
+ | cosine_precision@3 | 0.2729 |
488
+ | cosine_precision@5 | 0.1726 |
489
+ | cosine_precision@10 | 0.0901 |
490
+ | cosine_recall@1 | 0.6871 |
491
+ | cosine_recall@3 | 0.8186 |
492
+ | cosine_recall@5 | 0.8629 |
493
+ | cosine_recall@10 | 0.9014 |
494
+ | cosine_ndcg@10 | 0.7963 |
495
+ | cosine_mrr@10 | 0.7623 |
496
+ | **cosine_map@100** | **0.7657** |
497
+
498
+ #### Information Retrieval
499
+ * Dataset: `dim_128`
500
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
501
+
502
+ | Metric | Value |
503
+ |:--------------------|:-----------|
504
+ | cosine_accuracy@1 | 0.6743 |
505
+ | cosine_accuracy@3 | 0.8057 |
506
+ | cosine_accuracy@5 | 0.8529 |
507
+ | cosine_accuracy@10 | 0.8943 |
508
+ | cosine_precision@1 | 0.6743 |
509
+ | cosine_precision@3 | 0.2686 |
510
+ | cosine_precision@5 | 0.1706 |
511
+ | cosine_precision@10 | 0.0894 |
512
+ | cosine_recall@1 | 0.6743 |
513
+ | cosine_recall@3 | 0.8057 |
514
+ | cosine_recall@5 | 0.8529 |
515
+ | cosine_recall@10 | 0.8943 |
516
+ | cosine_ndcg@10 | 0.7862 |
517
+ | cosine_mrr@10 | 0.7513 |
518
+ | **cosine_map@100** | **0.7549** |
519
+
520
+ #### Information Retrieval
521
+ * Dataset: `dim_64`
522
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
523
+
524
+ | Metric | Value |
525
+ |:--------------------|:-----------|
526
+ | cosine_accuracy@1 | 0.6429 |
527
+ | cosine_accuracy@3 | 0.7971 |
528
+ | cosine_accuracy@5 | 0.8186 |
529
+ | cosine_accuracy@10 | 0.8686 |
530
+ | cosine_precision@1 | 0.6429 |
531
+ | cosine_precision@3 | 0.2657 |
532
+ | cosine_precision@5 | 0.1637 |
533
+ | cosine_precision@10 | 0.0869 |
534
+ | cosine_recall@1 | 0.6429 |
535
+ | cosine_recall@3 | 0.7971 |
536
+ | cosine_recall@5 | 0.8186 |
537
+ | cosine_recall@10 | 0.8686 |
538
+ | cosine_ndcg@10 | 0.7591 |
539
+ | cosine_mrr@10 | 0.7237 |
540
+ | **cosine_map@100** | **0.7283** |
541
+
542
+ <!--
543
+ ## Bias, Risks and Limitations
544
+
545
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
546
+ -->
547
+
548
+ <!--
549
+ ### Recommendations
550
+
551
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
552
+ -->
553
+
554
+ ## Training Details
555
+
556
+ ### Training Dataset
557
+
558
+ #### Unnamed Dataset
559
+
560
+
561
+ * Size: 6,300 training samples
562
+ * Columns: <code>positive</code> and <code>anchor</code>
563
+ * Approximate statistics based on the first 1000 samples:
564
+ | | positive | anchor |
565
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
566
+ | type | string | string |
567
+ | details | <ul><li>min: 6 tokens</li><li>mean: 45.17 tokens</li><li>max: 260 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.38 tokens</li><li>max: 40 tokens</li></ul> |
568
+ * Samples:
569
+ | positive | anchor |
570
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------|
571
+ | <code>Net revenue for fiscal year 2023 increased by $435 million compared to fiscal year 2022.</code> | <code>How did the net revenue for fiscal year 2023 compare to fiscal year 2022?</code> |
572
+ | <code>Adjusted Free Cash Flow is defined as operating cash flow less capital spending and excluding payments for the transitional tax resulting from the U.S. Tax Act.</code> | <code>How is Adjusted Free Cash Flow defined in the text?</code> |
573
+ | <code>During 2023, the Company’s net sales through its direct and indirect distribution channels accounted for 37% and 63%, respectively, of total net sales.</code> | <code>During 2023, what percentage of the Company’s net sales came from direct sales channels?</code> |
574
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
575
+ ```json
576
+ {
577
+ "loss": "MultipleNegativesRankingLoss",
578
+ "matryoshka_dims": [
579
+ 768,
580
+ 512,
581
+ 256,
582
+ 128,
583
+ 64
584
+ ],
585
+ "matryoshka_weights": [
586
+ 1,
587
+ 1,
588
+ 1,
589
+ 1,
590
+ 1
591
+ ],
592
+ "n_dims_per_step": -1
593
+ }
594
+ ```
595
+
596
+ ### Training Hyperparameters
597
+ #### Non-Default Hyperparameters
598
+
599
+ - `eval_strategy`: epoch
600
+ - `per_device_train_batch_size`: 32
601
+ - `per_device_eval_batch_size`: 16
602
+ - `gradient_accumulation_steps`: 16
603
+ - `learning_rate`: 2e-05
604
+ - `num_train_epochs`: 4
605
+ - `lr_scheduler_type`: cosine
606
+ - `warmup_ratio`: 0.1
607
+ - `tf32`: True
608
+ - `load_best_model_at_end`: True
609
+ - `optim`: adamw_torch_fused
610
+ - `batch_sampler`: no_duplicates
611
+
612
+ #### All Hyperparameters
613
+ <details><summary>Click to expand</summary>
614
+
615
+ - `overwrite_output_dir`: False
616
+ - `do_predict`: False
617
+ - `eval_strategy`: epoch
618
+ - `prediction_loss_only`: True
619
+ - `per_device_train_batch_size`: 32
620
+ - `per_device_eval_batch_size`: 16
621
+ - `per_gpu_train_batch_size`: None
622
+ - `per_gpu_eval_batch_size`: None
623
+ - `gradient_accumulation_steps`: 16
624
+ - `eval_accumulation_steps`: None
625
+ - `learning_rate`: 2e-05
626
+ - `weight_decay`: 0.0
627
+ - `adam_beta1`: 0.9
628
+ - `adam_beta2`: 0.999
629
+ - `adam_epsilon`: 1e-08
630
+ - `max_grad_norm`: 1.0
631
+ - `num_train_epochs`: 4
632
+ - `max_steps`: -1
633
+ - `lr_scheduler_type`: cosine
634
+ - `lr_scheduler_kwargs`: {}
635
+ - `warmup_ratio`: 0.1
636
+ - `warmup_steps`: 0
637
+ - `log_level`: passive
638
+ - `log_level_replica`: warning
639
+ - `log_on_each_node`: True
640
+ - `logging_nan_inf_filter`: True
641
+ - `save_safetensors`: True
642
+ - `save_on_each_node`: False
643
+ - `save_only_model`: False
644
+ - `restore_callback_states_from_checkpoint`: False
645
+ - `no_cuda`: False
646
+ - `use_cpu`: False
647
+ - `use_mps_device`: False
648
+ - `seed`: 42
649
+ - `data_seed`: None
650
+ - `jit_mode_eval`: False
651
+ - `use_ipex`: False
652
+ - `bf16`: False
653
+ - `fp16`: False
654
+ - `fp16_opt_level`: O1
655
+ - `half_precision_backend`: auto
656
+ - `bf16_full_eval`: False
657
+ - `fp16_full_eval`: False
658
+ - `tf32`: True
659
+ - `local_rank`: 0
660
+ - `ddp_backend`: None
661
+ - `tpu_num_cores`: None
662
+ - `tpu_metrics_debug`: False
663
+ - `debug`: []
664
+ - `dataloader_drop_last`: False
665
+ - `dataloader_num_workers`: 0
666
+ - `dataloader_prefetch_factor`: None
667
+ - `past_index`: -1
668
+ - `disable_tqdm`: False
669
+ - `remove_unused_columns`: True
670
+ - `label_names`: None
671
+ - `load_best_model_at_end`: True
672
+ - `ignore_data_skip`: False
673
+ - `fsdp`: []
674
+ - `fsdp_min_num_params`: 0
675
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
676
+ - `fsdp_transformer_layer_cls_to_wrap`: None
677
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
678
+ - `deepspeed`: None
679
+ - `label_smoothing_factor`: 0.0
680
+ - `optim`: adamw_torch_fused
681
+ - `optim_args`: None
682
+ - `adafactor`: False
683
+ - `group_by_length`: False
684
+ - `length_column_name`: length
685
+ - `ddp_find_unused_parameters`: None
686
+ - `ddp_bucket_cap_mb`: None
687
+ - `ddp_broadcast_buffers`: False
688
+ - `dataloader_pin_memory`: True
689
+ - `dataloader_persistent_workers`: False
690
+ - `skip_memory_metrics`: True
691
+ - `use_legacy_prediction_loop`: False
692
+ - `push_to_hub`: False
693
+ - `resume_from_checkpoint`: None
694
+ - `hub_model_id`: None
695
+ - `hub_strategy`: every_save
696
+ - `hub_private_repo`: False
697
+ - `hub_always_push`: False
698
+ - `gradient_checkpointing`: False
699
+ - `gradient_checkpointing_kwargs`: None
700
+ - `include_inputs_for_metrics`: False
701
+ - `eval_do_concat_batches`: True
702
+ - `fp16_backend`: auto
703
+ - `push_to_hub_model_id`: None
704
+ - `push_to_hub_organization`: None
705
+ - `mp_parameters`:
706
+ - `auto_find_batch_size`: False
707
+ - `full_determinism`: False
708
+ - `torchdynamo`: None
709
+ - `ray_scope`: last
710
+ - `ddp_timeout`: 1800
711
+ - `torch_compile`: False
712
+ - `torch_compile_backend`: None
713
+ - `torch_compile_mode`: None
714
+ - `dispatch_batches`: None
715
+ - `split_batches`: None
716
+ - `include_tokens_per_second`: False
717
+ - `include_num_input_tokens_seen`: False
718
+ - `neftune_noise_alpha`: None
719
+ - `optim_target_modules`: None
720
+ - `batch_eval_metrics`: False
721
+ - `batch_sampler`: no_duplicates
722
+ - `multi_dataset_batch_sampler`: proportional
723
+
724
+ </details>
725
+
726
+ ### Training Logs
727
+ | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 |
728
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
729
+ | 0.8122 | 10 | 1.6399 | - | - | - | - | - |
730
+ | 0.9746 | 12 | - | 0.7441 | 0.7580 | 0.7543 | 0.7068 | 0.7632 |
731
+ | 1.6244 | 20 | 0.6475 | - | - | - | - | - |
732
+ | 1.9492 | 24 | - | 0.7530 | 0.7653 | 0.7672 | 0.7244 | 0.7708 |
733
+ | 2.4365 | 30 | 0.4494 | - | - | - | - | - |
734
+ | 2.9239 | 36 | - | 0.7548 | 0.7653 | 0.7683 | 0.7297 | 0.7679 |
735
+ | 3.2487 | 40 | 0.4089 | - | - | - | - | - |
736
+ | **3.8985** | **48** | **-** | **0.7549** | **0.7657** | **0.7701** | **0.7283** | **0.7697** |
737
+
738
+ * The bold row denotes the saved checkpoint.
739
+
740
+ ### Framework Versions
741
+ - Python: 3.10.12
742
+ - Sentence Transformers: 3.0.1
743
+ - Transformers: 4.41.2
744
+ - PyTorch: 2.1.2+cu121
745
+ - Accelerate: 0.31.0
746
+ - Datasets: 2.19.1
747
+ - Tokenizers: 0.19.1
748
+
749
+ ## Citation
750
+
751
+ ### BibTeX
752
+
753
+ #### Sentence Transformers
754
+ ```bibtex
755
+ @inproceedings{reimers-2019-sentence-bert,
756
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
757
+ author = "Reimers, Nils and Gurevych, Iryna",
758
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
759
+ month = "11",
760
+ year = "2019",
761
+ publisher = "Association for Computational Linguistics",
762
+ url = "https://arxiv.org/abs/1908.10084",
763
+ }
764
+ ```
765
+
766
+ #### MatryoshkaLoss
767
+ ```bibtex
768
+ @misc{kusupati2024matryoshka,
769
+ title={Matryoshka Representation Learning},
770
+ 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},
771
+ year={2024},
772
+ eprint={2205.13147},
773
+ archivePrefix={arXiv},
774
+ primaryClass={cs.LG}
775
+ }
776
+ ```
777
+
778
+ #### MultipleNegativesRankingLoss
779
+ ```bibtex
780
+ @misc{henderson2017efficient,
781
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
782
+ 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},
783
+ year={2017},
784
+ eprint={1705.00652},
785
+ archivePrefix={arXiv},
786
+ primaryClass={cs.CL}
787
+ }
788
+ ```
789
+
790
+ <!--
791
+ ## Glossary
792
+
793
+ *Clearly define terms in order to be accessible across audiences.*
794
+ -->
795
+
796
+ <!--
797
+ ## Model Card Authors
798
+
799
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
800
+ -->
801
+
802
+ <!--
803
+ ## Model Card Contact
804
+
805
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
806
+ -->
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.41.2",
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.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ad5bfe4c42542e3248fc787e95794cc040c4f9597dfef01f70578a435aa658b
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,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "never_split": null,
51
+ "pad_token": "[PAD]",
52
+ "sep_token": "[SEP]",
53
+ "strip_accents": null,
54
+ "tokenize_chinese_chars": true,
55
+ "tokenizer_class": "BertTokenizer",
56
+ "unk_token": "[UNK]"
57
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff