preetham315 commited on
Commit
7c9628a
·
verified ·
1 Parent(s): 18418f0

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,851 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - dense
10
+ - generated_from_trainer
11
+ - dataset_size:6300
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: BAAI/bge-base-en-v1.5
15
+ widget:
16
+ - source_sentence: Item 8 in IBM's 2023 Annual Report to Stockholders details the
17
+ Financial Statements and Supplementary Data, which are included on pages 44 through
18
+ 121.
19
+ sentences:
20
+ - What is the purpose of the unused credit facility fee payments, and what is their
21
+ total as of June 30, 2023?
22
+ - What section of IBM's Annual Report for 2023 contains the Financial Statements
23
+ and Supplementary Data?
24
+ - What position did K. Michelle Borninkhof hold at McDonald’s before joining AutoZone?
25
+ - source_sentence: When evaluating for impairment, we first compare the carrying value
26
+ of the asset to the asset’s estimated future undiscounted cash flows. If the estimated
27
+ undiscounted future cash flows are less than the carrying value of the asset,
28
+ we determine if we have an impairment loss by comparing the carrying value of
29
+ the asset to the asset's estimated fair value and recognize an impairment charge
30
+ when the asset’s carrying value exceeds its estimated fair price.
31
+ sentences:
32
+ - What was the percentage change in net revenues for the Consumer Products segment
33
+ from 2022 to 2023?
34
+ - How are impairment losses on long-lived assets determined?
35
+ - What was the amount of pretax net losses on derivative instruments expected to
36
+ be reclassified into earnings over the next 12 months as of December 31, 2023,
37
+ according to the data provided?
38
+ - source_sentence: The company develops and produces renewable fuels, including but
39
+ not limited to renewable diesel, renewable gasoline, biodiesel, sustainable aviation
40
+ fuel and renewable natural gas (RNG).
41
+ sentences:
42
+ - What types of renewable fuels does the Chevron Renewable Energy Group produce?
43
+ - What are the main contributors to the revenue of Xbox?
44
+ - How have changes by Apple and Google affected the company's advertising capabilities?
45
+ - source_sentence: Our ERGs provide many contributions, such as mentoring programs
46
+ that connect diverse employees with senior leaders who can support their career
47
+ goals, partnerships with recruiters and diverse early career and professional
48
+ organizations that can assist in strengthening the diverse talent pipeline and
49
+ programs that educate and inform on the richness of the global cultures that we
50
+ share.
51
+ sentences:
52
+ - What phase of renovation was announced for Marina Bay Sands in 2023?
53
+ - How did the unit sales of new homes change in the fourth quarter of 2022 compared
54
+ to 2021?
55
+ - What kinds of contributions do ERGs provide?
56
+ - source_sentence: The initial terms of Hilton's management contracts are typically
57
+ 20 to 30 years.
58
+ sentences:
59
+ - What are the typical initial terms of Hilton's management contracts?
60
+ - What was the total revenue in millions for 2023 according to the disaggregated
61
+ revenue information by segment?
62
+ - What principle governs Macao under the Basic Law after December 20, 1999?
63
+ pipeline_tag: sentence-similarity
64
+ library_name: sentence-transformers
65
+ metrics:
66
+ - cosine_accuracy@1
67
+ - cosine_accuracy@3
68
+ - cosine_accuracy@5
69
+ - cosine_accuracy@10
70
+ - cosine_precision@1
71
+ - cosine_precision@3
72
+ - cosine_precision@5
73
+ - cosine_precision@10
74
+ - cosine_recall@1
75
+ - cosine_recall@3
76
+ - cosine_recall@5
77
+ - cosine_recall@10
78
+ - cosine_ndcg@10
79
+ - cosine_mrr@10
80
+ - cosine_map@100
81
+ model-index:
82
+ - name: BGE base Financial Matryoshka
83
+ results:
84
+ - task:
85
+ type: information-retrieval
86
+ name: Information Retrieval
87
+ dataset:
88
+ name: dim 768
89
+ type: dim_768
90
+ metrics:
91
+ - type: cosine_accuracy@1
92
+ value: 0.7
93
+ name: Cosine Accuracy@1
94
+ - type: cosine_accuracy@3
95
+ value: 0.8257142857142857
96
+ name: Cosine Accuracy@3
97
+ - type: cosine_accuracy@5
98
+ value: 0.8585714285714285
99
+ name: Cosine Accuracy@5
100
+ - type: cosine_accuracy@10
101
+ value: 0.9071428571428571
102
+ name: Cosine Accuracy@10
103
+ - type: cosine_precision@1
104
+ value: 0.7
105
+ name: Cosine Precision@1
106
+ - type: cosine_precision@3
107
+ value: 0.2752380952380952
108
+ name: Cosine Precision@3
109
+ - type: cosine_precision@5
110
+ value: 0.1717142857142857
111
+ name: Cosine Precision@5
112
+ - type: cosine_precision@10
113
+ value: 0.0907142857142857
114
+ name: Cosine Precision@10
115
+ - type: cosine_recall@1
116
+ value: 0.7
117
+ name: Cosine Recall@1
118
+ - type: cosine_recall@3
119
+ value: 0.8257142857142857
120
+ name: Cosine Recall@3
121
+ - type: cosine_recall@5
122
+ value: 0.8585714285714285
123
+ name: Cosine Recall@5
124
+ - type: cosine_recall@10
125
+ value: 0.9071428571428571
126
+ name: Cosine Recall@10
127
+ - type: cosine_ndcg@10
128
+ value: 0.8042901803629035
129
+ name: Cosine Ndcg@10
130
+ - type: cosine_mrr@10
131
+ value: 0.7714574829931975
132
+ name: Cosine Mrr@10
133
+ - type: cosine_map@100
134
+ value: 0.774634210341598
135
+ name: Cosine Map@100
136
+ - task:
137
+ type: information-retrieval
138
+ name: Information Retrieval
139
+ dataset:
140
+ name: dim 512
141
+ type: dim_512
142
+ metrics:
143
+ - type: cosine_accuracy@1
144
+ value: 0.7
145
+ name: Cosine Accuracy@1
146
+ - type: cosine_accuracy@3
147
+ value: 0.82
148
+ name: Cosine Accuracy@3
149
+ - type: cosine_accuracy@5
150
+ value: 0.85
151
+ name: Cosine Accuracy@5
152
+ - type: cosine_accuracy@10
153
+ value: 0.9057142857142857
154
+ name: Cosine Accuracy@10
155
+ - type: cosine_precision@1
156
+ value: 0.7
157
+ name: Cosine Precision@1
158
+ - type: cosine_precision@3
159
+ value: 0.2733333333333333
160
+ name: Cosine Precision@3
161
+ - type: cosine_precision@5
162
+ value: 0.16999999999999998
163
+ name: Cosine Precision@5
164
+ - type: cosine_precision@10
165
+ value: 0.09057142857142855
166
+ name: Cosine Precision@10
167
+ - type: cosine_recall@1
168
+ value: 0.7
169
+ name: Cosine Recall@1
170
+ - type: cosine_recall@3
171
+ value: 0.82
172
+ name: Cosine Recall@3
173
+ - type: cosine_recall@5
174
+ value: 0.85
175
+ name: Cosine Recall@5
176
+ - type: cosine_recall@10
177
+ value: 0.9057142857142857
178
+ name: Cosine Recall@10
179
+ - type: cosine_ndcg@10
180
+ value: 0.8020168113658792
181
+ name: Cosine Ndcg@10
182
+ - type: cosine_mrr@10
183
+ value: 0.7691179138321999
184
+ name: Cosine Mrr@10
185
+ - type: cosine_map@100
186
+ value: 0.7725170259617702
187
+ name: Cosine Map@100
188
+ - task:
189
+ type: information-retrieval
190
+ name: Information Retrieval
191
+ dataset:
192
+ name: dim 256
193
+ type: dim_256
194
+ metrics:
195
+ - type: cosine_accuracy@1
196
+ value: 0.6828571428571428
197
+ name: Cosine Accuracy@1
198
+ - type: cosine_accuracy@3
199
+ value: 0.82
200
+ name: Cosine Accuracy@3
201
+ - type: cosine_accuracy@5
202
+ value: 0.8528571428571429
203
+ name: Cosine Accuracy@5
204
+ - type: cosine_accuracy@10
205
+ value: 0.9
206
+ name: Cosine Accuracy@10
207
+ - type: cosine_precision@1
208
+ value: 0.6828571428571428
209
+ name: Cosine Precision@1
210
+ - type: cosine_precision@3
211
+ value: 0.2733333333333333
212
+ name: Cosine Precision@3
213
+ - type: cosine_precision@5
214
+ value: 0.17057142857142854
215
+ name: Cosine Precision@5
216
+ - type: cosine_precision@10
217
+ value: 0.09
218
+ name: Cosine Precision@10
219
+ - type: cosine_recall@1
220
+ value: 0.6828571428571428
221
+ name: Cosine Recall@1
222
+ - type: cosine_recall@3
223
+ value: 0.82
224
+ name: Cosine Recall@3
225
+ - type: cosine_recall@5
226
+ value: 0.8528571428571429
227
+ name: Cosine Recall@5
228
+ - type: cosine_recall@10
229
+ value: 0.9
230
+ name: Cosine Recall@10
231
+ - type: cosine_ndcg@10
232
+ value: 0.7934699471629124
233
+ name: Cosine Ndcg@10
234
+ - type: cosine_mrr@10
235
+ value: 0.7592913832199544
236
+ name: Cosine Mrr@10
237
+ - type: cosine_map@100
238
+ value: 0.762707392745061
239
+ name: Cosine Map@100
240
+ - task:
241
+ type: information-retrieval
242
+ name: Information Retrieval
243
+ dataset:
244
+ name: dim 128
245
+ type: dim_128
246
+ metrics:
247
+ - type: cosine_accuracy@1
248
+ value: 0.6742857142857143
249
+ name: Cosine Accuracy@1
250
+ - type: cosine_accuracy@3
251
+ value: 0.7971428571428572
252
+ name: Cosine Accuracy@3
253
+ - type: cosine_accuracy@5
254
+ value: 0.8285714285714286
255
+ name: Cosine Accuracy@5
256
+ - type: cosine_accuracy@10
257
+ value: 0.87
258
+ name: Cosine Accuracy@10
259
+ - type: cosine_precision@1
260
+ value: 0.6742857142857143
261
+ name: Cosine Precision@1
262
+ - type: cosine_precision@3
263
+ value: 0.26571428571428574
264
+ name: Cosine Precision@3
265
+ - type: cosine_precision@5
266
+ value: 0.1657142857142857
267
+ name: Cosine Precision@5
268
+ - type: cosine_precision@10
269
+ value: 0.087
270
+ name: Cosine Precision@10
271
+ - type: cosine_recall@1
272
+ value: 0.6742857142857143
273
+ name: Cosine Recall@1
274
+ - type: cosine_recall@3
275
+ value: 0.7971428571428572
276
+ name: Cosine Recall@3
277
+ - type: cosine_recall@5
278
+ value: 0.8285714285714286
279
+ name: Cosine Recall@5
280
+ - type: cosine_recall@10
281
+ value: 0.87
282
+ name: Cosine Recall@10
283
+ - type: cosine_ndcg@10
284
+ value: 0.7733108370502226
285
+ name: Cosine Ndcg@10
286
+ - type: cosine_mrr@10
287
+ value: 0.7422732426303855
288
+ name: Cosine Mrr@10
289
+ - type: cosine_map@100
290
+ value: 0.7472617177636981
291
+ name: Cosine Map@100
292
+ - task:
293
+ type: information-retrieval
294
+ name: Information Retrieval
295
+ dataset:
296
+ name: dim 64
297
+ type: dim_64
298
+ metrics:
299
+ - type: cosine_accuracy@1
300
+ value: 0.6242857142857143
301
+ name: Cosine Accuracy@1
302
+ - type: cosine_accuracy@3
303
+ value: 0.7514285714285714
304
+ name: Cosine Accuracy@3
305
+ - type: cosine_accuracy@5
306
+ value: 0.7914285714285715
307
+ name: Cosine Accuracy@5
308
+ - type: cosine_accuracy@10
309
+ value: 0.8371428571428572
310
+ name: Cosine Accuracy@10
311
+ - type: cosine_precision@1
312
+ value: 0.6242857142857143
313
+ name: Cosine Precision@1
314
+ - type: cosine_precision@3
315
+ value: 0.25047619047619046
316
+ name: Cosine Precision@3
317
+ - type: cosine_precision@5
318
+ value: 0.15828571428571425
319
+ name: Cosine Precision@5
320
+ - type: cosine_precision@10
321
+ value: 0.0837142857142857
322
+ name: Cosine Precision@10
323
+ - type: cosine_recall@1
324
+ value: 0.6242857142857143
325
+ name: Cosine Recall@1
326
+ - type: cosine_recall@3
327
+ value: 0.7514285714285714
328
+ name: Cosine Recall@3
329
+ - type: cosine_recall@5
330
+ value: 0.7914285714285715
331
+ name: Cosine Recall@5
332
+ - type: cosine_recall@10
333
+ value: 0.8371428571428572
334
+ name: Cosine Recall@10
335
+ - type: cosine_ndcg@10
336
+ value: 0.7307335092507811
337
+ name: Cosine Ndcg@10
338
+ - type: cosine_mrr@10
339
+ value: 0.6966581632653059
340
+ name: Cosine Mrr@10
341
+ - type: cosine_map@100
342
+ value: 0.7018444934217598
343
+ name: Cosine Map@100
344
+ ---
345
+
346
+ # BGE base Financial Matryoshka
347
+
348
+ 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.
349
+
350
+ ## Model Details
351
+
352
+ ### Model Description
353
+ - **Model Type:** Sentence Transformer
354
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
355
+ - **Maximum Sequence Length:** 512 tokens
356
+ - **Output Dimensionality:** 768 dimensions
357
+ - **Similarity Function:** Cosine Similarity
358
+ - **Training Dataset:**
359
+ - json
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/huggingface/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, 'architecture': '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("preetham315/bge-base-financial-matryoshka")
395
+ # Run inference
396
+ sentences = [
397
+ "The initial terms of Hilton's management contracts are typically 20 to 30 years.",
398
+ "What are the typical initial terms of Hilton's management contracts?",
399
+ 'What was the total revenue in millions for 2023 according to the disaggregated revenue information by segment?',
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)
408
+ # tensor([[1.0000, 0.8917, 0.2945],
409
+ # [0.8917, 1.0000, 0.2615],
410
+ # [0.2945, 0.2615, 1.0000]])
411
+ ```
412
+
413
+ <!--
414
+ ### Direct Usage (Transformers)
415
+
416
+ <details><summary>Click to see the direct usage in Transformers</summary>
417
+
418
+ </details>
419
+ -->
420
+
421
+ <!--
422
+ ### Downstream Usage (Sentence Transformers)
423
+
424
+ You can finetune this model on your own dataset.
425
+
426
+ <details><summary>Click to expand</summary>
427
+
428
+ </details>
429
+ -->
430
+
431
+ <!--
432
+ ### Out-of-Scope Use
433
+
434
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
435
+ -->
436
+
437
+ ## Evaluation
438
+
439
+ ### Metrics
440
+
441
+ #### Information Retrieval
442
+
443
+ * Dataset: `dim_768`
444
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
445
+ ```json
446
+ {
447
+ "truncate_dim": 768
448
+ }
449
+ ```
450
+
451
+ | Metric | Value |
452
+ |:--------------------|:-----------|
453
+ | cosine_accuracy@1 | 0.7 |
454
+ | cosine_accuracy@3 | 0.8257 |
455
+ | cosine_accuracy@5 | 0.8586 |
456
+ | cosine_accuracy@10 | 0.9071 |
457
+ | cosine_precision@1 | 0.7 |
458
+ | cosine_precision@3 | 0.2752 |
459
+ | cosine_precision@5 | 0.1717 |
460
+ | cosine_precision@10 | 0.0907 |
461
+ | cosine_recall@1 | 0.7 |
462
+ | cosine_recall@3 | 0.8257 |
463
+ | cosine_recall@5 | 0.8586 |
464
+ | cosine_recall@10 | 0.9071 |
465
+ | **cosine_ndcg@10** | **0.8043** |
466
+ | cosine_mrr@10 | 0.7715 |
467
+ | cosine_map@100 | 0.7746 |
468
+
469
+ #### Information Retrieval
470
+
471
+ * Dataset: `dim_512`
472
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
473
+ ```json
474
+ {
475
+ "truncate_dim": 512
476
+ }
477
+ ```
478
+
479
+ | Metric | Value |
480
+ |:--------------------|:----------|
481
+ | cosine_accuracy@1 | 0.7 |
482
+ | cosine_accuracy@3 | 0.82 |
483
+ | cosine_accuracy@5 | 0.85 |
484
+ | cosine_accuracy@10 | 0.9057 |
485
+ | cosine_precision@1 | 0.7 |
486
+ | cosine_precision@3 | 0.2733 |
487
+ | cosine_precision@5 | 0.17 |
488
+ | cosine_precision@10 | 0.0906 |
489
+ | cosine_recall@1 | 0.7 |
490
+ | cosine_recall@3 | 0.82 |
491
+ | cosine_recall@5 | 0.85 |
492
+ | cosine_recall@10 | 0.9057 |
493
+ | **cosine_ndcg@10** | **0.802** |
494
+ | cosine_mrr@10 | 0.7691 |
495
+ | cosine_map@100 | 0.7725 |
496
+
497
+ #### Information Retrieval
498
+
499
+ * Dataset: `dim_256`
500
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
501
+ ```json
502
+ {
503
+ "truncate_dim": 256
504
+ }
505
+ ```
506
+
507
+ | Metric | Value |
508
+ |:--------------------|:-----------|
509
+ | cosine_accuracy@1 | 0.6829 |
510
+ | cosine_accuracy@3 | 0.82 |
511
+ | cosine_accuracy@5 | 0.8529 |
512
+ | cosine_accuracy@10 | 0.9 |
513
+ | cosine_precision@1 | 0.6829 |
514
+ | cosine_precision@3 | 0.2733 |
515
+ | cosine_precision@5 | 0.1706 |
516
+ | cosine_precision@10 | 0.09 |
517
+ | cosine_recall@1 | 0.6829 |
518
+ | cosine_recall@3 | 0.82 |
519
+ | cosine_recall@5 | 0.8529 |
520
+ | cosine_recall@10 | 0.9 |
521
+ | **cosine_ndcg@10** | **0.7935** |
522
+ | cosine_mrr@10 | 0.7593 |
523
+ | cosine_map@100 | 0.7627 |
524
+
525
+ #### Information Retrieval
526
+
527
+ * Dataset: `dim_128`
528
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
529
+ ```json
530
+ {
531
+ "truncate_dim": 128
532
+ }
533
+ ```
534
+
535
+ | Metric | Value |
536
+ |:--------------------|:-----------|
537
+ | cosine_accuracy@1 | 0.6743 |
538
+ | cosine_accuracy@3 | 0.7971 |
539
+ | cosine_accuracy@5 | 0.8286 |
540
+ | cosine_accuracy@10 | 0.87 |
541
+ | cosine_precision@1 | 0.6743 |
542
+ | cosine_precision@3 | 0.2657 |
543
+ | cosine_precision@5 | 0.1657 |
544
+ | cosine_precision@10 | 0.087 |
545
+ | cosine_recall@1 | 0.6743 |
546
+ | cosine_recall@3 | 0.7971 |
547
+ | cosine_recall@5 | 0.8286 |
548
+ | cosine_recall@10 | 0.87 |
549
+ | **cosine_ndcg@10** | **0.7733** |
550
+ | cosine_mrr@10 | 0.7423 |
551
+ | cosine_map@100 | 0.7473 |
552
+
553
+ #### Information Retrieval
554
+
555
+ * Dataset: `dim_64`
556
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
557
+ ```json
558
+ {
559
+ "truncate_dim": 64
560
+ }
561
+ ```
562
+
563
+ | Metric | Value |
564
+ |:--------------------|:-----------|
565
+ | cosine_accuracy@1 | 0.6243 |
566
+ | cosine_accuracy@3 | 0.7514 |
567
+ | cosine_accuracy@5 | 0.7914 |
568
+ | cosine_accuracy@10 | 0.8371 |
569
+ | cosine_precision@1 | 0.6243 |
570
+ | cosine_precision@3 | 0.2505 |
571
+ | cosine_precision@5 | 0.1583 |
572
+ | cosine_precision@10 | 0.0837 |
573
+ | cosine_recall@1 | 0.6243 |
574
+ | cosine_recall@3 | 0.7514 |
575
+ | cosine_recall@5 | 0.7914 |
576
+ | cosine_recall@10 | 0.8371 |
577
+ | **cosine_ndcg@10** | **0.7307** |
578
+ | cosine_mrr@10 | 0.6967 |
579
+ | cosine_map@100 | 0.7018 |
580
+
581
+ <!--
582
+ ## Bias, Risks and Limitations
583
+
584
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
585
+ -->
586
+
587
+ <!--
588
+ ### Recommendations
589
+
590
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
591
+ -->
592
+
593
+ ## Training Details
594
+
595
+ ### Training Dataset
596
+
597
+ #### json
598
+
599
+ * Dataset: json
600
+ * Size: 6,300 training samples
601
+ * Columns: <code>positive</code> and <code>anchor</code>
602
+ * Approximate statistics based on the first 1000 samples:
603
+ | | positive | anchor |
604
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
605
+ | type | string | string |
606
+ | details | <ul><li>min: 6 tokens</li><li>mean: 44.97 tokens</li><li>max: 371 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 20.7 tokens</li><li>max: 51 tokens</li></ul> |
607
+ * Samples:
608
+ | positive | anchor |
609
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
610
+ | <code>As of December 31, 2023, cash and cash equivalents totaled $6.2 billion, showing an increase from $4.7 billion in 2022.</code> | <code>What amount did cash and cash equivalents reach at the end of 2023?</code> |
611
+ | <code>The GDPR imposes a comprehensive data protection regime with the potential for regulatory fines as much as up to the greater of 4% of worldwide turnover or €20 million.</code> | <code>How does the GDPR penalize non-compliance in terms of fines?</code> |
612
+ | <code>The 'Index to Financial Statement Schedules' serves as a guide to organize and present the content of the financial statement schedules.</code> | <code>What purpose does the 'Index to Financial Statement Schedules' serve?</code> |
613
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
614
+ ```json
615
+ {
616
+ "loss": "MultipleNegativesRankingLoss",
617
+ "matryoshka_dims": [
618
+ 768,
619
+ 512,
620
+ 256,
621
+ 128,
622
+ 64
623
+ ],
624
+ "matryoshka_weights": [
625
+ 1,
626
+ 1,
627
+ 1,
628
+ 1,
629
+ 1
630
+ ],
631
+ "n_dims_per_step": -1
632
+ }
633
+ ```
634
+
635
+ ### Training Hyperparameters
636
+ #### Non-Default Hyperparameters
637
+
638
+ - `eval_strategy`: epoch
639
+ - `per_device_train_batch_size`: 32
640
+ - `per_device_eval_batch_size`: 16
641
+ - `gradient_accumulation_steps`: 16
642
+ - `learning_rate`: 2e-05
643
+ - `num_train_epochs`: 1
644
+ - `lr_scheduler_type`: cosine
645
+ - `warmup_ratio`: 0.1
646
+ - `tf32`: False
647
+ - `load_best_model_at_end`: True
648
+ - `optim`: adamw_torch
649
+ - `batch_sampler`: no_duplicates
650
+
651
+ #### All Hyperparameters
652
+ <details><summary>Click to expand</summary>
653
+
654
+ - `overwrite_output_dir`: False
655
+ - `do_predict`: False
656
+ - `eval_strategy`: epoch
657
+ - `prediction_loss_only`: True
658
+ - `per_device_train_batch_size`: 32
659
+ - `per_device_eval_batch_size`: 16
660
+ - `per_gpu_train_batch_size`: None
661
+ - `per_gpu_eval_batch_size`: None
662
+ - `gradient_accumulation_steps`: 16
663
+ - `eval_accumulation_steps`: None
664
+ - `torch_empty_cache_steps`: None
665
+ - `learning_rate`: 2e-05
666
+ - `weight_decay`: 0.0
667
+ - `adam_beta1`: 0.9
668
+ - `adam_beta2`: 0.999
669
+ - `adam_epsilon`: 1e-08
670
+ - `max_grad_norm`: 1.0
671
+ - `num_train_epochs`: 1
672
+ - `max_steps`: -1
673
+ - `lr_scheduler_type`: cosine
674
+ - `lr_scheduler_kwargs`: {}
675
+ - `warmup_ratio`: 0.1
676
+ - `warmup_steps`: 0
677
+ - `log_level`: passive
678
+ - `log_level_replica`: warning
679
+ - `log_on_each_node`: True
680
+ - `logging_nan_inf_filter`: True
681
+ - `save_safetensors`: True
682
+ - `save_on_each_node`: False
683
+ - `save_only_model`: False
684
+ - `restore_callback_states_from_checkpoint`: False
685
+ - `no_cuda`: False
686
+ - `use_cpu`: False
687
+ - `use_mps_device`: False
688
+ - `seed`: 42
689
+ - `data_seed`: None
690
+ - `jit_mode_eval`: False
691
+ - `bf16`: False
692
+ - `fp16`: False
693
+ - `fp16_opt_level`: O1
694
+ - `half_precision_backend`: auto
695
+ - `bf16_full_eval`: False
696
+ - `fp16_full_eval`: False
697
+ - `tf32`: False
698
+ - `local_rank`: 0
699
+ - `ddp_backend`: None
700
+ - `tpu_num_cores`: None
701
+ - `tpu_metrics_debug`: False
702
+ - `debug`: []
703
+ - `dataloader_drop_last`: False
704
+ - `dataloader_num_workers`: 0
705
+ - `dataloader_prefetch_factor`: None
706
+ - `past_index`: -1
707
+ - `disable_tqdm`: False
708
+ - `remove_unused_columns`: True
709
+ - `label_names`: None
710
+ - `load_best_model_at_end`: True
711
+ - `ignore_data_skip`: False
712
+ - `fsdp`: []
713
+ - `fsdp_min_num_params`: 0
714
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
715
+ - `fsdp_transformer_layer_cls_to_wrap`: None
716
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
717
+ - `parallelism_config`: None
718
+ - `deepspeed`: None
719
+ - `label_smoothing_factor`: 0.0
720
+ - `optim`: adamw_torch
721
+ - `optim_args`: None
722
+ - `adafactor`: False
723
+ - `group_by_length`: False
724
+ - `length_column_name`: length
725
+ - `project`: huggingface
726
+ - `trackio_space_id`: trackio
727
+ - `ddp_find_unused_parameters`: None
728
+ - `ddp_bucket_cap_mb`: None
729
+ - `ddp_broadcast_buffers`: False
730
+ - `dataloader_pin_memory`: True
731
+ - `dataloader_persistent_workers`: False
732
+ - `skip_memory_metrics`: True
733
+ - `use_legacy_prediction_loop`: False
734
+ - `push_to_hub`: False
735
+ - `resume_from_checkpoint`: None
736
+ - `hub_model_id`: None
737
+ - `hub_strategy`: every_save
738
+ - `hub_private_repo`: None
739
+ - `hub_always_push`: False
740
+ - `hub_revision`: None
741
+ - `gradient_checkpointing`: False
742
+ - `gradient_checkpointing_kwargs`: None
743
+ - `include_inputs_for_metrics`: False
744
+ - `include_for_metrics`: []
745
+ - `eval_do_concat_batches`: True
746
+ - `fp16_backend`: auto
747
+ - `push_to_hub_model_id`: None
748
+ - `push_to_hub_organization`: None
749
+ - `mp_parameters`:
750
+ - `auto_find_batch_size`: False
751
+ - `full_determinism`: False
752
+ - `torchdynamo`: None
753
+ - `ray_scope`: last
754
+ - `ddp_timeout`: 1800
755
+ - `torch_compile`: False
756
+ - `torch_compile_backend`: None
757
+ - `torch_compile_mode`: None
758
+ - `include_tokens_per_second`: False
759
+ - `include_num_input_tokens_seen`: no
760
+ - `neftune_noise_alpha`: None
761
+ - `optim_target_modules`: None
762
+ - `batch_eval_metrics`: False
763
+ - `eval_on_start`: False
764
+ - `use_liger_kernel`: False
765
+ - `liger_kernel_config`: None
766
+ - `eval_use_gather_object`: False
767
+ - `average_tokens_across_devices`: True
768
+ - `prompts`: None
769
+ - `batch_sampler`: no_duplicates
770
+ - `multi_dataset_batch_sampler`: proportional
771
+ - `router_mapping`: {}
772
+ - `learning_rate_mapping`: {}
773
+
774
+ </details>
775
+
776
+ ### Training Logs
777
+ | Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
778
+ |:-------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
779
+ | -1 | -1 | - | 0.7623 | 0.7640 | 0.7500 | 0.7045 | 0.6426 |
780
+ | 0.8122 | 10 | 1.4367 | - | - | - | - | - |
781
+ | **1.0** | **13** | **-** | **0.8043** | **0.802** | **0.7935** | **0.7733** | **0.7307** |
782
+
783
+ * The bold row denotes the saved checkpoint.
784
+
785
+ ### Framework Versions
786
+ - Python: 3.12.12
787
+ - Sentence Transformers: 5.1.2
788
+ - Transformers: 4.57.1
789
+ - PyTorch: 2.9.0+cu126
790
+ - Accelerate: 1.11.0
791
+ - Datasets: 4.0.0
792
+ - Tokenizers: 0.22.1
793
+
794
+ ## Citation
795
+
796
+ ### BibTeX
797
+
798
+ #### Sentence Transformers
799
+ ```bibtex
800
+ @inproceedings{reimers-2019-sentence-bert,
801
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
802
+ author = "Reimers, Nils and Gurevych, Iryna",
803
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
804
+ month = "11",
805
+ year = "2019",
806
+ publisher = "Association for Computational Linguistics",
807
+ url = "https://arxiv.org/abs/1908.10084",
808
+ }
809
+ ```
810
+
811
+ #### MatryoshkaLoss
812
+ ```bibtex
813
+ @misc{kusupati2024matryoshka,
814
+ title={Matryoshka Representation Learning},
815
+ 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},
816
+ year={2024},
817
+ eprint={2205.13147},
818
+ archivePrefix={arXiv},
819
+ primaryClass={cs.LG}
820
+ }
821
+ ```
822
+
823
+ #### MultipleNegativesRankingLoss
824
+ ```bibtex
825
+ @misc{henderson2017efficient,
826
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
827
+ 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},
828
+ year={2017},
829
+ eprint={1705.00652},
830
+ archivePrefix={arXiv},
831
+ primaryClass={cs.CL}
832
+ }
833
+ ```
834
+
835
+ <!--
836
+ ## Glossary
837
+
838
+ *Clearly define terms in order to be accessible across audiences.*
839
+ -->
840
+
841
+ <!--
842
+ ## Model Card Authors
843
+
844
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
845
+ -->
846
+
847
+ <!--
848
+ ## Model Card Contact
849
+
850
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
851
+ -->
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
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
+ "transformers_version": "4.57.1",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.2",
4
+ "transformers": "4.57.1",
5
+ "pytorch": "2.9.0+cu126"
6
+ },
7
+ "model_type": "SentenceTransformer",
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4cab9be04b83fd199090c8d0be20d2e4f4adba7bb27f7add7f014f5f81d8280
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff