Sailesh9999 commited on
Commit
423452e
1 Parent(s): 8e5326f

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,804 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@10
32
+ widget:
33
+ - source_sentence: The Gross Merchandise Sales (GMS) decreased by 1.2% in 2023 compared
34
+ to 2022.
35
+ sentences:
36
+ - What specific matters did the CFPB investigate concerning Equifax?
37
+ - What was the percentage decline in GMS for the year ended December 31, 2023 compared
38
+ to 2022?
39
+ - What percentage of eBay's 2023 net revenues were attributed to international markets?
40
+ - source_sentence: Asset management and administration fees vary with changes in the
41
+ balances of client assets due to market fluctuations and client activity.
42
+ sentences:
43
+ - Why was there a net outflow of cash in financing activities in fiscal 2022?
44
+ - How do asset management and administration fees vary at The Charles Schwab Corporation?
45
+ - What are some key goals of the corporation related to climate change?
46
+ - source_sentence: Operating profit margin was 19.3 percent in 2023, compared with
47
+ 13.3 percent in 2022.
48
+ sentences:
49
+ - What was the operating profit margin for 2023?
50
+ - How do the studios compete in the entertainment industry?
51
+ - What types of audio products does Garmin's Fusion and JL Audio brands offer?
52
+ - source_sentence: Subsequent to 2023, on February 12, 2024, AbbVie borrowed $5.0
53
+ billion under the term loan credit agreement.
54
+ sentences:
55
+ - What percentage of U.S. dialysis patient service revenues in 2023 came from Medicare
56
+ and Medicare Advantage plans?
57
+ - What is Peloton Interactive, Inc. known for in the interactive fitness industry?
58
+ - What was the purpose stated by AbbVie for borrowing $5.0 billion under the term
59
+ loan credit agreement on February 12, 2024?
60
+ - source_sentence: Chipotle retains an independent third-party compensation consultant
61
+ each year to conduct a pay equity analysis of its U.S. and Canadian workforce,
62
+ including factors of pay such as grade level, tenure in role, and external market
63
+ conditions like geographic location, to ensure consistency and equitable treatment
64
+ among employees.
65
+ sentences:
66
+ - How does Chipotle ensure pay equity among its employees?
67
+ - How can one locate information on legal proceedings within the Consolidated Financial
68
+ Statements?
69
+ - What criteria did the independent audit use to assess the effectiveness of internal
70
+ control over financial reporting at the company?
71
+ pipeline_tag: sentence-similarity
72
+ model-index:
73
+ - name: BGE base Financial Matryoshka
74
+ results:
75
+ - task:
76
+ type: information-retrieval
77
+ name: Information Retrieval
78
+ dataset:
79
+ name: dim 768
80
+ type: dim_768
81
+ metrics:
82
+ - type: cosine_accuracy@1
83
+ value: 0.6985714285714286
84
+ name: Cosine Accuracy@1
85
+ - type: cosine_accuracy@3
86
+ value: 0.8342857142857143
87
+ name: Cosine Accuracy@3
88
+ - type: cosine_accuracy@5
89
+ value: 0.8628571428571429
90
+ name: Cosine Accuracy@5
91
+ - type: cosine_accuracy@10
92
+ value: 0.9
93
+ name: Cosine Accuracy@10
94
+ - type: cosine_precision@1
95
+ value: 0.6985714285714286
96
+ name: Cosine Precision@1
97
+ - type: cosine_precision@3
98
+ value: 0.27809523809523806
99
+ name: Cosine Precision@3
100
+ - type: cosine_precision@5
101
+ value: 0.17257142857142854
102
+ name: Cosine Precision@5
103
+ - type: cosine_precision@10
104
+ value: 0.08999999999999998
105
+ name: Cosine Precision@10
106
+ - type: cosine_recall@1
107
+ value: 0.6985714285714286
108
+ name: Cosine Recall@1
109
+ - type: cosine_recall@3
110
+ value: 0.8342857142857143
111
+ name: Cosine Recall@3
112
+ - type: cosine_recall@5
113
+ value: 0.8628571428571429
114
+ name: Cosine Recall@5
115
+ - type: cosine_recall@10
116
+ value: 0.9
117
+ name: Cosine Recall@10
118
+ - type: cosine_ndcg@10
119
+ value: 0.8029099239677612
120
+ name: Cosine Ndcg@10
121
+ - type: cosine_mrr@10
122
+ value: 0.771475056689342
123
+ name: Cosine Mrr@10
124
+ - type: cosine_map@10
125
+ value: 0.7714750566893424
126
+ name: Cosine Map@10
127
+ - task:
128
+ type: information-retrieval
129
+ name: Information Retrieval
130
+ dataset:
131
+ name: dim 512
132
+ type: dim_512
133
+ metrics:
134
+ - type: cosine_accuracy@1
135
+ value: 0.6842857142857143
136
+ name: Cosine Accuracy@1
137
+ - type: cosine_accuracy@3
138
+ value: 0.8271428571428572
139
+ name: Cosine Accuracy@3
140
+ - type: cosine_accuracy@5
141
+ value: 0.8628571428571429
142
+ name: Cosine Accuracy@5
143
+ - type: cosine_accuracy@10
144
+ value: 0.8928571428571429
145
+ name: Cosine Accuracy@10
146
+ - type: cosine_precision@1
147
+ value: 0.6842857142857143
148
+ name: Cosine Precision@1
149
+ - type: cosine_precision@3
150
+ value: 0.2757142857142857
151
+ name: Cosine Precision@3
152
+ - type: cosine_precision@5
153
+ value: 0.17257142857142854
154
+ name: Cosine Precision@5
155
+ - type: cosine_precision@10
156
+ value: 0.08928571428571427
157
+ name: Cosine Precision@10
158
+ - type: cosine_recall@1
159
+ value: 0.6842857142857143
160
+ name: Cosine Recall@1
161
+ - type: cosine_recall@3
162
+ value: 0.8271428571428572
163
+ name: Cosine Recall@3
164
+ - type: cosine_recall@5
165
+ value: 0.8628571428571429
166
+ name: Cosine Recall@5
167
+ - type: cosine_recall@10
168
+ value: 0.8928571428571429
169
+ name: Cosine Recall@10
170
+ - type: cosine_ndcg@10
171
+ value: 0.7942762197573711
172
+ name: Cosine Ndcg@10
173
+ - type: cosine_mrr@10
174
+ value: 0.7620697278911563
175
+ name: Cosine Mrr@10
176
+ - type: cosine_map@10
177
+ value: 0.7620697278911566
178
+ name: Cosine Map@10
179
+ - task:
180
+ type: information-retrieval
181
+ name: Information Retrieval
182
+ dataset:
183
+ name: dim 256
184
+ type: dim_256
185
+ metrics:
186
+ - type: cosine_accuracy@1
187
+ value: 0.6871428571428572
188
+ name: Cosine Accuracy@1
189
+ - type: cosine_accuracy@3
190
+ value: 0.8157142857142857
191
+ name: Cosine Accuracy@3
192
+ - type: cosine_accuracy@5
193
+ value: 0.8614285714285714
194
+ name: Cosine Accuracy@5
195
+ - type: cosine_accuracy@10
196
+ value: 0.8928571428571429
197
+ name: Cosine Accuracy@10
198
+ - type: cosine_precision@1
199
+ value: 0.6871428571428572
200
+ name: Cosine Precision@1
201
+ - type: cosine_precision@3
202
+ value: 0.27190476190476187
203
+ name: Cosine Precision@3
204
+ - type: cosine_precision@5
205
+ value: 0.17228571428571426
206
+ name: Cosine Precision@5
207
+ - type: cosine_precision@10
208
+ value: 0.08928571428571427
209
+ name: Cosine Precision@10
210
+ - type: cosine_recall@1
211
+ value: 0.6871428571428572
212
+ name: Cosine Recall@1
213
+ - type: cosine_recall@3
214
+ value: 0.8157142857142857
215
+ name: Cosine Recall@3
216
+ - type: cosine_recall@5
217
+ value: 0.8614285714285714
218
+ name: Cosine Recall@5
219
+ - type: cosine_recall@10
220
+ value: 0.8928571428571429
221
+ name: Cosine Recall@10
222
+ - type: cosine_ndcg@10
223
+ value: 0.7935865448697424
224
+ name: Cosine Ndcg@10
225
+ - type: cosine_mrr@10
226
+ value: 0.7613917233560088
227
+ name: Cosine Mrr@10
228
+ - type: cosine_map@10
229
+ value: 0.7613917233560091
230
+ name: Cosine Map@10
231
+ - task:
232
+ type: information-retrieval
233
+ name: Information Retrieval
234
+ dataset:
235
+ name: dim 128
236
+ type: dim_128
237
+ metrics:
238
+ - type: cosine_accuracy@1
239
+ value: 0.6757142857142857
240
+ name: Cosine Accuracy@1
241
+ - type: cosine_accuracy@3
242
+ value: 0.8171428571428572
243
+ name: Cosine Accuracy@3
244
+ - type: cosine_accuracy@5
245
+ value: 0.8514285714285714
246
+ name: Cosine Accuracy@5
247
+ - type: cosine_accuracy@10
248
+ value: 0.8814285714285715
249
+ name: Cosine Accuracy@10
250
+ - type: cosine_precision@1
251
+ value: 0.6757142857142857
252
+ name: Cosine Precision@1
253
+ - type: cosine_precision@3
254
+ value: 0.2723809523809524
255
+ name: Cosine Precision@3
256
+ - type: cosine_precision@5
257
+ value: 0.17028571428571426
258
+ name: Cosine Precision@5
259
+ - type: cosine_precision@10
260
+ value: 0.08814285714285712
261
+ name: Cosine Precision@10
262
+ - type: cosine_recall@1
263
+ value: 0.6757142857142857
264
+ name: Cosine Recall@1
265
+ - type: cosine_recall@3
266
+ value: 0.8171428571428572
267
+ name: Cosine Recall@3
268
+ - type: cosine_recall@5
269
+ value: 0.8514285714285714
270
+ name: Cosine Recall@5
271
+ - type: cosine_recall@10
272
+ value: 0.8814285714285715
273
+ name: Cosine Recall@10
274
+ - type: cosine_ndcg@10
275
+ value: 0.7842926561068588
276
+ name: Cosine Ndcg@10
277
+ - type: cosine_mrr@10
278
+ value: 0.7525731292517003
279
+ name: Cosine Mrr@10
280
+ - type: cosine_map@10
281
+ value: 0.7525731292517006
282
+ name: Cosine Map@10
283
+ - task:
284
+ type: information-retrieval
285
+ name: Information Retrieval
286
+ dataset:
287
+ name: dim 64
288
+ type: dim_64
289
+ metrics:
290
+ - type: cosine_accuracy@1
291
+ value: 0.64
292
+ name: Cosine Accuracy@1
293
+ - type: cosine_accuracy@3
294
+ value: 0.79
295
+ name: Cosine Accuracy@3
296
+ - type: cosine_accuracy@5
297
+ value: 0.8271428571428572
298
+ name: Cosine Accuracy@5
299
+ - type: cosine_accuracy@10
300
+ value: 0.87
301
+ name: Cosine Accuracy@10
302
+ - type: cosine_precision@1
303
+ value: 0.64
304
+ name: Cosine Precision@1
305
+ - type: cosine_precision@3
306
+ value: 0.2633333333333333
307
+ name: Cosine Precision@3
308
+ - type: cosine_precision@5
309
+ value: 0.1654285714285714
310
+ name: Cosine Precision@5
311
+ - type: cosine_precision@10
312
+ value: 0.087
313
+ name: Cosine Precision@10
314
+ - type: cosine_recall@1
315
+ value: 0.64
316
+ name: Cosine Recall@1
317
+ - type: cosine_recall@3
318
+ value: 0.79
319
+ name: Cosine Recall@3
320
+ - type: cosine_recall@5
321
+ value: 0.8271428571428572
322
+ name: Cosine Recall@5
323
+ - type: cosine_recall@10
324
+ value: 0.87
325
+ name: Cosine Recall@10
326
+ - type: cosine_ndcg@10
327
+ value: 0.7594704472459967
328
+ name: Cosine Ndcg@10
329
+ - type: cosine_mrr@10
330
+ value: 0.7236507936507934
331
+ name: Cosine Mrr@10
332
+ - type: cosine_map@10
333
+ value: 0.7236507936507937
334
+ name: Cosine Map@10
335
+ ---
336
+
337
+ # BGE base Financial Matryoshka
338
+
339
+ 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.
340
+
341
+ ## Model Details
342
+
343
+ ### Model Description
344
+ - **Model Type:** Sentence Transformer
345
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
346
+ - **Maximum Sequence Length:** 512 tokens
347
+ - **Output Dimensionality:** 768 tokens
348
+ - **Similarity Function:** Cosine Similarity
349
+ <!-- - **Training Dataset:** Unknown -->
350
+ - **Language:** en
351
+ - **License:** apache-2.0
352
+
353
+ ### Model Sources
354
+
355
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
356
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
357
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
358
+
359
+ ### Full Model Architecture
360
+
361
+ ```
362
+ SentenceTransformer(
363
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
364
+ (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})
365
+ (2): Normalize()
366
+ )
367
+ ```
368
+
369
+ ## Usage
370
+
371
+ ### Direct Usage (Sentence Transformers)
372
+
373
+ First install the Sentence Transformers library:
374
+
375
+ ```bash
376
+ pip install -U sentence-transformers
377
+ ```
378
+
379
+ Then you can load this model and run inference.
380
+ ```python
381
+ from sentence_transformers import SentenceTransformer
382
+
383
+ # Download from the 🤗 Hub
384
+ model = SentenceTransformer("Sailesh9999/bge-base-financial-matryoshka")
385
+ # Run inference
386
+ sentences = [
387
+ 'Chipotle retains an independent third-party compensation consultant each year to conduct a pay equity analysis of its U.S. and Canadian workforce, including factors of pay such as grade level, tenure in role, and external market conditions like geographic location, to ensure consistency and equitable treatment among employees.',
388
+ 'How does Chipotle ensure pay equity among its employees?',
389
+ 'How can one locate information on legal proceedings within the Consolidated Financial Statements?',
390
+ ]
391
+ embeddings = model.encode(sentences)
392
+ print(embeddings.shape)
393
+ # [3, 768]
394
+
395
+ # Get the similarity scores for the embeddings
396
+ similarities = model.similarity(embeddings, embeddings)
397
+ print(similarities.shape)
398
+ # [3, 3]
399
+ ```
400
+
401
+ <!--
402
+ ### Direct Usage (Transformers)
403
+
404
+ <details><summary>Click to see the direct usage in Transformers</summary>
405
+
406
+ </details>
407
+ -->
408
+
409
+ <!--
410
+ ### Downstream Usage (Sentence Transformers)
411
+
412
+ You can finetune this model on your own dataset.
413
+
414
+ <details><summary>Click to expand</summary>
415
+
416
+ </details>
417
+ -->
418
+
419
+ <!--
420
+ ### Out-of-Scope Use
421
+
422
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
423
+ -->
424
+
425
+ ## Evaluation
426
+
427
+ ### Metrics
428
+
429
+ #### Information Retrieval
430
+ * Dataset: `dim_768`
431
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
432
+
433
+ | Metric | Value |
434
+ |:--------------------|:-----------|
435
+ | cosine_accuracy@1 | 0.6986 |
436
+ | cosine_accuracy@3 | 0.8343 |
437
+ | cosine_accuracy@5 | 0.8629 |
438
+ | cosine_accuracy@10 | 0.9 |
439
+ | cosine_precision@1 | 0.6986 |
440
+ | cosine_precision@3 | 0.2781 |
441
+ | cosine_precision@5 | 0.1726 |
442
+ | cosine_precision@10 | 0.09 |
443
+ | cosine_recall@1 | 0.6986 |
444
+ | cosine_recall@3 | 0.8343 |
445
+ | cosine_recall@5 | 0.8629 |
446
+ | cosine_recall@10 | 0.9 |
447
+ | cosine_ndcg@10 | 0.8029 |
448
+ | cosine_mrr@10 | 0.7715 |
449
+ | **cosine_map@10** | **0.7715** |
450
+
451
+ #### Information Retrieval
452
+ * Dataset: `dim_512`
453
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
454
+
455
+ | Metric | Value |
456
+ |:--------------------|:-----------|
457
+ | cosine_accuracy@1 | 0.6843 |
458
+ | cosine_accuracy@3 | 0.8271 |
459
+ | cosine_accuracy@5 | 0.8629 |
460
+ | cosine_accuracy@10 | 0.8929 |
461
+ | cosine_precision@1 | 0.6843 |
462
+ | cosine_precision@3 | 0.2757 |
463
+ | cosine_precision@5 | 0.1726 |
464
+ | cosine_precision@10 | 0.0893 |
465
+ | cosine_recall@1 | 0.6843 |
466
+ | cosine_recall@3 | 0.8271 |
467
+ | cosine_recall@5 | 0.8629 |
468
+ | cosine_recall@10 | 0.8929 |
469
+ | cosine_ndcg@10 | 0.7943 |
470
+ | cosine_mrr@10 | 0.7621 |
471
+ | **cosine_map@10** | **0.7621** |
472
+
473
+ #### Information Retrieval
474
+ * Dataset: `dim_256`
475
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
476
+
477
+ | Metric | Value |
478
+ |:--------------------|:-----------|
479
+ | cosine_accuracy@1 | 0.6871 |
480
+ | cosine_accuracy@3 | 0.8157 |
481
+ | cosine_accuracy@5 | 0.8614 |
482
+ | cosine_accuracy@10 | 0.8929 |
483
+ | cosine_precision@1 | 0.6871 |
484
+ | cosine_precision@3 | 0.2719 |
485
+ | cosine_precision@5 | 0.1723 |
486
+ | cosine_precision@10 | 0.0893 |
487
+ | cosine_recall@1 | 0.6871 |
488
+ | cosine_recall@3 | 0.8157 |
489
+ | cosine_recall@5 | 0.8614 |
490
+ | cosine_recall@10 | 0.8929 |
491
+ | cosine_ndcg@10 | 0.7936 |
492
+ | cosine_mrr@10 | 0.7614 |
493
+ | **cosine_map@10** | **0.7614** |
494
+
495
+ #### Information Retrieval
496
+ * Dataset: `dim_128`
497
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
498
+
499
+ | Metric | Value |
500
+ |:--------------------|:-----------|
501
+ | cosine_accuracy@1 | 0.6757 |
502
+ | cosine_accuracy@3 | 0.8171 |
503
+ | cosine_accuracy@5 | 0.8514 |
504
+ | cosine_accuracy@10 | 0.8814 |
505
+ | cosine_precision@1 | 0.6757 |
506
+ | cosine_precision@3 | 0.2724 |
507
+ | cosine_precision@5 | 0.1703 |
508
+ | cosine_precision@10 | 0.0881 |
509
+ | cosine_recall@1 | 0.6757 |
510
+ | cosine_recall@3 | 0.8171 |
511
+ | cosine_recall@5 | 0.8514 |
512
+ | cosine_recall@10 | 0.8814 |
513
+ | cosine_ndcg@10 | 0.7843 |
514
+ | cosine_mrr@10 | 0.7526 |
515
+ | **cosine_map@10** | **0.7526** |
516
+
517
+ #### Information Retrieval
518
+ * Dataset: `dim_64`
519
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
520
+
521
+ | Metric | Value |
522
+ |:--------------------|:-----------|
523
+ | cosine_accuracy@1 | 0.64 |
524
+ | cosine_accuracy@3 | 0.79 |
525
+ | cosine_accuracy@5 | 0.8271 |
526
+ | cosine_accuracy@10 | 0.87 |
527
+ | cosine_precision@1 | 0.64 |
528
+ | cosine_precision@3 | 0.2633 |
529
+ | cosine_precision@5 | 0.1654 |
530
+ | cosine_precision@10 | 0.087 |
531
+ | cosine_recall@1 | 0.64 |
532
+ | cosine_recall@3 | 0.79 |
533
+ | cosine_recall@5 | 0.8271 |
534
+ | cosine_recall@10 | 0.87 |
535
+ | cosine_ndcg@10 | 0.7595 |
536
+ | cosine_mrr@10 | 0.7237 |
537
+ | **cosine_map@10** | **0.7237** |
538
+
539
+ <!--
540
+ ## Bias, Risks and Limitations
541
+
542
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
543
+ -->
544
+
545
+ <!--
546
+ ### Recommendations
547
+
548
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
549
+ -->
550
+
551
+ ## Training Details
552
+
553
+ ### Training Dataset
554
+
555
+ #### Unnamed Dataset
556
+
557
+
558
+ * Size: 6,300 training samples
559
+ * Columns: <code>positive</code> and <code>anchor</code>
560
+ * Approximate statistics based on the first 1000 samples:
561
+ | | positive | anchor |
562
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
563
+ | type | string | string |
564
+ | details | <ul><li>min: 7 tokens</li><li>mean: 46.55 tokens</li><li>max: 439 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.43 tokens</li><li>max: 46 tokens</li></ul> |
565
+ * Samples:
566
+ | positive | anchor |
567
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------|
568
+ | <code>Americas | $ | 7,631,647 | | | $ | 6,817,454 | | 79.3 | % | 84.1 | %</code> | <code>What was the proportion of Americas' net revenue to the company's total net revenue in 2023, and how did it change from 2022?</code> |
569
+ | <code>Item 1 Business typically includes detailed information about the organization's operations, the nature of the business, and its strategic direction.</code> | <code>What is the title of the section that potentially discusses the operations or nature of a business in a document?</code> |
570
+ | <code>Operating expenses as a percentage of total revenues decreased to 15.3% in 2023 compared to 15.9% in 2022.</code> | <code>What was the operating expenses as a percentage of total revenues in 2023?</code> |
571
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
572
+ ```json
573
+ {
574
+ "loss": "MultipleNegativesRankingLoss",
575
+ "matryoshka_dims": [
576
+ 768,
577
+ 512,
578
+ 256,
579
+ 128,
580
+ 64
581
+ ],
582
+ "matryoshka_weights": [
583
+ 1,
584
+ 1,
585
+ 1,
586
+ 1,
587
+ 1
588
+ ],
589
+ "n_dims_per_step": -1
590
+ }
591
+ ```
592
+
593
+ ### Training Hyperparameters
594
+ #### Non-Default Hyperparameters
595
+
596
+ - `eval_strategy`: epoch
597
+ - `per_device_train_batch_size`: 32
598
+ - `per_device_eval_batch_size`: 16
599
+ - `gradient_accumulation_steps`: 16
600
+ - `learning_rate`: 2e-05
601
+ - `num_train_epochs`: 4
602
+ - `lr_scheduler_type`: cosine
603
+ - `warmup_ratio`: 0.1
604
+ - `bf16`: True
605
+ - `tf32`: True
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`: 4
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`: True
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`: True
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 | Training Loss | dim_128_cosine_map@10 | dim_256_cosine_map@10 | dim_512_cosine_map@10 | dim_64_cosine_map@10 | dim_768_cosine_map@10 |
726
+ |:----------:|:------:|:-------------:|:---------------------:|:---------------------:|:---------------------:|:--------------------:|:---------------------:|
727
+ | 0.8122 | 10 | 1.5638 | - | - | - | - | - |
728
+ | 0.9746 | 12 | - | 0.7308 | 0.7547 | 0.7547 | 0.7004 | 0.7624 |
729
+ | 1.6244 | 20 | 0.6662 | - | - | - | - | - |
730
+ | 1.9492 | 24 | - | 0.7468 | 0.7586 | 0.7624 | 0.7195 | 0.7655 |
731
+ | 2.4365 | 30 | 0.4634 | - | - | - | - | - |
732
+ | 2.9239 | 36 | - | 0.7525 | 0.7620 | 0.7614 | 0.7237 | 0.7717 |
733
+ | 3.2487 | 40 | 0.387 | - | - | - | - | - |
734
+ | **3.8985** | **48** | **-** | **0.7526** | **0.7614** | **0.7621** | **0.7237** | **0.7715** |
735
+
736
+ * The bold row denotes the saved checkpoint.
737
+
738
+ ### Framework Versions
739
+ - Python: 3.9.18
740
+ - Sentence Transformers: 3.0.1
741
+ - Transformers: 4.41.2
742
+ - PyTorch: 2.1.2+cu121
743
+ - Accelerate: 0.29.3
744
+ - Datasets: 2.19.1
745
+ - Tokenizers: 0.19.1
746
+
747
+ ## Citation
748
+
749
+ ### BibTeX
750
+
751
+ #### Sentence Transformers
752
+ ```bibtex
753
+ @inproceedings{reimers-2019-sentence-bert,
754
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
755
+ author = "Reimers, Nils and Gurevych, Iryna",
756
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
757
+ month = "11",
758
+ year = "2019",
759
+ publisher = "Association for Computational Linguistics",
760
+ url = "https://arxiv.org/abs/1908.10084",
761
+ }
762
+ ```
763
+
764
+ #### MatryoshkaLoss
765
+ ```bibtex
766
+ @misc{kusupati2024matryoshka,
767
+ title={Matryoshka Representation Learning},
768
+ 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},
769
+ year={2024},
770
+ eprint={2205.13147},
771
+ archivePrefix={arXiv},
772
+ primaryClass={cs.LG}
773
+ }
774
+ ```
775
+
776
+ #### MultipleNegativesRankingLoss
777
+ ```bibtex
778
+ @misc{henderson2017efficient,
779
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
780
+ 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},
781
+ year={2017},
782
+ eprint={1705.00652},
783
+ archivePrefix={arXiv},
784
+ primaryClass={cs.CL}
785
+ }
786
+ ```
787
+
788
+ <!--
789
+ ## Glossary
790
+
791
+ *Clearly define terms in order to be accessible across audiences.*
792
+ -->
793
+
794
+ <!--
795
+ ## Model Card Authors
796
+
797
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
798
+ -->
799
+
800
+ <!--
801
+ ## Model Card Contact
802
+
803
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
804
+ -->
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:d4770cf3e0d9b11cf9115f251897d889115b47aac817f837ae28c064c6820f0c
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