dustyatx commited on
Commit
f9d46fc
1 Parent(s): 08652a7

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,817 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-base-en-v1.5
3
+ datasets: []
4
+ language:
5
+ - en
6
+ library_name: sentence-transformers
7
+ license: apache-2.0
8
+ metrics:
9
+ - cosine_accuracy@1
10
+ - cosine_accuracy@3
11
+ - cosine_accuracy@5
12
+ - cosine_accuracy@10
13
+ - cosine_precision@1
14
+ - cosine_precision@3
15
+ - cosine_precision@5
16
+ - cosine_precision@10
17
+ - cosine_recall@1
18
+ - cosine_recall@3
19
+ - cosine_recall@5
20
+ - cosine_recall@10
21
+ - cosine_ndcg@10
22
+ - cosine_mrr@10
23
+ - cosine_map@100
24
+ pipeline_tag: sentence-similarity
25
+ tags:
26
+ - sentence-transformers
27
+ - sentence-similarity
28
+ - feature-extraction
29
+ - generated_from_trainer
30
+ - dataset_size:6300
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: Total net additions to property and equipment for AWS in 2023 amounted
35
+ to $24,843 million.
36
+ sentences:
37
+ - What technological feature helps protect digital transactions in the Visa Token
38
+ Service?
39
+ - What was the total net addition to property and equipment for AWS in the year
40
+ 2023?
41
+ - By what proportion did net cash used in financing activities increase from 2022
42
+ to 2023?
43
+ - source_sentence: 'Leases generally contain one or more of the following options,
44
+ which the Company can exercise at the end of the initial term: (a) renew the lease
45
+ for a defined number of years at the then-fair market rental rate or rate stipulated
46
+ in the lease agreement; (b) purchase the property at the then-fair market value
47
+ or purchase price stated in the agreement; or (c) a right of first refusal in
48
+ the event of a third-party offer.'
49
+ sentences:
50
+ - What are the requirements for health insurers and group health plans in providing
51
+ cost estimates to consumers?
52
+ - What options does the company have at the end of the lease term for their leased
53
+ properties?
54
+ - How much did the company incur in intangible amortization costs related to the
55
+ eOne acquisition in 2022?
56
+ - source_sentence: We recorded an acquisition termination cost of $1.35 billion in
57
+ fiscal year 2023 reflecting the write-off of the prepayment provided at signing.
58
+ sentences:
59
+ - How much did NVIDIA record as an acquisition termination cost in fiscal year 2023
60
+ related to the Arm Share Purchase Agreement?
61
+ - What is included in the consolidated financial statements and accompanying notes
62
+ mentioned in Part IV, Item 15(a)(1) of the Annual Report on Form 10-K?
63
+ - What risks are associated with projecting the effectiveness of internal controls
64
+ into future periods as mentioned?
65
+ - source_sentence: Item 8 is labeled as Financial Statements and Supplementary Data.
66
+ sentences:
67
+ - What was the percentage of trading days in 2023 where trading-related revenue
68
+ was recorded as positive?
69
+ - How is the discount rate for the Family Dollar goodwill impairment evaluation
70
+ determined?
71
+ - What is the title of Item 8 in the financial document?
72
+ - source_sentence: Details about legal proceedings are included in Part II, Item 8,
73
+ "Financial Statements and Supplementary Data" of the Annual Report on Form 10-K,
74
+ under the caption "Legal Proceedings".
75
+ sentences:
76
+ - Where can details about legal proceedings be located in an Annual Report on Form
77
+ 10-K?
78
+ - How many stores did AutoZone operate in the United States as of August 26, 2023?
79
+ - In the context of Hewlett Packard Enterprise's recent financial discussions, what
80
+ factors are expected to impact their operational costs and revenue growth moving
81
+ forward?
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.7071428571428572
94
+ name: Cosine Accuracy@1
95
+ - type: cosine_accuracy@3
96
+ value: 0.8414285714285714
97
+ name: Cosine Accuracy@3
98
+ - type: cosine_accuracy@5
99
+ value: 0.88
100
+ name: Cosine Accuracy@5
101
+ - type: cosine_accuracy@10
102
+ value: 0.9314285714285714
103
+ name: Cosine Accuracy@10
104
+ - type: cosine_precision@1
105
+ value: 0.7071428571428572
106
+ name: Cosine Precision@1
107
+ - type: cosine_precision@3
108
+ value: 0.28047619047619043
109
+ name: Cosine Precision@3
110
+ - type: cosine_precision@5
111
+ value: 0.176
112
+ name: Cosine Precision@5
113
+ - type: cosine_precision@10
114
+ value: 0.09314285714285712
115
+ name: Cosine Precision@10
116
+ - type: cosine_recall@1
117
+ value: 0.7071428571428572
118
+ name: Cosine Recall@1
119
+ - type: cosine_recall@3
120
+ value: 0.8414285714285714
121
+ name: Cosine Recall@3
122
+ - type: cosine_recall@5
123
+ value: 0.88
124
+ name: Cosine Recall@5
125
+ - type: cosine_recall@10
126
+ value: 0.9314285714285714
127
+ name: Cosine Recall@10
128
+ - type: cosine_ndcg@10
129
+ value: 0.8207437059171859
130
+ name: Cosine Ndcg@10
131
+ - type: cosine_mrr@10
132
+ value: 0.7853486394557823
133
+ name: Cosine Mrr@10
134
+ - type: cosine_map@100
135
+ value: 0.7881907906804949
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.6957142857142857
146
+ name: Cosine Accuracy@1
147
+ - type: cosine_accuracy@3
148
+ value: 0.8385714285714285
149
+ name: Cosine Accuracy@3
150
+ - type: cosine_accuracy@5
151
+ value: 0.8757142857142857
152
+ name: Cosine Accuracy@5
153
+ - type: cosine_accuracy@10
154
+ value: 0.93
155
+ name: Cosine Accuracy@10
156
+ - type: cosine_precision@1
157
+ value: 0.6957142857142857
158
+ name: Cosine Precision@1
159
+ - type: cosine_precision@3
160
+ value: 0.2795238095238095
161
+ name: Cosine Precision@3
162
+ - type: cosine_precision@5
163
+ value: 0.17514285714285713
164
+ name: Cosine Precision@5
165
+ - type: cosine_precision@10
166
+ value: 0.09299999999999999
167
+ name: Cosine Precision@10
168
+ - type: cosine_recall@1
169
+ value: 0.6957142857142857
170
+ name: Cosine Recall@1
171
+ - type: cosine_recall@3
172
+ value: 0.8385714285714285
173
+ name: Cosine Recall@3
174
+ - type: cosine_recall@5
175
+ value: 0.8757142857142857
176
+ name: Cosine Recall@5
177
+ - type: cosine_recall@10
178
+ value: 0.93
179
+ name: Cosine Recall@10
180
+ - type: cosine_ndcg@10
181
+ value: 0.8149439460863356
182
+ name: Cosine Ndcg@10
183
+ - type: cosine_mrr@10
184
+ value: 0.7780714285714285
185
+ name: Cosine Mrr@10
186
+ - type: cosine_map@100
187
+ value: 0.781021025356189
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.6885714285714286
198
+ name: Cosine Accuracy@1
199
+ - type: cosine_accuracy@3
200
+ value: 0.83
201
+ name: Cosine Accuracy@3
202
+ - type: cosine_accuracy@5
203
+ value: 0.8742857142857143
204
+ name: Cosine Accuracy@5
205
+ - type: cosine_accuracy@10
206
+ value: 0.9142857142857143
207
+ name: Cosine Accuracy@10
208
+ - type: cosine_precision@1
209
+ value: 0.6885714285714286
210
+ name: Cosine Precision@1
211
+ - type: cosine_precision@3
212
+ value: 0.27666666666666667
213
+ name: Cosine Precision@3
214
+ - type: cosine_precision@5
215
+ value: 0.17485714285714282
216
+ name: Cosine Precision@5
217
+ - type: cosine_precision@10
218
+ value: 0.09142857142857141
219
+ name: Cosine Precision@10
220
+ - type: cosine_recall@1
221
+ value: 0.6885714285714286
222
+ name: Cosine Recall@1
223
+ - type: cosine_recall@3
224
+ value: 0.83
225
+ name: Cosine Recall@3
226
+ - type: cosine_recall@5
227
+ value: 0.8742857142857143
228
+ name: Cosine Recall@5
229
+ - type: cosine_recall@10
230
+ value: 0.9142857142857143
231
+ name: Cosine Recall@10
232
+ - type: cosine_ndcg@10
233
+ value: 0.8060991379418679
234
+ name: Cosine Ndcg@10
235
+ - type: cosine_mrr@10
236
+ value: 0.7710873015873015
237
+ name: Cosine Mrr@10
238
+ - type: cosine_map@100
239
+ value: 0.7751792513774886
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.6771428571428572
250
+ name: Cosine Accuracy@1
251
+ - type: cosine_accuracy@3
252
+ value: 0.8214285714285714
253
+ name: Cosine Accuracy@3
254
+ - type: cosine_accuracy@5
255
+ value: 0.8614285714285714
256
+ name: Cosine Accuracy@5
257
+ - type: cosine_accuracy@10
258
+ value: 0.9142857142857143
259
+ name: Cosine Accuracy@10
260
+ - type: cosine_precision@1
261
+ value: 0.6771428571428572
262
+ name: Cosine Precision@1
263
+ - type: cosine_precision@3
264
+ value: 0.2738095238095238
265
+ name: Cosine Precision@3
266
+ - type: cosine_precision@5
267
+ value: 0.17228571428571426
268
+ name: Cosine Precision@5
269
+ - type: cosine_precision@10
270
+ value: 0.09142857142857141
271
+ name: Cosine Precision@10
272
+ - type: cosine_recall@1
273
+ value: 0.6771428571428572
274
+ name: Cosine Recall@1
275
+ - type: cosine_recall@3
276
+ value: 0.8214285714285714
277
+ name: Cosine Recall@3
278
+ - type: cosine_recall@5
279
+ value: 0.8614285714285714
280
+ name: Cosine Recall@5
281
+ - type: cosine_recall@10
282
+ value: 0.9142857142857143
283
+ name: Cosine Recall@10
284
+ - type: cosine_ndcg@10
285
+ value: 0.7979494993398927
286
+ name: Cosine Ndcg@10
287
+ - type: cosine_mrr@10
288
+ value: 0.7605890022675734
289
+ name: Cosine Mrr@10
290
+ - type: cosine_map@100
291
+ value: 0.7639633810343436
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.6557142857142857
302
+ name: Cosine Accuracy@1
303
+ - type: cosine_accuracy@3
304
+ value: 0.7871428571428571
305
+ name: Cosine Accuracy@3
306
+ - type: cosine_accuracy@5
307
+ value: 0.8271428571428572
308
+ name: Cosine Accuracy@5
309
+ - type: cosine_accuracy@10
310
+ value: 0.8714285714285714
311
+ name: Cosine Accuracy@10
312
+ - type: cosine_precision@1
313
+ value: 0.6557142857142857
314
+ name: Cosine Precision@1
315
+ - type: cosine_precision@3
316
+ value: 0.2623809523809524
317
+ name: Cosine Precision@3
318
+ - type: cosine_precision@5
319
+ value: 0.1654285714285714
320
+ name: Cosine Precision@5
321
+ - type: cosine_precision@10
322
+ value: 0.08714285714285713
323
+ name: Cosine Precision@10
324
+ - type: cosine_recall@1
325
+ value: 0.6557142857142857
326
+ name: Cosine Recall@1
327
+ - type: cosine_recall@3
328
+ value: 0.7871428571428571
329
+ name: Cosine Recall@3
330
+ - type: cosine_recall@5
331
+ value: 0.8271428571428572
332
+ name: Cosine Recall@5
333
+ - type: cosine_recall@10
334
+ value: 0.8714285714285714
335
+ name: Cosine Recall@10
336
+ - type: cosine_ndcg@10
337
+ value: 0.7664083634078753
338
+ name: Cosine Ndcg@10
339
+ - type: cosine_mrr@10
340
+ value: 0.7326604308390022
341
+ name: Cosine Mrr@10
342
+ - type: cosine_map@100
343
+ value: 0.7375736792740525
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). 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:** Unknown -->
360
+ - **Language:** en
361
+ - **License:** apache-2.0
362
+
363
+ ### Model Sources
364
+
365
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
366
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
367
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
368
+
369
+ ### Full Model Architecture
370
+
371
+ ```
372
+ SentenceTransformer(
373
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
374
+ (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})
375
+ (2): Normalize()
376
+ )
377
+ ```
378
+
379
+ ## Usage
380
+
381
+ ### Direct Usage (Sentence Transformers)
382
+
383
+ First install the Sentence Transformers library:
384
+
385
+ ```bash
386
+ pip install -U sentence-transformers
387
+ ```
388
+
389
+ Then you can load this model and run inference.
390
+ ```python
391
+ from sentence_transformers import SentenceTransformer
392
+
393
+ # Download from the 🤗 Hub
394
+ model = SentenceTransformer("dustyatx/bge-base-financial-matryoshka")
395
+ # Run inference
396
+ sentences = [
397
+ 'Details about legal proceedings are included in Part II, Item 8, "Financial Statements and Supplementary Data" of the Annual Report on Form 10-K, under the caption "Legal Proceedings".',
398
+ 'Where can details about legal proceedings be located in an Annual Report on Form 10-K?',
399
+ 'How many stores did AutoZone operate in the United States as of August 26, 2023?',
400
+ ]
401
+ embeddings = model.encode(sentences)
402
+ print(embeddings.shape)
403
+ # [3, 768]
404
+
405
+ # Get the similarity scores for the embeddings
406
+ similarities = model.similarity(embeddings, embeddings)
407
+ print(similarities.shape)
408
+ # [3, 3]
409
+ ```
410
+
411
+ <!--
412
+ ### Direct Usage (Transformers)
413
+
414
+ <details><summary>Click to see the direct usage in Transformers</summary>
415
+
416
+ </details>
417
+ -->
418
+
419
+ <!--
420
+ ### Downstream Usage (Sentence Transformers)
421
+
422
+ You can finetune this model on your own dataset.
423
+
424
+ <details><summary>Click to expand</summary>
425
+
426
+ </details>
427
+ -->
428
+
429
+ <!--
430
+ ### Out-of-Scope Use
431
+
432
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
433
+ -->
434
+
435
+ ## Evaluation
436
+
437
+ ### Metrics
438
+
439
+ #### Information Retrieval
440
+ * Dataset: `dim_768`
441
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
442
+
443
+ | Metric | Value |
444
+ |:--------------------|:-----------|
445
+ | cosine_accuracy@1 | 0.7071 |
446
+ | cosine_accuracy@3 | 0.8414 |
447
+ | cosine_accuracy@5 | 0.88 |
448
+ | cosine_accuracy@10 | 0.9314 |
449
+ | cosine_precision@1 | 0.7071 |
450
+ | cosine_precision@3 | 0.2805 |
451
+ | cosine_precision@5 | 0.176 |
452
+ | cosine_precision@10 | 0.0931 |
453
+ | cosine_recall@1 | 0.7071 |
454
+ | cosine_recall@3 | 0.8414 |
455
+ | cosine_recall@5 | 0.88 |
456
+ | cosine_recall@10 | 0.9314 |
457
+ | cosine_ndcg@10 | 0.8207 |
458
+ | cosine_mrr@10 | 0.7853 |
459
+ | **cosine_map@100** | **0.7882** |
460
+
461
+ #### Information Retrieval
462
+ * Dataset: `dim_512`
463
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
464
+
465
+ | Metric | Value |
466
+ |:--------------------|:----------|
467
+ | cosine_accuracy@1 | 0.6957 |
468
+ | cosine_accuracy@3 | 0.8386 |
469
+ | cosine_accuracy@5 | 0.8757 |
470
+ | cosine_accuracy@10 | 0.93 |
471
+ | cosine_precision@1 | 0.6957 |
472
+ | cosine_precision@3 | 0.2795 |
473
+ | cosine_precision@5 | 0.1751 |
474
+ | cosine_precision@10 | 0.093 |
475
+ | cosine_recall@1 | 0.6957 |
476
+ | cosine_recall@3 | 0.8386 |
477
+ | cosine_recall@5 | 0.8757 |
478
+ | cosine_recall@10 | 0.93 |
479
+ | cosine_ndcg@10 | 0.8149 |
480
+ | cosine_mrr@10 | 0.7781 |
481
+ | **cosine_map@100** | **0.781** |
482
+
483
+ #### Information Retrieval
484
+ * Dataset: `dim_256`
485
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
486
+
487
+ | Metric | Value |
488
+ |:--------------------|:-----------|
489
+ | cosine_accuracy@1 | 0.6886 |
490
+ | cosine_accuracy@3 | 0.83 |
491
+ | cosine_accuracy@5 | 0.8743 |
492
+ | cosine_accuracy@10 | 0.9143 |
493
+ | cosine_precision@1 | 0.6886 |
494
+ | cosine_precision@3 | 0.2767 |
495
+ | cosine_precision@5 | 0.1749 |
496
+ | cosine_precision@10 | 0.0914 |
497
+ | cosine_recall@1 | 0.6886 |
498
+ | cosine_recall@3 | 0.83 |
499
+ | cosine_recall@5 | 0.8743 |
500
+ | cosine_recall@10 | 0.9143 |
501
+ | cosine_ndcg@10 | 0.8061 |
502
+ | cosine_mrr@10 | 0.7711 |
503
+ | **cosine_map@100** | **0.7752** |
504
+
505
+ #### Information Retrieval
506
+ * Dataset: `dim_128`
507
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
508
+
509
+ | Metric | Value |
510
+ |:--------------------|:----------|
511
+ | cosine_accuracy@1 | 0.6771 |
512
+ | cosine_accuracy@3 | 0.8214 |
513
+ | cosine_accuracy@5 | 0.8614 |
514
+ | cosine_accuracy@10 | 0.9143 |
515
+ | cosine_precision@1 | 0.6771 |
516
+ | cosine_precision@3 | 0.2738 |
517
+ | cosine_precision@5 | 0.1723 |
518
+ | cosine_precision@10 | 0.0914 |
519
+ | cosine_recall@1 | 0.6771 |
520
+ | cosine_recall@3 | 0.8214 |
521
+ | cosine_recall@5 | 0.8614 |
522
+ | cosine_recall@10 | 0.9143 |
523
+ | cosine_ndcg@10 | 0.7979 |
524
+ | cosine_mrr@10 | 0.7606 |
525
+ | **cosine_map@100** | **0.764** |
526
+
527
+ #### Information Retrieval
528
+ * Dataset: `dim_64`
529
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
530
+
531
+ | Metric | Value |
532
+ |:--------------------|:-----------|
533
+ | cosine_accuracy@1 | 0.6557 |
534
+ | cosine_accuracy@3 | 0.7871 |
535
+ | cosine_accuracy@5 | 0.8271 |
536
+ | cosine_accuracy@10 | 0.8714 |
537
+ | cosine_precision@1 | 0.6557 |
538
+ | cosine_precision@3 | 0.2624 |
539
+ | cosine_precision@5 | 0.1654 |
540
+ | cosine_precision@10 | 0.0871 |
541
+ | cosine_recall@1 | 0.6557 |
542
+ | cosine_recall@3 | 0.7871 |
543
+ | cosine_recall@5 | 0.8271 |
544
+ | cosine_recall@10 | 0.8714 |
545
+ | cosine_ndcg@10 | 0.7664 |
546
+ | cosine_mrr@10 | 0.7327 |
547
+ | **cosine_map@100** | **0.7376** |
548
+
549
+ <!--
550
+ ## Bias, Risks and Limitations
551
+
552
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
553
+ -->
554
+
555
+ <!--
556
+ ### Recommendations
557
+
558
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
559
+ -->
560
+
561
+ ## Training Details
562
+
563
+ ### Training Dataset
564
+
565
+ #### Unnamed Dataset
566
+
567
+
568
+ * Size: 6,300 training samples
569
+ * Columns: <code>positive</code> and <code>anchor</code>
570
+ * Approximate statistics based on the first 1000 samples:
571
+ | | positive | anchor |
572
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
573
+ | type | string | string |
574
+ | details | <ul><li>min: 8 tokens</li><li>mean: 45.94 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.7 tokens</li><li>max: 42 tokens</li></ul> |
575
+ * Samples:
576
+ | positive | anchor |
577
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
578
+ | <code>The company must continuously strengthen its capabilities in marketing and innovation to compete in a digital environment and maintain brand loyalty and marketallability. In addition, it is increasing its investments in e-commerce to support retail and meal delivery services, offering more package sizes that are fit-for-purpose for online sales and shifting more consumer and trade promotions to digital.</code> | <code>What strategies is the company employing to enhance its competitiveness in a digital environment?</code> |
579
+ | <code>Fedflowing expanded or relocated its hub and linehaul network, FedEx Ground also introduced new safety technologies, set new driver standards, and made operational enhancements for safer handling of heavy items.</code> | <code>What specific changes has FedEx Ground made for vehicle and driver safety?</code> |
580
+ | <code>The debt financing, which is being provided by a syndicate of Chinese financial institutions, contains certain covenants and a maximum borrowing limit of ¥29.7 billion RMB (approximately $4.2 billion).</code> | <code>What is the maximum borrowing limit of the debt financing provided by the syndicate of Chinese financial institutions for Universal Beijing Resort?</code> |
581
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
582
+ ```json
583
+ {
584
+ "loss": "MultipleNegativesRankingLoss",
585
+ "matryoshka_dims": [
586
+ 768,
587
+ 512,
588
+ 256,
589
+ 128,
590
+ 64
591
+ ],
592
+ "matryoshka_weights": [
593
+ 1,
594
+ 1,
595
+ 1,
596
+ 1,
597
+ 1
598
+ ],
599
+ "n_dims_per_step": -1
600
+ }
601
+ ```
602
+
603
+ ### Training Hyperparameters
604
+ #### Non-Default Hyperparameters
605
+
606
+ - `eval_strategy`: epoch
607
+ - `per_device_train_batch_size`: 32
608
+ - `per_device_eval_batch_size`: 16
609
+ - `gradient_accumulation_steps`: 16
610
+ - `learning_rate`: 2e-05
611
+ - `num_train_epochs`: 4
612
+ - `lr_scheduler_type`: cosine
613
+ - `warmup_ratio`: 0.1
614
+ - `bf16`: True
615
+ - `tf32`: True
616
+ - `load_best_model_at_end`: True
617
+ - `optim`: adamw_torch_fused
618
+ - `batch_sampler`: no_duplicates
619
+
620
+ #### All Hyperparameters
621
+ <details><summary>Click to expand</summary>
622
+
623
+ - `overwrite_output_dir`: False
624
+ - `do_predict`: False
625
+ - `eval_strategy`: epoch
626
+ - `prediction_loss_only`: True
627
+ - `per_device_train_batch_size`: 32
628
+ - `per_device_eval_batch_size`: 16
629
+ - `per_gpu_train_batch_size`: None
630
+ - `per_gpu_eval_batch_size`: None
631
+ - `gradient_accumulation_steps`: 16
632
+ - `eval_accumulation_steps`: None
633
+ - `torch_empty_cache_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
+ - `eval_on_start`: False
731
+ - `eval_use_gather_object`: False
732
+ - `batch_sampler`: no_duplicates
733
+ - `multi_dataset_batch_sampler`: proportional
734
+
735
+ </details>
736
+
737
+ ### Training Logs
738
+ | 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 |
739
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
740
+ | 0.8122 | 10 | 1.5212 | - | - | - | - | - |
741
+ | 0.9746 | 12 | - | 0.7439 | 0.7556 | 0.7670 | 0.7142 | 0.7717 |
742
+ | 1.6244 | 20 | 0.6418 | - | - | - | - | - |
743
+ | 1.9492 | 24 | - | 0.7592 | 0.7743 | 0.7787 | 0.7331 | 0.7839 |
744
+ | 2.4365 | 30 | 0.4411 | - | - | - | - | - |
745
+ | 2.9239 | 36 | - | 0.7623 | 0.7757 | 0.7816 | 0.7365 | 0.7902 |
746
+ | 3.2487 | 40 | 0.3917 | - | - | - | - | - |
747
+ | **3.8985** | **48** | **-** | **0.764** | **0.7752** | **0.781** | **0.7376** | **0.7882** |
748
+
749
+ * The bold row denotes the saved checkpoint.
750
+
751
+ ### Framework Versions
752
+ - Python: 3.11.9
753
+ - Sentence Transformers: 3.0.1
754
+ - Transformers: 4.44.2
755
+ - PyTorch: 2.4.0+cu121
756
+ - Accelerate: 0.33.0
757
+ - Datasets: 2.21.0
758
+ - Tokenizers: 0.19.1
759
+
760
+ ## Citation
761
+
762
+ ### BibTeX
763
+
764
+ #### Sentence Transformers
765
+ ```bibtex
766
+ @inproceedings{reimers-2019-sentence-bert,
767
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
768
+ author = "Reimers, Nils and Gurevych, Iryna",
769
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
770
+ month = "11",
771
+ year = "2019",
772
+ publisher = "Association for Computational Linguistics",
773
+ url = "https://arxiv.org/abs/1908.10084",
774
+ }
775
+ ```
776
+
777
+ #### MatryoshkaLoss
778
+ ```bibtex
779
+ @misc{kusupati2024matryoshka,
780
+ title={Matryoshka Representation Learning},
781
+ 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},
782
+ year={2024},
783
+ eprint={2205.13147},
784
+ archivePrefix={arXiv},
785
+ primaryClass={cs.LG}
786
+ }
787
+ ```
788
+
789
+ #### MultipleNegativesRankingLoss
790
+ ```bibtex
791
+ @misc{henderson2017efficient,
792
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
793
+ 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},
794
+ year={2017},
795
+ eprint={1705.00652},
796
+ archivePrefix={arXiv},
797
+ primaryClass={cs.CL}
798
+ }
799
+ ```
800
+
801
+ <!--
802
+ ## Glossary
803
+
804
+ *Clearly define terms in order to be accessible across audiences.*
805
+ -->
806
+
807
+ <!--
808
+ ## Model Card Authors
809
+
810
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
811
+ -->
812
+
813
+ <!--
814
+ ## Model Card Contact
815
+
816
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
817
+ -->
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.44.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.4.0+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:97cf0fca696bdb9fa8547d68739e86fa55de41dca701435ca424473979a9ef45
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