cristuf commited on
Commit
a7e5b12
1 Parent(s): 66e5c60

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,808 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: Item 3—Legal Proceedings See discussion of Legal Proceedings in
34
+ Note 10 to the consolidated financial statements included in Item 8 of this Report.
35
+ sentences:
36
+ - How much did the company's finance lease obligations total as of December 31,
37
+ 2023?
38
+ - What do Note 10 and Item 8 of the report encompass?
39
+ - What was the basic earnings per common share attributable to Comcast Corporation
40
+ shareholders in 2023?
41
+ - source_sentence: Our quarterly Insurance segment earnings and operating cash flows
42
+ are impacted by the Medicare Part D benefit Grant program, the changing membership
43
+ composition, and the multistage plan period starting annually on January 1. These
44
+ plan designs generally result in us sharing a greater portion of the responsibility
45
+ for total prescription drug costs in the early stages and less in the latter stages.
46
+ sentences:
47
+ - What are the two main categories into which Ford Motor Company classifies its
48
+ costs and expenses, excluding those related to Ford Credit?
49
+ - How does the benefit design of Medicare Part D impact the quarterly insurance
50
+ segment earnings and operating cash flows?
51
+ - What basis is used to record HTM investment securities in Schwab's financial statements?
52
+ - source_sentence: Operating Profit in the Wizards of the Coast and Digital Gaming
53
+ segment decreased 2% to $538.3 million.
54
+ sentences:
55
+ - How much did the Wizards of the Coast and Digital Gaming segment's operating profit
56
+ change in 2022?
57
+ - What factors are considered in evaluating the lifetime losses for most loans and
58
+ receivables?
59
+ - How did the loss on certain U.S. affiliates impact the Company's effective tax
60
+ rate in the fiscal fourth quarter of 2021?
61
+ - source_sentence: In 2023, the net earnings of Johnson & Johnson were $35,153 million.
62
+ The company also registered cash dividends paid amounting to $11,770 million for
63
+ the year, priced at $4.70 per share.
64
+ sentences:
65
+ - What was the postpaid churn rate for AT&T Inc. in 2023?
66
+ - What was the GAAP net revenue for the fiscal year ended October 31, 2023?
67
+ - What were the total net earnings of Johnson & Johnson in the year 2023?
68
+ - source_sentence: During fiscal 2022, GameStop Corp increased its valuation allowances
69
+ by approximately $70.2 million in various jurisdictions.
70
+ sentences:
71
+ - How much did GameStop Corp's valuation allowances increase during fiscal 2022?
72
+ - How does Gilead ensure an inclusive and diverse workforce?
73
+ - What factors are considered in determining the estimated future warranty costs
74
+ for connected fitness and Precor branded fitness products?
75
+ pipeline_tag: sentence-similarity
76
+ model-index:
77
+ - name: BGE base Financial Matryoshka
78
+ results:
79
+ - task:
80
+ type: information-retrieval
81
+ name: Information Retrieval
82
+ dataset:
83
+ name: dim 768
84
+ type: dim_768
85
+ metrics:
86
+ - type: cosine_accuracy@1
87
+ value: 0.7185714285714285
88
+ name: Cosine Accuracy@1
89
+ - type: cosine_accuracy@3
90
+ value: 0.83
91
+ name: Cosine Accuracy@3
92
+ - type: cosine_accuracy@5
93
+ value: 0.8714285714285714
94
+ name: Cosine Accuracy@5
95
+ - type: cosine_accuracy@10
96
+ value: 0.91
97
+ name: Cosine Accuracy@10
98
+ - type: cosine_precision@1
99
+ value: 0.7185714285714285
100
+ name: Cosine Precision@1
101
+ - type: cosine_precision@3
102
+ value: 0.27666666666666667
103
+ name: Cosine Precision@3
104
+ - type: cosine_precision@5
105
+ value: 0.17428571428571427
106
+ name: Cosine Precision@5
107
+ - type: cosine_precision@10
108
+ value: 0.091
109
+ name: Cosine Precision@10
110
+ - type: cosine_recall@1
111
+ value: 0.7185714285714285
112
+ name: Cosine Recall@1
113
+ - type: cosine_recall@3
114
+ value: 0.83
115
+ name: Cosine Recall@3
116
+ - type: cosine_recall@5
117
+ value: 0.8714285714285714
118
+ name: Cosine Recall@5
119
+ - type: cosine_recall@10
120
+ value: 0.91
121
+ name: Cosine Recall@10
122
+ - type: cosine_ndcg@10
123
+ value: 0.8137967516958747
124
+ name: Cosine Ndcg@10
125
+ - type: cosine_mrr@10
126
+ value: 0.7830442176870747
127
+ name: Cosine Mrr@10
128
+ - type: cosine_map@100
129
+ value: 0.7866777593387027
130
+ name: Cosine Map@100
131
+ - task:
132
+ type: information-retrieval
133
+ name: Information Retrieval
134
+ dataset:
135
+ name: dim 512
136
+ type: dim_512
137
+ metrics:
138
+ - type: cosine_accuracy@1
139
+ value: 0.7114285714285714
140
+ name: Cosine Accuracy@1
141
+ - type: cosine_accuracy@3
142
+ value: 0.8314285714285714
143
+ name: Cosine Accuracy@3
144
+ - type: cosine_accuracy@5
145
+ value: 0.8728571428571429
146
+ name: Cosine Accuracy@5
147
+ - type: cosine_accuracy@10
148
+ value: 0.9142857142857143
149
+ name: Cosine Accuracy@10
150
+ - type: cosine_precision@1
151
+ value: 0.7114285714285714
152
+ name: Cosine Precision@1
153
+ - type: cosine_precision@3
154
+ value: 0.27714285714285714
155
+ name: Cosine Precision@3
156
+ - type: cosine_precision@5
157
+ value: 0.17457142857142854
158
+ name: Cosine Precision@5
159
+ - type: cosine_precision@10
160
+ value: 0.09142857142857141
161
+ name: Cosine Precision@10
162
+ - type: cosine_recall@1
163
+ value: 0.7114285714285714
164
+ name: Cosine Recall@1
165
+ - type: cosine_recall@3
166
+ value: 0.8314285714285714
167
+ name: Cosine Recall@3
168
+ - type: cosine_recall@5
169
+ value: 0.8728571428571429
170
+ name: Cosine Recall@5
171
+ - type: cosine_recall@10
172
+ value: 0.9142857142857143
173
+ name: Cosine Recall@10
174
+ - type: cosine_ndcg@10
175
+ value: 0.8123538841130576
176
+ name: Cosine Ndcg@10
177
+ - type: cosine_mrr@10
178
+ value: 0.7798667800453513
179
+ name: Cosine Mrr@10
180
+ - type: cosine_map@100
181
+ value: 0.7831580648041446
182
+ name: Cosine Map@100
183
+ - task:
184
+ type: information-retrieval
185
+ name: Information Retrieval
186
+ dataset:
187
+ name: dim 256
188
+ type: dim_256
189
+ metrics:
190
+ - type: cosine_accuracy@1
191
+ value: 0.7
192
+ name: Cosine Accuracy@1
193
+ - type: cosine_accuracy@3
194
+ value: 0.8285714285714286
195
+ name: Cosine Accuracy@3
196
+ - type: cosine_accuracy@5
197
+ value: 0.8614285714285714
198
+ name: Cosine Accuracy@5
199
+ - type: cosine_accuracy@10
200
+ value: 0.9042857142857142
201
+ name: Cosine Accuracy@10
202
+ - type: cosine_precision@1
203
+ value: 0.7
204
+ name: Cosine Precision@1
205
+ - type: cosine_precision@3
206
+ value: 0.2761904761904762
207
+ name: Cosine Precision@3
208
+ - type: cosine_precision@5
209
+ value: 0.17228571428571426
210
+ name: Cosine Precision@5
211
+ - type: cosine_precision@10
212
+ value: 0.09042857142857143
213
+ name: Cosine Precision@10
214
+ - type: cosine_recall@1
215
+ value: 0.7
216
+ name: Cosine Recall@1
217
+ - type: cosine_recall@3
218
+ value: 0.8285714285714286
219
+ name: Cosine Recall@3
220
+ - type: cosine_recall@5
221
+ value: 0.8614285714285714
222
+ name: Cosine Recall@5
223
+ - type: cosine_recall@10
224
+ value: 0.9042857142857142
225
+ name: Cosine Recall@10
226
+ - type: cosine_ndcg@10
227
+ value: 0.8043112987059042
228
+ name: Cosine Ndcg@10
229
+ - type: cosine_mrr@10
230
+ value: 0.7721706349206346
231
+ name: Cosine Mrr@10
232
+ - type: cosine_map@100
233
+ value: 0.7759026470022171
234
+ name: Cosine Map@100
235
+ - task:
236
+ type: information-retrieval
237
+ name: Information Retrieval
238
+ dataset:
239
+ name: dim 128
240
+ type: dim_128
241
+ metrics:
242
+ - type: cosine_accuracy@1
243
+ value: 0.6857142857142857
244
+ name: Cosine Accuracy@1
245
+ - type: cosine_accuracy@3
246
+ value: 0.8071428571428572
247
+ name: Cosine Accuracy@3
248
+ - type: cosine_accuracy@5
249
+ value: 0.8571428571428571
250
+ name: Cosine Accuracy@5
251
+ - type: cosine_accuracy@10
252
+ value: 0.8971428571428571
253
+ name: Cosine Accuracy@10
254
+ - type: cosine_precision@1
255
+ value: 0.6857142857142857
256
+ name: Cosine Precision@1
257
+ - type: cosine_precision@3
258
+ value: 0.26904761904761904
259
+ name: Cosine Precision@3
260
+ - type: cosine_precision@5
261
+ value: 0.1714285714285714
262
+ name: Cosine Precision@5
263
+ - type: cosine_precision@10
264
+ value: 0.0897142857142857
265
+ name: Cosine Precision@10
266
+ - type: cosine_recall@1
267
+ value: 0.6857142857142857
268
+ name: Cosine Recall@1
269
+ - type: cosine_recall@3
270
+ value: 0.8071428571428572
271
+ name: Cosine Recall@3
272
+ - type: cosine_recall@5
273
+ value: 0.8571428571428571
274
+ name: Cosine Recall@5
275
+ - type: cosine_recall@10
276
+ value: 0.8971428571428571
277
+ name: Cosine Recall@10
278
+ - type: cosine_ndcg@10
279
+ value: 0.79087795854059
280
+ name: Cosine Ndcg@10
281
+ - type: cosine_mrr@10
282
+ value: 0.7568854875283447
283
+ name: Cosine Mrr@10
284
+ - type: cosine_map@100
285
+ value: 0.7608935817550728
286
+ name: Cosine Map@100
287
+ - task:
288
+ type: information-retrieval
289
+ name: Information Retrieval
290
+ dataset:
291
+ name: dim 64
292
+ type: dim_64
293
+ metrics:
294
+ - type: cosine_accuracy@1
295
+ value: 0.66
296
+ name: Cosine Accuracy@1
297
+ - type: cosine_accuracy@3
298
+ value: 0.7757142857142857
299
+ name: Cosine Accuracy@3
300
+ - type: cosine_accuracy@5
301
+ value: 0.8128571428571428
302
+ name: Cosine Accuracy@5
303
+ - type: cosine_accuracy@10
304
+ value: 0.8671428571428571
305
+ name: Cosine Accuracy@10
306
+ - type: cosine_precision@1
307
+ value: 0.66
308
+ name: Cosine Precision@1
309
+ - type: cosine_precision@3
310
+ value: 0.25857142857142856
311
+ name: Cosine Precision@3
312
+ - type: cosine_precision@5
313
+ value: 0.16257142857142853
314
+ name: Cosine Precision@5
315
+ - type: cosine_precision@10
316
+ value: 0.0867142857142857
317
+ name: Cosine Precision@10
318
+ - type: cosine_recall@1
319
+ value: 0.66
320
+ name: Cosine Recall@1
321
+ - type: cosine_recall@3
322
+ value: 0.7757142857142857
323
+ name: Cosine Recall@3
324
+ - type: cosine_recall@5
325
+ value: 0.8128571428571428
326
+ name: Cosine Recall@5
327
+ - type: cosine_recall@10
328
+ value: 0.8671428571428571
329
+ name: Cosine Recall@10
330
+ - type: cosine_ndcg@10
331
+ value: 0.7616045249840884
332
+ name: Cosine Ndcg@10
333
+ - type: cosine_mrr@10
334
+ value: 0.7281247165532877
335
+ name: Cosine Mrr@10
336
+ - type: cosine_map@100
337
+ value: 0.7330922421864847
338
+ name: Cosine Map@100
339
+ ---
340
+
341
+ # BGE base Financial Matryoshka
342
+
343
+ 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.
344
+
345
+ ## Model Details
346
+
347
+ ### Model Description
348
+ - **Model Type:** Sentence Transformer
349
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
350
+ - **Maximum Sequence Length:** 512 tokens
351
+ - **Output Dimensionality:** 768 tokens
352
+ - **Similarity Function:** Cosine Similarity
353
+ <!-- - **Training Dataset:** Unknown -->
354
+ - **Language:** en
355
+ - **License:** apache-2.0
356
+
357
+ ### Model Sources
358
+
359
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
360
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
361
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
362
+
363
+ ### Full Model Architecture
364
+
365
+ ```
366
+ SentenceTransformer(
367
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
368
+ (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})
369
+ (2): Normalize()
370
+ )
371
+ ```
372
+
373
+ ## Usage
374
+
375
+ ### Direct Usage (Sentence Transformers)
376
+
377
+ First install the Sentence Transformers library:
378
+
379
+ ```bash
380
+ pip install -U sentence-transformers
381
+ ```
382
+
383
+ Then you can load this model and run inference.
384
+ ```python
385
+ from sentence_transformers import SentenceTransformer
386
+
387
+ # Download from the 🤗 Hub
388
+ model = SentenceTransformer("cristuf/bge-base-financial-matryoshka")
389
+ # Run inference
390
+ sentences = [
391
+ 'During fiscal 2022, GameStop Corp increased its valuation allowances by approximately $70.2 million in various jurisdictions.',
392
+ "How much did GameStop Corp's valuation allowances increase during fiscal 2022?",
393
+ 'How does Gilead ensure an inclusive and diverse workforce?',
394
+ ]
395
+ embeddings = model.encode(sentences)
396
+ print(embeddings.shape)
397
+ # [3, 768]
398
+
399
+ # Get the similarity scores for the embeddings
400
+ similarities = model.similarity(embeddings, embeddings)
401
+ print(similarities.shape)
402
+ # [3, 3]
403
+ ```
404
+
405
+ <!--
406
+ ### Direct Usage (Transformers)
407
+
408
+ <details><summary>Click to see the direct usage in Transformers</summary>
409
+
410
+ </details>
411
+ -->
412
+
413
+ <!--
414
+ ### Downstream Usage (Sentence Transformers)
415
+
416
+ You can finetune this model on your own dataset.
417
+
418
+ <details><summary>Click to expand</summary>
419
+
420
+ </details>
421
+ -->
422
+
423
+ <!--
424
+ ### Out-of-Scope Use
425
+
426
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
427
+ -->
428
+
429
+ ## Evaluation
430
+
431
+ ### Metrics
432
+
433
+ #### Information Retrieval
434
+ * Dataset: `dim_768`
435
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
436
+
437
+ | Metric | Value |
438
+ |:--------------------|:-----------|
439
+ | cosine_accuracy@1 | 0.7186 |
440
+ | cosine_accuracy@3 | 0.83 |
441
+ | cosine_accuracy@5 | 0.8714 |
442
+ | cosine_accuracy@10 | 0.91 |
443
+ | cosine_precision@1 | 0.7186 |
444
+ | cosine_precision@3 | 0.2767 |
445
+ | cosine_precision@5 | 0.1743 |
446
+ | cosine_precision@10 | 0.091 |
447
+ | cosine_recall@1 | 0.7186 |
448
+ | cosine_recall@3 | 0.83 |
449
+ | cosine_recall@5 | 0.8714 |
450
+ | cosine_recall@10 | 0.91 |
451
+ | cosine_ndcg@10 | 0.8138 |
452
+ | cosine_mrr@10 | 0.783 |
453
+ | **cosine_map@100** | **0.7867** |
454
+
455
+ #### Information Retrieval
456
+ * Dataset: `dim_512`
457
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
458
+
459
+ | Metric | Value |
460
+ |:--------------------|:-----------|
461
+ | cosine_accuracy@1 | 0.7114 |
462
+ | cosine_accuracy@3 | 0.8314 |
463
+ | cosine_accuracy@5 | 0.8729 |
464
+ | cosine_accuracy@10 | 0.9143 |
465
+ | cosine_precision@1 | 0.7114 |
466
+ | cosine_precision@3 | 0.2771 |
467
+ | cosine_precision@5 | 0.1746 |
468
+ | cosine_precision@10 | 0.0914 |
469
+ | cosine_recall@1 | 0.7114 |
470
+ | cosine_recall@3 | 0.8314 |
471
+ | cosine_recall@5 | 0.8729 |
472
+ | cosine_recall@10 | 0.9143 |
473
+ | cosine_ndcg@10 | 0.8124 |
474
+ | cosine_mrr@10 | 0.7799 |
475
+ | **cosine_map@100** | **0.7832** |
476
+
477
+ #### Information Retrieval
478
+ * Dataset: `dim_256`
479
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
480
+
481
+ | Metric | Value |
482
+ |:--------------------|:-----------|
483
+ | cosine_accuracy@1 | 0.7 |
484
+ | cosine_accuracy@3 | 0.8286 |
485
+ | cosine_accuracy@5 | 0.8614 |
486
+ | cosine_accuracy@10 | 0.9043 |
487
+ | cosine_precision@1 | 0.7 |
488
+ | cosine_precision@3 | 0.2762 |
489
+ | cosine_precision@5 | 0.1723 |
490
+ | cosine_precision@10 | 0.0904 |
491
+ | cosine_recall@1 | 0.7 |
492
+ | cosine_recall@3 | 0.8286 |
493
+ | cosine_recall@5 | 0.8614 |
494
+ | cosine_recall@10 | 0.9043 |
495
+ | cosine_ndcg@10 | 0.8043 |
496
+ | cosine_mrr@10 | 0.7722 |
497
+ | **cosine_map@100** | **0.7759** |
498
+
499
+ #### Information Retrieval
500
+ * Dataset: `dim_128`
501
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
502
+
503
+ | Metric | Value |
504
+ |:--------------------|:-----------|
505
+ | cosine_accuracy@1 | 0.6857 |
506
+ | cosine_accuracy@3 | 0.8071 |
507
+ | cosine_accuracy@5 | 0.8571 |
508
+ | cosine_accuracy@10 | 0.8971 |
509
+ | cosine_precision@1 | 0.6857 |
510
+ | cosine_precision@3 | 0.269 |
511
+ | cosine_precision@5 | 0.1714 |
512
+ | cosine_precision@10 | 0.0897 |
513
+ | cosine_recall@1 | 0.6857 |
514
+ | cosine_recall@3 | 0.8071 |
515
+ | cosine_recall@5 | 0.8571 |
516
+ | cosine_recall@10 | 0.8971 |
517
+ | cosine_ndcg@10 | 0.7909 |
518
+ | cosine_mrr@10 | 0.7569 |
519
+ | **cosine_map@100** | **0.7609** |
520
+
521
+ #### Information Retrieval
522
+ * Dataset: `dim_64`
523
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
524
+
525
+ | Metric | Value |
526
+ |:--------------------|:-----------|
527
+ | cosine_accuracy@1 | 0.66 |
528
+ | cosine_accuracy@3 | 0.7757 |
529
+ | cosine_accuracy@5 | 0.8129 |
530
+ | cosine_accuracy@10 | 0.8671 |
531
+ | cosine_precision@1 | 0.66 |
532
+ | cosine_precision@3 | 0.2586 |
533
+ | cosine_precision@5 | 0.1626 |
534
+ | cosine_precision@10 | 0.0867 |
535
+ | cosine_recall@1 | 0.66 |
536
+ | cosine_recall@3 | 0.7757 |
537
+ | cosine_recall@5 | 0.8129 |
538
+ | cosine_recall@10 | 0.8671 |
539
+ | cosine_ndcg@10 | 0.7616 |
540
+ | cosine_mrr@10 | 0.7281 |
541
+ | **cosine_map@100** | **0.7331** |
542
+
543
+ <!--
544
+ ## Bias, Risks and Limitations
545
+
546
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
547
+ -->
548
+
549
+ <!--
550
+ ### Recommendations
551
+
552
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
553
+ -->
554
+
555
+ ## Training Details
556
+
557
+ ### Training Dataset
558
+
559
+ #### Unnamed Dataset
560
+
561
+
562
+ * Size: 6,300 training samples
563
+ * Columns: <code>positive</code> and <code>anchor</code>
564
+ * Approximate statistics based on the first 1000 samples:
565
+ | | positive | anchor |
566
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
567
+ | type | string | string |
568
+ | details | <ul><li>min: 8 tokens</li><li>mean: 46.36 tokens</li><li>max: 439 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.41 tokens</li><li>max: 51 tokens</li></ul> |
569
+ * Samples:
570
+ | positive | anchor |
571
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
572
+ | <code>Japan's revenue for the year 2023 reached 2,367.0 million.</code> | <code>What was the revenue attributed to Japan in the year 2023?</code> |
573
+ | <code>Our four reportable segments are: •the Data Center segment, which primarily includes server CPUs, GPUs, APUs, DPUs, FPGAs, SmartNICs, AI accelerators and Adaptive SoC products for data centers; •the Client segment, which primarily includes CPUs, APUs, and chipsets for desktop, notebook and handheld personal computers; •the Gaming segment, which primarily includes discrete GPUs, semi-custom SoC products and development services; and •the Embedded segment, which primarily includes embedded CPUs, GPUs, APUs, FPGAs, SOMs, and Adaptive SoC products.</code> | <code>What are the different segments that AMD reports financially?</code> |
574
+ | <code>For detailed information about the company's legal proceedings, see Note 4 to the consolidated financial statements, included under the caption 'Contingencies' in the Annual Report on Form 10-K.</code> | <code>Where can detailed information about the company's legal proceedings be found in its financial statements?</code> |
575
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
576
+ ```json
577
+ {
578
+ "loss": "MultipleNegativesRankingLoss",
579
+ "matryoshka_dims": [
580
+ 768,
581
+ 512,
582
+ 256,
583
+ 128,
584
+ 64
585
+ ],
586
+ "matryoshka_weights": [
587
+ 1,
588
+ 1,
589
+ 1,
590
+ 1,
591
+ 1
592
+ ],
593
+ "n_dims_per_step": -1
594
+ }
595
+ ```
596
+
597
+ ### Training Hyperparameters
598
+ #### Non-Default Hyperparameters
599
+
600
+ - `eval_strategy`: epoch
601
+ - `per_device_train_batch_size`: 32
602
+ - `per_device_eval_batch_size`: 16
603
+ - `gradient_accumulation_steps`: 16
604
+ - `learning_rate`: 2e-05
605
+ - `num_train_epochs`: 4
606
+ - `lr_scheduler_type`: cosine
607
+ - `warmup_ratio`: 0.1
608
+ - `bf16`: True
609
+ - `tf32`: True
610
+ - `load_best_model_at_end`: True
611
+ - `optim`: adamw_torch_fused
612
+ - `batch_sampler`: no_duplicates
613
+
614
+ #### All Hyperparameters
615
+ <details><summary>Click to expand</summary>
616
+
617
+ - `overwrite_output_dir`: False
618
+ - `do_predict`: False
619
+ - `eval_strategy`: epoch
620
+ - `prediction_loss_only`: True
621
+ - `per_device_train_batch_size`: 32
622
+ - `per_device_eval_batch_size`: 16
623
+ - `per_gpu_train_batch_size`: None
624
+ - `per_gpu_eval_batch_size`: None
625
+ - `gradient_accumulation_steps`: 16
626
+ - `eval_accumulation_steps`: None
627
+ - `learning_rate`: 2e-05
628
+ - `weight_decay`: 0.0
629
+ - `adam_beta1`: 0.9
630
+ - `adam_beta2`: 0.999
631
+ - `adam_epsilon`: 1e-08
632
+ - `max_grad_norm`: 1.0
633
+ - `num_train_epochs`: 4
634
+ - `max_steps`: -1
635
+ - `lr_scheduler_type`: cosine
636
+ - `lr_scheduler_kwargs`: {}
637
+ - `warmup_ratio`: 0.1
638
+ - `warmup_steps`: 0
639
+ - `log_level`: passive
640
+ - `log_level_replica`: warning
641
+ - `log_on_each_node`: True
642
+ - `logging_nan_inf_filter`: True
643
+ - `save_safetensors`: True
644
+ - `save_on_each_node`: False
645
+ - `save_only_model`: False
646
+ - `restore_callback_states_from_checkpoint`: False
647
+ - `no_cuda`: False
648
+ - `use_cpu`: False
649
+ - `use_mps_device`: False
650
+ - `seed`: 42
651
+ - `data_seed`: None
652
+ - `jit_mode_eval`: False
653
+ - `use_ipex`: False
654
+ - `bf16`: True
655
+ - `fp16`: False
656
+ - `fp16_opt_level`: O1
657
+ - `half_precision_backend`: auto
658
+ - `bf16_full_eval`: False
659
+ - `fp16_full_eval`: False
660
+ - `tf32`: True
661
+ - `local_rank`: 0
662
+ - `ddp_backend`: None
663
+ - `tpu_num_cores`: None
664
+ - `tpu_metrics_debug`: False
665
+ - `debug`: []
666
+ - `dataloader_drop_last`: False
667
+ - `dataloader_num_workers`: 0
668
+ - `dataloader_prefetch_factor`: None
669
+ - `past_index`: -1
670
+ - `disable_tqdm`: False
671
+ - `remove_unused_columns`: True
672
+ - `label_names`: None
673
+ - `load_best_model_at_end`: True
674
+ - `ignore_data_skip`: False
675
+ - `fsdp`: []
676
+ - `fsdp_min_num_params`: 0
677
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
678
+ - `fsdp_transformer_layer_cls_to_wrap`: None
679
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
680
+ - `deepspeed`: None
681
+ - `label_smoothing_factor`: 0.0
682
+ - `optim`: adamw_torch_fused
683
+ - `optim_args`: None
684
+ - `adafactor`: False
685
+ - `group_by_length`: False
686
+ - `length_column_name`: length
687
+ - `ddp_find_unused_parameters`: None
688
+ - `ddp_bucket_cap_mb`: None
689
+ - `ddp_broadcast_buffers`: False
690
+ - `dataloader_pin_memory`: True
691
+ - `dataloader_persistent_workers`: False
692
+ - `skip_memory_metrics`: True
693
+ - `use_legacy_prediction_loop`: False
694
+ - `push_to_hub`: False
695
+ - `resume_from_checkpoint`: None
696
+ - `hub_model_id`: None
697
+ - `hub_strategy`: every_save
698
+ - `hub_private_repo`: False
699
+ - `hub_always_push`: False
700
+ - `gradient_checkpointing`: False
701
+ - `gradient_checkpointing_kwargs`: None
702
+ - `include_inputs_for_metrics`: False
703
+ - `eval_do_concat_batches`: True
704
+ - `fp16_backend`: auto
705
+ - `push_to_hub_model_id`: None
706
+ - `push_to_hub_organization`: None
707
+ - `mp_parameters`:
708
+ - `auto_find_batch_size`: False
709
+ - `full_determinism`: False
710
+ - `torchdynamo`: None
711
+ - `ray_scope`: last
712
+ - `ddp_timeout`: 1800
713
+ - `torch_compile`: False
714
+ - `torch_compile_backend`: None
715
+ - `torch_compile_mode`: None
716
+ - `dispatch_batches`: None
717
+ - `split_batches`: None
718
+ - `include_tokens_per_second`: False
719
+ - `include_num_input_tokens_seen`: False
720
+ - `neftune_noise_alpha`: None
721
+ - `optim_target_modules`: None
722
+ - `batch_eval_metrics`: False
723
+ - `batch_sampler`: no_duplicates
724
+ - `multi_dataset_batch_sampler`: proportional
725
+
726
+ </details>
727
+
728
+ ### Training Logs
729
+ | 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 |
730
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
731
+ | 0.8122 | 10 | 1.5267 | - | - | - | - | - |
732
+ | 0.9746 | 12 | - | 0.7446 | 0.7639 | 0.7765 | 0.7039 | 0.7725 |
733
+ | 1.6244 | 20 | 0.6742 | - | - | - | - | - |
734
+ | 1.9492 | 24 | - | 0.7606 | 0.7795 | 0.7828 | 0.7297 | 0.7839 |
735
+ | 2.4365 | 30 | 0.4469 | - | - | - | - | - |
736
+ | **2.9239** | **36** | **-** | **0.7643** | **0.7758** | **0.7834** | **0.7332** | **0.7845** |
737
+ | 3.2487 | 40 | 0.3712 | - | - | - | - | - |
738
+ | 3.8985 | 48 | - | 0.7609 | 0.7759 | 0.7832 | 0.7331 | 0.7867 |
739
+
740
+ * The bold row denotes the saved checkpoint.
741
+
742
+ ### Framework Versions
743
+ - Python: 3.11.8
744
+ - Sentence Transformers: 3.0.1
745
+ - Transformers: 4.41.2
746
+ - PyTorch: 2.3.1+cu121
747
+ - Accelerate: 0.30.1
748
+ - Datasets: 2.19.1
749
+ - Tokenizers: 0.19.1
750
+
751
+ ## Citation
752
+
753
+ ### BibTeX
754
+
755
+ #### Sentence Transformers
756
+ ```bibtex
757
+ @inproceedings{reimers-2019-sentence-bert,
758
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
759
+ author = "Reimers, Nils and Gurevych, Iryna",
760
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
761
+ month = "11",
762
+ year = "2019",
763
+ publisher = "Association for Computational Linguistics",
764
+ url = "https://arxiv.org/abs/1908.10084",
765
+ }
766
+ ```
767
+
768
+ #### MatryoshkaLoss
769
+ ```bibtex
770
+ @misc{kusupati2024matryoshka,
771
+ title={Matryoshka Representation Learning},
772
+ 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},
773
+ year={2024},
774
+ eprint={2205.13147},
775
+ archivePrefix={arXiv},
776
+ primaryClass={cs.LG}
777
+ }
778
+ ```
779
+
780
+ #### MultipleNegativesRankingLoss
781
+ ```bibtex
782
+ @misc{henderson2017efficient,
783
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
784
+ 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},
785
+ year={2017},
786
+ eprint={1705.00652},
787
+ archivePrefix={arXiv},
788
+ primaryClass={cs.CL}
789
+ }
790
+ ```
791
+
792
+ <!--
793
+ ## Glossary
794
+
795
+ *Clearly define terms in order to be accessible across audiences.*
796
+ -->
797
+
798
+ <!--
799
+ ## Model Card Authors
800
+
801
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
802
+ -->
803
+
804
+ <!--
805
+ ## Model Card Contact
806
+
807
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
808
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bge-base-financial-matryoshka",
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.3.1+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:cd726bd8af93113fe4092a2d1a0b88470b98210b508a720a17b98a4dca68d365
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,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 512,
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff