tessimago commited on
Commit
3e91351
1 Parent(s): eb36389

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,810 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: Total company-operated stores | 711 | | 655
34
+ sentences:
35
+ - What type of financial documents are included in Part IV, Item 15(a)(1) of the
36
+ Annual Report on Form 10-K?
37
+ - What is the total number of company-operated stores as of January 28, 2024?
38
+ - When does the 364-day facility entered into in August 2023 expire, and what is
39
+ its total amount?
40
+ - source_sentence: GM empowers employees to 'Speak Up for Safety' through the Employee
41
+ Safety Concern Process which makes it easier for employees to report potential
42
+ safety issues or suggest improvements without fear of retaliation and ensures
43
+ their safety every day.
44
+ sentences:
45
+ - What item number is associated with financial statements and supplementary data
46
+ in documents?
47
+ - How does GM promote safety and well-being among its employees?
48
+ - What are the main features included in the Skills for Jobs initiative launched
49
+ by Microsoft?
50
+ - source_sentence: Under the 2020 Plan, the exercise price of options granted is generally
51
+ at least equal to the fair market value of the Company’s Class A common stock
52
+ on the date of grant.
53
+ sentences:
54
+ - How is the exercise price for incentive stock options determined under Palantir
55
+ Technologies Inc.’s 2020 Equity Incentive Plan?
56
+ - What were the dividend amounts declared by AT&T for its preferred and common shares
57
+ in December 2022 and December 2023?
58
+ - What does Item 8 in a document usually represent?
59
+ - source_sentence: On December 22, 2022, the parties entered into a settlement agreement
60
+ to resolve the lawsuit, which provides for a payment of $725 million by us. The
61
+ settlement was approved by the court on October 10, 2023, and the payment was
62
+ made in November 2023.
63
+ sentences:
64
+ - What is the purpose of GM's collaboration efforts at their Global Technical Center
65
+ in Warren, Michigan?
66
+ - How does the acquisition method affect the financial statements after a business
67
+ acquisition?
68
+ - What was the outcome of the 2019 consumer class action regarding the company's
69
+ user data practices?
70
+ - source_sentence: Item 8, titled 'Financial Statements and Supplementary Data,' is
71
+ followed by an index to these sections.
72
+ sentences:
73
+ - What section follows Item 8 in the document?
74
+ - What is the total assets and shareholders' equity of Chubb Limited as of December
75
+ 31, 2023?
76
+ - How does AT&T emphasize diversity in its hiring practices?
77
+ model-index:
78
+ - name: BGE base Financial Matryoshka
79
+ results:
80
+ - task:
81
+ type: information-retrieval
82
+ name: Information Retrieval
83
+ dataset:
84
+ name: dim 768
85
+ type: dim_768
86
+ metrics:
87
+ - type: cosine_accuracy@1
88
+ value: 0.7385714285714285
89
+ name: Cosine Accuracy@1
90
+ - type: cosine_accuracy@3
91
+ value: 0.8642857142857143
92
+ name: Cosine Accuracy@3
93
+ - type: cosine_accuracy@5
94
+ value: 0.8942857142857142
95
+ name: Cosine Accuracy@5
96
+ - type: cosine_accuracy@10
97
+ value: 0.9342857142857143
98
+ name: Cosine Accuracy@10
99
+ - type: cosine_precision@1
100
+ value: 0.7385714285714285
101
+ name: Cosine Precision@1
102
+ - type: cosine_precision@3
103
+ value: 0.28809523809523807
104
+ name: Cosine Precision@3
105
+ - type: cosine_precision@5
106
+ value: 0.17885714285714285
107
+ name: Cosine Precision@5
108
+ - type: cosine_precision@10
109
+ value: 0.09342857142857142
110
+ name: Cosine Precision@10
111
+ - type: cosine_recall@1
112
+ value: 0.7385714285714285
113
+ name: Cosine Recall@1
114
+ - type: cosine_recall@3
115
+ value: 0.8642857142857143
116
+ name: Cosine Recall@3
117
+ - type: cosine_recall@5
118
+ value: 0.8942857142857142
119
+ name: Cosine Recall@5
120
+ - type: cosine_recall@10
121
+ value: 0.9342857142857143
122
+ name: Cosine Recall@10
123
+ - type: cosine_ndcg@10
124
+ value: 0.8387370920568787
125
+ name: Cosine Ndcg@10
126
+ - type: cosine_mrr@10
127
+ value: 0.8078395691609976
128
+ name: Cosine Mrr@10
129
+ - type: cosine_map@100
130
+ value: 0.8102903092098301
131
+ name: Cosine Map@100
132
+ - task:
133
+ type: information-retrieval
134
+ name: Information Retrieval
135
+ dataset:
136
+ name: dim 512
137
+ type: dim_512
138
+ metrics:
139
+ - type: cosine_accuracy@1
140
+ value: 0.7414285714285714
141
+ name: Cosine Accuracy@1
142
+ - type: cosine_accuracy@3
143
+ value: 0.8557142857142858
144
+ name: Cosine Accuracy@3
145
+ - type: cosine_accuracy@5
146
+ value: 0.8942857142857142
147
+ name: Cosine Accuracy@5
148
+ - type: cosine_accuracy@10
149
+ value: 0.9328571428571428
150
+ name: Cosine Accuracy@10
151
+ - type: cosine_precision@1
152
+ value: 0.7414285714285714
153
+ name: Cosine Precision@1
154
+ - type: cosine_precision@3
155
+ value: 0.2852380952380953
156
+ name: Cosine Precision@3
157
+ - type: cosine_precision@5
158
+ value: 0.17885714285714285
159
+ name: Cosine Precision@5
160
+ - type: cosine_precision@10
161
+ value: 0.09328571428571426
162
+ name: Cosine Precision@10
163
+ - type: cosine_recall@1
164
+ value: 0.7414285714285714
165
+ name: Cosine Recall@1
166
+ - type: cosine_recall@3
167
+ value: 0.8557142857142858
168
+ name: Cosine Recall@3
169
+ - type: cosine_recall@5
170
+ value: 0.8942857142857142
171
+ name: Cosine Recall@5
172
+ - type: cosine_recall@10
173
+ value: 0.9328571428571428
174
+ name: Cosine Recall@10
175
+ - type: cosine_ndcg@10
176
+ value: 0.8380676321786823
177
+ name: Cosine Ndcg@10
178
+ - type: cosine_mrr@10
179
+ value: 0.8075895691609978
180
+ name: Cosine Mrr@10
181
+ - type: cosine_map@100
182
+ value: 0.8101143502932845
183
+ name: Cosine Map@100
184
+ - task:
185
+ type: information-retrieval
186
+ name: Information Retrieval
187
+ dataset:
188
+ name: dim 256
189
+ type: dim_256
190
+ metrics:
191
+ - type: cosine_accuracy@1
192
+ value: 0.7357142857142858
193
+ name: Cosine Accuracy@1
194
+ - type: cosine_accuracy@3
195
+ value: 0.85
196
+ name: Cosine Accuracy@3
197
+ - type: cosine_accuracy@5
198
+ value: 0.8814285714285715
199
+ name: Cosine Accuracy@5
200
+ - type: cosine_accuracy@10
201
+ value: 0.92
202
+ name: Cosine Accuracy@10
203
+ - type: cosine_precision@1
204
+ value: 0.7357142857142858
205
+ name: Cosine Precision@1
206
+ - type: cosine_precision@3
207
+ value: 0.2833333333333333
208
+ name: Cosine Precision@3
209
+ - type: cosine_precision@5
210
+ value: 0.17628571428571424
211
+ name: Cosine Precision@5
212
+ - type: cosine_precision@10
213
+ value: 0.09199999999999998
214
+ name: Cosine Precision@10
215
+ - type: cosine_recall@1
216
+ value: 0.7357142857142858
217
+ name: Cosine Recall@1
218
+ - type: cosine_recall@3
219
+ value: 0.85
220
+ name: Cosine Recall@3
221
+ - type: cosine_recall@5
222
+ value: 0.8814285714285715
223
+ name: Cosine Recall@5
224
+ - type: cosine_recall@10
225
+ value: 0.92
226
+ name: Cosine Recall@10
227
+ - type: cosine_ndcg@10
228
+ value: 0.8286016704428653
229
+ name: Cosine Ndcg@10
230
+ - type: cosine_mrr@10
231
+ value: 0.7992942176870748
232
+ name: Cosine Mrr@10
233
+ - type: cosine_map@100
234
+ value: 0.8028214002001232
235
+ name: Cosine Map@100
236
+ - task:
237
+ type: information-retrieval
238
+ name: Information Retrieval
239
+ dataset:
240
+ name: dim 128
241
+ type: dim_128
242
+ metrics:
243
+ - type: cosine_accuracy@1
244
+ value: 0.7142857142857143
245
+ name: Cosine Accuracy@1
246
+ - type: cosine_accuracy@3
247
+ value: 0.84
248
+ name: Cosine Accuracy@3
249
+ - type: cosine_accuracy@5
250
+ value: 0.87
251
+ name: Cosine Accuracy@5
252
+ - type: cosine_accuracy@10
253
+ value: 0.9128571428571428
254
+ name: Cosine Accuracy@10
255
+ - type: cosine_precision@1
256
+ value: 0.7142857142857143
257
+ name: Cosine Precision@1
258
+ - type: cosine_precision@3
259
+ value: 0.28
260
+ name: Cosine Precision@3
261
+ - type: cosine_precision@5
262
+ value: 0.174
263
+ name: Cosine Precision@5
264
+ - type: cosine_precision@10
265
+ value: 0.09128571428571428
266
+ name: Cosine Precision@10
267
+ - type: cosine_recall@1
268
+ value: 0.7142857142857143
269
+ name: Cosine Recall@1
270
+ - type: cosine_recall@3
271
+ value: 0.84
272
+ name: Cosine Recall@3
273
+ - type: cosine_recall@5
274
+ value: 0.87
275
+ name: Cosine Recall@5
276
+ - type: cosine_recall@10
277
+ value: 0.9128571428571428
278
+ name: Cosine Recall@10
279
+ - type: cosine_ndcg@10
280
+ value: 0.8153680997284491
281
+ name: Cosine Ndcg@10
282
+ - type: cosine_mrr@10
283
+ value: 0.7840521541950115
284
+ name: Cosine Mrr@10
285
+ - type: cosine_map@100
286
+ value: 0.7875962124214356
287
+ name: Cosine Map@100
288
+ - task:
289
+ type: information-retrieval
290
+ name: Information Retrieval
291
+ dataset:
292
+ name: dim 64
293
+ type: dim_64
294
+ metrics:
295
+ - type: cosine_accuracy@1
296
+ value: 0.6771428571428572
297
+ name: Cosine Accuracy@1
298
+ - type: cosine_accuracy@3
299
+ value: 0.8085714285714286
300
+ name: Cosine Accuracy@3
301
+ - type: cosine_accuracy@5
302
+ value: 0.8371428571428572
303
+ name: Cosine Accuracy@5
304
+ - type: cosine_accuracy@10
305
+ value: 0.8857142857142857
306
+ name: Cosine Accuracy@10
307
+ - type: cosine_precision@1
308
+ value: 0.6771428571428572
309
+ name: Cosine Precision@1
310
+ - type: cosine_precision@3
311
+ value: 0.26952380952380955
312
+ name: Cosine Precision@3
313
+ - type: cosine_precision@5
314
+ value: 0.1674285714285714
315
+ name: Cosine Precision@5
316
+ - type: cosine_precision@10
317
+ value: 0.08857142857142855
318
+ name: Cosine Precision@10
319
+ - type: cosine_recall@1
320
+ value: 0.6771428571428572
321
+ name: Cosine Recall@1
322
+ - type: cosine_recall@3
323
+ value: 0.8085714285714286
324
+ name: Cosine Recall@3
325
+ - type: cosine_recall@5
326
+ value: 0.8371428571428572
327
+ name: Cosine Recall@5
328
+ - type: cosine_recall@10
329
+ value: 0.8857142857142857
330
+ name: Cosine Recall@10
331
+ - type: cosine_ndcg@10
332
+ value: 0.7840147713456539
333
+ name: Cosine Ndcg@10
334
+ - type: cosine_mrr@10
335
+ value: 0.7513815192743762
336
+ name: Cosine Mrr@10
337
+ - type: cosine_map@100
338
+ value: 0.755682487136274
339
+ name: Cosine Map@100
340
+ ---
341
+
342
+ # BGE base Financial Matryoshka
343
+
344
+ 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.
345
+
346
+ ## Model Details
347
+
348
+ ### Model Description
349
+ - **Model Type:** Sentence Transformer
350
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
351
+ - **Maximum Sequence Length:** 512 tokens
352
+ - **Output Dimensionality:** 768 tokens
353
+ - **Similarity Function:** Cosine Similarity
354
+ - **Training Dataset:**
355
+ - json
356
+ - **Language:** en
357
+ - **License:** apache-2.0
358
+
359
+ ### Model Sources
360
+
361
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
362
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
363
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
364
+
365
+ ### Full Model Architecture
366
+
367
+ ```
368
+ SentenceTransformer(
369
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
370
+ (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})
371
+ (2): Normalize()
372
+ )
373
+ ```
374
+
375
+ ## Usage
376
+
377
+ ### Direct Usage (Sentence Transformers)
378
+
379
+ First install the Sentence Transformers library:
380
+
381
+ ```bash
382
+ pip install -U sentence-transformers
383
+ ```
384
+
385
+ Then you can load this model and run inference.
386
+ ```python
387
+ from sentence_transformers import SentenceTransformer
388
+
389
+ # Download from the 🤗 Hub
390
+ model = SentenceTransformer("tessimago/bge-base-financial-matryoshka")
391
+ # Run inference
392
+ sentences = [
393
+ "Item 8, titled 'Financial Statements and Supplementary Data,' is followed by an index to these sections.",
394
+ 'What section follows Item 8 in the document?',
395
+ "What is the total assets and shareholders' equity of Chubb Limited as of December 31, 2023?",
396
+ ]
397
+ embeddings = model.encode(sentences)
398
+ print(embeddings.shape)
399
+ # [3, 768]
400
+
401
+ # Get the similarity scores for the embeddings
402
+ similarities = model.similarity(embeddings, embeddings)
403
+ print(similarities.shape)
404
+ # [3, 3]
405
+ ```
406
+
407
+ <!--
408
+ ### Direct Usage (Transformers)
409
+
410
+ <details><summary>Click to see the direct usage in Transformers</summary>
411
+
412
+ </details>
413
+ -->
414
+
415
+ <!--
416
+ ### Downstream Usage (Sentence Transformers)
417
+
418
+ You can finetune this model on your own dataset.
419
+
420
+ <details><summary>Click to expand</summary>
421
+
422
+ </details>
423
+ -->
424
+
425
+ <!--
426
+ ### Out-of-Scope Use
427
+
428
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
429
+ -->
430
+
431
+ ## Evaluation
432
+
433
+ ### Metrics
434
+
435
+ #### Information Retrieval
436
+ * Dataset: `dim_768`
437
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
438
+
439
+ | Metric | Value |
440
+ |:--------------------|:-----------|
441
+ | cosine_accuracy@1 | 0.7386 |
442
+ | cosine_accuracy@3 | 0.8643 |
443
+ | cosine_accuracy@5 | 0.8943 |
444
+ | cosine_accuracy@10 | 0.9343 |
445
+ | cosine_precision@1 | 0.7386 |
446
+ | cosine_precision@3 | 0.2881 |
447
+ | cosine_precision@5 | 0.1789 |
448
+ | cosine_precision@10 | 0.0934 |
449
+ | cosine_recall@1 | 0.7386 |
450
+ | cosine_recall@3 | 0.8643 |
451
+ | cosine_recall@5 | 0.8943 |
452
+ | cosine_recall@10 | 0.9343 |
453
+ | cosine_ndcg@10 | 0.8387 |
454
+ | cosine_mrr@10 | 0.8078 |
455
+ | **cosine_map@100** | **0.8103** |
456
+
457
+ #### Information Retrieval
458
+ * Dataset: `dim_512`
459
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
460
+
461
+ | Metric | Value |
462
+ |:--------------------|:-----------|
463
+ | cosine_accuracy@1 | 0.7414 |
464
+ | cosine_accuracy@3 | 0.8557 |
465
+ | cosine_accuracy@5 | 0.8943 |
466
+ | cosine_accuracy@10 | 0.9329 |
467
+ | cosine_precision@1 | 0.7414 |
468
+ | cosine_precision@3 | 0.2852 |
469
+ | cosine_precision@5 | 0.1789 |
470
+ | cosine_precision@10 | 0.0933 |
471
+ | cosine_recall@1 | 0.7414 |
472
+ | cosine_recall@3 | 0.8557 |
473
+ | cosine_recall@5 | 0.8943 |
474
+ | cosine_recall@10 | 0.9329 |
475
+ | cosine_ndcg@10 | 0.8381 |
476
+ | cosine_mrr@10 | 0.8076 |
477
+ | **cosine_map@100** | **0.8101** |
478
+
479
+ #### Information Retrieval
480
+ * Dataset: `dim_256`
481
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
482
+
483
+ | Metric | Value |
484
+ |:--------------------|:-----------|
485
+ | cosine_accuracy@1 | 0.7357 |
486
+ | cosine_accuracy@3 | 0.85 |
487
+ | cosine_accuracy@5 | 0.8814 |
488
+ | cosine_accuracy@10 | 0.92 |
489
+ | cosine_precision@1 | 0.7357 |
490
+ | cosine_precision@3 | 0.2833 |
491
+ | cosine_precision@5 | 0.1763 |
492
+ | cosine_precision@10 | 0.092 |
493
+ | cosine_recall@1 | 0.7357 |
494
+ | cosine_recall@3 | 0.85 |
495
+ | cosine_recall@5 | 0.8814 |
496
+ | cosine_recall@10 | 0.92 |
497
+ | cosine_ndcg@10 | 0.8286 |
498
+ | cosine_mrr@10 | 0.7993 |
499
+ | **cosine_map@100** | **0.8028** |
500
+
501
+ #### Information Retrieval
502
+ * Dataset: `dim_128`
503
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
504
+
505
+ | Metric | Value |
506
+ |:--------------------|:-----------|
507
+ | cosine_accuracy@1 | 0.7143 |
508
+ | cosine_accuracy@3 | 0.84 |
509
+ | cosine_accuracy@5 | 0.87 |
510
+ | cosine_accuracy@10 | 0.9129 |
511
+ | cosine_precision@1 | 0.7143 |
512
+ | cosine_precision@3 | 0.28 |
513
+ | cosine_precision@5 | 0.174 |
514
+ | cosine_precision@10 | 0.0913 |
515
+ | cosine_recall@1 | 0.7143 |
516
+ | cosine_recall@3 | 0.84 |
517
+ | cosine_recall@5 | 0.87 |
518
+ | cosine_recall@10 | 0.9129 |
519
+ | cosine_ndcg@10 | 0.8154 |
520
+ | cosine_mrr@10 | 0.7841 |
521
+ | **cosine_map@100** | **0.7876** |
522
+
523
+ #### Information Retrieval
524
+ * Dataset: `dim_64`
525
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
526
+
527
+ | Metric | Value |
528
+ |:--------------------|:-----------|
529
+ | cosine_accuracy@1 | 0.6771 |
530
+ | cosine_accuracy@3 | 0.8086 |
531
+ | cosine_accuracy@5 | 0.8371 |
532
+ | cosine_accuracy@10 | 0.8857 |
533
+ | cosine_precision@1 | 0.6771 |
534
+ | cosine_precision@3 | 0.2695 |
535
+ | cosine_precision@5 | 0.1674 |
536
+ | cosine_precision@10 | 0.0886 |
537
+ | cosine_recall@1 | 0.6771 |
538
+ | cosine_recall@3 | 0.8086 |
539
+ | cosine_recall@5 | 0.8371 |
540
+ | cosine_recall@10 | 0.8857 |
541
+ | cosine_ndcg@10 | 0.784 |
542
+ | cosine_mrr@10 | 0.7514 |
543
+ | **cosine_map@100** | **0.7557** |
544
+
545
+ <!--
546
+ ## Bias, Risks and Limitations
547
+
548
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
549
+ -->
550
+
551
+ <!--
552
+ ### Recommendations
553
+
554
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
555
+ -->
556
+
557
+ ## Training Details
558
+
559
+ ### Training Dataset
560
+
561
+ #### json
562
+
563
+ * Dataset: json
564
+ * Size: 6,300 training samples
565
+ * Columns: <code>positive</code> and <code>anchor</code>
566
+ * Approximate statistics based on the first 1000 samples:
567
+ | | positive | anchor |
568
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
569
+ | type | string | string |
570
+ | details | <ul><li>min: 6 tokens</li><li>mean: 46.25 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.69 tokens</li><li>max: 42 tokens</li></ul> |
571
+ * Samples:
572
+ | positive | anchor |
573
+ |:----------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------|
574
+ | <code>As of January 28, 2024, we held cash and cash equivalents of $2.2 billion.</code> | <code>What was the total cash and cash equivalents held by the company as of January 28, 2024?</code> |
575
+ | <code>Net cash used in financing activities amounted to $1,600 million in fiscal year 2023.</code> | <code>What was the total net cash used in financing activities in fiscal year 2023?</code> |
576
+ | <code>Item 8, titled 'Financial Statements and Supplementary Data,' is followed by an index to these sections.</code> | <code>What section follows Item 8 in the document?</code> |
577
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
578
+ ```json
579
+ {
580
+ "loss": "MultipleNegativesRankingLoss",
581
+ "matryoshka_dims": [
582
+ 768,
583
+ 512,
584
+ 256,
585
+ 128,
586
+ 64
587
+ ],
588
+ "matryoshka_weights": [
589
+ 1,
590
+ 1,
591
+ 1,
592
+ 1,
593
+ 1
594
+ ],
595
+ "n_dims_per_step": -1
596
+ }
597
+ ```
598
+
599
+ ### Training Hyperparameters
600
+ #### Non-Default Hyperparameters
601
+
602
+ - `eval_strategy`: epoch
603
+ - `per_device_train_batch_size`: 32
604
+ - `per_device_eval_batch_size`: 16
605
+ - `gradient_accumulation_steps`: 16
606
+ - `learning_rate`: 2e-05
607
+ - `num_train_epochs`: 4
608
+ - `lr_scheduler_type`: cosine
609
+ - `warmup_ratio`: 0.1
610
+ - `bf16`: True
611
+ - `tf32`: True
612
+ - `load_best_model_at_end`: True
613
+ - `optim`: adamw_torch_fused
614
+ - `batch_sampler`: no_duplicates
615
+
616
+ #### All Hyperparameters
617
+ <details><summary>Click to expand</summary>
618
+
619
+ - `overwrite_output_dir`: False
620
+ - `do_predict`: False
621
+ - `eval_strategy`: epoch
622
+ - `prediction_loss_only`: True
623
+ - `per_device_train_batch_size`: 32
624
+ - `per_device_eval_batch_size`: 16
625
+ - `per_gpu_train_batch_size`: None
626
+ - `per_gpu_eval_batch_size`: None
627
+ - `gradient_accumulation_steps`: 16
628
+ - `eval_accumulation_steps`: None
629
+ - `learning_rate`: 2e-05
630
+ - `weight_decay`: 0.0
631
+ - `adam_beta1`: 0.9
632
+ - `adam_beta2`: 0.999
633
+ - `adam_epsilon`: 1e-08
634
+ - `max_grad_norm`: 1.0
635
+ - `num_train_epochs`: 4
636
+ - `max_steps`: -1
637
+ - `lr_scheduler_type`: cosine
638
+ - `lr_scheduler_kwargs`: {}
639
+ - `warmup_ratio`: 0.1
640
+ - `warmup_steps`: 0
641
+ - `log_level`: passive
642
+ - `log_level_replica`: warning
643
+ - `log_on_each_node`: True
644
+ - `logging_nan_inf_filter`: True
645
+ - `save_safetensors`: True
646
+ - `save_on_each_node`: False
647
+ - `save_only_model`: False
648
+ - `restore_callback_states_from_checkpoint`: False
649
+ - `no_cuda`: False
650
+ - `use_cpu`: False
651
+ - `use_mps_device`: False
652
+ - `seed`: 42
653
+ - `data_seed`: None
654
+ - `jit_mode_eval`: False
655
+ - `use_ipex`: False
656
+ - `bf16`: True
657
+ - `fp16`: False
658
+ - `fp16_opt_level`: O1
659
+ - `half_precision_backend`: auto
660
+ - `bf16_full_eval`: False
661
+ - `fp16_full_eval`: False
662
+ - `tf32`: True
663
+ - `local_rank`: 0
664
+ - `ddp_backend`: None
665
+ - `tpu_num_cores`: None
666
+ - `tpu_metrics_debug`: False
667
+ - `debug`: []
668
+ - `dataloader_drop_last`: False
669
+ - `dataloader_num_workers`: 0
670
+ - `dataloader_prefetch_factor`: None
671
+ - `past_index`: -1
672
+ - `disable_tqdm`: False
673
+ - `remove_unused_columns`: True
674
+ - `label_names`: None
675
+ - `load_best_model_at_end`: True
676
+ - `ignore_data_skip`: False
677
+ - `fsdp`: []
678
+ - `fsdp_min_num_params`: 0
679
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
680
+ - `fsdp_transformer_layer_cls_to_wrap`: None
681
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
682
+ - `deepspeed`: None
683
+ - `label_smoothing_factor`: 0.0
684
+ - `optim`: adamw_torch_fused
685
+ - `optim_args`: None
686
+ - `adafactor`: False
687
+ - `group_by_length`: False
688
+ - `length_column_name`: length
689
+ - `ddp_find_unused_parameters`: None
690
+ - `ddp_bucket_cap_mb`: None
691
+ - `ddp_broadcast_buffers`: False
692
+ - `dataloader_pin_memory`: True
693
+ - `dataloader_persistent_workers`: False
694
+ - `skip_memory_metrics`: True
695
+ - `use_legacy_prediction_loop`: False
696
+ - `push_to_hub`: False
697
+ - `resume_from_checkpoint`: None
698
+ - `hub_model_id`: None
699
+ - `hub_strategy`: every_save
700
+ - `hub_private_repo`: False
701
+ - `hub_always_push`: False
702
+ - `gradient_checkpointing`: False
703
+ - `gradient_checkpointing_kwargs`: None
704
+ - `include_inputs_for_metrics`: False
705
+ - `eval_do_concat_batches`: True
706
+ - `fp16_backend`: auto
707
+ - `push_to_hub_model_id`: None
708
+ - `push_to_hub_organization`: None
709
+ - `mp_parameters`:
710
+ - `auto_find_batch_size`: False
711
+ - `full_determinism`: False
712
+ - `torchdynamo`: None
713
+ - `ray_scope`: last
714
+ - `ddp_timeout`: 1800
715
+ - `torch_compile`: False
716
+ - `torch_compile_backend`: None
717
+ - `torch_compile_mode`: None
718
+ - `dispatch_batches`: None
719
+ - `split_batches`: None
720
+ - `include_tokens_per_second`: False
721
+ - `include_num_input_tokens_seen`: False
722
+ - `neftune_noise_alpha`: None
723
+ - `optim_target_modules`: None
724
+ - `batch_eval_metrics`: False
725
+ - `batch_sampler`: no_duplicates
726
+ - `multi_dataset_batch_sampler`: proportional
727
+
728
+ </details>
729
+
730
+ ### Training Logs
731
+ | 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 |
732
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
733
+ | 0.8122 | 10 | 1.5849 | - | - | - | - | - |
734
+ | 0.9746 | 12 | - | 0.7610 | 0.7799 | 0.7878 | 0.7254 | 0.7922 |
735
+ | 1.6244 | 20 | 0.6368 | - | - | - | - | - |
736
+ | 1.9492 | 24 | - | 0.7823 | 0.7974 | 0.8047 | 0.7515 | 0.8046 |
737
+ | 2.4365 | 30 | 0.4976 | - | - | - | - | - |
738
+ | **2.9239** | **36** | **-** | **0.7876** | **0.803** | **0.8096** | **0.754** | **0.8081** |
739
+ | 3.2487 | 40 | 0.3845 | - | - | - | - | - |
740
+ | 3.8985 | 48 | - | 0.7876 | 0.8028 | 0.8101 | 0.7557 | 0.8103 |
741
+
742
+ * The bold row denotes the saved checkpoint.
743
+
744
+ ### Framework Versions
745
+ - Python: 3.10.14
746
+ - Sentence Transformers: 3.1.0
747
+ - Transformers: 4.41.2
748
+ - PyTorch: 2.1.2+cu121
749
+ - Accelerate: 0.34.2
750
+ - Datasets: 2.19.1
751
+ - Tokenizers: 0.19.1
752
+
753
+ ## Citation
754
+
755
+ ### BibTeX
756
+
757
+ #### Sentence Transformers
758
+ ```bibtex
759
+ @inproceedings{reimers-2019-sentence-bert,
760
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
761
+ author = "Reimers, Nils and Gurevych, Iryna",
762
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
763
+ month = "11",
764
+ year = "2019",
765
+ publisher = "Association for Computational Linguistics",
766
+ url = "https://arxiv.org/abs/1908.10084",
767
+ }
768
+ ```
769
+
770
+ #### MatryoshkaLoss
771
+ ```bibtex
772
+ @misc{kusupati2024matryoshka,
773
+ title={Matryoshka Representation Learning},
774
+ 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},
775
+ year={2024},
776
+ eprint={2205.13147},
777
+ archivePrefix={arXiv},
778
+ primaryClass={cs.LG}
779
+ }
780
+ ```
781
+
782
+ #### MultipleNegativesRankingLoss
783
+ ```bibtex
784
+ @misc{henderson2017efficient,
785
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
786
+ 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},
787
+ year={2017},
788
+ eprint={1705.00652},
789
+ archivePrefix={arXiv},
790
+ primaryClass={cs.CL}
791
+ }
792
+ ```
793
+
794
+ <!--
795
+ ## Glossary
796
+
797
+ *Clearly define terms in order to be accessible across audiences.*
798
+ -->
799
+
800
+ <!--
801
+ ## Model Card Authors
802
+
803
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
804
+ -->
805
+
806
+ <!--
807
+ ## Model Card Contact
808
+
809
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
810
+ -->
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.0",
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:ea2e880ff1d64153aca07dda02d2415c473edb691d7e6c01484164f32a74fda9
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