Yuki20 commited on
Commit
1c6579f
1 Parent(s): bd068ad

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,808 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: There are no relevant matters to disclose under this Item for this
34
+ period.
35
+ sentences:
36
+ - How much did non-cash items contribute to the cash provided by operating activities
37
+ in fiscal 2023?
38
+ - Are there any legal matters under Item 3 that need to be disclosed for this period?
39
+ - What is the primary therapeutic use of Linzess (linaclotide)?
40
+ - source_sentence: As of December 31, 2023, we had a $500,000 revolving credit facility
41
+ with JPMorgan Chase Bank as administrative agent, with an interest rate based
42
+ on the SOFR plus 1.475%, a commitment fee of 0.175% for unused amounts, and conditions
43
+ such as maintaining a total leverage ratio of less than 3.0x and a consolidated
44
+ fixed charge coverage ratio of greater than 1.5x.
45
+ sentences:
46
+ - What percentage of U.S. admissions revenues in 2023 was attributed to films from
47
+ the company's seven largest movie studio distributors?
48
+ - What are the terms of the revolving credit facility agreement with JPMorgan as
49
+ of December 31, 2023?
50
+ - What was the postpaid churn rate for AT&T Inc. in 2023?
51
+ - source_sentence: Gross margin increased from $22,095 million in 2022 to $24,690
52
+ million in 2023, amounting to a $2,595 million increase.
53
+ sentences:
54
+ - How much did the gross margin increase in fiscal year 2023 compared to 2022?
55
+ - What percentage of Meta's U.S. workforce in 2023 were represented by people with
56
+ disabilities, veterans, and members of the LGBTQ+ community?
57
+ - How many FedEx-branded packaging produced in 2022 was third-party certified?
58
+ - source_sentence: NHTSA has proposed CAFE standards for model years 2027–2031, and
59
+ the EPA has drafted GHG emission standards for 2027–2032. Both sets of standards
60
+ are awaiting finalization.
61
+ sentences:
62
+ - What methods does the company use to advertise its products?
63
+ - What types of products does Garmin design, develop, and distribute?
64
+ - What are the projected years covered by the new CAFE and GHG emission standards
65
+ proposed by NHTSA and the EPA?
66
+ - source_sentence: As of December 31, 2023, the fair value and amortized cost, net
67
+ of valuation allowance, for the Republic of Korea's government securities were
68
+ $1,784 million and $1,723 million respectively.
69
+ sentences:
70
+ - What was the fair value and amortized cost, net of valuation allowance, for the
71
+ Republic of Korea's government securities as of December 31, 2023?
72
+ - How does the company advance autonomous vehicle technology?
73
+ - What were the key factors affecting the company's cash flow from operations in
74
+ fiscal 2023?
75
+ model-index:
76
+ - name: BGE base Financial Matryoshka
77
+ results:
78
+ - task:
79
+ type: information-retrieval
80
+ name: Information Retrieval
81
+ dataset:
82
+ name: dim 768
83
+ type: dim_768
84
+ metrics:
85
+ - type: cosine_accuracy@1
86
+ value: 0.6871428571428572
87
+ name: Cosine Accuracy@1
88
+ - type: cosine_accuracy@3
89
+ value: 0.8285714285714286
90
+ name: Cosine Accuracy@3
91
+ - type: cosine_accuracy@5
92
+ value: 0.8571428571428571
93
+ name: Cosine Accuracy@5
94
+ - type: cosine_accuracy@10
95
+ value: 0.9071428571428571
96
+ name: Cosine Accuracy@10
97
+ - type: cosine_precision@1
98
+ value: 0.6871428571428572
99
+ name: Cosine Precision@1
100
+ - type: cosine_precision@3
101
+ value: 0.27619047619047615
102
+ name: Cosine Precision@3
103
+ - type: cosine_precision@5
104
+ value: 0.1714285714285714
105
+ name: Cosine Precision@5
106
+ - type: cosine_precision@10
107
+ value: 0.0907142857142857
108
+ name: Cosine Precision@10
109
+ - type: cosine_recall@1
110
+ value: 0.6871428571428572
111
+ name: Cosine Recall@1
112
+ - type: cosine_recall@3
113
+ value: 0.8285714285714286
114
+ name: Cosine Recall@3
115
+ - type: cosine_recall@5
116
+ value: 0.8571428571428571
117
+ name: Cosine Recall@5
118
+ - type: cosine_recall@10
119
+ value: 0.9071428571428571
120
+ name: Cosine Recall@10
121
+ - type: cosine_ndcg@10
122
+ value: 0.7981646895635455
123
+ name: Cosine Ndcg@10
124
+ - type: cosine_mrr@10
125
+ value: 0.7633208616780044
126
+ name: Cosine Mrr@10
127
+ - type: cosine_map@100
128
+ value: 0.7670469746658456
129
+ name: Cosine Map@100
130
+ - task:
131
+ type: information-retrieval
132
+ name: Information Retrieval
133
+ dataset:
134
+ name: dim 512
135
+ type: dim_512
136
+ metrics:
137
+ - type: cosine_accuracy@1
138
+ value: 0.69
139
+ name: Cosine Accuracy@1
140
+ - type: cosine_accuracy@3
141
+ value: 0.8171428571428572
142
+ name: Cosine Accuracy@3
143
+ - type: cosine_accuracy@5
144
+ value: 0.8542857142857143
145
+ name: Cosine Accuracy@5
146
+ - type: cosine_accuracy@10
147
+ value: 0.9042857142857142
148
+ name: Cosine Accuracy@10
149
+ - type: cosine_precision@1
150
+ value: 0.69
151
+ name: Cosine Precision@1
152
+ - type: cosine_precision@3
153
+ value: 0.2723809523809524
154
+ name: Cosine Precision@3
155
+ - type: cosine_precision@5
156
+ value: 0.17085714285714282
157
+ name: Cosine Precision@5
158
+ - type: cosine_precision@10
159
+ value: 0.09042857142857141
160
+ name: Cosine Precision@10
161
+ - type: cosine_recall@1
162
+ value: 0.69
163
+ name: Cosine Recall@1
164
+ - type: cosine_recall@3
165
+ value: 0.8171428571428572
166
+ name: Cosine Recall@3
167
+ - type: cosine_recall@5
168
+ value: 0.8542857142857143
169
+ name: Cosine Recall@5
170
+ - type: cosine_recall@10
171
+ value: 0.9042857142857142
172
+ name: Cosine Recall@10
173
+ - type: cosine_ndcg@10
174
+ value: 0.7976622307973412
175
+ name: Cosine Ndcg@10
176
+ - type: cosine_mrr@10
177
+ value: 0.7636388888888889
178
+ name: Cosine Mrr@10
179
+ - type: cosine_map@100
180
+ value: 0.7675482221709721
181
+ name: Cosine Map@100
182
+ - task:
183
+ type: information-retrieval
184
+ name: Information Retrieval
185
+ dataset:
186
+ name: dim 256
187
+ type: dim_256
188
+ metrics:
189
+ - type: cosine_accuracy@1
190
+ value: 0.6857142857142857
191
+ name: Cosine Accuracy@1
192
+ - type: cosine_accuracy@3
193
+ value: 0.8142857142857143
194
+ name: Cosine Accuracy@3
195
+ - type: cosine_accuracy@5
196
+ value: 0.8514285714285714
197
+ name: Cosine Accuracy@5
198
+ - type: cosine_accuracy@10
199
+ value: 0.8957142857142857
200
+ name: Cosine Accuracy@10
201
+ - type: cosine_precision@1
202
+ value: 0.6857142857142857
203
+ name: Cosine Precision@1
204
+ - type: cosine_precision@3
205
+ value: 0.2714285714285714
206
+ name: Cosine Precision@3
207
+ - type: cosine_precision@5
208
+ value: 0.17028571428571426
209
+ name: Cosine Precision@5
210
+ - type: cosine_precision@10
211
+ value: 0.08957142857142855
212
+ name: Cosine Precision@10
213
+ - type: cosine_recall@1
214
+ value: 0.6857142857142857
215
+ name: Cosine Recall@1
216
+ - type: cosine_recall@3
217
+ value: 0.8142857142857143
218
+ name: Cosine Recall@3
219
+ - type: cosine_recall@5
220
+ value: 0.8514285714285714
221
+ name: Cosine Recall@5
222
+ - type: cosine_recall@10
223
+ value: 0.8957142857142857
224
+ name: Cosine Recall@10
225
+ - type: cosine_ndcg@10
226
+ value: 0.7916274982255576
227
+ name: Cosine Ndcg@10
228
+ - type: cosine_mrr@10
229
+ value: 0.7582437641723355
230
+ name: Cosine Mrr@10
231
+ - type: cosine_map@100
232
+ value: 0.7624248845655235
233
+ name: Cosine Map@100
234
+ - task:
235
+ type: information-retrieval
236
+ name: Information Retrieval
237
+ dataset:
238
+ name: dim 128
239
+ type: dim_128
240
+ metrics:
241
+ - type: cosine_accuracy@1
242
+ value: 0.6757142857142857
243
+ name: Cosine Accuracy@1
244
+ - type: cosine_accuracy@3
245
+ value: 0.8
246
+ name: Cosine Accuracy@3
247
+ - type: cosine_accuracy@5
248
+ value: 0.8414285714285714
249
+ name: Cosine Accuracy@5
250
+ - type: cosine_accuracy@10
251
+ value: 0.8885714285714286
252
+ name: Cosine Accuracy@10
253
+ - type: cosine_precision@1
254
+ value: 0.6757142857142857
255
+ name: Cosine Precision@1
256
+ - type: cosine_precision@3
257
+ value: 0.26666666666666666
258
+ name: Cosine Precision@3
259
+ - type: cosine_precision@5
260
+ value: 0.16828571428571426
261
+ name: Cosine Precision@5
262
+ - type: cosine_precision@10
263
+ value: 0.08885714285714286
264
+ name: Cosine Precision@10
265
+ - type: cosine_recall@1
266
+ value: 0.6757142857142857
267
+ name: Cosine Recall@1
268
+ - type: cosine_recall@3
269
+ value: 0.8
270
+ name: Cosine Recall@3
271
+ - type: cosine_recall@5
272
+ value: 0.8414285714285714
273
+ name: Cosine Recall@5
274
+ - type: cosine_recall@10
275
+ value: 0.8885714285714286
276
+ name: Cosine Recall@10
277
+ - type: cosine_ndcg@10
278
+ value: 0.781962439522339
279
+ name: Cosine Ndcg@10
280
+ - type: cosine_mrr@10
281
+ value: 0.7478424036281178
282
+ name: Cosine Mrr@10
283
+ - type: cosine_map@100
284
+ value: 0.7523517680786094
285
+ name: Cosine Map@100
286
+ - task:
287
+ type: information-retrieval
288
+ name: Information Retrieval
289
+ dataset:
290
+ name: dim 64
291
+ type: dim_64
292
+ metrics:
293
+ - type: cosine_accuracy@1
294
+ value: 0.6414285714285715
295
+ name: Cosine Accuracy@1
296
+ - type: cosine_accuracy@3
297
+ value: 0.7657142857142857
298
+ name: Cosine Accuracy@3
299
+ - type: cosine_accuracy@5
300
+ value: 0.7957142857142857
301
+ name: Cosine Accuracy@5
302
+ - type: cosine_accuracy@10
303
+ value: 0.8585714285714285
304
+ name: Cosine Accuracy@10
305
+ - type: cosine_precision@1
306
+ value: 0.6414285714285715
307
+ name: Cosine Precision@1
308
+ - type: cosine_precision@3
309
+ value: 0.2552380952380952
310
+ name: Cosine Precision@3
311
+ - type: cosine_precision@5
312
+ value: 0.15914285714285714
313
+ name: Cosine Precision@5
314
+ - type: cosine_precision@10
315
+ value: 0.08585714285714285
316
+ name: Cosine Precision@10
317
+ - type: cosine_recall@1
318
+ value: 0.6414285714285715
319
+ name: Cosine Recall@1
320
+ - type: cosine_recall@3
321
+ value: 0.7657142857142857
322
+ name: Cosine Recall@3
323
+ - type: cosine_recall@5
324
+ value: 0.7957142857142857
325
+ name: Cosine Recall@5
326
+ - type: cosine_recall@10
327
+ value: 0.8585714285714285
328
+ name: Cosine Recall@10
329
+ - type: cosine_ndcg@10
330
+ value: 0.7479917583081255
331
+ name: Cosine Ndcg@10
332
+ - type: cosine_mrr@10
333
+ value: 0.7129206349206347
334
+ name: Cosine Mrr@10
335
+ - type: cosine_map@100
336
+ value: 0.7185335911194088
337
+ name: Cosine Map@100
338
+ ---
339
+
340
+ # BGE base Financial Matryoshka
341
+
342
+ 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.
343
+
344
+ ## Model Details
345
+
346
+ ### Model Description
347
+ - **Model Type:** Sentence Transformer
348
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
349
+ - **Maximum Sequence Length:** 512 tokens
350
+ - **Output Dimensionality:** 768 tokens
351
+ - **Similarity Function:** Cosine Similarity
352
+ - **Training Dataset:**
353
+ - json
354
+ - **Language:** en
355
+ - **License:** apache-2.0
356
+
357
+ ### Model Sources
358
+
359
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
360
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
361
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
362
+
363
+ ### Full Model Architecture
364
+
365
+ ```
366
+ SentenceTransformer(
367
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
368
+ (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})
369
+ (2): Normalize()
370
+ )
371
+ ```
372
+
373
+ ## Usage
374
+
375
+ ### Direct Usage (Sentence Transformers)
376
+
377
+ First install the Sentence Transformers library:
378
+
379
+ ```bash
380
+ pip install -U sentence-transformers
381
+ ```
382
+
383
+ Then you can load this model and run inference.
384
+ ```python
385
+ from sentence_transformers import SentenceTransformer
386
+
387
+ # Download from the 🤗 Hub
388
+ model = SentenceTransformer("Yuki20/bge-base-financial-matryoshka")
389
+ # Run inference
390
+ sentences = [
391
+ "As of December 31, 2023, the fair value and amortized cost, net of valuation allowance, for the Republic of Korea's government securities were $1,784 million and $1,723 million respectively.",
392
+ "What was the fair value and amortized cost, net of valuation allowance, for the Republic of Korea's government securities as of December 31, 2023?",
393
+ 'How does the company advance autonomous vehicle technology?',
394
+ ]
395
+ embeddings = model.encode(sentences)
396
+ print(embeddings.shape)
397
+ # [3, 768]
398
+
399
+ # Get the similarity scores for the embeddings
400
+ similarities = model.similarity(embeddings, embeddings)
401
+ print(similarities.shape)
402
+ # [3, 3]
403
+ ```
404
+
405
+ <!--
406
+ ### Direct Usage (Transformers)
407
+
408
+ <details><summary>Click to see the direct usage in Transformers</summary>
409
+
410
+ </details>
411
+ -->
412
+
413
+ <!--
414
+ ### Downstream Usage (Sentence Transformers)
415
+
416
+ You can finetune this model on your own dataset.
417
+
418
+ <details><summary>Click to expand</summary>
419
+
420
+ </details>
421
+ -->
422
+
423
+ <!--
424
+ ### Out-of-Scope Use
425
+
426
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
427
+ -->
428
+
429
+ ## Evaluation
430
+
431
+ ### Metrics
432
+
433
+ #### Information Retrieval
434
+ * Dataset: `dim_768`
435
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
436
+
437
+ | Metric | Value |
438
+ |:--------------------|:----------|
439
+ | cosine_accuracy@1 | 0.6871 |
440
+ | cosine_accuracy@3 | 0.8286 |
441
+ | cosine_accuracy@5 | 0.8571 |
442
+ | cosine_accuracy@10 | 0.9071 |
443
+ | cosine_precision@1 | 0.6871 |
444
+ | cosine_precision@3 | 0.2762 |
445
+ | cosine_precision@5 | 0.1714 |
446
+ | cosine_precision@10 | 0.0907 |
447
+ | cosine_recall@1 | 0.6871 |
448
+ | cosine_recall@3 | 0.8286 |
449
+ | cosine_recall@5 | 0.8571 |
450
+ | cosine_recall@10 | 0.9071 |
451
+ | cosine_ndcg@10 | 0.7982 |
452
+ | cosine_mrr@10 | 0.7633 |
453
+ | **cosine_map@100** | **0.767** |
454
+
455
+ #### Information Retrieval
456
+ * Dataset: `dim_512`
457
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
458
+
459
+ | Metric | Value |
460
+ |:--------------------|:-----------|
461
+ | cosine_accuracy@1 | 0.69 |
462
+ | cosine_accuracy@3 | 0.8171 |
463
+ | cosine_accuracy@5 | 0.8543 |
464
+ | cosine_accuracy@10 | 0.9043 |
465
+ | cosine_precision@1 | 0.69 |
466
+ | cosine_precision@3 | 0.2724 |
467
+ | cosine_precision@5 | 0.1709 |
468
+ | cosine_precision@10 | 0.0904 |
469
+ | cosine_recall@1 | 0.69 |
470
+ | cosine_recall@3 | 0.8171 |
471
+ | cosine_recall@5 | 0.8543 |
472
+ | cosine_recall@10 | 0.9043 |
473
+ | cosine_ndcg@10 | 0.7977 |
474
+ | cosine_mrr@10 | 0.7636 |
475
+ | **cosine_map@100** | **0.7675** |
476
+
477
+ #### Information Retrieval
478
+ * Dataset: `dim_256`
479
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
480
+
481
+ | Metric | Value |
482
+ |:--------------------|:-----------|
483
+ | cosine_accuracy@1 | 0.6857 |
484
+ | cosine_accuracy@3 | 0.8143 |
485
+ | cosine_accuracy@5 | 0.8514 |
486
+ | cosine_accuracy@10 | 0.8957 |
487
+ | cosine_precision@1 | 0.6857 |
488
+ | cosine_precision@3 | 0.2714 |
489
+ | cosine_precision@5 | 0.1703 |
490
+ | cosine_precision@10 | 0.0896 |
491
+ | cosine_recall@1 | 0.6857 |
492
+ | cosine_recall@3 | 0.8143 |
493
+ | cosine_recall@5 | 0.8514 |
494
+ | cosine_recall@10 | 0.8957 |
495
+ | cosine_ndcg@10 | 0.7916 |
496
+ | cosine_mrr@10 | 0.7582 |
497
+ | **cosine_map@100** | **0.7624** |
498
+
499
+ #### Information Retrieval
500
+ * Dataset: `dim_128`
501
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
502
+
503
+ | Metric | Value |
504
+ |:--------------------|:-----------|
505
+ | cosine_accuracy@1 | 0.6757 |
506
+ | cosine_accuracy@3 | 0.8 |
507
+ | cosine_accuracy@5 | 0.8414 |
508
+ | cosine_accuracy@10 | 0.8886 |
509
+ | cosine_precision@1 | 0.6757 |
510
+ | cosine_precision@3 | 0.2667 |
511
+ | cosine_precision@5 | 0.1683 |
512
+ | cosine_precision@10 | 0.0889 |
513
+ | cosine_recall@1 | 0.6757 |
514
+ | cosine_recall@3 | 0.8 |
515
+ | cosine_recall@5 | 0.8414 |
516
+ | cosine_recall@10 | 0.8886 |
517
+ | cosine_ndcg@10 | 0.782 |
518
+ | cosine_mrr@10 | 0.7478 |
519
+ | **cosine_map@100** | **0.7524** |
520
+
521
+ #### Information Retrieval
522
+ * Dataset: `dim_64`
523
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
524
+
525
+ | Metric | Value |
526
+ |:--------------------|:-----------|
527
+ | cosine_accuracy@1 | 0.6414 |
528
+ | cosine_accuracy@3 | 0.7657 |
529
+ | cosine_accuracy@5 | 0.7957 |
530
+ | cosine_accuracy@10 | 0.8586 |
531
+ | cosine_precision@1 | 0.6414 |
532
+ | cosine_precision@3 | 0.2552 |
533
+ | cosine_precision@5 | 0.1591 |
534
+ | cosine_precision@10 | 0.0859 |
535
+ | cosine_recall@1 | 0.6414 |
536
+ | cosine_recall@3 | 0.7657 |
537
+ | cosine_recall@5 | 0.7957 |
538
+ | cosine_recall@10 | 0.8586 |
539
+ | cosine_ndcg@10 | 0.748 |
540
+ | cosine_mrr@10 | 0.7129 |
541
+ | **cosine_map@100** | **0.7185** |
542
+
543
+ <!--
544
+ ## Bias, Risks and Limitations
545
+
546
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
547
+ -->
548
+
549
+ <!--
550
+ ### Recommendations
551
+
552
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
553
+ -->
554
+
555
+ ## Training Details
556
+
557
+ ### Training Dataset
558
+
559
+ #### json
560
+
561
+ * Dataset: json
562
+ * Size: 6,300 training samples
563
+ * Columns: <code>positive</code> and <code>anchor</code>
564
+ * Approximate statistics based on the first 1000 samples:
565
+ | | positive | anchor |
566
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
567
+ | type | string | string |
568
+ | details | <ul><li>min: 6 tokens</li><li>mean: 45.58 tokens</li><li>max: 289 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.34 tokens</li><li>max: 41 tokens</li></ul> |
569
+ * Samples:
570
+ | positive | anchor |
571
+ |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|
572
+ | <code>Billed business grew significantly over the past two years, increasing from $228.2 billion in 2021 to $281.6 billion in 2022, and reaching $329.5 billion in 2023.</code> | <code>How did billed business figures change from 2021 to 2023 as stated in the text?</code> |
573
+ | <code>The Federal Reserve may limit an FHC’s ability to conduct permissible activities if it or any of its depository institution subsidiaries fails to maintain a well-capitalized and well-managed status. If non-compliant after 180 days, the Federal Reserve may require the FHC to divest its depository institution subsidiaries or cease all FHC Activities.</code> | <code>What happens if an FHC does not meet the Federal Reserve's eligibility requirements?</code> |
574
+ | <code>For the fiscal year ending January 28, 2023, the basic net income per share was calculated to be $7.24, based on the net income and weighted average number of shares outstanding.</code> | <code>What was the basic net income per share in the fiscal year ending January 28, 2023?</code> |
575
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
576
+ ```json
577
+ {
578
+ "loss": "MultipleNegativesRankingLoss",
579
+ "matryoshka_dims": [
580
+ 768,
581
+ 512,
582
+ 256,
583
+ 128,
584
+ 64
585
+ ],
586
+ "matryoshka_weights": [
587
+ 1,
588
+ 1,
589
+ 1,
590
+ 1,
591
+ 1
592
+ ],
593
+ "n_dims_per_step": -1
594
+ }
595
+ ```
596
+
597
+ ### Training Hyperparameters
598
+ #### Non-Default Hyperparameters
599
+
600
+ - `eval_strategy`: epoch
601
+ - `per_device_train_batch_size`: 32
602
+ - `per_device_eval_batch_size`: 16
603
+ - `gradient_accumulation_steps`: 16
604
+ - `learning_rate`: 2e-05
605
+ - `num_train_epochs`: 4
606
+ - `lr_scheduler_type`: cosine
607
+ - `warmup_ratio`: 0.1
608
+ - `fp16`: True
609
+ - `tf32`: False
610
+ - `load_best_model_at_end`: True
611
+ - `optim`: adamw_torch_fused
612
+ - `batch_sampler`: no_duplicates
613
+
614
+ #### All Hyperparameters
615
+ <details><summary>Click to expand</summary>
616
+
617
+ - `overwrite_output_dir`: False
618
+ - `do_predict`: False
619
+ - `eval_strategy`: epoch
620
+ - `prediction_loss_only`: True
621
+ - `per_device_train_batch_size`: 32
622
+ - `per_device_eval_batch_size`: 16
623
+ - `per_gpu_train_batch_size`: None
624
+ - `per_gpu_eval_batch_size`: None
625
+ - `gradient_accumulation_steps`: 16
626
+ - `eval_accumulation_steps`: None
627
+ - `learning_rate`: 2e-05
628
+ - `weight_decay`: 0.0
629
+ - `adam_beta1`: 0.9
630
+ - `adam_beta2`: 0.999
631
+ - `adam_epsilon`: 1e-08
632
+ - `max_grad_norm`: 1.0
633
+ - `num_train_epochs`: 4
634
+ - `max_steps`: -1
635
+ - `lr_scheduler_type`: cosine
636
+ - `lr_scheduler_kwargs`: {}
637
+ - `warmup_ratio`: 0.1
638
+ - `warmup_steps`: 0
639
+ - `log_level`: passive
640
+ - `log_level_replica`: warning
641
+ - `log_on_each_node`: True
642
+ - `logging_nan_inf_filter`: True
643
+ - `save_safetensors`: True
644
+ - `save_on_each_node`: False
645
+ - `save_only_model`: False
646
+ - `restore_callback_states_from_checkpoint`: False
647
+ - `no_cuda`: False
648
+ - `use_cpu`: False
649
+ - `use_mps_device`: False
650
+ - `seed`: 42
651
+ - `data_seed`: None
652
+ - `jit_mode_eval`: False
653
+ - `use_ipex`: False
654
+ - `bf16`: False
655
+ - `fp16`: True
656
+ - `fp16_opt_level`: O1
657
+ - `half_precision_backend`: auto
658
+ - `bf16_full_eval`: False
659
+ - `fp16_full_eval`: False
660
+ - `tf32`: False
661
+ - `local_rank`: 0
662
+ - `ddp_backend`: None
663
+ - `tpu_num_cores`: None
664
+ - `tpu_metrics_debug`: False
665
+ - `debug`: []
666
+ - `dataloader_drop_last`: False
667
+ - `dataloader_num_workers`: 0
668
+ - `dataloader_prefetch_factor`: None
669
+ - `past_index`: -1
670
+ - `disable_tqdm`: False
671
+ - `remove_unused_columns`: True
672
+ - `label_names`: None
673
+ - `load_best_model_at_end`: True
674
+ - `ignore_data_skip`: False
675
+ - `fsdp`: []
676
+ - `fsdp_min_num_params`: 0
677
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
678
+ - `fsdp_transformer_layer_cls_to_wrap`: None
679
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
680
+ - `deepspeed`: None
681
+ - `label_smoothing_factor`: 0.0
682
+ - `optim`: adamw_torch_fused
683
+ - `optim_args`: None
684
+ - `adafactor`: False
685
+ - `group_by_length`: False
686
+ - `length_column_name`: length
687
+ - `ddp_find_unused_parameters`: None
688
+ - `ddp_bucket_cap_mb`: None
689
+ - `ddp_broadcast_buffers`: False
690
+ - `dataloader_pin_memory`: True
691
+ - `dataloader_persistent_workers`: False
692
+ - `skip_memory_metrics`: True
693
+ - `use_legacy_prediction_loop`: False
694
+ - `push_to_hub`: False
695
+ - `resume_from_checkpoint`: None
696
+ - `hub_model_id`: None
697
+ - `hub_strategy`: every_save
698
+ - `hub_private_repo`: False
699
+ - `hub_always_push`: False
700
+ - `gradient_checkpointing`: False
701
+ - `gradient_checkpointing_kwargs`: None
702
+ - `include_inputs_for_metrics`: False
703
+ - `eval_do_concat_batches`: True
704
+ - `fp16_backend`: auto
705
+ - `push_to_hub_model_id`: None
706
+ - `push_to_hub_organization`: None
707
+ - `mp_parameters`:
708
+ - `auto_find_batch_size`: False
709
+ - `full_determinism`: False
710
+ - `torchdynamo`: None
711
+ - `ray_scope`: last
712
+ - `ddp_timeout`: 1800
713
+ - `torch_compile`: False
714
+ - `torch_compile_backend`: None
715
+ - `torch_compile_mode`: None
716
+ - `dispatch_batches`: None
717
+ - `split_batches`: None
718
+ - `include_tokens_per_second`: False
719
+ - `include_num_input_tokens_seen`: False
720
+ - `neftune_noise_alpha`: None
721
+ - `optim_target_modules`: None
722
+ - `batch_eval_metrics`: False
723
+ - `batch_sampler`: no_duplicates
724
+ - `multi_dataset_batch_sampler`: proportional
725
+
726
+ </details>
727
+
728
+ ### Training Logs
729
+ | Epoch | Step | Training Loss | dim_768_cosine_map@100 | dim_512_cosine_map@100 | dim_256_cosine_map@100 | dim_128_cosine_map@100 | dim_64_cosine_map@100 |
730
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
731
+ | 0.8122 | 10 | 1.588 | - | - | - | - | - |
732
+ | 0.9746 | 12 | - | 0.7593 | 0.7550 | 0.7472 | 0.7347 | 0.6970 |
733
+ | 1.6244 | 20 | 0.7059 | - | - | - | - | - |
734
+ | 1.9492 | 24 | - | 0.7623 | 0.7652 | 0.7559 | 0.7517 | 0.7127 |
735
+ | 2.4365 | 30 | 0.4826 | - | - | - | - | - |
736
+ | 2.9239 | 36 | - | 0.7675 | 0.7683 | 0.7603 | 0.7512 | 0.7166 |
737
+ | 3.2487 | 40 | 0.3992 | - | - | - | - | - |
738
+ | **3.8985** | **48** | **-** | **0.767** | **0.7675** | **0.7624** | **0.7524** | **0.7185** |
739
+
740
+ * The bold row denotes the saved checkpoint.
741
+
742
+ ### Framework Versions
743
+ - Python: 3.10.12
744
+ - Sentence Transformers: 3.2.0
745
+ - Transformers: 4.41.2
746
+ - PyTorch: 2.1.2+cu121
747
+ - Accelerate: 0.34.2
748
+ - Datasets: 2.19.1
749
+ - Tokenizers: 0.19.1
750
+
751
+ ## Citation
752
+
753
+ ### BibTeX
754
+
755
+ #### Sentence Transformers
756
+ ```bibtex
757
+ @inproceedings{reimers-2019-sentence-bert,
758
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
759
+ author = "Reimers, Nils and Gurevych, Iryna",
760
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
761
+ month = "11",
762
+ year = "2019",
763
+ publisher = "Association for Computational Linguistics",
764
+ url = "https://arxiv.org/abs/1908.10084",
765
+ }
766
+ ```
767
+
768
+ #### MatryoshkaLoss
769
+ ```bibtex
770
+ @misc{kusupati2024matryoshka,
771
+ title={Matryoshka Representation Learning},
772
+ 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},
773
+ year={2024},
774
+ eprint={2205.13147},
775
+ archivePrefix={arXiv},
776
+ primaryClass={cs.LG}
777
+ }
778
+ ```
779
+
780
+ #### MultipleNegativesRankingLoss
781
+ ```bibtex
782
+ @misc{henderson2017efficient,
783
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
784
+ 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},
785
+ year={2017},
786
+ eprint={1705.00652},
787
+ archivePrefix={arXiv},
788
+ primaryClass={cs.CL}
789
+ }
790
+ ```
791
+
792
+ <!--
793
+ ## Glossary
794
+
795
+ *Clearly define terms in order to be accessible across audiences.*
796
+ -->
797
+
798
+ <!--
799
+ ## Model Card Authors
800
+
801
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
802
+ -->
803
+
804
+ <!--
805
+ ## Model Card Contact
806
+
807
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
808
+ -->
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.2.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:af3d83ad4a684e2848308ea9ccd6eb8c1d78e4bd71cf3fe3bc4e0a3e59261d42
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