ValentinaKim commited on
Commit
a09fb67
1 Parent(s): 546a892

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,812 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: In the Annual Report on Form 10-K, the consolidated financial statements
34
+ are included immediately following Part IV and incorporated by reference.
35
+ sentences:
36
+ - What movies contributed to higher revenue in 2023 compared to the previous year?
37
+ - How are the financial statements incorporated in the 10-K report?
38
+ - What was the ending store count for the Family Dollar segment after the fiscal
39
+ year ended January 28, 2023?
40
+ - source_sentence: Readers are cautioned not to place undue reliance on forward-looking
41
+ statements, which speak only as of the date they are made. We undertake no obligation
42
+ to update or revise publicly any forward-looking statements, whether because of
43
+ new information, future events, or otherwise.
44
+ sentences:
45
+ - What impact did the IRS deadline extension in 2023 have on Intuit's fiscal results?
46
+ - What risks are associated with relying on forward-looking statements according
47
+ to the provided text?
48
+ - What were the total minimum lease payments and their net amounts after imputed
49
+ interest for operating and finance leases as of January 31, 2023?
50
+ - source_sentence: CMS made significant changes to the structure of the hierarchical
51
+ condition category model in version 28, which may impact risk adjustment factor
52
+ scores for a larger percentage of Medicare Advantage beneficiaries and could result
53
+ in changes to beneficiary RAF scores with or without a change in the patient’s
54
+ health status.
55
+ sentences:
56
+ - What significant regulatory change did CMS make to the hierarchical condition
57
+ category model in its version 28?
58
+ - Which section of IBM’s 2023 Annual Report is reserved for Financial Statements
59
+ and Supplementary Data?
60
+ - What strategic goals are set for the Printing segment at HP Inc.?
61
+ - source_sentence: In December 2023, the FCA published a consultation proposing to
62
+ revise the U.K. commodity derivatives framework. The FSMA 2023 reformed the U.K.’s
63
+ commodity derivatives regulatory regime including revoking the MIFID II position
64
+ limit requirements and transferring the powers to set position limits and controls
65
+ from the FCA to the operator of trading venues. The FCA proposal requires U.K.
66
+ trading venues to set position limits for critical and related contracts, to establish
67
+ accountability thresholds and to report enhanced position data.
68
+ sentences:
69
+ - What was the percentage increase in revenues from aviation services in 2023 compared
70
+ to 2022?
71
+ - What was the impairment loss recognized by the Company due to TDA integration
72
+ and restructuring efforts for the year ending December 31, 2023?
73
+ - What changes did the FCA propose in its December 2023 consultation regarding the
74
+ U.K. commodity derivatives framework?
75
+ - source_sentence: Operating cash flow provides the primary source of cash to fund
76
+ operating needs and capital expenditures.
77
+ sentences:
78
+ - What is the primary source of cash used by the company to fund operating needs
79
+ and capital expenditures?
80
+ - What kinds of products and services does the Company provide under the AARP Program?
81
+ - What was the total assets under supervision (AUS) for all categories combined
82
+ in 2023?
83
+ model-index:
84
+ - name: BGE base Financial Matryoshka
85
+ results:
86
+ - task:
87
+ type: information-retrieval
88
+ name: Information Retrieval
89
+ dataset:
90
+ name: dim 768
91
+ type: dim_768
92
+ metrics:
93
+ - type: cosine_accuracy@1
94
+ value: 0.7128571428571429
95
+ name: Cosine Accuracy@1
96
+ - type: cosine_accuracy@3
97
+ value: 0.8385714285714285
98
+ name: Cosine Accuracy@3
99
+ - type: cosine_accuracy@5
100
+ value: 0.8657142857142858
101
+ name: Cosine Accuracy@5
102
+ - type: cosine_accuracy@10
103
+ value: 0.9128571428571428
104
+ name: Cosine Accuracy@10
105
+ - type: cosine_precision@1
106
+ value: 0.7128571428571429
107
+ name: Cosine Precision@1
108
+ - type: cosine_precision@3
109
+ value: 0.27952380952380956
110
+ name: Cosine Precision@3
111
+ - type: cosine_precision@5
112
+ value: 0.17314285714285713
113
+ name: Cosine Precision@5
114
+ - type: cosine_precision@10
115
+ value: 0.09128571428571428
116
+ name: Cosine Precision@10
117
+ - type: cosine_recall@1
118
+ value: 0.7128571428571429
119
+ name: Cosine Recall@1
120
+ - type: cosine_recall@3
121
+ value: 0.8385714285714285
122
+ name: Cosine Recall@3
123
+ - type: cosine_recall@5
124
+ value: 0.8657142857142858
125
+ name: Cosine Recall@5
126
+ - type: cosine_recall@10
127
+ value: 0.9128571428571428
128
+ name: Cosine Recall@10
129
+ - type: cosine_ndcg@10
130
+ value: 0.8160752408699454
131
+ name: Cosine Ndcg@10
132
+ - type: cosine_mrr@10
133
+ value: 0.7850544217687072
134
+ name: Cosine Mrr@10
135
+ - type: cosine_map@100
136
+ value: 0.7883813094771759
137
+ name: Cosine Map@100
138
+ - task:
139
+ type: information-retrieval
140
+ name: Information Retrieval
141
+ dataset:
142
+ name: dim 512
143
+ type: dim_512
144
+ metrics:
145
+ - type: cosine_accuracy@1
146
+ value: 0.7085714285714285
147
+ name: Cosine Accuracy@1
148
+ - type: cosine_accuracy@3
149
+ value: 0.8314285714285714
150
+ name: Cosine Accuracy@3
151
+ - type: cosine_accuracy@5
152
+ value: 0.8571428571428571
153
+ name: Cosine Accuracy@5
154
+ - type: cosine_accuracy@10
155
+ value: 0.91
156
+ name: Cosine Accuracy@10
157
+ - type: cosine_precision@1
158
+ value: 0.7085714285714285
159
+ name: Cosine Precision@1
160
+ - type: cosine_precision@3
161
+ value: 0.27714285714285714
162
+ name: Cosine Precision@3
163
+ - type: cosine_precision@5
164
+ value: 0.1714285714285714
165
+ name: Cosine Precision@5
166
+ - type: cosine_precision@10
167
+ value: 0.091
168
+ name: Cosine Precision@10
169
+ - type: cosine_recall@1
170
+ value: 0.7085714285714285
171
+ name: Cosine Recall@1
172
+ - type: cosine_recall@3
173
+ value: 0.8314285714285714
174
+ name: Cosine Recall@3
175
+ - type: cosine_recall@5
176
+ value: 0.8571428571428571
177
+ name: Cosine Recall@5
178
+ - type: cosine_recall@10
179
+ value: 0.91
180
+ name: Cosine Recall@10
181
+ - type: cosine_ndcg@10
182
+ value: 0.810046642542136
183
+ name: Cosine Ndcg@10
184
+ - type: cosine_mrr@10
185
+ value: 0.7782335600907029
186
+ name: Cosine Mrr@10
187
+ - type: cosine_map@100
188
+ value: 0.7817400926898996
189
+ name: Cosine Map@100
190
+ - task:
191
+ type: information-retrieval
192
+ name: Information Retrieval
193
+ dataset:
194
+ name: dim 256
195
+ type: dim_256
196
+ metrics:
197
+ - type: cosine_accuracy@1
198
+ value: 0.7057142857142857
199
+ name: Cosine Accuracy@1
200
+ - type: cosine_accuracy@3
201
+ value: 0.8214285714285714
202
+ name: Cosine Accuracy@3
203
+ - type: cosine_accuracy@5
204
+ value: 0.8614285714285714
205
+ name: Cosine Accuracy@5
206
+ - type: cosine_accuracy@10
207
+ value: 0.8957142857142857
208
+ name: Cosine Accuracy@10
209
+ - type: cosine_precision@1
210
+ value: 0.7057142857142857
211
+ name: Cosine Precision@1
212
+ - type: cosine_precision@3
213
+ value: 0.2738095238095238
214
+ name: Cosine Precision@3
215
+ - type: cosine_precision@5
216
+ value: 0.17228571428571426
217
+ name: Cosine Precision@5
218
+ - type: cosine_precision@10
219
+ value: 0.08957142857142855
220
+ name: Cosine Precision@10
221
+ - type: cosine_recall@1
222
+ value: 0.7057142857142857
223
+ name: Cosine Recall@1
224
+ - type: cosine_recall@3
225
+ value: 0.8214285714285714
226
+ name: Cosine Recall@3
227
+ - type: cosine_recall@5
228
+ value: 0.8614285714285714
229
+ name: Cosine Recall@5
230
+ - type: cosine_recall@10
231
+ value: 0.8957142857142857
232
+ name: Cosine Recall@10
233
+ - type: cosine_ndcg@10
234
+ value: 0.803237369609097
235
+ name: Cosine Ndcg@10
236
+ - type: cosine_mrr@10
237
+ value: 0.7734654195011333
238
+ name: Cosine Mrr@10
239
+ - type: cosine_map@100
240
+ value: 0.7778038646628423
241
+ name: Cosine Map@100
242
+ - task:
243
+ type: information-retrieval
244
+ name: Information Retrieval
245
+ dataset:
246
+ name: dim 128
247
+ type: dim_128
248
+ metrics:
249
+ - type: cosine_accuracy@1
250
+ value: 0.6871428571428572
251
+ name: Cosine Accuracy@1
252
+ - type: cosine_accuracy@3
253
+ value: 0.8085714285714286
254
+ name: Cosine Accuracy@3
255
+ - type: cosine_accuracy@5
256
+ value: 0.8428571428571429
257
+ name: Cosine Accuracy@5
258
+ - type: cosine_accuracy@10
259
+ value: 0.8942857142857142
260
+ name: Cosine Accuracy@10
261
+ - type: cosine_precision@1
262
+ value: 0.6871428571428572
263
+ name: Cosine Precision@1
264
+ - type: cosine_precision@3
265
+ value: 0.2695238095238095
266
+ name: Cosine Precision@3
267
+ - type: cosine_precision@5
268
+ value: 0.16857142857142854
269
+ name: Cosine Precision@5
270
+ - type: cosine_precision@10
271
+ value: 0.08942857142857143
272
+ name: Cosine Precision@10
273
+ - type: cosine_recall@1
274
+ value: 0.6871428571428572
275
+ name: Cosine Recall@1
276
+ - type: cosine_recall@3
277
+ value: 0.8085714285714286
278
+ name: Cosine Recall@3
279
+ - type: cosine_recall@5
280
+ value: 0.8428571428571429
281
+ name: Cosine Recall@5
282
+ - type: cosine_recall@10
283
+ value: 0.8942857142857142
284
+ name: Cosine Recall@10
285
+ - type: cosine_ndcg@10
286
+ value: 0.7913904723614839
287
+ name: Cosine Ndcg@10
288
+ - type: cosine_mrr@10
289
+ value: 0.7585782312925171
290
+ name: Cosine Mrr@10
291
+ - type: cosine_map@100
292
+ value: 0.762610071156596
293
+ name: Cosine Map@100
294
+ - task:
295
+ type: information-retrieval
296
+ name: Information Retrieval
297
+ dataset:
298
+ name: dim 64
299
+ type: dim_64
300
+ metrics:
301
+ - type: cosine_accuracy@1
302
+ value: 0.66
303
+ name: Cosine Accuracy@1
304
+ - type: cosine_accuracy@3
305
+ value: 0.7714285714285715
306
+ name: Cosine Accuracy@3
307
+ - type: cosine_accuracy@5
308
+ value: 0.8085714285714286
309
+ name: Cosine Accuracy@5
310
+ - type: cosine_accuracy@10
311
+ value: 0.8714285714285714
312
+ name: Cosine Accuracy@10
313
+ - type: cosine_precision@1
314
+ value: 0.66
315
+ name: Cosine Precision@1
316
+ - type: cosine_precision@3
317
+ value: 0.2571428571428571
318
+ name: Cosine Precision@3
319
+ - type: cosine_precision@5
320
+ value: 0.1617142857142857
321
+ name: Cosine Precision@5
322
+ - type: cosine_precision@10
323
+ value: 0.08714285714285713
324
+ name: Cosine Precision@10
325
+ - type: cosine_recall@1
326
+ value: 0.66
327
+ name: Cosine Recall@1
328
+ - type: cosine_recall@3
329
+ value: 0.7714285714285715
330
+ name: Cosine Recall@3
331
+ - type: cosine_recall@5
332
+ value: 0.8085714285714286
333
+ name: Cosine Recall@5
334
+ - type: cosine_recall@10
335
+ value: 0.8714285714285714
336
+ name: Cosine Recall@10
337
+ - type: cosine_ndcg@10
338
+ value: 0.7614379134484182
339
+ name: Cosine Ndcg@10
340
+ - type: cosine_mrr@10
341
+ value: 0.7269172335600907
342
+ name: Cosine Mrr@10
343
+ - type: cosine_map@100
344
+ value: 0.7319569628864667
345
+ name: Cosine Map@100
346
+ ---
347
+
348
+ # BGE base Financial Matryoshka
349
+
350
+ 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.
351
+
352
+ ## Model Details
353
+
354
+ ### Model Description
355
+ - **Model Type:** Sentence Transformer
356
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
357
+ - **Maximum Sequence Length:** 512 tokens
358
+ - **Output Dimensionality:** 768 tokens
359
+ - **Similarity Function:** Cosine Similarity
360
+ - **Training Dataset:**
361
+ - json
362
+ - **Language:** en
363
+ - **License:** apache-2.0
364
+
365
+ ### Model Sources
366
+
367
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
368
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
369
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
370
+
371
+ ### Full Model Architecture
372
+
373
+ ```
374
+ SentenceTransformer(
375
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
376
+ (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})
377
+ (2): Normalize()
378
+ )
379
+ ```
380
+
381
+ ## Usage
382
+
383
+ ### Direct Usage (Sentence Transformers)
384
+
385
+ First install the Sentence Transformers library:
386
+
387
+ ```bash
388
+ pip install -U sentence-transformers
389
+ ```
390
+
391
+ Then you can load this model and run inference.
392
+ ```python
393
+ from sentence_transformers import SentenceTransformer
394
+
395
+ # Download from the 🤗 Hub
396
+ model = SentenceTransformer("ValentinaKim/bge-base-financial-matryoshka")
397
+ # Run inference
398
+ sentences = [
399
+ 'Operating cash flow provides the primary source of cash to fund operating needs and capital expenditures.',
400
+ 'What is the primary source of cash used by the company to fund operating needs and capital expenditures?',
401
+ 'What kinds of products and services does the Company provide under the AARP Program?',
402
+ ]
403
+ embeddings = model.encode(sentences)
404
+ print(embeddings.shape)
405
+ # [3, 768]
406
+
407
+ # Get the similarity scores for the embeddings
408
+ similarities = model.similarity(embeddings, embeddings)
409
+ print(similarities.shape)
410
+ # [3, 3]
411
+ ```
412
+
413
+ <!--
414
+ ### Direct Usage (Transformers)
415
+
416
+ <details><summary>Click to see the direct usage in Transformers</summary>
417
+
418
+ </details>
419
+ -->
420
+
421
+ <!--
422
+ ### Downstream Usage (Sentence Transformers)
423
+
424
+ You can finetune this model on your own dataset.
425
+
426
+ <details><summary>Click to expand</summary>
427
+
428
+ </details>
429
+ -->
430
+
431
+ <!--
432
+ ### Out-of-Scope Use
433
+
434
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
435
+ -->
436
+
437
+ ## Evaluation
438
+
439
+ ### Metrics
440
+
441
+ #### Information Retrieval
442
+ * Dataset: `dim_768`
443
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
444
+
445
+ | Metric | Value |
446
+ |:--------------------|:-----------|
447
+ | cosine_accuracy@1 | 0.7129 |
448
+ | cosine_accuracy@3 | 0.8386 |
449
+ | cosine_accuracy@5 | 0.8657 |
450
+ | cosine_accuracy@10 | 0.9129 |
451
+ | cosine_precision@1 | 0.7129 |
452
+ | cosine_precision@3 | 0.2795 |
453
+ | cosine_precision@5 | 0.1731 |
454
+ | cosine_precision@10 | 0.0913 |
455
+ | cosine_recall@1 | 0.7129 |
456
+ | cosine_recall@3 | 0.8386 |
457
+ | cosine_recall@5 | 0.8657 |
458
+ | cosine_recall@10 | 0.9129 |
459
+ | cosine_ndcg@10 | 0.8161 |
460
+ | cosine_mrr@10 | 0.7851 |
461
+ | **cosine_map@100** | **0.7884** |
462
+
463
+ #### Information Retrieval
464
+ * Dataset: `dim_512`
465
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
466
+
467
+ | Metric | Value |
468
+ |:--------------------|:-----------|
469
+ | cosine_accuracy@1 | 0.7086 |
470
+ | cosine_accuracy@3 | 0.8314 |
471
+ | cosine_accuracy@5 | 0.8571 |
472
+ | cosine_accuracy@10 | 0.91 |
473
+ | cosine_precision@1 | 0.7086 |
474
+ | cosine_precision@3 | 0.2771 |
475
+ | cosine_precision@5 | 0.1714 |
476
+ | cosine_precision@10 | 0.091 |
477
+ | cosine_recall@1 | 0.7086 |
478
+ | cosine_recall@3 | 0.8314 |
479
+ | cosine_recall@5 | 0.8571 |
480
+ | cosine_recall@10 | 0.91 |
481
+ | cosine_ndcg@10 | 0.81 |
482
+ | cosine_mrr@10 | 0.7782 |
483
+ | **cosine_map@100** | **0.7817** |
484
+
485
+ #### Information Retrieval
486
+ * Dataset: `dim_256`
487
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
488
+
489
+ | Metric | Value |
490
+ |:--------------------|:-----------|
491
+ | cosine_accuracy@1 | 0.7057 |
492
+ | cosine_accuracy@3 | 0.8214 |
493
+ | cosine_accuracy@5 | 0.8614 |
494
+ | cosine_accuracy@10 | 0.8957 |
495
+ | cosine_precision@1 | 0.7057 |
496
+ | cosine_precision@3 | 0.2738 |
497
+ | cosine_precision@5 | 0.1723 |
498
+ | cosine_precision@10 | 0.0896 |
499
+ | cosine_recall@1 | 0.7057 |
500
+ | cosine_recall@3 | 0.8214 |
501
+ | cosine_recall@5 | 0.8614 |
502
+ | cosine_recall@10 | 0.8957 |
503
+ | cosine_ndcg@10 | 0.8032 |
504
+ | cosine_mrr@10 | 0.7735 |
505
+ | **cosine_map@100** | **0.7778** |
506
+
507
+ #### Information Retrieval
508
+ * Dataset: `dim_128`
509
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
510
+
511
+ | Metric | Value |
512
+ |:--------------------|:-----------|
513
+ | cosine_accuracy@1 | 0.6871 |
514
+ | cosine_accuracy@3 | 0.8086 |
515
+ | cosine_accuracy@5 | 0.8429 |
516
+ | cosine_accuracy@10 | 0.8943 |
517
+ | cosine_precision@1 | 0.6871 |
518
+ | cosine_precision@3 | 0.2695 |
519
+ | cosine_precision@5 | 0.1686 |
520
+ | cosine_precision@10 | 0.0894 |
521
+ | cosine_recall@1 | 0.6871 |
522
+ | cosine_recall@3 | 0.8086 |
523
+ | cosine_recall@5 | 0.8429 |
524
+ | cosine_recall@10 | 0.8943 |
525
+ | cosine_ndcg@10 | 0.7914 |
526
+ | cosine_mrr@10 | 0.7586 |
527
+ | **cosine_map@100** | **0.7626** |
528
+
529
+ #### Information Retrieval
530
+ * Dataset: `dim_64`
531
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
532
+
533
+ | Metric | Value |
534
+ |:--------------------|:----------|
535
+ | cosine_accuracy@1 | 0.66 |
536
+ | cosine_accuracy@3 | 0.7714 |
537
+ | cosine_accuracy@5 | 0.8086 |
538
+ | cosine_accuracy@10 | 0.8714 |
539
+ | cosine_precision@1 | 0.66 |
540
+ | cosine_precision@3 | 0.2571 |
541
+ | cosine_precision@5 | 0.1617 |
542
+ | cosine_precision@10 | 0.0871 |
543
+ | cosine_recall@1 | 0.66 |
544
+ | cosine_recall@3 | 0.7714 |
545
+ | cosine_recall@5 | 0.8086 |
546
+ | cosine_recall@10 | 0.8714 |
547
+ | cosine_ndcg@10 | 0.7614 |
548
+ | cosine_mrr@10 | 0.7269 |
549
+ | **cosine_map@100** | **0.732** |
550
+
551
+ <!--
552
+ ## Bias, Risks and Limitations
553
+
554
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
555
+ -->
556
+
557
+ <!--
558
+ ### Recommendations
559
+
560
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
561
+ -->
562
+
563
+ ## Training Details
564
+
565
+ ### Training Dataset
566
+
567
+ #### json
568
+
569
+ * Dataset: json
570
+ * Size: 6,300 training samples
571
+ * Columns: <code>positive</code> and <code>anchor</code>
572
+ * Approximate statistics based on the first 1000 samples:
573
+ | | positive | anchor |
574
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
575
+ | type | string | string |
576
+ | details | <ul><li>min: 6 tokens</li><li>mean: 45.81 tokens</li><li>max: 439 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.26 tokens</li><li>max: 43 tokens</li></ul> |
577
+ * Samples:
578
+ | positive | anchor |
579
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------|
580
+ | <code>For the year ended December 31, 2023, Alphabet Inc. reported a net cash provided by operating activities of $101,746 million.</code> | <code>What was the net cash provided by operating activities for Alphabet Inc. in 2023?</code> |
581
+ | <code>Our History In 2000, ICE was founded with the idea of transforming energy markets by creating a network that removed barriers and provided greater transparency, efficiency and access.</code> | <code>When was Intercontinental Exchange, Inc. founded, and what was its initial focus?</code> |
582
+ | <code>Item 8. Financial Statements and Supplementary Data The index to Financial Statements and Supplementary Data is presented</code> | <code>What is presented in Item 8 according to Financial Statements and Supplementary Data?</code> |
583
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
584
+ ```json
585
+ {
586
+ "loss": "MultipleNegativesRankingLoss",
587
+ "matryoshka_dims": [
588
+ 768,
589
+ 512,
590
+ 256,
591
+ 128,
592
+ 64
593
+ ],
594
+ "matryoshka_weights": [
595
+ 1,
596
+ 1,
597
+ 1,
598
+ 1,
599
+ 1
600
+ ],
601
+ "n_dims_per_step": -1
602
+ }
603
+ ```
604
+
605
+ ### Training Hyperparameters
606
+ #### Non-Default Hyperparameters
607
+
608
+ - `eval_strategy`: epoch
609
+ - `per_device_train_batch_size`: 16
610
+ - `gradient_accumulation_steps`: 32
611
+ - `learning_rate`: 2e-05
612
+ - `num_train_epochs`: 4
613
+ - `lr_scheduler_type`: cosine
614
+ - `warmup_ratio`: 0.1
615
+ - `tf32`: False
616
+ - `load_best_model_at_end`: True
617
+ - `optim`: adamw_torch_fused
618
+ - `batch_sampler`: no_duplicates
619
+
620
+ #### All Hyperparameters
621
+ <details><summary>Click to expand</summary>
622
+
623
+ - `overwrite_output_dir`: False
624
+ - `do_predict`: False
625
+ - `eval_strategy`: epoch
626
+ - `prediction_loss_only`: True
627
+ - `per_device_train_batch_size`: 16
628
+ - `per_device_eval_batch_size`: 8
629
+ - `per_gpu_train_batch_size`: None
630
+ - `per_gpu_eval_batch_size`: None
631
+ - `gradient_accumulation_steps`: 32
632
+ - `eval_accumulation_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`: False
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`: False
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
+ - `batch_sampler`: no_duplicates
730
+ - `multi_dataset_batch_sampler`: proportional
731
+
732
+ </details>
733
+
734
+ ### Training Logs
735
+ | 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 |
736
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
737
+ | 0.9746 | 6 | - | 0.7258 | 0.7501 | 0.7513 | 0.6860 | 0.7589 |
738
+ | 1.6244 | 10 | 1.4436 | - | - | - | - | - |
739
+ | 1.9492 | 12 | - | 0.7494 | 0.7733 | 0.7800 | 0.7187 | 0.7827 |
740
+ | 2.9239 | 18 | - | 0.7601 | 0.7796 | 0.7813 | 0.7312 | 0.7897 |
741
+ | 3.2487 | 20 | 0.6159 | - | - | - | - | - |
742
+ | **3.8985** | **24** | **-** | **0.7626** | **0.7778** | **0.7817** | **0.732** | **0.7884** |
743
+
744
+ * The bold row denotes the saved checkpoint.
745
+
746
+ ### Framework Versions
747
+ - Python: 3.10.14
748
+ - Sentence Transformers: 3.1.1
749
+ - Transformers: 4.41.2
750
+ - PyTorch: 2.1.2+cu121
751
+ - Accelerate: 0.34.2
752
+ - Datasets: 2.19.1
753
+ - Tokenizers: 0.19.1
754
+
755
+ ## Citation
756
+
757
+ ### BibTeX
758
+
759
+ #### Sentence Transformers
760
+ ```bibtex
761
+ @inproceedings{reimers-2019-sentence-bert,
762
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
763
+ author = "Reimers, Nils and Gurevych, Iryna",
764
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
765
+ month = "11",
766
+ year = "2019",
767
+ publisher = "Association for Computational Linguistics",
768
+ url = "https://arxiv.org/abs/1908.10084",
769
+ }
770
+ ```
771
+
772
+ #### MatryoshkaLoss
773
+ ```bibtex
774
+ @misc{kusupati2024matryoshka,
775
+ title={Matryoshka Representation Learning},
776
+ 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},
777
+ year={2024},
778
+ eprint={2205.13147},
779
+ archivePrefix={arXiv},
780
+ primaryClass={cs.LG}
781
+ }
782
+ ```
783
+
784
+ #### MultipleNegativesRankingLoss
785
+ ```bibtex
786
+ @misc{henderson2017efficient,
787
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
788
+ 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},
789
+ year={2017},
790
+ eprint={1705.00652},
791
+ archivePrefix={arXiv},
792
+ primaryClass={cs.CL}
793
+ }
794
+ ```
795
+
796
+ <!--
797
+ ## Glossary
798
+
799
+ *Clearly define terms in order to be accessible across audiences.*
800
+ -->
801
+
802
+ <!--
803
+ ## Model Card Authors
804
+
805
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
806
+ -->
807
+
808
+ <!--
809
+ ## Model Card Contact
810
+
811
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
812
+ -->
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.1.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:8c17fee0216719a62f1011c6b8cb637e5d901734132bb28c5f41a36882ac5b1f
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