rbhatia46 commited on
Commit
ab5855e
1 Parent(s): fd3939c

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,816 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: As of December 31, 2023, deferred revenues for unsatisfied performance
35
+ obligations consisted of $769 million related to Hilton Honors that will be recognized
36
+ as revenue over approximately the next two years.
37
+ sentences:
38
+ - How many shares of common stock were issued in both 2022 and 2023?
39
+ - What is the projected timeline for recognizing revenue from deferred revenues
40
+ related to Hilton Honors as of December 31, 2023?
41
+ - What acquisitions did CVS Health Corporation complete in 2023 to enhance their
42
+ care delivery strategy?
43
+ - source_sentence: If a good or service does not qualify as distinct, it is combined
44
+ with the other non-distinct goods or services within the arrangement and these
45
+ combined goods or services are treated as a single performance obligation for
46
+ accounting purposes. The arrangement's transaction price is then allocated to
47
+ each performance obligation based on the relative standalone selling price of
48
+ each performance obligation.
49
+ sentences:
50
+ - What does the summary table indicate about the company's activities at the end
51
+ of 2023?
52
+ - What governs the treatment of goods or services that are not distinct within a
53
+ contractual arrangement?
54
+ - What is the basis for the Company to determine the Standalone Selling Price (SSP)
55
+ for each distinct performance obligation in contracts with multiple performance
56
+ obligations?
57
+ - source_sentence: As of January 2023, the maximum daily borrowing capacity under
58
+ the commercial paper program was approximately $2.75 billion.
59
+ sentences:
60
+ - What is the maximum daily borrowing capacity under the commercial paper program
61
+ as of January 2023?
62
+ - When does the Company's fiscal year end?
63
+ - How much cash did acquisition activities use in 2023?
64
+ - source_sentence: Federal Home Loan Bank borrowings had an interest rate of 4.59%
65
+ in 2022, which increased to 5.14% in 2023.
66
+ sentences:
67
+ - By what percentage did the company's capital expenditures increase in fiscal 2023
68
+ compared to fiscal 2022?
69
+ - What is the significance of Note 13 in the context of legal proceedings described
70
+ in the Annual Report on Form 10-K?
71
+ - How much did the Federal Home Loan Bank borrowings increase in terms of interest
72
+ rates from 2022 to 2023?
73
+ - source_sentence: The design of the Annual Report, with the consolidated financial
74
+ statements placed immediately after Part IV, enhances the integration of financial
75
+ data by maintaining a coherent structure.
76
+ sentences:
77
+ - How does the structure of the Annual Report on Form 10-K facilitate the integration
78
+ of the consolidated financial statements?
79
+ - Where can one find the Glossary of Terms and Acronyms in Item 8?
80
+ - What part of the annual report contains the consolidated financial statements
81
+ and accompanying notes?
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.6957142857142857
94
+ name: Cosine Accuracy@1
95
+ - type: cosine_accuracy@3
96
+ value: 0.8171428571428572
97
+ name: Cosine Accuracy@3
98
+ - type: cosine_accuracy@5
99
+ value: 0.8628571428571429
100
+ name: Cosine Accuracy@5
101
+ - type: cosine_accuracy@10
102
+ value: 0.9
103
+ name: Cosine Accuracy@10
104
+ - type: cosine_precision@1
105
+ value: 0.6957142857142857
106
+ name: Cosine Precision@1
107
+ - type: cosine_precision@3
108
+ value: 0.2723809523809524
109
+ name: Cosine Precision@3
110
+ - type: cosine_precision@5
111
+ value: 0.17257142857142854
112
+ name: Cosine Precision@5
113
+ - type: cosine_precision@10
114
+ value: 0.08999999999999998
115
+ name: Cosine Precision@10
116
+ - type: cosine_recall@1
117
+ value: 0.6957142857142857
118
+ name: Cosine Recall@1
119
+ - type: cosine_recall@3
120
+ value: 0.8171428571428572
121
+ name: Cosine Recall@3
122
+ - type: cosine_recall@5
123
+ value: 0.8628571428571429
124
+ name: Cosine Recall@5
125
+ - type: cosine_recall@10
126
+ value: 0.9
127
+ name: Cosine Recall@10
128
+ - type: cosine_ndcg@10
129
+ value: 0.7971144469297426
130
+ name: Cosine Ndcg@10
131
+ - type: cosine_mrr@10
132
+ value: 0.7641831065759639
133
+ name: Cosine Mrr@10
134
+ - type: cosine_map@100
135
+ value: 0.7681728985040082
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.6942857142857143
146
+ name: Cosine Accuracy@1
147
+ - type: cosine_accuracy@3
148
+ value: 0.81
149
+ name: Cosine Accuracy@3
150
+ - type: cosine_accuracy@5
151
+ value: 0.8514285714285714
152
+ name: Cosine Accuracy@5
153
+ - type: cosine_accuracy@10
154
+ value: 0.9
155
+ name: Cosine Accuracy@10
156
+ - type: cosine_precision@1
157
+ value: 0.6942857142857143
158
+ name: Cosine Precision@1
159
+ - type: cosine_precision@3
160
+ value: 0.27
161
+ name: Cosine Precision@3
162
+ - type: cosine_precision@5
163
+ value: 0.17028571428571426
164
+ name: Cosine Precision@5
165
+ - type: cosine_precision@10
166
+ value: 0.09
167
+ name: Cosine Precision@10
168
+ - type: cosine_recall@1
169
+ value: 0.6942857142857143
170
+ name: Cosine Recall@1
171
+ - type: cosine_recall@3
172
+ value: 0.81
173
+ name: Cosine Recall@3
174
+ - type: cosine_recall@5
175
+ value: 0.8514285714285714
176
+ name: Cosine Recall@5
177
+ - type: cosine_recall@10
178
+ value: 0.9
179
+ name: Cosine Recall@10
180
+ - type: cosine_ndcg@10
181
+ value: 0.7951260604161544
182
+ name: Cosine Ndcg@10
183
+ - type: cosine_mrr@10
184
+ value: 0.7617998866213151
185
+ name: Cosine Mrr@10
186
+ - type: cosine_map@100
187
+ value: 0.7658003405075238
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.7014285714285714
198
+ name: Cosine Accuracy@1
199
+ - type: cosine_accuracy@3
200
+ value: 0.7971428571428572
201
+ name: Cosine Accuracy@3
202
+ - type: cosine_accuracy@5
203
+ value: 0.85
204
+ name: Cosine Accuracy@5
205
+ - type: cosine_accuracy@10
206
+ value: 0.8885714285714286
207
+ name: Cosine Accuracy@10
208
+ - type: cosine_precision@1
209
+ value: 0.7014285714285714
210
+ name: Cosine Precision@1
211
+ - type: cosine_precision@3
212
+ value: 0.26571428571428574
213
+ name: Cosine Precision@3
214
+ - type: cosine_precision@5
215
+ value: 0.16999999999999998
216
+ name: Cosine Precision@5
217
+ - type: cosine_precision@10
218
+ value: 0.08885714285714284
219
+ name: Cosine Precision@10
220
+ - type: cosine_recall@1
221
+ value: 0.7014285714285714
222
+ name: Cosine Recall@1
223
+ - type: cosine_recall@3
224
+ value: 0.7971428571428572
225
+ name: Cosine Recall@3
226
+ - type: cosine_recall@5
227
+ value: 0.85
228
+ name: Cosine Recall@5
229
+ - type: cosine_recall@10
230
+ value: 0.8885714285714286
231
+ name: Cosine Recall@10
232
+ - type: cosine_ndcg@10
233
+ value: 0.793266992460996
234
+ name: Cosine Ndcg@10
235
+ - type: cosine_mrr@10
236
+ value: 0.7629580498866213
237
+ name: Cosine Mrr@10
238
+ - type: cosine_map@100
239
+ value: 0.7678096436855835
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.6957142857142857
250
+ name: Cosine Accuracy@1
251
+ - type: cosine_accuracy@3
252
+ value: 0.8014285714285714
253
+ name: Cosine Accuracy@3
254
+ - type: cosine_accuracy@5
255
+ value: 0.8357142857142857
256
+ name: Cosine Accuracy@5
257
+ - type: cosine_accuracy@10
258
+ value: 0.8842857142857142
259
+ name: Cosine Accuracy@10
260
+ - type: cosine_precision@1
261
+ value: 0.6957142857142857
262
+ name: Cosine Precision@1
263
+ - type: cosine_precision@3
264
+ value: 0.2671428571428571
265
+ name: Cosine Precision@3
266
+ - type: cosine_precision@5
267
+ value: 0.16714285714285712
268
+ name: Cosine Precision@5
269
+ - type: cosine_precision@10
270
+ value: 0.08842857142857141
271
+ name: Cosine Precision@10
272
+ - type: cosine_recall@1
273
+ value: 0.6957142857142857
274
+ name: Cosine Recall@1
275
+ - type: cosine_recall@3
276
+ value: 0.8014285714285714
277
+ name: Cosine Recall@3
278
+ - type: cosine_recall@5
279
+ value: 0.8357142857142857
280
+ name: Cosine Recall@5
281
+ - type: cosine_recall@10
282
+ value: 0.8842857142857142
283
+ name: Cosine Recall@10
284
+ - type: cosine_ndcg@10
285
+ value: 0.787378246207931
286
+ name: Cosine Ndcg@10
287
+ - type: cosine_mrr@10
288
+ value: 0.7566984126984126
289
+ name: Cosine Mrr@10
290
+ - type: cosine_map@100
291
+ value: 0.7613545312565108
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.6571428571428571
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.8285714285714286
308
+ name: Cosine Accuracy@5
309
+ - type: cosine_accuracy@10
310
+ value: 0.8757142857142857
311
+ name: Cosine Accuracy@10
312
+ - type: cosine_precision@1
313
+ value: 0.6571428571428571
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.1657142857142857
320
+ name: Cosine Precision@5
321
+ - type: cosine_precision@10
322
+ value: 0.08757142857142856
323
+ name: Cosine Precision@10
324
+ - type: cosine_recall@1
325
+ value: 0.6571428571428571
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.8285714285714286
332
+ name: Cosine Recall@5
333
+ - type: cosine_recall@10
334
+ value: 0.8757142857142857
335
+ name: Cosine Recall@10
336
+ - type: cosine_ndcg@10
337
+ value: 0.7655516319615892
338
+ name: Cosine Ndcg@10
339
+ - type: cosine_mrr@10
340
+ value: 0.7303951247165531
341
+ name: Cosine Mrr@10
342
+ - type: cosine_map@100
343
+ value: 0.7349875161463472
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("rbhatia46/bge-base-financial-nvidia-matryoshka")
395
+ # Run inference
396
+ sentences = [
397
+ 'The design of the Annual Report, with the consolidated financial statements placed immediately after Part IV, enhances the integration of financial data by maintaining a coherent structure.',
398
+ 'How does the structure of the Annual Report on Form 10-K facilitate the integration of the consolidated financial statements?',
399
+ 'Where can one find the Glossary of Terms and Acronyms in Item 8?',
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.6957 |
446
+ | cosine_accuracy@3 | 0.8171 |
447
+ | cosine_accuracy@5 | 0.8629 |
448
+ | cosine_accuracy@10 | 0.9 |
449
+ | cosine_precision@1 | 0.6957 |
450
+ | cosine_precision@3 | 0.2724 |
451
+ | cosine_precision@5 | 0.1726 |
452
+ | cosine_precision@10 | 0.09 |
453
+ | cosine_recall@1 | 0.6957 |
454
+ | cosine_recall@3 | 0.8171 |
455
+ | cosine_recall@5 | 0.8629 |
456
+ | cosine_recall@10 | 0.9 |
457
+ | cosine_ndcg@10 | 0.7971 |
458
+ | cosine_mrr@10 | 0.7642 |
459
+ | **cosine_map@100** | **0.7682** |
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.6943 |
468
+ | cosine_accuracy@3 | 0.81 |
469
+ | cosine_accuracy@5 | 0.8514 |
470
+ | cosine_accuracy@10 | 0.9 |
471
+ | cosine_precision@1 | 0.6943 |
472
+ | cosine_precision@3 | 0.27 |
473
+ | cosine_precision@5 | 0.1703 |
474
+ | cosine_precision@10 | 0.09 |
475
+ | cosine_recall@1 | 0.6943 |
476
+ | cosine_recall@3 | 0.81 |
477
+ | cosine_recall@5 | 0.8514 |
478
+ | cosine_recall@10 | 0.9 |
479
+ | cosine_ndcg@10 | 0.7951 |
480
+ | cosine_mrr@10 | 0.7618 |
481
+ | **cosine_map@100** | **0.7658** |
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.7014 |
490
+ | cosine_accuracy@3 | 0.7971 |
491
+ | cosine_accuracy@5 | 0.85 |
492
+ | cosine_accuracy@10 | 0.8886 |
493
+ | cosine_precision@1 | 0.7014 |
494
+ | cosine_precision@3 | 0.2657 |
495
+ | cosine_precision@5 | 0.17 |
496
+ | cosine_precision@10 | 0.0889 |
497
+ | cosine_recall@1 | 0.7014 |
498
+ | cosine_recall@3 | 0.7971 |
499
+ | cosine_recall@5 | 0.85 |
500
+ | cosine_recall@10 | 0.8886 |
501
+ | cosine_ndcg@10 | 0.7933 |
502
+ | cosine_mrr@10 | 0.763 |
503
+ | **cosine_map@100** | **0.7678** |
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.6957 |
512
+ | cosine_accuracy@3 | 0.8014 |
513
+ | cosine_accuracy@5 | 0.8357 |
514
+ | cosine_accuracy@10 | 0.8843 |
515
+ | cosine_precision@1 | 0.6957 |
516
+ | cosine_precision@3 | 0.2671 |
517
+ | cosine_precision@5 | 0.1671 |
518
+ | cosine_precision@10 | 0.0884 |
519
+ | cosine_recall@1 | 0.6957 |
520
+ | cosine_recall@3 | 0.8014 |
521
+ | cosine_recall@5 | 0.8357 |
522
+ | cosine_recall@10 | 0.8843 |
523
+ | cosine_ndcg@10 | 0.7874 |
524
+ | cosine_mrr@10 | 0.7567 |
525
+ | **cosine_map@100** | **0.7614** |
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.6571 |
534
+ | cosine_accuracy@3 | 0.7871 |
535
+ | cosine_accuracy@5 | 0.8286 |
536
+ | cosine_accuracy@10 | 0.8757 |
537
+ | cosine_precision@1 | 0.6571 |
538
+ | cosine_precision@3 | 0.2624 |
539
+ | cosine_precision@5 | 0.1657 |
540
+ | cosine_precision@10 | 0.0876 |
541
+ | cosine_recall@1 | 0.6571 |
542
+ | cosine_recall@3 | 0.7871 |
543
+ | cosine_recall@5 | 0.8286 |
544
+ | cosine_recall@10 | 0.8757 |
545
+ | cosine_ndcg@10 | 0.7656 |
546
+ | cosine_mrr@10 | 0.7304 |
547
+ | **cosine_map@100** | **0.735** |
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: 6 tokens</li><li>mean: 45.53 tokens</li><li>max: 222 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 20.3 tokens</li><li>max: 45 tokens</li></ul> |
575
+ * Samples:
576
+ | positive | anchor |
577
+ |:---------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------|
578
+ | <code>Acquisition activity used cash of $765 million in 2023, primarily related to a Beauty acquisition.</code> | <code>How much cash did acquisition activities use in 2023?</code> |
579
+ | <code>In a financial report, Part IV Item 15 includes Exhibits and Financial Statement Schedules as mentioned.</code> | <code>What content can be expected under Part IV Item 15 in a financial report?</code> |
580
+ | <code>we had more than 8.3 million fiber consumer wireline broadband customers, adding 1.1 million during the year.</code> | <code>How many fiber consumer wireline broadband customers did the company have at the end of the year?</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
+ - `learning_rate`: 2e-05
634
+ - `weight_decay`: 0.0
635
+ - `adam_beta1`: 0.9
636
+ - `adam_beta2`: 0.999
637
+ - `adam_epsilon`: 1e-08
638
+ - `max_grad_norm`: 1.0
639
+ - `num_train_epochs`: 4
640
+ - `max_steps`: -1
641
+ - `lr_scheduler_type`: cosine
642
+ - `lr_scheduler_kwargs`: {}
643
+ - `warmup_ratio`: 0.1
644
+ - `warmup_steps`: 0
645
+ - `log_level`: passive
646
+ - `log_level_replica`: warning
647
+ - `log_on_each_node`: True
648
+ - `logging_nan_inf_filter`: True
649
+ - `save_safetensors`: True
650
+ - `save_on_each_node`: False
651
+ - `save_only_model`: False
652
+ - `restore_callback_states_from_checkpoint`: False
653
+ - `no_cuda`: False
654
+ - `use_cpu`: False
655
+ - `use_mps_device`: False
656
+ - `seed`: 42
657
+ - `data_seed`: None
658
+ - `jit_mode_eval`: False
659
+ - `use_ipex`: False
660
+ - `bf16`: True
661
+ - `fp16`: False
662
+ - `fp16_opt_level`: O1
663
+ - `half_precision_backend`: auto
664
+ - `bf16_full_eval`: False
665
+ - `fp16_full_eval`: False
666
+ - `tf32`: True
667
+ - `local_rank`: 0
668
+ - `ddp_backend`: None
669
+ - `tpu_num_cores`: None
670
+ - `tpu_metrics_debug`: False
671
+ - `debug`: []
672
+ - `dataloader_drop_last`: False
673
+ - `dataloader_num_workers`: 0
674
+ - `dataloader_prefetch_factor`: None
675
+ - `past_index`: -1
676
+ - `disable_tqdm`: False
677
+ - `remove_unused_columns`: True
678
+ - `label_names`: None
679
+ - `load_best_model_at_end`: True
680
+ - `ignore_data_skip`: False
681
+ - `fsdp`: []
682
+ - `fsdp_min_num_params`: 0
683
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
684
+ - `fsdp_transformer_layer_cls_to_wrap`: None
685
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
686
+ - `deepspeed`: None
687
+ - `label_smoothing_factor`: 0.0
688
+ - `optim`: adamw_torch_fused
689
+ - `optim_args`: None
690
+ - `adafactor`: False
691
+ - `group_by_length`: False
692
+ - `length_column_name`: length
693
+ - `ddp_find_unused_parameters`: None
694
+ - `ddp_bucket_cap_mb`: None
695
+ - `ddp_broadcast_buffers`: False
696
+ - `dataloader_pin_memory`: True
697
+ - `dataloader_persistent_workers`: False
698
+ - `skip_memory_metrics`: True
699
+ - `use_legacy_prediction_loop`: False
700
+ - `push_to_hub`: False
701
+ - `resume_from_checkpoint`: None
702
+ - `hub_model_id`: None
703
+ - `hub_strategy`: every_save
704
+ - `hub_private_repo`: False
705
+ - `hub_always_push`: False
706
+ - `gradient_checkpointing`: False
707
+ - `gradient_checkpointing_kwargs`: None
708
+ - `include_inputs_for_metrics`: False
709
+ - `eval_do_concat_batches`: True
710
+ - `fp16_backend`: auto
711
+ - `push_to_hub_model_id`: None
712
+ - `push_to_hub_organization`: None
713
+ - `mp_parameters`:
714
+ - `auto_find_batch_size`: False
715
+ - `full_determinism`: False
716
+ - `torchdynamo`: None
717
+ - `ray_scope`: last
718
+ - `ddp_timeout`: 1800
719
+ - `torch_compile`: False
720
+ - `torch_compile_backend`: None
721
+ - `torch_compile_mode`: None
722
+ - `dispatch_batches`: None
723
+ - `split_batches`: None
724
+ - `include_tokens_per_second`: False
725
+ - `include_num_input_tokens_seen`: False
726
+ - `neftune_noise_alpha`: None
727
+ - `optim_target_modules`: None
728
+ - `batch_eval_metrics`: False
729
+ - `batch_sampler`: no_duplicates
730
+ - `multi_dataset_batch_sampler`: proportional
731
+
732
+ </details>
733
+
734
+ ### Training Logs
735
+ | 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 |
736
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
737
+ | 0.8122 | 10 | 1.5751 | - | - | - | - | - |
738
+ | 0.9746 | 12 | - | - | - | - | - | 0.7580 |
739
+ | 0.8122 | 10 | 0.6362 | - | - | - | - | - |
740
+ | 0.9746 | 12 | - | 0.7503 | 0.7576 | 0.7653 | 0.7282 | 0.7638 |
741
+ | 1.6244 | 20 | 0.4426 | - | - | - | - | - |
742
+ | 1.9492 | 24 | - | 0.7544 | 0.7662 | 0.7640 | 0.7311 | 0.7676 |
743
+ | 2.4365 | 30 | 0.3217 | - | - | - | - | - |
744
+ | 2.9239 | 36 | - | 0.7608 | 0.7684 | 0.7662 | 0.7341 | 0.7686 |
745
+ | 3.2487 | 40 | 0.2761 | - | - | - | - | - |
746
+ | **3.8985** | **48** | **-** | **0.7614** | **0.7678** | **0.7658** | **0.735** | **0.7682** |
747
+
748
+ * The bold row denotes the saved checkpoint.
749
+
750
+ ### Framework Versions
751
+ - Python: 3.10.6
752
+ - Sentence Transformers: 3.0.1
753
+ - Transformers: 4.41.2
754
+ - PyTorch: 2.1.2+cu121
755
+ - Accelerate: 0.31.0
756
+ - Datasets: 2.19.1
757
+ - Tokenizers: 0.19.1
758
+
759
+ ## Citation
760
+
761
+ ### BibTeX
762
+
763
+ #### Sentence Transformers
764
+ ```bibtex
765
+ @inproceedings{reimers-2019-sentence-bert,
766
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
767
+ author = "Reimers, Nils and Gurevych, Iryna",
768
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
769
+ month = "11",
770
+ year = "2019",
771
+ publisher = "Association for Computational Linguistics",
772
+ url = "https://arxiv.org/abs/1908.10084",
773
+ }
774
+ ```
775
+
776
+ #### MatryoshkaLoss
777
+ ```bibtex
778
+ @misc{kusupati2024matryoshka,
779
+ title={Matryoshka Representation Learning},
780
+ 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},
781
+ year={2024},
782
+ eprint={2205.13147},
783
+ archivePrefix={arXiv},
784
+ primaryClass={cs.LG}
785
+ }
786
+ ```
787
+
788
+ #### MultipleNegativesRankingLoss
789
+ ```bibtex
790
+ @misc{henderson2017efficient,
791
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
792
+ 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},
793
+ year={2017},
794
+ eprint={1705.00652},
795
+ archivePrefix={arXiv},
796
+ primaryClass={cs.CL}
797
+ }
798
+ ```
799
+
800
+ <!--
801
+ ## Glossary
802
+
803
+ *Clearly define terms in order to be accessible across audiences.*
804
+ -->
805
+
806
+ <!--
807
+ ## Model Card Authors
808
+
809
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
810
+ -->
811
+
812
+ <!--
813
+ ## Model Card Contact
814
+
815
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
816
+ -->
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.0.1",
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:09ee77dd85e39da697ac6ea5955d7b9021f1702b9c004a9a90d9ee3d9bde56ed
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