amichelini commited on
Commit
adff780
1 Parent(s): 95e740d

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,817 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-base-en-v1.5
3
+ language:
4
+ - en
5
+ library_name: sentence-transformers
6
+ license: apache-2.0
7
+ metrics:
8
+ - cosine_accuracy@1
9
+ - cosine_accuracy@3
10
+ - cosine_accuracy@5
11
+ - cosine_accuracy@10
12
+ - cosine_precision@1
13
+ - cosine_precision@3
14
+ - cosine_precision@5
15
+ - cosine_precision@10
16
+ - cosine_recall@1
17
+ - cosine_recall@3
18
+ - cosine_recall@5
19
+ - cosine_recall@10
20
+ - cosine_ndcg@10
21
+ - cosine_mrr@10
22
+ - cosine_map@100
23
+ pipeline_tag: sentence-similarity
24
+ tags:
25
+ - sentence-transformers
26
+ - sentence-similarity
27
+ - feature-extraction
28
+ - generated_from_trainer
29
+ - dataset_size:6300
30
+ - loss:MatryoshkaLoss
31
+ - loss:MultipleNegativesRankingLoss
32
+ widget:
33
+ - source_sentence: 'The platform offers a number of free services to its members:
34
+ access to their credit scores and reports, credit and identity monitoring, credit
35
+ report dispute, tools to help understand net worth and make financial progress,
36
+ and personalized recommendations of credit card, loan, and insurance products.
37
+ Credit Karma Money offers members online savings and checking accounts through
38
+ an FDIC member bank partner. Credit Karma Money also provides tools to help members
39
+ improve their credit scores.'
40
+ sentences:
41
+ - What is the mechanism of action for Veklury?
42
+ - What services does Credit Karma offer to its members?
43
+ - What was the annual amortization expense forecast for acquisition-related intangible
44
+ assets in 2025, according to a specified financial projection?
45
+ - source_sentence: Vaccine related exit costs of $0.8 billion were reported in the
46
+ 2023 annual report.
47
+ sentences:
48
+ - What factors primarily drove the decrease in Veklury's sales in 2023?
49
+ - What were the vaccine related exit costs reported by Johnson & Johnson in their
50
+ 2023 annual report?
51
+ - What was the percentage increase in interest income from 2022 to 2023?
52
+ - source_sentence: Broadband revenues increased in 2023 by 8.1% driven by an increase
53
+ in fiber customers and higher average revenue per user, partially offset by declines
54
+ in copper-based broadband services.
55
+ sentences:
56
+ - What was the percent change in broadband revenues for AT&T in 2023 compared to
57
+ 2022?
58
+ - What factors primarily drove the increase in net cash provided by operating activities
59
+ for fiscal 2023?
60
+ - How much interest does Chevron hold in the production sharing contract for deepwater
61
+ Block 14?
62
+ - source_sentence: SEC regulations require the company to disclose certain information
63
+ about proceedings arising under federal, state or local environmental regulations
64
+ if they reasonably believe that such proceedings may result in monetary sanctions
65
+ exceeding $1 million.
66
+ sentences:
67
+ - What does the term 'Acquired brands' refer to and how does it affect the reported
68
+ volumes?
69
+ - How many new medicine candidates are currently in clinical development or under
70
+ regulatory review?
71
+ - Under what conditions are the Company required to disclose certain proceedings
72
+ according to SEC regulations?
73
+ - source_sentence: 2023 highlights include net revenues of $5,003.3 million which
74
+ decreased 15% from $5,856.7 million in 2022.
75
+ sentences:
76
+ - How did Hasbro's net revenues in 2023 compare to the previous year?
77
+ - How much cash did continuing operating activities provide in 2023?
78
+ - Which pages of IBM’s 2023 Annual Report provide information on Financial Statements
79
+ and Supplementary Data?
80
+ model-index:
81
+ - name: BGE base Financial Matryoshka
82
+ results:
83
+ - task:
84
+ type: information-retrieval
85
+ name: Information Retrieval
86
+ dataset:
87
+ name: dim 768
88
+ type: dim_768
89
+ metrics:
90
+ - type: cosine_accuracy@1
91
+ value: 0.68
92
+ name: Cosine Accuracy@1
93
+ - type: cosine_accuracy@3
94
+ value: 0.81
95
+ name: Cosine Accuracy@3
96
+ - type: cosine_accuracy@5
97
+ value: 0.8514285714285714
98
+ name: Cosine Accuracy@5
99
+ - type: cosine_accuracy@10
100
+ value: 0.8942857142857142
101
+ name: Cosine Accuracy@10
102
+ - type: cosine_precision@1
103
+ value: 0.68
104
+ name: Cosine Precision@1
105
+ - type: cosine_precision@3
106
+ value: 0.27
107
+ name: Cosine Precision@3
108
+ - type: cosine_precision@5
109
+ value: 0.17028571428571426
110
+ name: Cosine Precision@5
111
+ - type: cosine_precision@10
112
+ value: 0.08942857142857143
113
+ name: Cosine Precision@10
114
+ - type: cosine_recall@1
115
+ value: 0.68
116
+ name: Cosine Recall@1
117
+ - type: cosine_recall@3
118
+ value: 0.81
119
+ name: Cosine Recall@3
120
+ - type: cosine_recall@5
121
+ value: 0.8514285714285714
122
+ name: Cosine Recall@5
123
+ - type: cosine_recall@10
124
+ value: 0.8942857142857142
125
+ name: Cosine Recall@10
126
+ - type: cosine_ndcg@10
127
+ value: 0.7882073443841624
128
+ name: Cosine Ndcg@10
129
+ - type: cosine_mrr@10
130
+ value: 0.7541315192743764
131
+ name: Cosine Mrr@10
132
+ - type: cosine_map@100
133
+ value: 0.7584597649275473
134
+ name: Cosine Map@100
135
+ - task:
136
+ type: information-retrieval
137
+ name: Information Retrieval
138
+ dataset:
139
+ name: dim 512
140
+ type: dim_512
141
+ metrics:
142
+ - type: cosine_accuracy@1
143
+ value: 0.68
144
+ name: Cosine Accuracy@1
145
+ - type: cosine_accuracy@3
146
+ value: 0.8028571428571428
147
+ name: Cosine Accuracy@3
148
+ - type: cosine_accuracy@5
149
+ value: 0.8457142857142858
150
+ name: Cosine Accuracy@5
151
+ - type: cosine_accuracy@10
152
+ value: 0.8971428571428571
153
+ name: Cosine Accuracy@10
154
+ - type: cosine_precision@1
155
+ value: 0.68
156
+ name: Cosine Precision@1
157
+ - type: cosine_precision@3
158
+ value: 0.2676190476190476
159
+ name: Cosine Precision@3
160
+ - type: cosine_precision@5
161
+ value: 0.16914285714285712
162
+ name: Cosine Precision@5
163
+ - type: cosine_precision@10
164
+ value: 0.0897142857142857
165
+ name: Cosine Precision@10
166
+ - type: cosine_recall@1
167
+ value: 0.68
168
+ name: Cosine Recall@1
169
+ - type: cosine_recall@3
170
+ value: 0.8028571428571428
171
+ name: Cosine Recall@3
172
+ - type: cosine_recall@5
173
+ value: 0.8457142857142858
174
+ name: Cosine Recall@5
175
+ - type: cosine_recall@10
176
+ value: 0.8971428571428571
177
+ name: Cosine Recall@10
178
+ - type: cosine_ndcg@10
179
+ value: 0.7870684908640463
180
+ name: Cosine Ndcg@10
181
+ - type: cosine_mrr@10
182
+ value: 0.7519659863945578
183
+ name: Cosine Mrr@10
184
+ - type: cosine_map@100
185
+ value: 0.7559459500178702
186
+ name: Cosine Map@100
187
+ - task:
188
+ type: information-retrieval
189
+ name: Information Retrieval
190
+ dataset:
191
+ name: dim 256
192
+ type: dim_256
193
+ metrics:
194
+ - type: cosine_accuracy@1
195
+ value: 0.6714285714285714
196
+ name: Cosine Accuracy@1
197
+ - type: cosine_accuracy@3
198
+ value: 0.7985714285714286
199
+ name: Cosine Accuracy@3
200
+ - type: cosine_accuracy@5
201
+ value: 0.8457142857142858
202
+ name: Cosine Accuracy@5
203
+ - type: cosine_accuracy@10
204
+ value: 0.8842857142857142
205
+ name: Cosine Accuracy@10
206
+ - type: cosine_precision@1
207
+ value: 0.6714285714285714
208
+ name: Cosine Precision@1
209
+ - type: cosine_precision@3
210
+ value: 0.2661904761904762
211
+ name: Cosine Precision@3
212
+ - type: cosine_precision@5
213
+ value: 0.16914285714285712
214
+ name: Cosine Precision@5
215
+ - type: cosine_precision@10
216
+ value: 0.08842857142857141
217
+ name: Cosine Precision@10
218
+ - type: cosine_recall@1
219
+ value: 0.6714285714285714
220
+ name: Cosine Recall@1
221
+ - type: cosine_recall@3
222
+ value: 0.7985714285714286
223
+ name: Cosine Recall@3
224
+ - type: cosine_recall@5
225
+ value: 0.8457142857142858
226
+ name: Cosine Recall@5
227
+ - type: cosine_recall@10
228
+ value: 0.8842857142857142
229
+ name: Cosine Recall@10
230
+ - type: cosine_ndcg@10
231
+ value: 0.7799432706618373
232
+ name: Cosine Ndcg@10
233
+ - type: cosine_mrr@10
234
+ value: 0.7462352607709751
235
+ name: Cosine Mrr@10
236
+ - type: cosine_map@100
237
+ value: 0.7505911400077954
238
+ name: Cosine Map@100
239
+ - task:
240
+ type: information-retrieval
241
+ name: Information Retrieval
242
+ dataset:
243
+ name: dim 128
244
+ type: dim_128
245
+ metrics:
246
+ - type: cosine_accuracy@1
247
+ value: 0.66
248
+ name: Cosine Accuracy@1
249
+ - type: cosine_accuracy@3
250
+ value: 0.7914285714285715
251
+ name: Cosine Accuracy@3
252
+ - type: cosine_accuracy@5
253
+ value: 0.8285714285714286
254
+ name: Cosine Accuracy@5
255
+ - type: cosine_accuracy@10
256
+ value: 0.8814285714285715
257
+ name: Cosine Accuracy@10
258
+ - type: cosine_precision@1
259
+ value: 0.66
260
+ name: Cosine Precision@1
261
+ - type: cosine_precision@3
262
+ value: 0.2638095238095238
263
+ name: Cosine Precision@3
264
+ - type: cosine_precision@5
265
+ value: 0.1657142857142857
266
+ name: Cosine Precision@5
267
+ - type: cosine_precision@10
268
+ value: 0.08814285714285712
269
+ name: Cosine Precision@10
270
+ - type: cosine_recall@1
271
+ value: 0.66
272
+ name: Cosine Recall@1
273
+ - type: cosine_recall@3
274
+ value: 0.7914285714285715
275
+ name: Cosine Recall@3
276
+ - type: cosine_recall@5
277
+ value: 0.8285714285714286
278
+ name: Cosine Recall@5
279
+ - type: cosine_recall@10
280
+ value: 0.8814285714285715
281
+ name: Cosine Recall@10
282
+ - type: cosine_ndcg@10
283
+ value: 0.7707461487192945
284
+ name: Cosine Ndcg@10
285
+ - type: cosine_mrr@10
286
+ value: 0.7354421768707481
287
+ name: Cosine Mrr@10
288
+ - type: cosine_map@100
289
+ value: 0.7395774801009367
290
+ name: Cosine Map@100
291
+ - task:
292
+ type: information-retrieval
293
+ name: Information Retrieval
294
+ dataset:
295
+ name: dim 64
296
+ type: dim_64
297
+ metrics:
298
+ - type: cosine_accuracy@1
299
+ value: 0.6271428571428571
300
+ name: Cosine Accuracy@1
301
+ - type: cosine_accuracy@3
302
+ value: 0.7542857142857143
303
+ name: Cosine Accuracy@3
304
+ - type: cosine_accuracy@5
305
+ value: 0.8014285714285714
306
+ name: Cosine Accuracy@5
307
+ - type: cosine_accuracy@10
308
+ value: 0.86
309
+ name: Cosine Accuracy@10
310
+ - type: cosine_precision@1
311
+ value: 0.6271428571428571
312
+ name: Cosine Precision@1
313
+ - type: cosine_precision@3
314
+ value: 0.25142857142857145
315
+ name: Cosine Precision@3
316
+ - type: cosine_precision@5
317
+ value: 0.16028571428571428
318
+ name: Cosine Precision@5
319
+ - type: cosine_precision@10
320
+ value: 0.08599999999999998
321
+ name: Cosine Precision@10
322
+ - type: cosine_recall@1
323
+ value: 0.6271428571428571
324
+ name: Cosine Recall@1
325
+ - type: cosine_recall@3
326
+ value: 0.7542857142857143
327
+ name: Cosine Recall@3
328
+ - type: cosine_recall@5
329
+ value: 0.8014285714285714
330
+ name: Cosine Recall@5
331
+ - type: cosine_recall@10
332
+ value: 0.86
333
+ name: Cosine Recall@10
334
+ - type: cosine_ndcg@10
335
+ value: 0.7403886246637359
336
+ name: Cosine Ndcg@10
337
+ - type: cosine_mrr@10
338
+ value: 0.7025532879818592
339
+ name: Cosine Mrr@10
340
+ - type: cosine_map@100
341
+ value: 0.7068862427781479
342
+ name: Cosine Map@100
343
+ ---
344
+
345
+ # BGE base Financial Matryoshka
346
+
347
+ 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.
348
+
349
+ ## Model Details
350
+
351
+ ### Model Description
352
+ - **Model Type:** Sentence Transformer
353
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
354
+ - **Maximum Sequence Length:** 512 tokens
355
+ - **Output Dimensionality:** 768 tokens
356
+ - **Similarity Function:** Cosine Similarity
357
+ - **Training Dataset:**
358
+ - json
359
+ - **Language:** en
360
+ - **License:** apache-2.0
361
+
362
+ ### Model Sources
363
+
364
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
365
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
366
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
367
+
368
+ ### Full Model Architecture
369
+
370
+ ```
371
+ SentenceTransformer(
372
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
373
+ (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})
374
+ (2): Normalize()
375
+ )
376
+ ```
377
+
378
+ ## Usage
379
+
380
+ ### Direct Usage (Sentence Transformers)
381
+
382
+ First install the Sentence Transformers library:
383
+
384
+ ```bash
385
+ pip install -U sentence-transformers
386
+ ```
387
+
388
+ Then you can load this model and run inference.
389
+ ```python
390
+ from sentence_transformers import SentenceTransformer
391
+
392
+ # Download from the 🤗 Hub
393
+ model = SentenceTransformer("amichelini/bge-base-financial-matryoshka")
394
+ # Run inference
395
+ sentences = [
396
+ '2023 highlights include net revenues of $5,003.3 million which decreased 15% from $5,856.7 million in 2022.',
397
+ "How did Hasbro's net revenues in 2023 compare to the previous year?",
398
+ 'How much cash did continuing operating activities provide in 2023?',
399
+ ]
400
+ embeddings = model.encode(sentences)
401
+ print(embeddings.shape)
402
+ # [3, 768]
403
+
404
+ # Get the similarity scores for the embeddings
405
+ similarities = model.similarity(embeddings, embeddings)
406
+ print(similarities.shape)
407
+ # [3, 3]
408
+ ```
409
+
410
+ <!--
411
+ ### Direct Usage (Transformers)
412
+
413
+ <details><summary>Click to see the direct usage in Transformers</summary>
414
+
415
+ </details>
416
+ -->
417
+
418
+ <!--
419
+ ### Downstream Usage (Sentence Transformers)
420
+
421
+ You can finetune this model on your own dataset.
422
+
423
+ <details><summary>Click to expand</summary>
424
+
425
+ </details>
426
+ -->
427
+
428
+ <!--
429
+ ### Out-of-Scope Use
430
+
431
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
432
+ -->
433
+
434
+ ## Evaluation
435
+
436
+ ### Metrics
437
+
438
+ #### Information Retrieval
439
+ * Dataset: `dim_768`
440
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
441
+
442
+ | Metric | Value |
443
+ |:--------------------|:-----------|
444
+ | cosine_accuracy@1 | 0.68 |
445
+ | cosine_accuracy@3 | 0.81 |
446
+ | cosine_accuracy@5 | 0.8514 |
447
+ | cosine_accuracy@10 | 0.8943 |
448
+ | cosine_precision@1 | 0.68 |
449
+ | cosine_precision@3 | 0.27 |
450
+ | cosine_precision@5 | 0.1703 |
451
+ | cosine_precision@10 | 0.0894 |
452
+ | cosine_recall@1 | 0.68 |
453
+ | cosine_recall@3 | 0.81 |
454
+ | cosine_recall@5 | 0.8514 |
455
+ | cosine_recall@10 | 0.8943 |
456
+ | cosine_ndcg@10 | 0.7882 |
457
+ | cosine_mrr@10 | 0.7541 |
458
+ | **cosine_map@100** | **0.7585** |
459
+
460
+ #### Information Retrieval
461
+ * Dataset: `dim_512`
462
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
463
+
464
+ | Metric | Value |
465
+ |:--------------------|:-----------|
466
+ | cosine_accuracy@1 | 0.68 |
467
+ | cosine_accuracy@3 | 0.8029 |
468
+ | cosine_accuracy@5 | 0.8457 |
469
+ | cosine_accuracy@10 | 0.8971 |
470
+ | cosine_precision@1 | 0.68 |
471
+ | cosine_precision@3 | 0.2676 |
472
+ | cosine_precision@5 | 0.1691 |
473
+ | cosine_precision@10 | 0.0897 |
474
+ | cosine_recall@1 | 0.68 |
475
+ | cosine_recall@3 | 0.8029 |
476
+ | cosine_recall@5 | 0.8457 |
477
+ | cosine_recall@10 | 0.8971 |
478
+ | cosine_ndcg@10 | 0.7871 |
479
+ | cosine_mrr@10 | 0.752 |
480
+ | **cosine_map@100** | **0.7559** |
481
+
482
+ #### Information Retrieval
483
+ * Dataset: `dim_256`
484
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
485
+
486
+ | Metric | Value |
487
+ |:--------------------|:-----------|
488
+ | cosine_accuracy@1 | 0.6714 |
489
+ | cosine_accuracy@3 | 0.7986 |
490
+ | cosine_accuracy@5 | 0.8457 |
491
+ | cosine_accuracy@10 | 0.8843 |
492
+ | cosine_precision@1 | 0.6714 |
493
+ | cosine_precision@3 | 0.2662 |
494
+ | cosine_precision@5 | 0.1691 |
495
+ | cosine_precision@10 | 0.0884 |
496
+ | cosine_recall@1 | 0.6714 |
497
+ | cosine_recall@3 | 0.7986 |
498
+ | cosine_recall@5 | 0.8457 |
499
+ | cosine_recall@10 | 0.8843 |
500
+ | cosine_ndcg@10 | 0.7799 |
501
+ | cosine_mrr@10 | 0.7462 |
502
+ | **cosine_map@100** | **0.7506** |
503
+
504
+ #### Information Retrieval
505
+ * Dataset: `dim_128`
506
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
507
+
508
+ | Metric | Value |
509
+ |:--------------------|:-----------|
510
+ | cosine_accuracy@1 | 0.66 |
511
+ | cosine_accuracy@3 | 0.7914 |
512
+ | cosine_accuracy@5 | 0.8286 |
513
+ | cosine_accuracy@10 | 0.8814 |
514
+ | cosine_precision@1 | 0.66 |
515
+ | cosine_precision@3 | 0.2638 |
516
+ | cosine_precision@5 | 0.1657 |
517
+ | cosine_precision@10 | 0.0881 |
518
+ | cosine_recall@1 | 0.66 |
519
+ | cosine_recall@3 | 0.7914 |
520
+ | cosine_recall@5 | 0.8286 |
521
+ | cosine_recall@10 | 0.8814 |
522
+ | cosine_ndcg@10 | 0.7707 |
523
+ | cosine_mrr@10 | 0.7354 |
524
+ | **cosine_map@100** | **0.7396** |
525
+
526
+ #### Information Retrieval
527
+ * Dataset: `dim_64`
528
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
529
+
530
+ | Metric | Value |
531
+ |:--------------------|:-----------|
532
+ | cosine_accuracy@1 | 0.6271 |
533
+ | cosine_accuracy@3 | 0.7543 |
534
+ | cosine_accuracy@5 | 0.8014 |
535
+ | cosine_accuracy@10 | 0.86 |
536
+ | cosine_precision@1 | 0.6271 |
537
+ | cosine_precision@3 | 0.2514 |
538
+ | cosine_precision@5 | 0.1603 |
539
+ | cosine_precision@10 | 0.086 |
540
+ | cosine_recall@1 | 0.6271 |
541
+ | cosine_recall@3 | 0.7543 |
542
+ | cosine_recall@5 | 0.8014 |
543
+ | cosine_recall@10 | 0.86 |
544
+ | cosine_ndcg@10 | 0.7404 |
545
+ | cosine_mrr@10 | 0.7026 |
546
+ | **cosine_map@100** | **0.7069** |
547
+
548
+ <!--
549
+ ## Bias, Risks and Limitations
550
+
551
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
552
+ -->
553
+
554
+ <!--
555
+ ### Recommendations
556
+
557
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
558
+ -->
559
+
560
+ ## Training Details
561
+
562
+ ### Training Dataset
563
+
564
+ #### json
565
+
566
+ * Dataset: json
567
+ * Size: 6,300 training samples
568
+ * Columns: <code>positive</code> and <code>anchor</code>
569
+ * Approximate statistics based on the first 1000 samples:
570
+ | | positive | anchor |
571
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
572
+ | type | string | string |
573
+ | details | <ul><li>min: 4 tokens</li><li>mean: 46.33 tokens</li><li>max: 326 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.38 tokens</li><li>max: 43 tokens</li></ul> |
574
+ * Samples:
575
+ | positive | anchor |
576
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------|
577
+ | <code>The data includes transaction and integration costs listed as follows for each year: $0, $0, $59, $0, $0, $0, $269, $91, $39, $269, $91, $98.</code> | <code>What were the values of transaction and integration costs for each of the years provided in the data?</code> |
578
+ | <code>In 2023, Delta Air Lines announced an increase in remuneration from their partnership with American Express to $6.8 billion, with expected growth of 10% in 2024.</code> | <code>What was the remuneration from Delta Air Lines' partnership with American Express in 2023, and what is the growth expectation for 2024?</code> |
579
+ | <code>On December 1, 2023, we advanced $10.0 billion under the ASR program and received approximately 215 million shares of common stock with a value of $6.8 billion, which were immediately retired.</code> | <code>What significant financial activity occurred on December 1, 2023, under the ASR program?</code> |
580
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
581
+ ```json
582
+ {
583
+ "loss": "MultipleNegativesRankingLoss",
584
+ "matryoshka_dims": [
585
+ 768,
586
+ 512,
587
+ 256,
588
+ 128,
589
+ 64
590
+ ],
591
+ "matryoshka_weights": [
592
+ 1,
593
+ 1,
594
+ 1,
595
+ 1,
596
+ 1
597
+ ],
598
+ "n_dims_per_step": -1
599
+ }
600
+ ```
601
+
602
+ ### Training Hyperparameters
603
+ #### Non-Default Hyperparameters
604
+
605
+ - `eval_strategy`: epoch
606
+ - `per_device_train_batch_size`: 32
607
+ - `per_device_eval_batch_size`: 16
608
+ - `gradient_accumulation_steps`: 16
609
+ - `learning_rate`: 2e-05
610
+ - `num_train_epochs`: 4
611
+ - `lr_scheduler_type`: cosine
612
+ - `warmup_ratio`: 0.1
613
+ - `bf16`: True
614
+ - `tf32`: True
615
+ - `load_best_model_at_end`: True
616
+ - `optim`: adamw_torch_fused
617
+ - `batch_sampler`: no_duplicates
618
+
619
+ #### All Hyperparameters
620
+ <details><summary>Click to expand</summary>
621
+
622
+ - `overwrite_output_dir`: False
623
+ - `do_predict`: False
624
+ - `eval_strategy`: epoch
625
+ - `prediction_loss_only`: True
626
+ - `per_device_train_batch_size`: 32
627
+ - `per_device_eval_batch_size`: 16
628
+ - `per_gpu_train_batch_size`: None
629
+ - `per_gpu_eval_batch_size`: None
630
+ - `gradient_accumulation_steps`: 16
631
+ - `eval_accumulation_steps`: None
632
+ - `torch_empty_cache_steps`: None
633
+ - `learning_rate`: 2e-05
634
+ - `weight_decay`: 0.0
635
+ - `adam_beta1`: 0.9
636
+ - `adam_beta2`: 0.999
637
+ - `adam_epsilon`: 1e-08
638
+ - `max_grad_norm`: 1.0
639
+ - `num_train_epochs`: 4
640
+ - `max_steps`: -1
641
+ - `lr_scheduler_type`: cosine
642
+ - `lr_scheduler_kwargs`: {}
643
+ - `warmup_ratio`: 0.1
644
+ - `warmup_steps`: 0
645
+ - `log_level`: passive
646
+ - `log_level_replica`: warning
647
+ - `log_on_each_node`: True
648
+ - `logging_nan_inf_filter`: True
649
+ - `save_safetensors`: True
650
+ - `save_on_each_node`: False
651
+ - `save_only_model`: False
652
+ - `restore_callback_states_from_checkpoint`: False
653
+ - `no_cuda`: False
654
+ - `use_cpu`: False
655
+ - `use_mps_device`: False
656
+ - `seed`: 42
657
+ - `data_seed`: None
658
+ - `jit_mode_eval`: False
659
+ - `use_ipex`: False
660
+ - `bf16`: True
661
+ - `fp16`: False
662
+ - `fp16_opt_level`: O1
663
+ - `half_precision_backend`: auto
664
+ - `bf16_full_eval`: False
665
+ - `fp16_full_eval`: False
666
+ - `tf32`: True
667
+ - `local_rank`: 0
668
+ - `ddp_backend`: None
669
+ - `tpu_num_cores`: None
670
+ - `tpu_metrics_debug`: False
671
+ - `debug`: []
672
+ - `dataloader_drop_last`: False
673
+ - `dataloader_num_workers`: 0
674
+ - `dataloader_prefetch_factor`: None
675
+ - `past_index`: -1
676
+ - `disable_tqdm`: False
677
+ - `remove_unused_columns`: True
678
+ - `label_names`: None
679
+ - `load_best_model_at_end`: True
680
+ - `ignore_data_skip`: False
681
+ - `fsdp`: []
682
+ - `fsdp_min_num_params`: 0
683
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
684
+ - `fsdp_transformer_layer_cls_to_wrap`: None
685
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
686
+ - `deepspeed`: None
687
+ - `label_smoothing_factor`: 0.0
688
+ - `optim`: adamw_torch_fused
689
+ - `optim_args`: None
690
+ - `adafactor`: False
691
+ - `group_by_length`: False
692
+ - `length_column_name`: length
693
+ - `ddp_find_unused_parameters`: None
694
+ - `ddp_bucket_cap_mb`: None
695
+ - `ddp_broadcast_buffers`: False
696
+ - `dataloader_pin_memory`: True
697
+ - `dataloader_persistent_workers`: False
698
+ - `skip_memory_metrics`: True
699
+ - `use_legacy_prediction_loop`: False
700
+ - `push_to_hub`: False
701
+ - `resume_from_checkpoint`: None
702
+ - `hub_model_id`: None
703
+ - `hub_strategy`: every_save
704
+ - `hub_private_repo`: False
705
+ - `hub_always_push`: False
706
+ - `gradient_checkpointing`: False
707
+ - `gradient_checkpointing_kwargs`: None
708
+ - `include_inputs_for_metrics`: False
709
+ - `eval_do_concat_batches`: True
710
+ - `fp16_backend`: auto
711
+ - `push_to_hub_model_id`: None
712
+ - `push_to_hub_organization`: None
713
+ - `mp_parameters`:
714
+ - `auto_find_batch_size`: False
715
+ - `full_determinism`: False
716
+ - `torchdynamo`: None
717
+ - `ray_scope`: last
718
+ - `ddp_timeout`: 1800
719
+ - `torch_compile`: False
720
+ - `torch_compile_backend`: None
721
+ - `torch_compile_mode`: None
722
+ - `dispatch_batches`: None
723
+ - `split_batches`: None
724
+ - `include_tokens_per_second`: False
725
+ - `include_num_input_tokens_seen`: False
726
+ - `neftune_noise_alpha`: None
727
+ - `optim_target_modules`: None
728
+ - `batch_eval_metrics`: False
729
+ - `eval_on_start`: False
730
+ - `eval_use_gather_object`: False
731
+ - `batch_sampler`: no_duplicates
732
+ - `multi_dataset_batch_sampler`: proportional
733
+
734
+ </details>
735
+
736
+ ### Training Logs
737
+ | 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 |
738
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
739
+ | 0 | 0 | - | 0.6648 | 0.6922 | 0.6982 | 0.6028 | 0.7029 |
740
+ | 0.8122 | 10 | 1.5362 | - | - | - | - | - |
741
+ | 0.9746 | 12 | - | 0.7259 | 0.7402 | 0.7481 | 0.6913 | 0.7510 |
742
+ | 1.6244 | 20 | 0.6012 | - | - | - | - | - |
743
+ | 1.9492 | 24 | - | 0.7341 | 0.7503 | 0.7554 | 0.7051 | 0.7576 |
744
+ | 2.4365 | 30 | 0.4225 | - | - | - | - | - |
745
+ | 2.9239 | 36 | - | 0.7383 | 0.7522 | 0.7569 | 0.7063 | 0.7570 |
746
+ | 3.2487 | 40 | 0.358 | - | - | - | - | - |
747
+ | **3.8985** | **48** | **-** | **0.7396** | **0.7506** | **0.7559** | **0.7069** | **0.7585** |
748
+
749
+ * The bold row denotes the saved checkpoint.
750
+
751
+ ### Framework Versions
752
+ - Python: 3.10.12
753
+ - Sentence Transformers: 3.1.1
754
+ - Transformers: 4.44.2
755
+ - PyTorch: 2.4.1+cu121
756
+ - Accelerate: 0.34.2
757
+ - Datasets: 3.0.0
758
+ - Tokenizers: 0.19.1
759
+
760
+ ## Citation
761
+
762
+ ### BibTeX
763
+
764
+ #### Sentence Transformers
765
+ ```bibtex
766
+ @inproceedings{reimers-2019-sentence-bert,
767
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
768
+ author = "Reimers, Nils and Gurevych, Iryna",
769
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
770
+ month = "11",
771
+ year = "2019",
772
+ publisher = "Association for Computational Linguistics",
773
+ url = "https://arxiv.org/abs/1908.10084",
774
+ }
775
+ ```
776
+
777
+ #### MatryoshkaLoss
778
+ ```bibtex
779
+ @misc{kusupati2024matryoshka,
780
+ title={Matryoshka Representation Learning},
781
+ 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},
782
+ year={2024},
783
+ eprint={2205.13147},
784
+ archivePrefix={arXiv},
785
+ primaryClass={cs.LG}
786
+ }
787
+ ```
788
+
789
+ #### MultipleNegativesRankingLoss
790
+ ```bibtex
791
+ @misc{henderson2017efficient,
792
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
793
+ 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},
794
+ year={2017},
795
+ eprint={1705.00652},
796
+ archivePrefix={arXiv},
797
+ primaryClass={cs.CL}
798
+ }
799
+ ```
800
+
801
+ <!--
802
+ ## Glossary
803
+
804
+ *Clearly define terms in order to be accessible across audiences.*
805
+ -->
806
+
807
+ <!--
808
+ ## Model Card Authors
809
+
810
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
811
+ -->
812
+
813
+ <!--
814
+ ## Model Card Contact
815
+
816
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
817
+ -->
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.44.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.1.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.4.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:9e7c985f1d0122cba0eabd77a129ba9ffb086af7a51b04f629418e208c2a9780
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