Chuangmail commited on
Commit
b4fd8c5
·
verified ·
1 Parent(s): 8b077a2

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,815 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:6300
11
+ - loss:MatryoshkaLoss
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: BAAI/bge-base-en-v1.5
14
+ widget:
15
+ - source_sentence: What was Iron Mountain's physical records retention rate approximately
16
+ 15 years after entry into their facilities?
17
+ sentences:
18
+ - Garmin Connect and Garmin Connect Mobile are web and mobile platforms where users
19
+ can track and analyze their fitness, activities and workouts, and wellness data.
20
+ - More than 50% of physical records that entered Iron Mountain's facilities approximately
21
+ 15 years ago are still there today.
22
+ - In the first quarter of 2023, the divestiture of the company’s Longwall business
23
+ was finalized, resulting in an unfavorable impact to operating profit of $586
24
+ million, primarily a non-cash item driven by the release of accumulated foreign
25
+ currency translation.
26
+ - source_sentence: How much did the company's currently payable U.S. taxes amount
27
+ to in 2023?
28
+ sentences:
29
+ - In 2023, the currently payable U.S. taxes amounted to $2,705 million.
30
+ - The Company expects to realize at least $500 million of incremental run-rate cost
31
+ savings in addition to integration synergies.
32
+ - During fiscal year 2023, we returned $210 million through our quarterly cash dividend
33
+ program which was initiated in November 2020.
34
+ - source_sentence: What was the percentage decline in GMS for the year ended December
35
+ 31, 2023 compared to 2022?
36
+ sentences:
37
+ - The Gross Merchandise Sales (GMS) decreased by 1.2% in 2023 compared to 2022.
38
+ - If, in the future, foreign exchange or capital control restrictions were to be
39
+ imposed and become applicable to us, such restrictions could potentially reduce
40
+ the amounts that we would be able to receive from our Macao, Hong Kong and mainland
41
+ China subsidiaries.
42
+ - Net cash provided by operating activities decreased by $2.0 billion in fiscal
43
+ 2022 compared to fiscal 2021.
44
+ - source_sentence: What was the operating income for the year 2023?
45
+ sentences:
46
+ - Effective January 1, 2021, CSC changed the designation of its corporate headquarters
47
+ from San Francisco, California to Westlake, Texas.
48
+ - The operating income for the year 2023 was reported as -$74.3 million.
49
+ - Table 12 shows that the total risk-weighted assets under Basel 3 for credit risk
50
+ at Bank of America amounted to $1,580 billion as of December 31, 2023.
51
+ - source_sentence: What was the total amount of tax incurred, collected, and remitted
52
+ by AT&T in 2023?
53
+ sentences:
54
+ - For example, in response to regulatory developments in Europe, we announced plans
55
+ to change the legal basis for behavioral advertising on Facebook and Instagram
56
+ in the EU, EEA, and Switzerland from "legitimate interests" to "consent," and
57
+ in November 2023 we began offering users in the region a "subscription for no
58
+ ads" alternative.
59
+ - Professional services expenses decreased $8 million in 2023 from 2022 primarily
60
+ due to lower consulting expenses related to bringing certain mortgage technology-related
61
+ costs in-house, partially offset by higher legal expenses primarily related to
62
+ the Black Knight acquisition.
63
+ - Total taxes incurred, collected and remitted by AT&T during 2023 were $16,877.
64
+ pipeline_tag: sentence-similarity
65
+ library_name: sentence-transformers
66
+ metrics:
67
+ - cosine_accuracy@1
68
+ - cosine_accuracy@3
69
+ - cosine_accuracy@5
70
+ - cosine_accuracy@10
71
+ - cosine_precision@1
72
+ - cosine_precision@3
73
+ - cosine_precision@5
74
+ - cosine_precision@10
75
+ - cosine_recall@1
76
+ - cosine_recall@3
77
+ - cosine_recall@5
78
+ - cosine_recall@10
79
+ - cosine_ndcg@10
80
+ - cosine_mrr@10
81
+ - cosine_map@100
82
+ model-index:
83
+ - name: BGE base Financial Matryoshka
84
+ results:
85
+ - task:
86
+ type: information-retrieval
87
+ name: Information Retrieval
88
+ dataset:
89
+ name: dim 768
90
+ type: dim_768
91
+ metrics:
92
+ - type: cosine_accuracy@1
93
+ value: 0.6771428571428572
94
+ name: Cosine Accuracy@1
95
+ - type: cosine_accuracy@3
96
+ value: 0.8328571428571429
97
+ name: Cosine Accuracy@3
98
+ - type: cosine_accuracy@5
99
+ value: 0.8614285714285714
100
+ name: Cosine Accuracy@5
101
+ - type: cosine_accuracy@10
102
+ value: 0.9085714285714286
103
+ name: Cosine Accuracy@10
104
+ - type: cosine_precision@1
105
+ value: 0.6771428571428572
106
+ name: Cosine Precision@1
107
+ - type: cosine_precision@3
108
+ value: 0.2776190476190476
109
+ name: Cosine Precision@3
110
+ - type: cosine_precision@5
111
+ value: 0.17228571428571426
112
+ name: Cosine Precision@5
113
+ - type: cosine_precision@10
114
+ value: 0.09085714285714284
115
+ name: Cosine Precision@10
116
+ - type: cosine_recall@1
117
+ value: 0.6771428571428572
118
+ name: Cosine Recall@1
119
+ - type: cosine_recall@3
120
+ value: 0.8328571428571429
121
+ name: Cosine Recall@3
122
+ - type: cosine_recall@5
123
+ value: 0.8614285714285714
124
+ name: Cosine Recall@5
125
+ - type: cosine_recall@10
126
+ value: 0.9085714285714286
127
+ name: Cosine Recall@10
128
+ - type: cosine_ndcg@10
129
+ value: 0.7950953946105658
130
+ name: Cosine Ndcg@10
131
+ - type: cosine_mrr@10
132
+ value: 0.7584574829931973
133
+ name: Cosine Mrr@10
134
+ - type: cosine_map@100
135
+ value: 0.7618150097795325
136
+ name: Cosine Map@100
137
+ - task:
138
+ type: information-retrieval
139
+ name: Information Retrieval
140
+ dataset:
141
+ name: dim 512
142
+ type: dim_512
143
+ metrics:
144
+ - type: cosine_accuracy@1
145
+ value: 0.6785714285714286
146
+ name: Cosine Accuracy@1
147
+ - type: cosine_accuracy@3
148
+ value: 0.8257142857142857
149
+ name: Cosine Accuracy@3
150
+ - type: cosine_accuracy@5
151
+ value: 0.8642857142857143
152
+ name: Cosine Accuracy@5
153
+ - type: cosine_accuracy@10
154
+ value: 0.9014285714285715
155
+ name: Cosine Accuracy@10
156
+ - type: cosine_precision@1
157
+ value: 0.6785714285714286
158
+ name: Cosine Precision@1
159
+ - type: cosine_precision@3
160
+ value: 0.2752380952380952
161
+ name: Cosine Precision@3
162
+ - type: cosine_precision@5
163
+ value: 0.17285714285714282
164
+ name: Cosine Precision@5
165
+ - type: cosine_precision@10
166
+ value: 0.09014285714285714
167
+ name: Cosine Precision@10
168
+ - type: cosine_recall@1
169
+ value: 0.6785714285714286
170
+ name: Cosine Recall@1
171
+ - type: cosine_recall@3
172
+ value: 0.8257142857142857
173
+ name: Cosine Recall@3
174
+ - type: cosine_recall@5
175
+ value: 0.8642857142857143
176
+ name: Cosine Recall@5
177
+ - type: cosine_recall@10
178
+ value: 0.9014285714285715
179
+ name: Cosine Recall@10
180
+ - type: cosine_ndcg@10
181
+ value: 0.7927053640201507
182
+ name: Cosine Ndcg@10
183
+ - type: cosine_mrr@10
184
+ value: 0.7574620181405893
185
+ name: Cosine Mrr@10
186
+ - type: cosine_map@100
187
+ value: 0.7614007843308703
188
+ name: Cosine Map@100
189
+ - task:
190
+ type: information-retrieval
191
+ name: Information Retrieval
192
+ dataset:
193
+ name: dim 256
194
+ type: dim_256
195
+ metrics:
196
+ - type: cosine_accuracy@1
197
+ value: 0.68
198
+ name: Cosine Accuracy@1
199
+ - type: cosine_accuracy@3
200
+ value: 0.81
201
+ name: Cosine Accuracy@3
202
+ - type: cosine_accuracy@5
203
+ value: 0.8528571428571429
204
+ name: Cosine Accuracy@5
205
+ - type: cosine_accuracy@10
206
+ value: 0.8971428571428571
207
+ name: Cosine Accuracy@10
208
+ - type: cosine_precision@1
209
+ value: 0.68
210
+ name: Cosine Precision@1
211
+ - type: cosine_precision@3
212
+ value: 0.27
213
+ name: Cosine Precision@3
214
+ - type: cosine_precision@5
215
+ value: 0.17057142857142854
216
+ name: Cosine Precision@5
217
+ - type: cosine_precision@10
218
+ value: 0.0897142857142857
219
+ name: Cosine Precision@10
220
+ - type: cosine_recall@1
221
+ value: 0.68
222
+ name: Cosine Recall@1
223
+ - type: cosine_recall@3
224
+ value: 0.81
225
+ name: Cosine Recall@3
226
+ - type: cosine_recall@5
227
+ value: 0.8528571428571429
228
+ name: Cosine Recall@5
229
+ - type: cosine_recall@10
230
+ value: 0.8971428571428571
231
+ name: Cosine Recall@10
232
+ - type: cosine_ndcg@10
233
+ value: 0.7889658321825918
234
+ name: Cosine Ndcg@10
235
+ - type: cosine_mrr@10
236
+ value: 0.7541865079365075
237
+ name: Cosine Mrr@10
238
+ - type: cosine_map@100
239
+ value: 0.7582635867273656
240
+ name: Cosine Map@100
241
+ - task:
242
+ type: information-retrieval
243
+ name: Information Retrieval
244
+ dataset:
245
+ name: dim 128
246
+ type: dim_128
247
+ metrics:
248
+ - type: cosine_accuracy@1
249
+ value: 0.6614285714285715
250
+ name: Cosine Accuracy@1
251
+ - type: cosine_accuracy@3
252
+ value: 0.8
253
+ name: Cosine Accuracy@3
254
+ - type: cosine_accuracy@5
255
+ value: 0.8385714285714285
256
+ name: Cosine Accuracy@5
257
+ - type: cosine_accuracy@10
258
+ value: 0.8914285714285715
259
+ name: Cosine Accuracy@10
260
+ - type: cosine_precision@1
261
+ value: 0.6614285714285715
262
+ name: Cosine Precision@1
263
+ - type: cosine_precision@3
264
+ value: 0.26666666666666666
265
+ name: Cosine Precision@3
266
+ - type: cosine_precision@5
267
+ value: 0.16771428571428568
268
+ name: Cosine Precision@5
269
+ - type: cosine_precision@10
270
+ value: 0.08914285714285713
271
+ name: Cosine Precision@10
272
+ - type: cosine_recall@1
273
+ value: 0.6614285714285715
274
+ name: Cosine Recall@1
275
+ - type: cosine_recall@3
276
+ value: 0.8
277
+ name: Cosine Recall@3
278
+ - type: cosine_recall@5
279
+ value: 0.8385714285714285
280
+ name: Cosine Recall@5
281
+ - type: cosine_recall@10
282
+ value: 0.8914285714285715
283
+ name: Cosine Recall@10
284
+ - type: cosine_ndcg@10
285
+ value: 0.7751876221972102
286
+ name: Cosine Ndcg@10
287
+ - type: cosine_mrr@10
288
+ value: 0.7381241496598633
289
+ name: Cosine Mrr@10
290
+ - type: cosine_map@100
291
+ value: 0.7423110490736153
292
+ name: Cosine Map@100
293
+ - task:
294
+ type: information-retrieval
295
+ name: Information Retrieval
296
+ dataset:
297
+ name: dim 64
298
+ type: dim_64
299
+ metrics:
300
+ - type: cosine_accuracy@1
301
+ value: 0.6257142857142857
302
+ name: Cosine Accuracy@1
303
+ - type: cosine_accuracy@3
304
+ value: 0.78
305
+ name: Cosine Accuracy@3
306
+ - type: cosine_accuracy@5
307
+ value: 0.8214285714285714
308
+ name: Cosine Accuracy@5
309
+ - type: cosine_accuracy@10
310
+ value: 0.8728571428571429
311
+ name: Cosine Accuracy@10
312
+ - type: cosine_precision@1
313
+ value: 0.6257142857142857
314
+ name: Cosine Precision@1
315
+ - type: cosine_precision@3
316
+ value: 0.26
317
+ name: Cosine Precision@3
318
+ - type: cosine_precision@5
319
+ value: 0.16428571428571426
320
+ name: Cosine Precision@5
321
+ - type: cosine_precision@10
322
+ value: 0.08728571428571427
323
+ name: Cosine Precision@10
324
+ - type: cosine_recall@1
325
+ value: 0.6257142857142857
326
+ name: Cosine Recall@1
327
+ - type: cosine_recall@3
328
+ value: 0.78
329
+ name: Cosine Recall@3
330
+ - type: cosine_recall@5
331
+ value: 0.8214285714285714
332
+ name: Cosine Recall@5
333
+ - type: cosine_recall@10
334
+ value: 0.8728571428571429
335
+ name: Cosine Recall@10
336
+ - type: cosine_ndcg@10
337
+ value: 0.750742644383485
338
+ name: Cosine Ndcg@10
339
+ - type: cosine_mrr@10
340
+ value: 0.7114563492063489
341
+ name: Cosine Mrr@10
342
+ - type: cosine_map@100
343
+ value: 0.7163043069454876
344
+ name: Cosine Map@100
345
+ ---
346
+
347
+ # BGE base Financial Matryoshka
348
+
349
+ 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.
350
+
351
+ ## Model Details
352
+
353
+ ### Model Description
354
+ - **Model Type:** Sentence Transformer
355
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
356
+ - **Maximum Sequence Length:** 512 tokens
357
+ - **Output Dimensionality:** 768 tokens
358
+ - **Similarity Function:** Cosine Similarity
359
+ - **Training Dataset:**
360
+ - json
361
+ - **Language:** en
362
+ - **License:** apache-2.0
363
+
364
+ ### Model Sources
365
+
366
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
367
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
368
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
369
+
370
+ ### Full Model Architecture
371
+
372
+ ```
373
+ SentenceTransformer(
374
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
375
+ (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})
376
+ (2): Normalize()
377
+ )
378
+ ```
379
+
380
+ ## Usage
381
+
382
+ ### Direct Usage (Sentence Transformers)
383
+
384
+ First install the Sentence Transformers library:
385
+
386
+ ```bash
387
+ pip install -U sentence-transformers
388
+ ```
389
+
390
+ Then you can load this model and run inference.
391
+ ```python
392
+ from sentence_transformers import SentenceTransformer
393
+
394
+ # Download from the 🤗 Hub
395
+ model = SentenceTransformer("Chuangmail/bge-base-financial-matryoshka")
396
+ # Run inference
397
+ sentences = [
398
+ 'What was the total amount of tax incurred, collected, and remitted by AT&T in 2023?',
399
+ 'Total taxes incurred, collected and remitted by AT&T during 2023 were $16,877.',
400
+ 'Professional services expenses decreased $8 million in 2023 from 2022 primarily due to lower consulting expenses related to bringing certain mortgage technology-related costs in-house, partially offset by higher legal expenses primarily related to the Black Knight acquisition.',
401
+ ]
402
+ embeddings = model.encode(sentences)
403
+ print(embeddings.shape)
404
+ # [3, 768]
405
+
406
+ # Get the similarity scores for the embeddings
407
+ similarities = model.similarity(embeddings, embeddings)
408
+ print(similarities.shape)
409
+ # [3, 3]
410
+ ```
411
+
412
+ <!--
413
+ ### Direct Usage (Transformers)
414
+
415
+ <details><summary>Click to see the direct usage in Transformers</summary>
416
+
417
+ </details>
418
+ -->
419
+
420
+ <!--
421
+ ### Downstream Usage (Sentence Transformers)
422
+
423
+ You can finetune this model on your own dataset.
424
+
425
+ <details><summary>Click to expand</summary>
426
+
427
+ </details>
428
+ -->
429
+
430
+ <!--
431
+ ### Out-of-Scope Use
432
+
433
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
434
+ -->
435
+
436
+ ## Evaluation
437
+
438
+ ### Metrics
439
+
440
+ #### Information Retrieval
441
+ * Dataset: `dim_768`
442
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
443
+
444
+ | Metric | Value |
445
+ |:--------------------|:-----------|
446
+ | cosine_accuracy@1 | 0.6771 |
447
+ | cosine_accuracy@3 | 0.8329 |
448
+ | cosine_accuracy@5 | 0.8614 |
449
+ | cosine_accuracy@10 | 0.9086 |
450
+ | cosine_precision@1 | 0.6771 |
451
+ | cosine_precision@3 | 0.2776 |
452
+ | cosine_precision@5 | 0.1723 |
453
+ | cosine_precision@10 | 0.0909 |
454
+ | cosine_recall@1 | 0.6771 |
455
+ | cosine_recall@3 | 0.8329 |
456
+ | cosine_recall@5 | 0.8614 |
457
+ | cosine_recall@10 | 0.9086 |
458
+ | cosine_ndcg@10 | 0.7951 |
459
+ | cosine_mrr@10 | 0.7585 |
460
+ | **cosine_map@100** | **0.7618** |
461
+
462
+ #### Information Retrieval
463
+ * Dataset: `dim_512`
464
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
465
+
466
+ | Metric | Value |
467
+ |:--------------------|:-----------|
468
+ | cosine_accuracy@1 | 0.6786 |
469
+ | cosine_accuracy@3 | 0.8257 |
470
+ | cosine_accuracy@5 | 0.8643 |
471
+ | cosine_accuracy@10 | 0.9014 |
472
+ | cosine_precision@1 | 0.6786 |
473
+ | cosine_precision@3 | 0.2752 |
474
+ | cosine_precision@5 | 0.1729 |
475
+ | cosine_precision@10 | 0.0901 |
476
+ | cosine_recall@1 | 0.6786 |
477
+ | cosine_recall@3 | 0.8257 |
478
+ | cosine_recall@5 | 0.8643 |
479
+ | cosine_recall@10 | 0.9014 |
480
+ | cosine_ndcg@10 | 0.7927 |
481
+ | cosine_mrr@10 | 0.7575 |
482
+ | **cosine_map@100** | **0.7614** |
483
+
484
+ #### Information Retrieval
485
+ * Dataset: `dim_256`
486
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
487
+
488
+ | Metric | Value |
489
+ |:--------------------|:-----------|
490
+ | cosine_accuracy@1 | 0.68 |
491
+ | cosine_accuracy@3 | 0.81 |
492
+ | cosine_accuracy@5 | 0.8529 |
493
+ | cosine_accuracy@10 | 0.8971 |
494
+ | cosine_precision@1 | 0.68 |
495
+ | cosine_precision@3 | 0.27 |
496
+ | cosine_precision@5 | 0.1706 |
497
+ | cosine_precision@10 | 0.0897 |
498
+ | cosine_recall@1 | 0.68 |
499
+ | cosine_recall@3 | 0.81 |
500
+ | cosine_recall@5 | 0.8529 |
501
+ | cosine_recall@10 | 0.8971 |
502
+ | cosine_ndcg@10 | 0.789 |
503
+ | cosine_mrr@10 | 0.7542 |
504
+ | **cosine_map@100** | **0.7583** |
505
+
506
+ #### Information Retrieval
507
+ * Dataset: `dim_128`
508
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
509
+
510
+ | Metric | Value |
511
+ |:--------------------|:-----------|
512
+ | cosine_accuracy@1 | 0.6614 |
513
+ | cosine_accuracy@3 | 0.8 |
514
+ | cosine_accuracy@5 | 0.8386 |
515
+ | cosine_accuracy@10 | 0.8914 |
516
+ | cosine_precision@1 | 0.6614 |
517
+ | cosine_precision@3 | 0.2667 |
518
+ | cosine_precision@5 | 0.1677 |
519
+ | cosine_precision@10 | 0.0891 |
520
+ | cosine_recall@1 | 0.6614 |
521
+ | cosine_recall@3 | 0.8 |
522
+ | cosine_recall@5 | 0.8386 |
523
+ | cosine_recall@10 | 0.8914 |
524
+ | cosine_ndcg@10 | 0.7752 |
525
+ | cosine_mrr@10 | 0.7381 |
526
+ | **cosine_map@100** | **0.7423** |
527
+
528
+ #### Information Retrieval
529
+ * Dataset: `dim_64`
530
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
531
+
532
+ | Metric | Value |
533
+ |:--------------------|:-----------|
534
+ | cosine_accuracy@1 | 0.6257 |
535
+ | cosine_accuracy@3 | 0.78 |
536
+ | cosine_accuracy@5 | 0.8214 |
537
+ | cosine_accuracy@10 | 0.8729 |
538
+ | cosine_precision@1 | 0.6257 |
539
+ | cosine_precision@3 | 0.26 |
540
+ | cosine_precision@5 | 0.1643 |
541
+ | cosine_precision@10 | 0.0873 |
542
+ | cosine_recall@1 | 0.6257 |
543
+ | cosine_recall@3 | 0.78 |
544
+ | cosine_recall@5 | 0.8214 |
545
+ | cosine_recall@10 | 0.8729 |
546
+ | cosine_ndcg@10 | 0.7507 |
547
+ | cosine_mrr@10 | 0.7115 |
548
+ | **cosine_map@100** | **0.7163** |
549
+
550
+ <!--
551
+ ## Bias, Risks and Limitations
552
+
553
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
554
+ -->
555
+
556
+ <!--
557
+ ### Recommendations
558
+
559
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
560
+ -->
561
+
562
+ ## Training Details
563
+
564
+ ### Training Dataset
565
+
566
+ #### json
567
+
568
+ * Dataset: json
569
+ * Size: 6,300 training samples
570
+ * Columns: <code>anchor</code> and <code>positive</code>
571
+ * Approximate statistics based on the first 1000 samples:
572
+ | | anchor | positive |
573
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
574
+ | type | string | string |
575
+ | details | <ul><li>min: 2 tokens</li><li>mean: 20.39 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 46.37 tokens</li><li>max: 326 tokens</li></ul> |
576
+ * Samples:
577
+ | anchor | positive |
578
+ |:---------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
579
+ | <code>What are the key factors HP considers when making adjustments to inventory valuation?</code> | <code>HP makes adjustments to inventory valuation based on considerations of changes in demand, technological changes, supply constraints, product life cycle, component cost trends, product pricing, and quality issues.</code> |
580
+ | <code>What types of products does AbbVie's portfolio include?</code> | <code>AbbVie is a global, diversified research-based biopharmaceutical company with a comprehensive product portfolio that has leadership positions across immunology, oncology, aesthetics, neuroscience, and eye care.</code> |
581
+ | <code>What does IBM’s 2023 Annual Report to Stockholders include?</code> | <code>IBM's 2023 Annual Report to Stockholders includes their financial statements and supplementary data, which span from pages 44 to 121 and are incorporated by reference in the Form 10-K. Additionally, the financial statement schedule can be found on page S-1 of the same Form 10-K.</code> |
582
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
583
+ ```json
584
+ {
585
+ "loss": "MultipleNegativesRankingLoss",
586
+ "matryoshka_dims": [
587
+ 768,
588
+ 512,
589
+ 256,
590
+ 128,
591
+ 64
592
+ ],
593
+ "matryoshka_weights": [
594
+ 1,
595
+ 1,
596
+ 1,
597
+ 1,
598
+ 1
599
+ ],
600
+ "n_dims_per_step": -1
601
+ }
602
+ ```
603
+
604
+ ### Training Hyperparameters
605
+ #### Non-Default Hyperparameters
606
+
607
+ - `eval_strategy`: epoch
608
+ - `per_device_train_batch_size`: 32
609
+ - `per_device_eval_batch_size`: 16
610
+ - `gradient_accumulation_steps`: 16
611
+ - `learning_rate`: 2e-05
612
+ - `num_train_epochs`: 4
613
+ - `lr_scheduler_type`: cosine
614
+ - `warmup_ratio`: 0.1
615
+ - `bf16`: True
616
+ - `tf32`: True
617
+ - `load_best_model_at_end`: True
618
+ - `optim`: adamw_torch_fused
619
+ - `batch_sampler`: no_duplicates
620
+
621
+ #### All Hyperparameters
622
+ <details><summary>Click to expand</summary>
623
+
624
+ - `overwrite_output_dir`: False
625
+ - `do_predict`: False
626
+ - `eval_strategy`: epoch
627
+ - `prediction_loss_only`: True
628
+ - `per_device_train_batch_size`: 32
629
+ - `per_device_eval_batch_size`: 16
630
+ - `per_gpu_train_batch_size`: None
631
+ - `per_gpu_eval_batch_size`: None
632
+ - `gradient_accumulation_steps`: 16
633
+ - `eval_accumulation_steps`: None
634
+ - `learning_rate`: 2e-05
635
+ - `weight_decay`: 0.0
636
+ - `adam_beta1`: 0.9
637
+ - `adam_beta2`: 0.999
638
+ - `adam_epsilon`: 1e-08
639
+ - `max_grad_norm`: 1.0
640
+ - `num_train_epochs`: 4
641
+ - `max_steps`: -1
642
+ - `lr_scheduler_type`: cosine
643
+ - `lr_scheduler_kwargs`: {}
644
+ - `warmup_ratio`: 0.1
645
+ - `warmup_steps`: 0
646
+ - `log_level`: passive
647
+ - `log_level_replica`: warning
648
+ - `log_on_each_node`: True
649
+ - `logging_nan_inf_filter`: True
650
+ - `save_safetensors`: True
651
+ - `save_on_each_node`: False
652
+ - `save_only_model`: False
653
+ - `restore_callback_states_from_checkpoint`: False
654
+ - `no_cuda`: False
655
+ - `use_cpu`: False
656
+ - `use_mps_device`: False
657
+ - `seed`: 42
658
+ - `data_seed`: None
659
+ - `jit_mode_eval`: False
660
+ - `use_ipex`: False
661
+ - `bf16`: True
662
+ - `fp16`: False
663
+ - `fp16_opt_level`: O1
664
+ - `half_precision_backend`: auto
665
+ - `bf16_full_eval`: False
666
+ - `fp16_full_eval`: False
667
+ - `tf32`: True
668
+ - `local_rank`: 0
669
+ - `ddp_backend`: None
670
+ - `tpu_num_cores`: None
671
+ - `tpu_metrics_debug`: False
672
+ - `debug`: []
673
+ - `dataloader_drop_last`: False
674
+ - `dataloader_num_workers`: 0
675
+ - `dataloader_prefetch_factor`: None
676
+ - `past_index`: -1
677
+ - `disable_tqdm`: False
678
+ - `remove_unused_columns`: True
679
+ - `label_names`: None
680
+ - `load_best_model_at_end`: True
681
+ - `ignore_data_skip`: False
682
+ - `fsdp`: []
683
+ - `fsdp_min_num_params`: 0
684
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
685
+ - `fsdp_transformer_layer_cls_to_wrap`: None
686
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
687
+ - `deepspeed`: None
688
+ - `label_smoothing_factor`: 0.0
689
+ - `optim`: adamw_torch_fused
690
+ - `optim_args`: None
691
+ - `adafactor`: False
692
+ - `group_by_length`: False
693
+ - `length_column_name`: length
694
+ - `ddp_find_unused_parameters`: None
695
+ - `ddp_bucket_cap_mb`: None
696
+ - `ddp_broadcast_buffers`: False
697
+ - `dataloader_pin_memory`: True
698
+ - `dataloader_persistent_workers`: False
699
+ - `skip_memory_metrics`: True
700
+ - `use_legacy_prediction_loop`: False
701
+ - `push_to_hub`: False
702
+ - `resume_from_checkpoint`: None
703
+ - `hub_model_id`: None
704
+ - `hub_strategy`: every_save
705
+ - `hub_private_repo`: False
706
+ - `hub_always_push`: False
707
+ - `gradient_checkpointing`: False
708
+ - `gradient_checkpointing_kwargs`: None
709
+ - `include_inputs_for_metrics`: False
710
+ - `eval_do_concat_batches`: True
711
+ - `fp16_backend`: auto
712
+ - `push_to_hub_model_id`: None
713
+ - `push_to_hub_organization`: None
714
+ - `mp_parameters`:
715
+ - `auto_find_batch_size`: False
716
+ - `full_determinism`: False
717
+ - `torchdynamo`: None
718
+ - `ray_scope`: last
719
+ - `ddp_timeout`: 1800
720
+ - `torch_compile`: False
721
+ - `torch_compile_backend`: None
722
+ - `torch_compile_mode`: None
723
+ - `dispatch_batches`: None
724
+ - `split_batches`: None
725
+ - `include_tokens_per_second`: False
726
+ - `include_num_input_tokens_seen`: False
727
+ - `neftune_noise_alpha`: None
728
+ - `optim_target_modules`: None
729
+ - `batch_eval_metrics`: False
730
+ - `batch_sampler`: no_duplicates
731
+ - `multi_dataset_batch_sampler`: proportional
732
+
733
+ </details>
734
+
735
+ ### Training Logs
736
+ | 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 |
737
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
738
+ | 0.8122 | 10 | 1.6191 | - | - | - | - | - |
739
+ | 0.9746 | 12 | - | 0.7267 | 0.7355 | 0.7447 | 0.6939 | 0.7453 |
740
+ | 1.6244 | 20 | 0.6415 | - | - | - | - | - |
741
+ | 1.9492 | 24 | - | 0.7358 | 0.7509 | 0.7548 | 0.7075 | 0.7554 |
742
+ | 2.4365 | 30 | 0.4638 | - | - | - | - | - |
743
+ | 2.9239 | 36 | - | 0.7398 | 0.7573 | 0.7607 | 0.7124 | 0.7601 |
744
+ | 3.2487 | 40 | 0.4083 | - | - | - | - | - |
745
+ | **3.8985** | **48** | **-** | **0.7423** | **0.7583** | **0.7614** | **0.7163** | **0.7618** |
746
+
747
+ * The bold row denotes the saved checkpoint.
748
+
749
+ ### Framework Versions
750
+ - Python: 3.11.11
751
+ - Sentence Transformers: 3.1.0
752
+ - Transformers: 4.41.2
753
+ - PyTorch: 2.1.2+cu121
754
+ - Accelerate: 1.3.0
755
+ - Datasets: 2.19.1
756
+ - Tokenizers: 0.19.1
757
+
758
+ ## Citation
759
+
760
+ ### BibTeX
761
+
762
+ #### Sentence Transformers
763
+ ```bibtex
764
+ @inproceedings{reimers-2019-sentence-bert,
765
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
766
+ author = "Reimers, Nils and Gurevych, Iryna",
767
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
768
+ month = "11",
769
+ year = "2019",
770
+ publisher = "Association for Computational Linguistics",
771
+ url = "https://arxiv.org/abs/1908.10084",
772
+ }
773
+ ```
774
+
775
+ #### MatryoshkaLoss
776
+ ```bibtex
777
+ @misc{kusupati2024matryoshka,
778
+ title={Matryoshka Representation Learning},
779
+ 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},
780
+ year={2024},
781
+ eprint={2205.13147},
782
+ archivePrefix={arXiv},
783
+ primaryClass={cs.LG}
784
+ }
785
+ ```
786
+
787
+ #### MultipleNegativesRankingLoss
788
+ ```bibtex
789
+ @misc{henderson2017efficient,
790
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
791
+ 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},
792
+ year={2017},
793
+ eprint={1705.00652},
794
+ archivePrefix={arXiv},
795
+ primaryClass={cs.CL}
796
+ }
797
+ ```
798
+
799
+ <!--
800
+ ## Glossary
801
+
802
+ *Clearly define terms in order to be accessible across audiences.*
803
+ -->
804
+
805
+ <!--
806
+ ## Model Card Authors
807
+
808
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
809
+ -->
810
+
811
+ <!--
812
+ ## Model Card Contact
813
+
814
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
815
+ -->
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:d7b8454590735cde144395ce3fc5ced8d936ef49ae2e8cdb0ad62a60747887fb
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