SMARTICT commited on
Commit
9ef909e
·
verified ·
1 Parent(s): 822fcc5

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,716 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: Item 8 includes Financial Statements and Supplementary Data.
34
+ sentences:
35
+ - What does the FDA label update for Yescarta include as of the latest approval?
36
+ - What information can be found in Item 8 of a document?
37
+ - When does the Company's fiscal year end?
38
+ - source_sentence: Item 8 in a financial document is designated for Financial Statements
39
+ and Supplementary Data.
40
+ sentences:
41
+ - What are the primary goals of AutoZone's store management system?
42
+ - What information is contained in Item 8 of a financial document?
43
+ - What were the pre-tax earnings of the manufacturing sector in 2023, 2022, and
44
+ 2021?
45
+ - source_sentence: of approximately $1.0 billion in IBNR liabilities, producing a
46
+ corresponding decrease in pre-tax earnings. We believe it is reasonably possible
47
+ for these assumptions to increase at these rates.
48
+ sentences:
49
+ - What was the decrease in pre-tax earnings due to the $1.0 billion in IBNR liabilities?
50
+ - What was the total long-term debt, including the current portion, for AbbVie as
51
+ of December 31, 2023?
52
+ - What feature dedicated AI hardware in an x86 processor and uses the XDNA architecture?
53
+ - source_sentence: In the year ended December 31, 2023, sellers generated GMS of $13.2
54
+ billion, approximately 68% of which came from purchases made on mobile devices.
55
+ sentences:
56
+ - What was the change in the total balance of revolving credits from December 31,
57
+ 2022, to December 31, 2023?
58
+ - What are the purposes of borrowings under the 2021 credit facility?
59
+ - What percentage of Etsy's Gross Merchandise Sales (GMS) in 2023 came from mobile
60
+ purchases?
61
+ - source_sentence: As of December 31, 2023, approximately $1.80 billion is available
62
+ to be repatriated from Mainland China to the U.S.
63
+ sentences:
64
+ - What is the total amount of unrestricted cash available for repatriation from
65
+ Mainland China to the U.S. as of the end of 2023?
66
+ - What is the focus of the company's research and development efforts?
67
+ - Where does the Report of Independent Registered Public Accounting Firm begin in
68
+ this report?
69
+ model-index:
70
+ - name: BGE base Financial Matryoshka
71
+ results:
72
+ - task:
73
+ type: information-retrieval
74
+ name: Information Retrieval
75
+ dataset:
76
+ name: dim 768
77
+ type: dim_768
78
+ metrics:
79
+ - type: cosine_accuracy@1
80
+ value: 0.6771428571428572
81
+ name: Cosine Accuracy@1
82
+ - type: cosine_accuracy@3
83
+ value: 0.8142857142857143
84
+ name: Cosine Accuracy@3
85
+ - type: cosine_accuracy@5
86
+ value: 0.8642857142857143
87
+ name: Cosine Accuracy@5
88
+ - type: cosine_accuracy@10
89
+ value: 0.9142857142857143
90
+ name: Cosine Accuracy@10
91
+ - type: cosine_precision@1
92
+ value: 0.6771428571428572
93
+ name: Cosine Precision@1
94
+ - type: cosine_precision@3
95
+ value: 0.2714285714285714
96
+ name: Cosine Precision@3
97
+ - type: cosine_precision@5
98
+ value: 0.17285714285714282
99
+ name: Cosine Precision@5
100
+ - type: cosine_precision@10
101
+ value: 0.09142857142857141
102
+ name: Cosine Precision@10
103
+ - type: cosine_recall@1
104
+ value: 0.6771428571428572
105
+ name: Cosine Recall@1
106
+ - type: cosine_recall@3
107
+ value: 0.8142857142857143
108
+ name: Cosine Recall@3
109
+ - type: cosine_recall@5
110
+ value: 0.8642857142857143
111
+ name: Cosine Recall@5
112
+ - type: cosine_recall@10
113
+ value: 0.9142857142857143
114
+ name: Cosine Recall@10
115
+ - type: cosine_ndcg@10
116
+ value: 0.7948920706768223
117
+ name: Cosine Ndcg@10
118
+ - type: cosine_mrr@10
119
+ value: 0.7568055555555551
120
+ name: Cosine Mrr@10
121
+ - type: cosine_map@100
122
+ value: 0.7601580985784901
123
+ name: Cosine Map@100
124
+ - task:
125
+ type: information-retrieval
126
+ name: Information Retrieval
127
+ dataset:
128
+ name: dim 512
129
+ type: dim_512
130
+ metrics:
131
+ - type: cosine_accuracy@1
132
+ value: 0.6714285714285714
133
+ name: Cosine Accuracy@1
134
+ - type: cosine_accuracy@3
135
+ value: 0.8157142857142857
136
+ name: Cosine Accuracy@3
137
+ - type: cosine_accuracy@5
138
+ value: 0.8657142857142858
139
+ name: Cosine Accuracy@5
140
+ - type: cosine_accuracy@10
141
+ value: 0.92
142
+ name: Cosine Accuracy@10
143
+ - type: cosine_precision@1
144
+ value: 0.6714285714285714
145
+ name: Cosine Precision@1
146
+ - type: cosine_precision@3
147
+ value: 0.27190476190476187
148
+ name: Cosine Precision@3
149
+ - type: cosine_precision@5
150
+ value: 0.17314285714285713
151
+ name: Cosine Precision@5
152
+ - type: cosine_precision@10
153
+ value: 0.09199999999999998
154
+ name: Cosine Precision@10
155
+ - type: cosine_recall@1
156
+ value: 0.6714285714285714
157
+ name: Cosine Recall@1
158
+ - type: cosine_recall@3
159
+ value: 0.8157142857142857
160
+ name: Cosine Recall@3
161
+ - type: cosine_recall@5
162
+ value: 0.8657142857142858
163
+ name: Cosine Recall@5
164
+ - type: cosine_recall@10
165
+ value: 0.92
166
+ name: Cosine Recall@10
167
+ - type: cosine_ndcg@10
168
+ value: 0.7936366054643341
169
+ name: Cosine Ndcg@10
170
+ - type: cosine_mrr@10
171
+ value: 0.7534455782312921
172
+ name: Cosine Mrr@10
173
+ - type: cosine_map@100
174
+ value: 0.756388193211117
175
+ name: Cosine Map@100
176
+ - task:
177
+ type: information-retrieval
178
+ name: Information Retrieval
179
+ dataset:
180
+ name: dim 256
181
+ type: dim_256
182
+ metrics:
183
+ - type: cosine_accuracy@1
184
+ value: 0.6714285714285714
185
+ name: Cosine Accuracy@1
186
+ - type: cosine_accuracy@3
187
+ value: 0.8157142857142857
188
+ name: Cosine Accuracy@3
189
+ - type: cosine_accuracy@5
190
+ value: 0.8585714285714285
191
+ name: Cosine Accuracy@5
192
+ - type: cosine_accuracy@10
193
+ value: 0.9157142857142857
194
+ name: Cosine Accuracy@10
195
+ - type: cosine_precision@1
196
+ value: 0.6714285714285714
197
+ name: Cosine Precision@1
198
+ - type: cosine_precision@3
199
+ value: 0.27190476190476187
200
+ name: Cosine Precision@3
201
+ - type: cosine_precision@5
202
+ value: 0.1717142857142857
203
+ name: Cosine Precision@5
204
+ - type: cosine_precision@10
205
+ value: 0.09157142857142857
206
+ name: Cosine Precision@10
207
+ - type: cosine_recall@1
208
+ value: 0.6714285714285714
209
+ name: Cosine Recall@1
210
+ - type: cosine_recall@3
211
+ value: 0.8157142857142857
212
+ name: Cosine Recall@3
213
+ - type: cosine_recall@5
214
+ value: 0.8585714285714285
215
+ name: Cosine Recall@5
216
+ - type: cosine_recall@10
217
+ value: 0.9157142857142857
218
+ name: Cosine Recall@10
219
+ - type: cosine_ndcg@10
220
+ value: 0.7926136922070053
221
+ name: Cosine Ndcg@10
222
+ - type: cosine_mrr@10
223
+ value: 0.7535062358276641
224
+ name: Cosine Mrr@10
225
+ - type: cosine_map@100
226
+ value: 0.7564593466816174
227
+ name: Cosine Map@100
228
+ - task:
229
+ type: information-retrieval
230
+ name: Information Retrieval
231
+ dataset:
232
+ name: dim 128
233
+ type: dim_128
234
+ metrics:
235
+ - type: cosine_accuracy@1
236
+ value: 0.6614285714285715
237
+ name: Cosine Accuracy@1
238
+ - type: cosine_accuracy@3
239
+ value: 0.8
240
+ name: Cosine Accuracy@3
241
+ - type: cosine_accuracy@5
242
+ value: 0.8414285714285714
243
+ name: Cosine Accuracy@5
244
+ - type: cosine_accuracy@10
245
+ value: 0.8885714285714286
246
+ name: Cosine Accuracy@10
247
+ - type: cosine_precision@1
248
+ value: 0.6614285714285715
249
+ name: Cosine Precision@1
250
+ - type: cosine_precision@3
251
+ value: 0.26666666666666666
252
+ name: Cosine Precision@3
253
+ - type: cosine_precision@5
254
+ value: 0.16828571428571426
255
+ name: Cosine Precision@5
256
+ - type: cosine_precision@10
257
+ value: 0.08885714285714286
258
+ name: Cosine Precision@10
259
+ - type: cosine_recall@1
260
+ value: 0.6614285714285715
261
+ name: Cosine Recall@1
262
+ - type: cosine_recall@3
263
+ value: 0.8
264
+ name: Cosine Recall@3
265
+ - type: cosine_recall@5
266
+ value: 0.8414285714285714
267
+ name: Cosine Recall@5
268
+ - type: cosine_recall@10
269
+ value: 0.8885714285714286
270
+ name: Cosine Recall@10
271
+ - type: cosine_ndcg@10
272
+ value: 0.7767052058983972
273
+ name: Cosine Ndcg@10
274
+ - type: cosine_mrr@10
275
+ value: 0.7407840136054418
276
+ name: Cosine Mrr@10
277
+ - type: cosine_map@100
278
+ value: 0.7454236920389576
279
+ name: Cosine Map@100
280
+ - task:
281
+ type: information-retrieval
282
+ name: Information Retrieval
283
+ dataset:
284
+ name: dim 64
285
+ type: dim_64
286
+ metrics:
287
+ - type: cosine_accuracy@1
288
+ value: 0.6357142857142857
289
+ name: Cosine Accuracy@1
290
+ - type: cosine_accuracy@3
291
+ value: 0.7742857142857142
292
+ name: Cosine Accuracy@3
293
+ - type: cosine_accuracy@5
294
+ value: 0.8185714285714286
295
+ name: Cosine Accuracy@5
296
+ - type: cosine_accuracy@10
297
+ value: 0.8642857142857143
298
+ name: Cosine Accuracy@10
299
+ - type: cosine_precision@1
300
+ value: 0.6357142857142857
301
+ name: Cosine Precision@1
302
+ - type: cosine_precision@3
303
+ value: 0.2580952380952381
304
+ name: Cosine Precision@3
305
+ - type: cosine_precision@5
306
+ value: 0.1637142857142857
307
+ name: Cosine Precision@5
308
+ - type: cosine_precision@10
309
+ value: 0.08642857142857142
310
+ name: Cosine Precision@10
311
+ - type: cosine_recall@1
312
+ value: 0.6357142857142857
313
+ name: Cosine Recall@1
314
+ - type: cosine_recall@3
315
+ value: 0.7742857142857142
316
+ name: Cosine Recall@3
317
+ - type: cosine_recall@5
318
+ value: 0.8185714285714286
319
+ name: Cosine Recall@5
320
+ - type: cosine_recall@10
321
+ value: 0.8642857142857143
322
+ name: Cosine Recall@10
323
+ - type: cosine_ndcg@10
324
+ value: 0.7511926722277801
325
+ name: Cosine Ndcg@10
326
+ - type: cosine_mrr@10
327
+ value: 0.7148713151927435
328
+ name: Cosine Mrr@10
329
+ - type: cosine_map@100
330
+ value: 0.7199017346952273
331
+ name: Cosine Map@100
332
+ ---
333
+
334
+ # BGE base Financial Matryoshka
335
+
336
+ 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.
337
+
338
+ ## Model Details
339
+
340
+ ### Model Description
341
+ - **Model Type:** Sentence Transformer
342
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
343
+ - **Maximum Sequence Length:** 512 tokens
344
+ - **Output Dimensionality:** 768 dimensions
345
+ - **Similarity Function:** Cosine Similarity
346
+ - **Training Dataset:**
347
+ - json
348
+ - **Language:** en
349
+ - **License:** apache-2.0
350
+
351
+ ### Model Sources
352
+
353
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
354
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
355
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
356
+
357
+ ### Full Model Architecture
358
+
359
+ ```
360
+ SentenceTransformer(
361
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
362
+ (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})
363
+ (2): Normalize()
364
+ )
365
+ ```
366
+
367
+ ## Usage
368
+
369
+ ### Direct Usage (Sentence Transformers)
370
+
371
+ First install the Sentence Transformers library:
372
+
373
+ ```bash
374
+ pip install -U sentence-transformers
375
+ ```
376
+
377
+ Then you can load this model and run inference.
378
+ ```python
379
+ from sentence_transformers import SentenceTransformer
380
+
381
+ # Download from the 🤗 Hub
382
+ model = SentenceTransformer("SMARTICT/bge-base-financial-matryoshka")
383
+ # Run inference
384
+ sentences = [
385
+ 'As of December 31, 2023, approximately $1.80 billion is available to be repatriated from Mainland China to the U.S.',
386
+ 'What is the total amount of unrestricted cash available for repatriation from Mainland China to the U.S. as of the end of 2023?',
387
+ "What is the focus of the company's research and development efforts?",
388
+ ]
389
+ embeddings = model.encode(sentences)
390
+ print(embeddings.shape)
391
+ # [3, 768]
392
+
393
+ # Get the similarity scores for the embeddings
394
+ similarities = model.similarity(embeddings, embeddings)
395
+ print(similarities.shape)
396
+ # [3, 3]
397
+ ```
398
+
399
+ <!--
400
+ ### Direct Usage (Transformers)
401
+
402
+ <details><summary>Click to see the direct usage in Transformers</summary>
403
+
404
+ </details>
405
+ -->
406
+
407
+ <!--
408
+ ### Downstream Usage (Sentence Transformers)
409
+
410
+ You can finetune this model on your own dataset.
411
+
412
+ <details><summary>Click to expand</summary>
413
+
414
+ </details>
415
+ -->
416
+
417
+ <!--
418
+ ### Out-of-Scope Use
419
+
420
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
421
+ -->
422
+
423
+ ## Evaluation
424
+
425
+ ### Metrics
426
+
427
+ #### Information Retrieval
428
+
429
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
430
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
431
+
432
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
433
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
434
+ | cosine_accuracy@1 | 0.6771 | 0.6714 | 0.6714 | 0.6614 | 0.6357 |
435
+ | cosine_accuracy@3 | 0.8143 | 0.8157 | 0.8157 | 0.8 | 0.7743 |
436
+ | cosine_accuracy@5 | 0.8643 | 0.8657 | 0.8586 | 0.8414 | 0.8186 |
437
+ | cosine_accuracy@10 | 0.9143 | 0.92 | 0.9157 | 0.8886 | 0.8643 |
438
+ | cosine_precision@1 | 0.6771 | 0.6714 | 0.6714 | 0.6614 | 0.6357 |
439
+ | cosine_precision@3 | 0.2714 | 0.2719 | 0.2719 | 0.2667 | 0.2581 |
440
+ | cosine_precision@5 | 0.1729 | 0.1731 | 0.1717 | 0.1683 | 0.1637 |
441
+ | cosine_precision@10 | 0.0914 | 0.092 | 0.0916 | 0.0889 | 0.0864 |
442
+ | cosine_recall@1 | 0.6771 | 0.6714 | 0.6714 | 0.6614 | 0.6357 |
443
+ | cosine_recall@3 | 0.8143 | 0.8157 | 0.8157 | 0.8 | 0.7743 |
444
+ | cosine_recall@5 | 0.8643 | 0.8657 | 0.8586 | 0.8414 | 0.8186 |
445
+ | cosine_recall@10 | 0.9143 | 0.92 | 0.9157 | 0.8886 | 0.8643 |
446
+ | **cosine_ndcg@10** | **0.7949** | **0.7936** | **0.7926** | **0.7767** | **0.7512** |
447
+ | cosine_mrr@10 | 0.7568 | 0.7534 | 0.7535 | 0.7408 | 0.7149 |
448
+ | cosine_map@100 | 0.7602 | 0.7564 | 0.7565 | 0.7454 | 0.7199 |
449
+
450
+ <!--
451
+ ## Bias, Risks and Limitations
452
+
453
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
454
+ -->
455
+
456
+ <!--
457
+ ### Recommendations
458
+
459
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
460
+ -->
461
+
462
+ ## Training Details
463
+
464
+ ### Training Dataset
465
+
466
+ #### json
467
+
468
+ * Dataset: json
469
+ * Size: 6,300 training samples
470
+ * Columns: <code>positive</code> and <code>anchor</code>
471
+ * Approximate statistics based on the first 1000 samples:
472
+ | | positive | anchor |
473
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
474
+ | type | string | string |
475
+ | details | <ul><li>min: 4 tokens</li><li>mean: 46.71 tokens</li><li>max: 281 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.48 tokens</li><li>max: 43 tokens</li></ul> |
476
+ * Samples:
477
+ | positive | anchor |
478
+ |:---------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
479
+ | <code>Information on legal proceedings is included in Note 15 to the Consolidated Financial Statements.</code> | <code>What note in the Consolidated Financial Statements provides details on legal proceedings?</code> |
480
+ | <code>As of December 31, 2023, approximately $1.80 billion is available to be repatriated from Mainland China to the U.S.</code> | <code>What is the total amount of unrestricted cash available for repatriation from Mainland China to the U.S. as of the end of 2023?</code> |
481
+ | <code>Bank deposits amounted to $289,953 million as of December 31, 2023.</code> | <code>What was the balance of bank deposits at Charles Schwab Corporation as of December 31, 2023?</code> |
482
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
483
+ ```json
484
+ {
485
+ "loss": "MultipleNegativesRankingLoss",
486
+ "matryoshka_dims": [
487
+ 768,
488
+ 512,
489
+ 256,
490
+ 128,
491
+ 64
492
+ ],
493
+ "matryoshka_weights": [
494
+ 1,
495
+ 1,
496
+ 1,
497
+ 1,
498
+ 1
499
+ ],
500
+ "n_dims_per_step": -1
501
+ }
502
+ ```
503
+
504
+ ### Training Hyperparameters
505
+ #### Non-Default Hyperparameters
506
+
507
+ - `eval_strategy`: epoch
508
+ - `per_device_train_batch_size`: 32
509
+ - `per_device_eval_batch_size`: 16
510
+ - `gradient_accumulation_steps`: 16
511
+ - `learning_rate`: 2e-05
512
+ - `num_train_epochs`: 4
513
+ - `lr_scheduler_type`: cosine
514
+ - `warmup_ratio`: 0.1
515
+ - `bf16`: True
516
+ - `tf32`: True
517
+ - `load_best_model_at_end`: True
518
+ - `optim`: adamw_torch_fused
519
+ - `batch_sampler`: no_duplicates
520
+
521
+ #### All Hyperparameters
522
+ <details><summary>Click to expand</summary>
523
+
524
+ - `overwrite_output_dir`: False
525
+ - `do_predict`: False
526
+ - `eval_strategy`: epoch
527
+ - `prediction_loss_only`: True
528
+ - `per_device_train_batch_size`: 32
529
+ - `per_device_eval_batch_size`: 16
530
+ - `per_gpu_train_batch_size`: None
531
+ - `per_gpu_eval_batch_size`: None
532
+ - `gradient_accumulation_steps`: 16
533
+ - `eval_accumulation_steps`: None
534
+ - `learning_rate`: 2e-05
535
+ - `weight_decay`: 0.0
536
+ - `adam_beta1`: 0.9
537
+ - `adam_beta2`: 0.999
538
+ - `adam_epsilon`: 1e-08
539
+ - `max_grad_norm`: 1.0
540
+ - `num_train_epochs`: 4
541
+ - `max_steps`: -1
542
+ - `lr_scheduler_type`: cosine
543
+ - `lr_scheduler_kwargs`: {}
544
+ - `warmup_ratio`: 0.1
545
+ - `warmup_steps`: 0
546
+ - `log_level`: passive
547
+ - `log_level_replica`: warning
548
+ - `log_on_each_node`: True
549
+ - `logging_nan_inf_filter`: True
550
+ - `save_safetensors`: True
551
+ - `save_on_each_node`: False
552
+ - `save_only_model`: False
553
+ - `restore_callback_states_from_checkpoint`: False
554
+ - `no_cuda`: False
555
+ - `use_cpu`: False
556
+ - `use_mps_device`: False
557
+ - `seed`: 42
558
+ - `data_seed`: None
559
+ - `jit_mode_eval`: False
560
+ - `use_ipex`: False
561
+ - `bf16`: True
562
+ - `fp16`: False
563
+ - `fp16_opt_level`: O1
564
+ - `half_precision_backend`: auto
565
+ - `bf16_full_eval`: False
566
+ - `fp16_full_eval`: False
567
+ - `tf32`: True
568
+ - `local_rank`: 0
569
+ - `ddp_backend`: None
570
+ - `tpu_num_cores`: None
571
+ - `tpu_metrics_debug`: False
572
+ - `debug`: []
573
+ - `dataloader_drop_last`: False
574
+ - `dataloader_num_workers`: 0
575
+ - `dataloader_prefetch_factor`: None
576
+ - `past_index`: -1
577
+ - `disable_tqdm`: False
578
+ - `remove_unused_columns`: True
579
+ - `label_names`: None
580
+ - `load_best_model_at_end`: True
581
+ - `ignore_data_skip`: False
582
+ - `fsdp`: []
583
+ - `fsdp_min_num_params`: 0
584
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
585
+ - `fsdp_transformer_layer_cls_to_wrap`: None
586
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
587
+ - `deepspeed`: None
588
+ - `label_smoothing_factor`: 0.0
589
+ - `optim`: adamw_torch_fused
590
+ - `optim_args`: None
591
+ - `adafactor`: False
592
+ - `group_by_length`: False
593
+ - `length_column_name`: length
594
+ - `ddp_find_unused_parameters`: None
595
+ - `ddp_bucket_cap_mb`: None
596
+ - `ddp_broadcast_buffers`: False
597
+ - `dataloader_pin_memory`: True
598
+ - `dataloader_persistent_workers`: False
599
+ - `skip_memory_metrics`: True
600
+ - `use_legacy_prediction_loop`: False
601
+ - `push_to_hub`: False
602
+ - `resume_from_checkpoint`: None
603
+ - `hub_model_id`: None
604
+ - `hub_strategy`: every_save
605
+ - `hub_private_repo`: False
606
+ - `hub_always_push`: False
607
+ - `gradient_checkpointing`: False
608
+ - `gradient_checkpointing_kwargs`: None
609
+ - `include_inputs_for_metrics`: False
610
+ - `eval_do_concat_batches`: True
611
+ - `fp16_backend`: auto
612
+ - `push_to_hub_model_id`: None
613
+ - `push_to_hub_organization`: None
614
+ - `mp_parameters`:
615
+ - `auto_find_batch_size`: False
616
+ - `full_determinism`: False
617
+ - `torchdynamo`: None
618
+ - `ray_scope`: last
619
+ - `ddp_timeout`: 1800
620
+ - `torch_compile`: False
621
+ - `torch_compile_backend`: None
622
+ - `torch_compile_mode`: None
623
+ - `dispatch_batches`: None
624
+ - `split_batches`: None
625
+ - `include_tokens_per_second`: False
626
+ - `include_num_input_tokens_seen`: False
627
+ - `neftune_noise_alpha`: None
628
+ - `optim_target_modules`: None
629
+ - `batch_eval_metrics`: False
630
+ - `prompts`: None
631
+ - `batch_sampler`: no_duplicates
632
+ - `multi_dataset_batch_sampler`: proportional
633
+
634
+ </details>
635
+
636
+ ### Training Logs
637
+ | Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
638
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
639
+ | 0.8122 | 10 | 1.5517 | - | - | - | - | - |
640
+ | 0.9746 | 12 | - | 0.7830 | 0.7842 | 0.7814 | 0.7623 | 0.7215 |
641
+ | 1.6244 | 20 | 0.6616 | - | - | - | - | - |
642
+ | 1.9492 | 24 | - | 0.7918 | 0.7924 | 0.7884 | 0.7737 | 0.7429 |
643
+ | 2.4365 | 30 | 0.46 | - | - | - | - | - |
644
+ | 2.9239 | 36 | - | 0.7941 | 0.7920 | 0.7930 | 0.7764 | 0.7482 |
645
+ | 3.2487 | 40 | 0.3917 | - | - | - | - | - |
646
+ | **3.8985** | **48** | **-** | **0.7949** | **0.7936** | **0.7926** | **0.7767** | **0.7512** |
647
+
648
+ * The bold row denotes the saved checkpoint.
649
+
650
+ ### Framework Versions
651
+ - Python: 3.10.12
652
+ - Sentence Transformers: 3.3.1
653
+ - Transformers: 4.41.2
654
+ - PyTorch: 2.1.2+cu121
655
+ - Accelerate: 0.34.2
656
+ - Datasets: 2.19.1
657
+ - Tokenizers: 0.19.1
658
+
659
+ ## Citation
660
+
661
+ ### BibTeX
662
+
663
+ #### Sentence Transformers
664
+ ```bibtex
665
+ @inproceedings{reimers-2019-sentence-bert,
666
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
667
+ author = "Reimers, Nils and Gurevych, Iryna",
668
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
669
+ month = "11",
670
+ year = "2019",
671
+ publisher = "Association for Computational Linguistics",
672
+ url = "https://arxiv.org/abs/1908.10084",
673
+ }
674
+ ```
675
+
676
+ #### MatryoshkaLoss
677
+ ```bibtex
678
+ @misc{kusupati2024matryoshka,
679
+ title={Matryoshka Representation Learning},
680
+ 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},
681
+ year={2024},
682
+ eprint={2205.13147},
683
+ archivePrefix={arXiv},
684
+ primaryClass={cs.LG}
685
+ }
686
+ ```
687
+
688
+ #### MultipleNegativesRankingLoss
689
+ ```bibtex
690
+ @misc{henderson2017efficient,
691
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
692
+ 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},
693
+ year={2017},
694
+ eprint={1705.00652},
695
+ archivePrefix={arXiv},
696
+ primaryClass={cs.CL}
697
+ }
698
+ ```
699
+
700
+ <!--
701
+ ## Glossary
702
+
703
+ *Clearly define terms in order to be accessible across audiences.*
704
+ -->
705
+
706
+ <!--
707
+ ## Model Card Authors
708
+
709
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
710
+ -->
711
+
712
+ <!--
713
+ ## Model Card Contact
714
+
715
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
716
+ -->
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.3.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17e5ff4be59fe68b9e012dc083fe5b7810c7623dd937dbfd203680fd908b1954
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