Nishanth7803 commited on
Commit
52ba41e
·
verified ·
1 Parent(s): 92a59b9

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,807 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: FedEx supports the mental health and well-being of its employees
34
+ and their household members by providing 24/7 confidential counseling services
35
+ and frequently communicating with employees on how to access these resources,
36
+ with an increased focus on mental health resources in recent years.
37
+ sentences:
38
+ - What are some of the key elements that management considers when making critical
39
+ accounting estimates for Garmin?
40
+ - How does FedEx support the mental health and well-being of its employees and their
41
+ household members?
42
+ - What was AbbVie's strategy for achieving its financial performance in 2023?
43
+ - source_sentence: Our tax returns are routinely audited and settlements of issues
44
+ raised in these audits sometimes affect our tax provisions.
45
+ sentences:
46
+ - What was the total long-term debt, including the current portion, for AbbVie as
47
+ of December 31, 2023?
48
+ - How are tax returns affecting the company's tax provisions when audited?
49
+ - What are the effective dates for the main provisions and additional data collection
50
+ and reporting requirements of the final rule impacting AENB's compliance obligations?
51
+ - source_sentence: In 2023, Machinery, Energy & Transportation held cash and cash
52
+ equivalents amounting to $6,106 million, compared to $6,042 million in 2022.
53
+ sentences:
54
+ - How much cash and cash equivalents did Machinery, Energy & Transportation hold
55
+ in 2023 compared to 2022?
56
+ - As of the report's date, how does the company view the necessity of disclosing
57
+ pending legal proceedings?
58
+ - What strategies does the company use to mitigate increasing shipping costs?
59
+ - source_sentence: As of December 31, 2023, the total amortized cost, net of valuation
60
+ allowance, for non-U.S. government securities amounted to $14,516 million.
61
+ sentences:
62
+ - How did the combined ratio change from 2022 to 2023?
63
+ - What changes occurred in the valuation of equity warrants from 2021 to 2023?
64
+ - What was the total amortized cost, net of valuation allowance, for non-U.S. government
65
+ securities as of December 31, 2023?
66
+ - source_sentence: Personal Systems net revenue was $35,684 million for the fiscal
67
+ year 2023.
68
+ sentences:
69
+ - What was the total net revenue for the Personal Systems segment in the fiscal
70
+ year 2023?
71
+ - What are the revised maximum leverage ratios under the Senior Credit Facilities
72
+ for the periods specified and in connection with certain material acquisitions?
73
+ - What was the total net sales for the Dollar Tree segment in the year ended January
74
+ 28, 2023?
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.7071428571428572
88
+ name: Cosine Accuracy@1
89
+ - type: cosine_accuracy@3
90
+ value: 0.8285714285714286
91
+ name: Cosine Accuracy@3
92
+ - type: cosine_accuracy@5
93
+ value: 0.8657142857142858
94
+ name: Cosine Accuracy@5
95
+ - type: cosine_accuracy@10
96
+ value: 0.9042857142857142
97
+ name: Cosine Accuracy@10
98
+ - type: cosine_precision@1
99
+ value: 0.7071428571428572
100
+ name: Cosine Precision@1
101
+ - type: cosine_precision@3
102
+ value: 0.27619047619047615
103
+ name: Cosine Precision@3
104
+ - type: cosine_precision@5
105
+ value: 0.17314285714285713
106
+ name: Cosine Precision@5
107
+ - type: cosine_precision@10
108
+ value: 0.09042857142857141
109
+ name: Cosine Precision@10
110
+ - type: cosine_recall@1
111
+ value: 0.7071428571428572
112
+ name: Cosine Recall@1
113
+ - type: cosine_recall@3
114
+ value: 0.8285714285714286
115
+ name: Cosine Recall@3
116
+ - type: cosine_recall@5
117
+ value: 0.8657142857142858
118
+ name: Cosine Recall@5
119
+ - type: cosine_recall@10
120
+ value: 0.9042857142857142
121
+ name: Cosine Recall@10
122
+ - type: cosine_ndcg@10
123
+ value: 0.8089576129709927
124
+ name: Cosine Ndcg@10
125
+ - type: cosine_mrr@10
126
+ value: 0.7781173469387753
127
+ name: Cosine Mrr@10
128
+ - type: cosine_map@100
129
+ value: 0.7818167550402533
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.7
140
+ name: Cosine Accuracy@1
141
+ - type: cosine_accuracy@3
142
+ value: 0.8357142857142857
143
+ name: Cosine Accuracy@3
144
+ - type: cosine_accuracy@5
145
+ value: 0.8671428571428571
146
+ name: Cosine Accuracy@5
147
+ - type: cosine_accuracy@10
148
+ value: 0.9114285714285715
149
+ name: Cosine Accuracy@10
150
+ - type: cosine_precision@1
151
+ value: 0.7
152
+ name: Cosine Precision@1
153
+ - type: cosine_precision@3
154
+ value: 0.2785714285714286
155
+ name: Cosine Precision@3
156
+ - type: cosine_precision@5
157
+ value: 0.1734285714285714
158
+ name: Cosine Precision@5
159
+ - type: cosine_precision@10
160
+ value: 0.09114285714285712
161
+ name: Cosine Precision@10
162
+ - type: cosine_recall@1
163
+ value: 0.7
164
+ name: Cosine Recall@1
165
+ - type: cosine_recall@3
166
+ value: 0.8357142857142857
167
+ name: Cosine Recall@3
168
+ - type: cosine_recall@5
169
+ value: 0.8671428571428571
170
+ name: Cosine Recall@5
171
+ - type: cosine_recall@10
172
+ value: 0.9114285714285715
173
+ name: Cosine Recall@10
174
+ - type: cosine_ndcg@10
175
+ value: 0.8092516903954083
176
+ name: Cosine Ndcg@10
177
+ - type: cosine_mrr@10
178
+ value: 0.7763032879818597
179
+ name: Cosine Mrr@10
180
+ - type: cosine_map@100
181
+ value: 0.7797147792125239
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.7028571428571428
192
+ name: Cosine Accuracy@1
193
+ - type: cosine_accuracy@3
194
+ value: 0.8357142857142857
195
+ name: Cosine Accuracy@3
196
+ - type: cosine_accuracy@5
197
+ value: 0.8628571428571429
198
+ name: Cosine Accuracy@5
199
+ - type: cosine_accuracy@10
200
+ value: 0.9014285714285715
201
+ name: Cosine Accuracy@10
202
+ - type: cosine_precision@1
203
+ value: 0.7028571428571428
204
+ name: Cosine Precision@1
205
+ - type: cosine_precision@3
206
+ value: 0.2785714285714286
207
+ name: Cosine Precision@3
208
+ - type: cosine_precision@5
209
+ value: 0.17257142857142854
210
+ name: Cosine Precision@5
211
+ - type: cosine_precision@10
212
+ value: 0.09014285714285714
213
+ name: Cosine Precision@10
214
+ - type: cosine_recall@1
215
+ value: 0.7028571428571428
216
+ name: Cosine Recall@1
217
+ - type: cosine_recall@3
218
+ value: 0.8357142857142857
219
+ name: Cosine Recall@3
220
+ - type: cosine_recall@5
221
+ value: 0.8628571428571429
222
+ name: Cosine Recall@5
223
+ - type: cosine_recall@10
224
+ value: 0.9014285714285715
225
+ name: Cosine Recall@10
226
+ - type: cosine_ndcg@10
227
+ value: 0.8068517806127258
228
+ name: Cosine Ndcg@10
229
+ - type: cosine_mrr@10
230
+ value: 0.7762273242630382
231
+ name: Cosine Mrr@10
232
+ - type: cosine_map@100
233
+ value: 0.7800735216126475
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.69
244
+ name: Cosine Accuracy@1
245
+ - type: cosine_accuracy@3
246
+ value: 0.8171428571428572
247
+ name: Cosine Accuracy@3
248
+ - type: cosine_accuracy@5
249
+ value: 0.8457142857142858
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.69
256
+ name: Cosine Precision@1
257
+ - type: cosine_precision@3
258
+ value: 0.2723809523809524
259
+ name: Cosine Precision@3
260
+ - type: cosine_precision@5
261
+ value: 0.16914285714285712
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.69
268
+ name: Cosine Recall@1
269
+ - type: cosine_recall@3
270
+ value: 0.8171428571428572
271
+ name: Cosine Recall@3
272
+ - type: cosine_recall@5
273
+ value: 0.8457142857142858
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.7940646861464341
280
+ name: Cosine Ndcg@10
281
+ - type: cosine_mrr@10
282
+ value: 0.7611541950113375
283
+ name: Cosine Mrr@10
284
+ - type: cosine_map@100
285
+ value: 0.7650200641460506
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.6428571428571429
296
+ name: Cosine Accuracy@1
297
+ - type: cosine_accuracy@3
298
+ value: 0.7785714285714286
299
+ name: Cosine Accuracy@3
300
+ - type: cosine_accuracy@5
301
+ value: 0.82
302
+ name: Cosine Accuracy@5
303
+ - type: cosine_accuracy@10
304
+ value: 0.86
305
+ name: Cosine Accuracy@10
306
+ - type: cosine_precision@1
307
+ value: 0.6428571428571429
308
+ name: Cosine Precision@1
309
+ - type: cosine_precision@3
310
+ value: 0.2595238095238095
311
+ name: Cosine Precision@3
312
+ - type: cosine_precision@5
313
+ value: 0.16399999999999998
314
+ name: Cosine Precision@5
315
+ - type: cosine_precision@10
316
+ value: 0.086
317
+ name: Cosine Precision@10
318
+ - type: cosine_recall@1
319
+ value: 0.6428571428571429
320
+ name: Cosine Recall@1
321
+ - type: cosine_recall@3
322
+ value: 0.7785714285714286
323
+ name: Cosine Recall@3
324
+ - type: cosine_recall@5
325
+ value: 0.82
326
+ name: Cosine Recall@5
327
+ - type: cosine_recall@10
328
+ value: 0.86
329
+ name: Cosine Recall@10
330
+ - type: cosine_ndcg@10
331
+ value: 0.7522449699920628
332
+ name: Cosine Ndcg@10
333
+ - type: cosine_mrr@10
334
+ value: 0.7175958049886619
335
+ name: Cosine Mrr@10
336
+ - type: cosine_map@100
337
+ value: 0.7226733508592172
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("Nishanth7803/bge-base-finetuned-financial")
389
+ # Run inference
390
+ sentences = [
391
+ 'Personal Systems net revenue was $35,684 million for the fiscal year 2023.',
392
+ 'What was the total net revenue for the Personal Systems segment in the fiscal year 2023?',
393
+ 'What are the revised maximum leverage ratios under the Senior Credit Facilities for the periods specified and in connection with certain material acquisitions?',
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.7071 |
440
+ | cosine_accuracy@3 | 0.8286 |
441
+ | cosine_accuracy@5 | 0.8657 |
442
+ | cosine_accuracy@10 | 0.9043 |
443
+ | cosine_precision@1 | 0.7071 |
444
+ | cosine_precision@3 | 0.2762 |
445
+ | cosine_precision@5 | 0.1731 |
446
+ | cosine_precision@10 | 0.0904 |
447
+ | cosine_recall@1 | 0.7071 |
448
+ | cosine_recall@3 | 0.8286 |
449
+ | cosine_recall@5 | 0.8657 |
450
+ | cosine_recall@10 | 0.9043 |
451
+ | cosine_ndcg@10 | 0.809 |
452
+ | cosine_mrr@10 | 0.7781 |
453
+ | **cosine_map@100** | **0.7818** |
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.7 |
462
+ | cosine_accuracy@3 | 0.8357 |
463
+ | cosine_accuracy@5 | 0.8671 |
464
+ | cosine_accuracy@10 | 0.9114 |
465
+ | cosine_precision@1 | 0.7 |
466
+ | cosine_precision@3 | 0.2786 |
467
+ | cosine_precision@5 | 0.1734 |
468
+ | cosine_precision@10 | 0.0911 |
469
+ | cosine_recall@1 | 0.7 |
470
+ | cosine_recall@3 | 0.8357 |
471
+ | cosine_recall@5 | 0.8671 |
472
+ | cosine_recall@10 | 0.9114 |
473
+ | cosine_ndcg@10 | 0.8093 |
474
+ | cosine_mrr@10 | 0.7763 |
475
+ | **cosine_map@100** | **0.7797** |
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.7029 |
484
+ | cosine_accuracy@3 | 0.8357 |
485
+ | cosine_accuracy@5 | 0.8629 |
486
+ | cosine_accuracy@10 | 0.9014 |
487
+ | cosine_precision@1 | 0.7029 |
488
+ | cosine_precision@3 | 0.2786 |
489
+ | cosine_precision@5 | 0.1726 |
490
+ | cosine_precision@10 | 0.0901 |
491
+ | cosine_recall@1 | 0.7029 |
492
+ | cosine_recall@3 | 0.8357 |
493
+ | cosine_recall@5 | 0.8629 |
494
+ | cosine_recall@10 | 0.9014 |
495
+ | cosine_ndcg@10 | 0.8069 |
496
+ | cosine_mrr@10 | 0.7762 |
497
+ | **cosine_map@100** | **0.7801** |
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.69 |
506
+ | cosine_accuracy@3 | 0.8171 |
507
+ | cosine_accuracy@5 | 0.8457 |
508
+ | cosine_accuracy@10 | 0.8971 |
509
+ | cosine_precision@1 | 0.69 |
510
+ | cosine_precision@3 | 0.2724 |
511
+ | cosine_precision@5 | 0.1691 |
512
+ | cosine_precision@10 | 0.0897 |
513
+ | cosine_recall@1 | 0.69 |
514
+ | cosine_recall@3 | 0.8171 |
515
+ | cosine_recall@5 | 0.8457 |
516
+ | cosine_recall@10 | 0.8971 |
517
+ | cosine_ndcg@10 | 0.7941 |
518
+ | cosine_mrr@10 | 0.7612 |
519
+ | **cosine_map@100** | **0.765** |
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.6429 |
528
+ | cosine_accuracy@3 | 0.7786 |
529
+ | cosine_accuracy@5 | 0.82 |
530
+ | cosine_accuracy@10 | 0.86 |
531
+ | cosine_precision@1 | 0.6429 |
532
+ | cosine_precision@3 | 0.2595 |
533
+ | cosine_precision@5 | 0.164 |
534
+ | cosine_precision@10 | 0.086 |
535
+ | cosine_recall@1 | 0.6429 |
536
+ | cosine_recall@3 | 0.7786 |
537
+ | cosine_recall@5 | 0.82 |
538
+ | cosine_recall@10 | 0.86 |
539
+ | cosine_ndcg@10 | 0.7522 |
540
+ | cosine_mrr@10 | 0.7176 |
541
+ | **cosine_map@100** | **0.7227** |
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.23 tokens</li><li>max: 289 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.38 tokens</li><li>max: 41 tokens</li></ul> |
569
+ * Samples:
570
+ | positive | anchor |
571
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------|
572
+ | <code>In addition, most group health plans and issuers of group or individual health insurance coverage are required to disclose personalized pricing information to their participants, beneficiaries, and enrollees through an online consumer tool, by phone, or in paper form, upon request. Cost estimates must be provided in real-time based on cost-sharing information that is accurate at the time of the request.</code> | <code>What are the requirements for health insurers and group health plans in providing cost estimates to consumers?</code> |
573
+ | <code>Gross profit energy generation and storage segment | $ | 1,141</code> | <code>What was the gross profit of the energy generation and storage segment in the year ended December 31, 2023?</code> |
574
+ | <code>In addition, eBay authenticates eligible luxury and collectible items in five categories through “Authenticity Guarantee”, an independent authentication service available in the United States, the United Kingdom, Germany, Australia and Canada.</code> | <code>What does eBay's Authenticity Guarantee service offer?</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
+ - `fp16`: True
609
+ - `load_best_model_at_end`: True
610
+ - `optim`: adamw_torch_fused
611
+ - `batch_sampler`: no_duplicates
612
+
613
+ #### All Hyperparameters
614
+ <details><summary>Click to expand</summary>
615
+
616
+ - `overwrite_output_dir`: False
617
+ - `do_predict`: False
618
+ - `eval_strategy`: epoch
619
+ - `prediction_loss_only`: True
620
+ - `per_device_train_batch_size`: 32
621
+ - `per_device_eval_batch_size`: 16
622
+ - `per_gpu_train_batch_size`: None
623
+ - `per_gpu_eval_batch_size`: None
624
+ - `gradient_accumulation_steps`: 16
625
+ - `eval_accumulation_steps`: None
626
+ - `learning_rate`: 2e-05
627
+ - `weight_decay`: 0.0
628
+ - `adam_beta1`: 0.9
629
+ - `adam_beta2`: 0.999
630
+ - `adam_epsilon`: 1e-08
631
+ - `max_grad_norm`: 1.0
632
+ - `num_train_epochs`: 4
633
+ - `max_steps`: -1
634
+ - `lr_scheduler_type`: cosine
635
+ - `lr_scheduler_kwargs`: {}
636
+ - `warmup_ratio`: 0.1
637
+ - `warmup_steps`: 0
638
+ - `log_level`: passive
639
+ - `log_level_replica`: warning
640
+ - `log_on_each_node`: True
641
+ - `logging_nan_inf_filter`: True
642
+ - `save_safetensors`: True
643
+ - `save_on_each_node`: False
644
+ - `save_only_model`: False
645
+ - `restore_callback_states_from_checkpoint`: False
646
+ - `no_cuda`: False
647
+ - `use_cpu`: False
648
+ - `use_mps_device`: False
649
+ - `seed`: 42
650
+ - `data_seed`: None
651
+ - `jit_mode_eval`: False
652
+ - `use_ipex`: False
653
+ - `bf16`: False
654
+ - `fp16`: True
655
+ - `fp16_opt_level`: O1
656
+ - `half_precision_backend`: auto
657
+ - `bf16_full_eval`: False
658
+ - `fp16_full_eval`: False
659
+ - `tf32`: None
660
+ - `local_rank`: 0
661
+ - `ddp_backend`: None
662
+ - `tpu_num_cores`: None
663
+ - `tpu_metrics_debug`: False
664
+ - `debug`: []
665
+ - `dataloader_drop_last`: False
666
+ - `dataloader_num_workers`: 0
667
+ - `dataloader_prefetch_factor`: None
668
+ - `past_index`: -1
669
+ - `disable_tqdm`: False
670
+ - `remove_unused_columns`: True
671
+ - `label_names`: None
672
+ - `load_best_model_at_end`: True
673
+ - `ignore_data_skip`: False
674
+ - `fsdp`: []
675
+ - `fsdp_min_num_params`: 0
676
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
677
+ - `fsdp_transformer_layer_cls_to_wrap`: None
678
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
679
+ - `deepspeed`: None
680
+ - `label_smoothing_factor`: 0.0
681
+ - `optim`: adamw_torch_fused
682
+ - `optim_args`: None
683
+ - `adafactor`: False
684
+ - `group_by_length`: False
685
+ - `length_column_name`: length
686
+ - `ddp_find_unused_parameters`: None
687
+ - `ddp_bucket_cap_mb`: None
688
+ - `ddp_broadcast_buffers`: False
689
+ - `dataloader_pin_memory`: True
690
+ - `dataloader_persistent_workers`: False
691
+ - `skip_memory_metrics`: True
692
+ - `use_legacy_prediction_loop`: False
693
+ - `push_to_hub`: False
694
+ - `resume_from_checkpoint`: None
695
+ - `hub_model_id`: None
696
+ - `hub_strategy`: every_save
697
+ - `hub_private_repo`: False
698
+ - `hub_always_push`: False
699
+ - `gradient_checkpointing`: False
700
+ - `gradient_checkpointing_kwargs`: None
701
+ - `include_inputs_for_metrics`: False
702
+ - `eval_do_concat_batches`: True
703
+ - `fp16_backend`: auto
704
+ - `push_to_hub_model_id`: None
705
+ - `push_to_hub_organization`: None
706
+ - `mp_parameters`:
707
+ - `auto_find_batch_size`: False
708
+ - `full_determinism`: False
709
+ - `torchdynamo`: None
710
+ - `ray_scope`: last
711
+ - `ddp_timeout`: 1800
712
+ - `torch_compile`: False
713
+ - `torch_compile_backend`: None
714
+ - `torch_compile_mode`: None
715
+ - `dispatch_batches`: None
716
+ - `split_batches`: None
717
+ - `include_tokens_per_second`: False
718
+ - `include_num_input_tokens_seen`: False
719
+ - `neftune_noise_alpha`: None
720
+ - `optim_target_modules`: None
721
+ - `batch_eval_metrics`: False
722
+ - `batch_sampler`: no_duplicates
723
+ - `multi_dataset_batch_sampler`: proportional
724
+
725
+ </details>
726
+
727
+ ### Training Logs
728
+ | 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 |
729
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
730
+ | 0.8122 | 10 | 1.5914 | - | - | - | - | - |
731
+ | 0.9746 | 12 | - | 0.7520 | 0.7713 | 0.7706 | 0.6969 | 0.7753 |
732
+ | 1.6244 | 20 | 0.6901 | - | - | - | - | - |
733
+ | 1.9492 | 24 | - | 0.7616 | 0.7821 | 0.7799 | 0.7173 | 0.7795 |
734
+ | 2.4365 | 30 | 0.4967 | - | - | - | - | - |
735
+ | 2.9239 | 36 | - | 0.7643 | 0.7815 | 0.7801 | 0.7219 | 0.7817 |
736
+ | 3.2487 | 40 | 0.3894 | - | - | - | - | - |
737
+ | **3.8985** | **48** | **-** | **0.765** | **0.7801** | **0.7797** | **0.7227** | **0.7818** |
738
+
739
+ * The bold row denotes the saved checkpoint.
740
+
741
+ ### Framework Versions
742
+ - Python: 3.10.12
743
+ - Sentence Transformers: 3.0.1
744
+ - Transformers: 4.41.2
745
+ - PyTorch: 2.3.0+cu121
746
+ - Accelerate: 0.31.0
747
+ - Datasets: 2.19.2
748
+ - Tokenizers: 0.19.1
749
+
750
+ ## Citation
751
+
752
+ ### BibTeX
753
+
754
+ #### Sentence Transformers
755
+ ```bibtex
756
+ @inproceedings{reimers-2019-sentence-bert,
757
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
758
+ author = "Reimers, Nils and Gurevych, Iryna",
759
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
760
+ month = "11",
761
+ year = "2019",
762
+ publisher = "Association for Computational Linguistics",
763
+ url = "https://arxiv.org/abs/1908.10084",
764
+ }
765
+ ```
766
+
767
+ #### MatryoshkaLoss
768
+ ```bibtex
769
+ @misc{kusupati2024matryoshka,
770
+ title={Matryoshka Representation Learning},
771
+ 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},
772
+ year={2024},
773
+ eprint={2205.13147},
774
+ archivePrefix={arXiv},
775
+ primaryClass={cs.LG}
776
+ }
777
+ ```
778
+
779
+ #### MultipleNegativesRankingLoss
780
+ ```bibtex
781
+ @misc{henderson2017efficient,
782
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
783
+ 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},
784
+ year={2017},
785
+ eprint={1705.00652},
786
+ archivePrefix={arXiv},
787
+ primaryClass={cs.CL}
788
+ }
789
+ ```
790
+
791
+ <!--
792
+ ## Glossary
793
+
794
+ *Clearly define terms in order to be accessible across audiences.*
795
+ -->
796
+
797
+ <!--
798
+ ## Model Card Authors
799
+
800
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
801
+ -->
802
+
803
+ <!--
804
+ ## Model Card Contact
805
+
806
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
807
+ -->
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.3.0+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:df93bb31149afb125a9df3140e97ced89e6e855e743858bb2b38b86a2fb1f899
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