adarshheg commited on
Commit
38592a0
·
verified ·
1 Parent(s): 3784df9

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,798 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-base-en-v1.5
3
+ datasets: []
4
+ language:
5
+ - en
6
+ library_name: sentence-transformers
7
+ license: apache-2.0
8
+ metrics:
9
+ - cosine_accuracy@1
10
+ - cosine_accuracy@3
11
+ - cosine_accuracy@5
12
+ - cosine_accuracy@10
13
+ - cosine_precision@1
14
+ - cosine_precision@3
15
+ - cosine_precision@5
16
+ - cosine_precision@10
17
+ - cosine_recall@1
18
+ - cosine_recall@3
19
+ - cosine_recall@5
20
+ - cosine_recall@10
21
+ - cosine_ndcg@10
22
+ - cosine_mrr@10
23
+ - cosine_map@100
24
+ pipeline_tag: sentence-similarity
25
+ tags:
26
+ - sentence-transformers
27
+ - sentence-similarity
28
+ - feature-extraction
29
+ - generated_from_trainer
30
+ - dataset_size:1500
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: The depreciation and amortization expense for the year 2021 was
35
+ recorded at $3,103.
36
+ sentences:
37
+ - In what sequence do the signature pages appear relative to the financial documents
38
+ in this report?
39
+ - What was the depreciation and amortization expense in 2021?
40
+ - What was the net impact on other comprehensive income (loss), net of tax, for
41
+ the fiscal year ended March 31, 2023?
42
+ - source_sentence: 'Actual Asset Returns: U.S. Plans: (21.20)%, Non-U.S. Plans: (25.40)%.'
43
+ sentences:
44
+ - What were the total other current liabilities for the fiscal year ending in 2023
45
+ compared to 2022?
46
+ - What was the percentage of proprietary brand product sales as part of the front
47
+ store revenues in 2023?
48
+ - By how much did actual asset returns vary between U.S. and Non-U.S. pension plans
49
+ in 2023?
50
+ - source_sentence: Intellectual property rights are important to Nike's brand, success,
51
+ and competitive position. The company strategically pursues protections of these
52
+ rights and vigorously protects them against third-party theft and infringement.
53
+ sentences:
54
+ - What types of legal issues are generally categorized under Commitments and Contingencies
55
+ in a Form 10-K?
56
+ - What role does intellectual property play in Nike's competitive position?
57
+ - How is the revenue from sales of Online-Hosted Service Games recognized?
58
+ - source_sentence: Item 3, titled 'Legal Proceedings' in a 10-K filing, directs to
59
+ Note 16 where specific information is further detailed in Item 8 of Part II.
60
+ sentences:
61
+ - How does Garmin manage the costs of manufacturing its products?
62
+ - What is indicated by Item 3, 'Legal Proceedings', in a 10-K filing?
63
+ - How much did UnitedHealthcare's cash provided by operating activities amount to
64
+ in 2023?
65
+ - source_sentence: During 2023, FedEx ranked 18th in FORTUNE magazine's 'World's Most
66
+ Admired Companies' list and maintained its position as the highest-ranked delivery
67
+ company on the list.
68
+ sentences:
69
+ - What was the total depreciation and amortization expense for the company in 2023?
70
+ - What was the valuation allowance against deferred tax assets at the end of 2023,
71
+ and what changes may affect its realization?
72
+ - What recognition did FedEx receive from FORTUNE magazine in 2023?
73
+ model-index:
74
+ - name: BGE base Financial Matryoshka
75
+ results:
76
+ - task:
77
+ type: information-retrieval
78
+ name: Information Retrieval
79
+ dataset:
80
+ name: dim 768
81
+ type: dim_768
82
+ metrics:
83
+ - type: cosine_accuracy@1
84
+ value: 0.7766666666666666
85
+ name: Cosine Accuracy@1
86
+ - type: cosine_accuracy@3
87
+ value: 0.86
88
+ name: Cosine Accuracy@3
89
+ - type: cosine_accuracy@5
90
+ value: 0.89
91
+ name: Cosine Accuracy@5
92
+ - type: cosine_accuracy@10
93
+ value: 0.9333333333333333
94
+ name: Cosine Accuracy@10
95
+ - type: cosine_precision@1
96
+ value: 0.7766666666666666
97
+ name: Cosine Precision@1
98
+ - type: cosine_precision@3
99
+ value: 0.2866666666666667
100
+ name: Cosine Precision@3
101
+ - type: cosine_precision@5
102
+ value: 0.17799999999999996
103
+ name: Cosine Precision@5
104
+ - type: cosine_precision@10
105
+ value: 0.09333333333333332
106
+ name: Cosine Precision@10
107
+ - type: cosine_recall@1
108
+ value: 0.7766666666666666
109
+ name: Cosine Recall@1
110
+ - type: cosine_recall@3
111
+ value: 0.86
112
+ name: Cosine Recall@3
113
+ - type: cosine_recall@5
114
+ value: 0.89
115
+ name: Cosine Recall@5
116
+ - type: cosine_recall@10
117
+ value: 0.9333333333333333
118
+ name: Cosine Recall@10
119
+ - type: cosine_ndcg@10
120
+ value: 0.8519532537710081
121
+ name: Cosine Ndcg@10
122
+ - type: cosine_mrr@10
123
+ value: 0.8263650793650793
124
+ name: Cosine Mrr@10
125
+ - type: cosine_map@100
126
+ value: 0.8285686593594938
127
+ name: Cosine Map@100
128
+ - task:
129
+ type: information-retrieval
130
+ name: Information Retrieval
131
+ dataset:
132
+ name: dim 512
133
+ type: dim_512
134
+ metrics:
135
+ - type: cosine_accuracy@1
136
+ value: 0.7566666666666667
137
+ name: Cosine Accuracy@1
138
+ - type: cosine_accuracy@3
139
+ value: 0.87
140
+ name: Cosine Accuracy@3
141
+ - type: cosine_accuracy@5
142
+ value: 0.8933333333333333
143
+ name: Cosine Accuracy@5
144
+ - type: cosine_accuracy@10
145
+ value: 0.9333333333333333
146
+ name: Cosine Accuracy@10
147
+ - type: cosine_precision@1
148
+ value: 0.7566666666666667
149
+ name: Cosine Precision@1
150
+ - type: cosine_precision@3
151
+ value: 0.29
152
+ name: Cosine Precision@3
153
+ - type: cosine_precision@5
154
+ value: 0.17866666666666664
155
+ name: Cosine Precision@5
156
+ - type: cosine_precision@10
157
+ value: 0.09333333333333332
158
+ name: Cosine Precision@10
159
+ - type: cosine_recall@1
160
+ value: 0.7566666666666667
161
+ name: Cosine Recall@1
162
+ - type: cosine_recall@3
163
+ value: 0.87
164
+ name: Cosine Recall@3
165
+ - type: cosine_recall@5
166
+ value: 0.8933333333333333
167
+ name: Cosine Recall@5
168
+ - type: cosine_recall@10
169
+ value: 0.9333333333333333
170
+ name: Cosine Recall@10
171
+ - type: cosine_ndcg@10
172
+ value: 0.8462349355848354
173
+ name: Cosine Ndcg@10
174
+ - type: cosine_mrr@10
175
+ value: 0.8183306878306877
176
+ name: Cosine Mrr@10
177
+ - type: cosine_map@100
178
+ value: 0.8207466430359656
179
+ name: Cosine Map@100
180
+ - task:
181
+ type: information-retrieval
182
+ name: Information Retrieval
183
+ dataset:
184
+ name: dim 256
185
+ type: dim_256
186
+ metrics:
187
+ - type: cosine_accuracy@1
188
+ value: 0.76
189
+ name: Cosine Accuracy@1
190
+ - type: cosine_accuracy@3
191
+ value: 0.86
192
+ name: Cosine Accuracy@3
193
+ - type: cosine_accuracy@5
194
+ value: 0.89
195
+ name: Cosine Accuracy@5
196
+ - type: cosine_accuracy@10
197
+ value: 0.9266666666666666
198
+ name: Cosine Accuracy@10
199
+ - type: cosine_precision@1
200
+ value: 0.76
201
+ name: Cosine Precision@1
202
+ - type: cosine_precision@3
203
+ value: 0.2866666666666666
204
+ name: Cosine Precision@3
205
+ - type: cosine_precision@5
206
+ value: 0.17799999999999996
207
+ name: Cosine Precision@5
208
+ - type: cosine_precision@10
209
+ value: 0.09266666666666666
210
+ name: Cosine Precision@10
211
+ - type: cosine_recall@1
212
+ value: 0.76
213
+ name: Cosine Recall@1
214
+ - type: cosine_recall@3
215
+ value: 0.86
216
+ name: Cosine Recall@3
217
+ - type: cosine_recall@5
218
+ value: 0.89
219
+ name: Cosine Recall@5
220
+ - type: cosine_recall@10
221
+ value: 0.9266666666666666
222
+ name: Cosine Recall@10
223
+ - type: cosine_ndcg@10
224
+ value: 0.8433224215661056
225
+ name: Cosine Ndcg@10
226
+ - type: cosine_mrr@10
227
+ value: 0.8166931216931217
228
+ name: Cosine Mrr@10
229
+ - type: cosine_map@100
230
+ value: 0.8190592083326618
231
+ name: Cosine Map@100
232
+ - task:
233
+ type: information-retrieval
234
+ name: Information Retrieval
235
+ dataset:
236
+ name: dim 128
237
+ type: dim_128
238
+ metrics:
239
+ - type: cosine_accuracy@1
240
+ value: 0.7066666666666667
241
+ name: Cosine Accuracy@1
242
+ - type: cosine_accuracy@3
243
+ value: 0.84
244
+ name: Cosine Accuracy@3
245
+ - type: cosine_accuracy@5
246
+ value: 0.8633333333333333
247
+ name: Cosine Accuracy@5
248
+ - type: cosine_accuracy@10
249
+ value: 0.91
250
+ name: Cosine Accuracy@10
251
+ - type: cosine_precision@1
252
+ value: 0.7066666666666667
253
+ name: Cosine Precision@1
254
+ - type: cosine_precision@3
255
+ value: 0.27999999999999997
256
+ name: Cosine Precision@3
257
+ - type: cosine_precision@5
258
+ value: 0.17266666666666666
259
+ name: Cosine Precision@5
260
+ - type: cosine_precision@10
261
+ value: 0.09099999999999998
262
+ name: Cosine Precision@10
263
+ - type: cosine_recall@1
264
+ value: 0.7066666666666667
265
+ name: Cosine Recall@1
266
+ - type: cosine_recall@3
267
+ value: 0.84
268
+ name: Cosine Recall@3
269
+ - type: cosine_recall@5
270
+ value: 0.8633333333333333
271
+ name: Cosine Recall@5
272
+ - type: cosine_recall@10
273
+ value: 0.91
274
+ name: Cosine Recall@10
275
+ - type: cosine_ndcg@10
276
+ value: 0.8099084142081584
277
+ name: Cosine Ndcg@10
278
+ - type: cosine_mrr@10
279
+ value: 0.7776230158730157
280
+ name: Cosine Mrr@10
281
+ - type: cosine_map@100
282
+ value: 0.7810311049771785
283
+ name: Cosine Map@100
284
+ - task:
285
+ type: information-retrieval
286
+ name: Information Retrieval
287
+ dataset:
288
+ name: dim 64
289
+ type: dim_64
290
+ metrics:
291
+ - type: cosine_accuracy@1
292
+ value: 0.6833333333333333
293
+ name: Cosine Accuracy@1
294
+ - type: cosine_accuracy@3
295
+ value: 0.7933333333333333
296
+ name: Cosine Accuracy@3
297
+ - type: cosine_accuracy@5
298
+ value: 0.8366666666666667
299
+ name: Cosine Accuracy@5
300
+ - type: cosine_accuracy@10
301
+ value: 0.88
302
+ name: Cosine Accuracy@10
303
+ - type: cosine_precision@1
304
+ value: 0.6833333333333333
305
+ name: Cosine Precision@1
306
+ - type: cosine_precision@3
307
+ value: 0.26444444444444437
308
+ name: Cosine Precision@3
309
+ - type: cosine_precision@5
310
+ value: 0.1673333333333333
311
+ name: Cosine Precision@5
312
+ - type: cosine_precision@10
313
+ value: 0.088
314
+ name: Cosine Precision@10
315
+ - type: cosine_recall@1
316
+ value: 0.6833333333333333
317
+ name: Cosine Recall@1
318
+ - type: cosine_recall@3
319
+ value: 0.7933333333333333
320
+ name: Cosine Recall@3
321
+ - type: cosine_recall@5
322
+ value: 0.8366666666666667
323
+ name: Cosine Recall@5
324
+ - type: cosine_recall@10
325
+ value: 0.88
326
+ name: Cosine Recall@10
327
+ - type: cosine_ndcg@10
328
+ value: 0.7796467165928374
329
+ name: Cosine Ndcg@10
330
+ - type: cosine_mrr@10
331
+ value: 0.7475780423280424
332
+ name: Cosine Mrr@10
333
+ - type: cosine_map@100
334
+ value: 0.751941519893099
335
+ name: Cosine Map@100
336
+ ---
337
+
338
+ # BGE base Financial Matryoshka
339
+
340
+ 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.
341
+
342
+ ## Model Details
343
+
344
+ ### Model Description
345
+ - **Model Type:** Sentence Transformer
346
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
347
+ - **Maximum Sequence Length:** 512 tokens
348
+ - **Output Dimensionality:** 768 tokens
349
+ - **Similarity Function:** Cosine Similarity
350
+ <!-- - **Training Dataset:** Unknown -->
351
+ - **Language:** en
352
+ - **License:** apache-2.0
353
+
354
+ ### Model Sources
355
+
356
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
357
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
358
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
359
+
360
+ ### Full Model Architecture
361
+
362
+ ```
363
+ SentenceTransformer(
364
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
365
+ (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})
366
+ (2): Normalize()
367
+ )
368
+ ```
369
+
370
+ ## Usage
371
+
372
+ ### Direct Usage (Sentence Transformers)
373
+
374
+ First install the Sentence Transformers library:
375
+
376
+ ```bash
377
+ pip install -U sentence-transformers
378
+ ```
379
+
380
+ Then you can load this model and run inference.
381
+ ```python
382
+ from sentence_transformers import SentenceTransformer
383
+
384
+ # Download from the 🤗 Hub
385
+ model = SentenceTransformer("adarshheg/bge-base-financial-matryoshka")
386
+ # Run inference
387
+ sentences = [
388
+ "During 2023, FedEx ranked 18th in FORTUNE magazine's 'World's Most Admired Companies' list and maintained its position as the highest-ranked delivery company on the list.",
389
+ 'What recognition did FedEx receive from FORTUNE magazine in 2023?',
390
+ 'What was the valuation allowance against deferred tax assets at the end of 2023, and what changes may affect its realization?',
391
+ ]
392
+ embeddings = model.encode(sentences)
393
+ print(embeddings.shape)
394
+ # [3, 768]
395
+
396
+ # Get the similarity scores for the embeddings
397
+ similarities = model.similarity(embeddings, embeddings)
398
+ print(similarities.shape)
399
+ # [3, 3]
400
+ ```
401
+
402
+ <!--
403
+ ### Direct Usage (Transformers)
404
+
405
+ <details><summary>Click to see the direct usage in Transformers</summary>
406
+
407
+ </details>
408
+ -->
409
+
410
+ <!--
411
+ ### Downstream Usage (Sentence Transformers)
412
+
413
+ You can finetune this model on your own dataset.
414
+
415
+ <details><summary>Click to expand</summary>
416
+
417
+ </details>
418
+ -->
419
+
420
+ <!--
421
+ ### Out-of-Scope Use
422
+
423
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
424
+ -->
425
+
426
+ ## Evaluation
427
+
428
+ ### Metrics
429
+
430
+ #### Information Retrieval
431
+ * Dataset: `dim_768`
432
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
433
+
434
+ | Metric | Value |
435
+ |:--------------------|:-----------|
436
+ | cosine_accuracy@1 | 0.7767 |
437
+ | cosine_accuracy@3 | 0.86 |
438
+ | cosine_accuracy@5 | 0.89 |
439
+ | cosine_accuracy@10 | 0.9333 |
440
+ | cosine_precision@1 | 0.7767 |
441
+ | cosine_precision@3 | 0.2867 |
442
+ | cosine_precision@5 | 0.178 |
443
+ | cosine_precision@10 | 0.0933 |
444
+ | cosine_recall@1 | 0.7767 |
445
+ | cosine_recall@3 | 0.86 |
446
+ | cosine_recall@5 | 0.89 |
447
+ | cosine_recall@10 | 0.9333 |
448
+ | cosine_ndcg@10 | 0.852 |
449
+ | cosine_mrr@10 | 0.8264 |
450
+ | **cosine_map@100** | **0.8286** |
451
+
452
+ #### Information Retrieval
453
+ * Dataset: `dim_512`
454
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
455
+
456
+ | Metric | Value |
457
+ |:--------------------|:-----------|
458
+ | cosine_accuracy@1 | 0.7567 |
459
+ | cosine_accuracy@3 | 0.87 |
460
+ | cosine_accuracy@5 | 0.8933 |
461
+ | cosine_accuracy@10 | 0.9333 |
462
+ | cosine_precision@1 | 0.7567 |
463
+ | cosine_precision@3 | 0.29 |
464
+ | cosine_precision@5 | 0.1787 |
465
+ | cosine_precision@10 | 0.0933 |
466
+ | cosine_recall@1 | 0.7567 |
467
+ | cosine_recall@3 | 0.87 |
468
+ | cosine_recall@5 | 0.8933 |
469
+ | cosine_recall@10 | 0.9333 |
470
+ | cosine_ndcg@10 | 0.8462 |
471
+ | cosine_mrr@10 | 0.8183 |
472
+ | **cosine_map@100** | **0.8207** |
473
+
474
+ #### Information Retrieval
475
+ * Dataset: `dim_256`
476
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
477
+
478
+ | Metric | Value |
479
+ |:--------------------|:-----------|
480
+ | cosine_accuracy@1 | 0.76 |
481
+ | cosine_accuracy@3 | 0.86 |
482
+ | cosine_accuracy@5 | 0.89 |
483
+ | cosine_accuracy@10 | 0.9267 |
484
+ | cosine_precision@1 | 0.76 |
485
+ | cosine_precision@3 | 0.2867 |
486
+ | cosine_precision@5 | 0.178 |
487
+ | cosine_precision@10 | 0.0927 |
488
+ | cosine_recall@1 | 0.76 |
489
+ | cosine_recall@3 | 0.86 |
490
+ | cosine_recall@5 | 0.89 |
491
+ | cosine_recall@10 | 0.9267 |
492
+ | cosine_ndcg@10 | 0.8433 |
493
+ | cosine_mrr@10 | 0.8167 |
494
+ | **cosine_map@100** | **0.8191** |
495
+
496
+ #### Information Retrieval
497
+ * Dataset: `dim_128`
498
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
499
+
500
+ | Metric | Value |
501
+ |:--------------------|:----------|
502
+ | cosine_accuracy@1 | 0.7067 |
503
+ | cosine_accuracy@3 | 0.84 |
504
+ | cosine_accuracy@5 | 0.8633 |
505
+ | cosine_accuracy@10 | 0.91 |
506
+ | cosine_precision@1 | 0.7067 |
507
+ | cosine_precision@3 | 0.28 |
508
+ | cosine_precision@5 | 0.1727 |
509
+ | cosine_precision@10 | 0.091 |
510
+ | cosine_recall@1 | 0.7067 |
511
+ | cosine_recall@3 | 0.84 |
512
+ | cosine_recall@5 | 0.8633 |
513
+ | cosine_recall@10 | 0.91 |
514
+ | cosine_ndcg@10 | 0.8099 |
515
+ | cosine_mrr@10 | 0.7776 |
516
+ | **cosine_map@100** | **0.781** |
517
+
518
+ #### Information Retrieval
519
+ * Dataset: `dim_64`
520
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
521
+
522
+ | Metric | Value |
523
+ |:--------------------|:-----------|
524
+ | cosine_accuracy@1 | 0.6833 |
525
+ | cosine_accuracy@3 | 0.7933 |
526
+ | cosine_accuracy@5 | 0.8367 |
527
+ | cosine_accuracy@10 | 0.88 |
528
+ | cosine_precision@1 | 0.6833 |
529
+ | cosine_precision@3 | 0.2644 |
530
+ | cosine_precision@5 | 0.1673 |
531
+ | cosine_precision@10 | 0.088 |
532
+ | cosine_recall@1 | 0.6833 |
533
+ | cosine_recall@3 | 0.7933 |
534
+ | cosine_recall@5 | 0.8367 |
535
+ | cosine_recall@10 | 0.88 |
536
+ | cosine_ndcg@10 | 0.7796 |
537
+ | cosine_mrr@10 | 0.7476 |
538
+ | **cosine_map@100** | **0.7519** |
539
+
540
+ <!--
541
+ ## Bias, Risks and Limitations
542
+
543
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
544
+ -->
545
+
546
+ <!--
547
+ ### Recommendations
548
+
549
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
550
+ -->
551
+
552
+ ## Training Details
553
+
554
+ ### Training Dataset
555
+
556
+ #### Unnamed Dataset
557
+
558
+
559
+ * Size: 1,500 training samples
560
+ * Columns: <code>positive</code> and <code>anchor</code>
561
+ * Approximate statistics based on the first 1000 samples:
562
+ | | positive | anchor |
563
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
564
+ | type | string | string |
565
+ | details | <ul><li>min: 6 tokens</li><li>mean: 46.0 tokens</li><li>max: 239 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.82 tokens</li><li>max: 42 tokens</li></ul> |
566
+ * Samples:
567
+ | positive | anchor |
568
+ |:--------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------|
569
+ | <code>In the U.S., Visa Inc.'s total nominal payments volume increased by 17% from $4,725 billion in 2021 to $5,548 billion in 2022.</code> | <code>What is the total percentage increase in Visa Inc.'s nominal payments volume in the U.S. from 2021 to 2022?</code> |
570
+ | <code>The section titled 'Financial Wtatement and Supplementary Data' is labeled with the number 39 in the document.</code> | <code>What is the numerical label associated with the section on Financial Statements and Supplementary Data in the document?</code> |
571
+ | <code>The consolidated financial statements and accompanying notes are incorporated by reference herein.</code> | <code>Are the consolidated financial statements and accompanying notes incorporated by reference in the Annual Report on Form 10-K?</code> |
572
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
573
+ ```json
574
+ {
575
+ "loss": "MultipleNegativesRankingLoss",
576
+ "matryoshka_dims": [
577
+ 768,
578
+ 512,
579
+ 256,
580
+ 128,
581
+ 64
582
+ ],
583
+ "matryoshka_weights": [
584
+ 1,
585
+ 1,
586
+ 1,
587
+ 1,
588
+ 1
589
+ ],
590
+ "n_dims_per_step": -1
591
+ }
592
+ ```
593
+
594
+ ### Training Hyperparameters
595
+ #### Non-Default Hyperparameters
596
+
597
+ - `eval_strategy`: epoch
598
+ - `per_device_train_batch_size`: 32
599
+ - `per_device_eval_batch_size`: 16
600
+ - `gradient_accumulation_steps`: 16
601
+ - `learning_rate`: 2e-05
602
+ - `num_train_epochs`: 2
603
+ - `lr_scheduler_type`: cosine
604
+ - `warmup_ratio`: 0.1
605
+ - `tf32`: False
606
+ - `load_best_model_at_end`: True
607
+ - `optim`: adamw_torch_fused
608
+ - `batch_sampler`: no_duplicates
609
+
610
+ #### All Hyperparameters
611
+ <details><summary>Click to expand</summary>
612
+
613
+ - `overwrite_output_dir`: False
614
+ - `do_predict`: False
615
+ - `eval_strategy`: epoch
616
+ - `prediction_loss_only`: True
617
+ - `per_device_train_batch_size`: 32
618
+ - `per_device_eval_batch_size`: 16
619
+ - `per_gpu_train_batch_size`: None
620
+ - `per_gpu_eval_batch_size`: None
621
+ - `gradient_accumulation_steps`: 16
622
+ - `eval_accumulation_steps`: None
623
+ - `learning_rate`: 2e-05
624
+ - `weight_decay`: 0.0
625
+ - `adam_beta1`: 0.9
626
+ - `adam_beta2`: 0.999
627
+ - `adam_epsilon`: 1e-08
628
+ - `max_grad_norm`: 1.0
629
+ - `num_train_epochs`: 2
630
+ - `max_steps`: -1
631
+ - `lr_scheduler_type`: cosine
632
+ - `lr_scheduler_kwargs`: {}
633
+ - `warmup_ratio`: 0.1
634
+ - `warmup_steps`: 0
635
+ - `log_level`: passive
636
+ - `log_level_replica`: warning
637
+ - `log_on_each_node`: True
638
+ - `logging_nan_inf_filter`: True
639
+ - `save_safetensors`: True
640
+ - `save_on_each_node`: False
641
+ - `save_only_model`: False
642
+ - `restore_callback_states_from_checkpoint`: False
643
+ - `no_cuda`: False
644
+ - `use_cpu`: False
645
+ - `use_mps_device`: False
646
+ - `seed`: 42
647
+ - `data_seed`: None
648
+ - `jit_mode_eval`: False
649
+ - `use_ipex`: False
650
+ - `bf16`: False
651
+ - `fp16`: False
652
+ - `fp16_opt_level`: O1
653
+ - `half_precision_backend`: auto
654
+ - `bf16_full_eval`: False
655
+ - `fp16_full_eval`: False
656
+ - `tf32`: False
657
+ - `local_rank`: 0
658
+ - `ddp_backend`: None
659
+ - `tpu_num_cores`: None
660
+ - `tpu_metrics_debug`: False
661
+ - `debug`: []
662
+ - `dataloader_drop_last`: False
663
+ - `dataloader_num_workers`: 0
664
+ - `dataloader_prefetch_factor`: None
665
+ - `past_index`: -1
666
+ - `disable_tqdm`: False
667
+ - `remove_unused_columns`: True
668
+ - `label_names`: None
669
+ - `load_best_model_at_end`: True
670
+ - `ignore_data_skip`: False
671
+ - `fsdp`: []
672
+ - `fsdp_min_num_params`: 0
673
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
674
+ - `fsdp_transformer_layer_cls_to_wrap`: None
675
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
676
+ - `deepspeed`: None
677
+ - `label_smoothing_factor`: 0.0
678
+ - `optim`: adamw_torch_fused
679
+ - `optim_args`: None
680
+ - `adafactor`: False
681
+ - `group_by_length`: False
682
+ - `length_column_name`: length
683
+ - `ddp_find_unused_parameters`: None
684
+ - `ddp_bucket_cap_mb`: None
685
+ - `ddp_broadcast_buffers`: False
686
+ - `dataloader_pin_memory`: True
687
+ - `dataloader_persistent_workers`: False
688
+ - `skip_memory_metrics`: True
689
+ - `use_legacy_prediction_loop`: False
690
+ - `push_to_hub`: False
691
+ - `resume_from_checkpoint`: None
692
+ - `hub_model_id`: None
693
+ - `hub_strategy`: every_save
694
+ - `hub_private_repo`: False
695
+ - `hub_always_push`: False
696
+ - `gradient_checkpointing`: False
697
+ - `gradient_checkpointing_kwargs`: None
698
+ - `include_inputs_for_metrics`: False
699
+ - `eval_do_concat_batches`: True
700
+ - `fp16_backend`: auto
701
+ - `push_to_hub_model_id`: None
702
+ - `push_to_hub_organization`: None
703
+ - `mp_parameters`:
704
+ - `auto_find_batch_size`: False
705
+ - `full_determinism`: False
706
+ - `torchdynamo`: None
707
+ - `ray_scope`: last
708
+ - `ddp_timeout`: 1800
709
+ - `torch_compile`: False
710
+ - `torch_compile_backend`: None
711
+ - `torch_compile_mode`: None
712
+ - `dispatch_batches`: None
713
+ - `split_batches`: None
714
+ - `include_tokens_per_second`: False
715
+ - `include_num_input_tokens_seen`: False
716
+ - `neftune_noise_alpha`: None
717
+ - `optim_target_modules`: None
718
+ - `batch_eval_metrics`: False
719
+ - `batch_sampler`: no_duplicates
720
+ - `multi_dataset_batch_sampler`: proportional
721
+
722
+ </details>
723
+
724
+ ### Training Logs
725
+ | Epoch | Step | 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 |
726
+ |:----------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
727
+ | 0.6809 | 2 | 0.7796 | 0.8153 | 0.8165 | 0.7375 | 0.8186 |
728
+ | **1.3617** | **4** | **0.781** | **0.8191** | **0.8207** | **0.7519** | **0.8286** |
729
+
730
+ * The bold row denotes the saved checkpoint.
731
+
732
+ ### Framework Versions
733
+ - Python: 3.10.12
734
+ - Sentence Transformers: 3.0.1
735
+ - Transformers: 4.41.2
736
+ - PyTorch: 2.1.2+cu121
737
+ - Accelerate: 0.33.0
738
+ - Datasets: 2.19.1
739
+ - Tokenizers: 0.19.1
740
+
741
+ ## Citation
742
+
743
+ ### BibTeX
744
+
745
+ #### Sentence Transformers
746
+ ```bibtex
747
+ @inproceedings{reimers-2019-sentence-bert,
748
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
749
+ author = "Reimers, Nils and Gurevych, Iryna",
750
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
751
+ month = "11",
752
+ year = "2019",
753
+ publisher = "Association for Computational Linguistics",
754
+ url = "https://arxiv.org/abs/1908.10084",
755
+ }
756
+ ```
757
+
758
+ #### MatryoshkaLoss
759
+ ```bibtex
760
+ @misc{kusupati2024matryoshka,
761
+ title={Matryoshka Representation Learning},
762
+ 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},
763
+ year={2024},
764
+ eprint={2205.13147},
765
+ archivePrefix={arXiv},
766
+ primaryClass={cs.LG}
767
+ }
768
+ ```
769
+
770
+ #### MultipleNegativesRankingLoss
771
+ ```bibtex
772
+ @misc{henderson2017efficient,
773
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
774
+ 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},
775
+ year={2017},
776
+ eprint={1705.00652},
777
+ archivePrefix={arXiv},
778
+ primaryClass={cs.CL}
779
+ }
780
+ ```
781
+
782
+ <!--
783
+ ## Glossary
784
+
785
+ *Clearly define terms in order to be accessible across audiences.*
786
+ -->
787
+
788
+ <!--
789
+ ## Model Card Authors
790
+
791
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
792
+ -->
793
+
794
+ <!--
795
+ ## Model Card Contact
796
+
797
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
798
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-base-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.41.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb5dee033c2eeef2e68abf4b89be16330ed0fa493005950b09732569fde432fc
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