NickyNicky commited on
Commit
d0d8d12
1 Parent(s): d460c8e

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,824 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: A number of factors may impact ESKD growth rates, including mortality
35
+ rates for dialysis patients or CKD patients, the aging of the U.S. population,
36
+ transplant rates, incidence rates for diseases that cause kidney failure such
37
+ as diabetes and hypertension, growth rates of minority populations with higher
38
+ than average incidence rates of ESKD.
39
+ sentences:
40
+ - By how much did the company increase its quarterly cash dividend in February 2023?
41
+ - What factors may impact the growth rates of the ESKD patient population?
42
+ - What percentage increase did salaries and related costs experience at Delta Air
43
+ Lines from 2022 to 2023?
44
+ - source_sentence: HIV product sales increased 6% to $18.2 billion in 2023, compared
45
+ to 2022.
46
+ sentences:
47
+ - What were the present values of lease liabilities for operating and finance leases
48
+ as of December 31, 2023?
49
+ - By what percentage did HIV product sales increase in 2023 compared to the previous
50
+ year?
51
+ - How is interest income not attributable to the Card Member loan portfolio primarily
52
+ represented in financial documents?
53
+ - source_sentence: If a violation is found, a broad range of remedies is potentially
54
+ available to the Commission and/or CMA, including imposing a fine and/or the prohibition
55
+ or restriction of certain business practices.
56
+ sentences:
57
+ - What are the potential remedies if a violation is found by the European Commission
58
+ or the U.K. Competition and Markets Authority in their investigation of automotive
59
+ companies?
60
+ - By which auditing standards were the consolidated financial statements of Salesforce,
61
+ Inc. audited?
62
+ - What is the main role of Kroger's Chief Executive Officer in the company?
63
+ - source_sentence: The discussion in Hewlett Packard Enterprise's Form 10-K highlights
64
+ factors impacting costs and revenues, including easing supply chain constraints,
65
+ foreign exchange pressures, inflationary trends, and recent tax developments potentially
66
+ affecting their financial outcomes.
67
+ sentences:
68
+ - Is the outcome of the investigation into Tesla's waste segregation practices currently
69
+ determinable?
70
+ - How does Hewlett Packard Enterprise justify the exclusion of transformation costs
71
+ from its non-GAAP financial measures?
72
+ - In the context of Hewlett Packard Enterprise's recent financial discussions, what
73
+ factors are expected to impact their operational costs and revenue growth moving
74
+ forward?
75
+ - source_sentence: Our Records Management and Data Management service revenue growth
76
+ is being negatively impacted by declining activity rates as stored records and
77
+ tapes are becoming less active and more archival.
78
+ sentences:
79
+ - How is Iron Mountain addressing the decline in activity rates in their Records
80
+ and Data Management services?
81
+ - What services do companies that build fiber-based networks provide in the Connectivity
82
+ & Platforms markets?
83
+ - What business outcomes is HPE focused on accelerating with its technological solutions?
84
+ model-index:
85
+ - name: BGE base Financial Matryoshka
86
+ results:
87
+ - task:
88
+ type: information-retrieval
89
+ name: Information Retrieval
90
+ dataset:
91
+ name: dim 768
92
+ type: dim_768
93
+ metrics:
94
+ - type: cosine_accuracy@1
95
+ value: 0.7057142857142857
96
+ name: Cosine Accuracy@1
97
+ - type: cosine_accuracy@3
98
+ value: 0.8457142857142858
99
+ name: Cosine Accuracy@3
100
+ - type: cosine_accuracy@5
101
+ value: 0.8785714285714286
102
+ name: Cosine Accuracy@5
103
+ - type: cosine_accuracy@10
104
+ value: 0.9114285714285715
105
+ name: Cosine Accuracy@10
106
+ - type: cosine_precision@1
107
+ value: 0.7057142857142857
108
+ name: Cosine Precision@1
109
+ - type: cosine_precision@3
110
+ value: 0.2819047619047619
111
+ name: Cosine Precision@3
112
+ - type: cosine_precision@5
113
+ value: 0.17571428571428568
114
+ name: Cosine Precision@5
115
+ - type: cosine_precision@10
116
+ value: 0.09114285714285714
117
+ name: Cosine Precision@10
118
+ - type: cosine_recall@1
119
+ value: 0.7057142857142857
120
+ name: Cosine Recall@1
121
+ - type: cosine_recall@3
122
+ value: 0.8457142857142858
123
+ name: Cosine Recall@3
124
+ - type: cosine_recall@5
125
+ value: 0.8785714285714286
126
+ name: Cosine Recall@5
127
+ - type: cosine_recall@10
128
+ value: 0.9114285714285715
129
+ name: Cosine Recall@10
130
+ - type: cosine_ndcg@10
131
+ value: 0.8125296344519609
132
+ name: Cosine Ndcg@10
133
+ - type: cosine_mrr@10
134
+ value: 0.7804263038548749
135
+ name: Cosine Mrr@10
136
+ - type: cosine_map@100
137
+ value: 0.7839408125709297
138
+ name: Cosine Map@100
139
+ - task:
140
+ type: information-retrieval
141
+ name: Information Retrieval
142
+ dataset:
143
+ name: dim 512
144
+ type: dim_512
145
+ metrics:
146
+ - type: cosine_accuracy@1
147
+ value: 0.7071428571428572
148
+ name: Cosine Accuracy@1
149
+ - type: cosine_accuracy@3
150
+ value: 0.8428571428571429
151
+ name: Cosine Accuracy@3
152
+ - type: cosine_accuracy@5
153
+ value: 0.8742857142857143
154
+ name: Cosine Accuracy@5
155
+ - type: cosine_accuracy@10
156
+ value: 0.9114285714285715
157
+ name: Cosine Accuracy@10
158
+ - type: cosine_precision@1
159
+ value: 0.7071428571428572
160
+ name: Cosine Precision@1
161
+ - type: cosine_precision@3
162
+ value: 0.28095238095238095
163
+ name: Cosine Precision@3
164
+ - type: cosine_precision@5
165
+ value: 0.17485714285714282
166
+ name: Cosine Precision@5
167
+ - type: cosine_precision@10
168
+ value: 0.09114285714285714
169
+ name: Cosine Precision@10
170
+ - type: cosine_recall@1
171
+ value: 0.7071428571428572
172
+ name: Cosine Recall@1
173
+ - type: cosine_recall@3
174
+ value: 0.8428571428571429
175
+ name: Cosine Recall@3
176
+ - type: cosine_recall@5
177
+ value: 0.8742857142857143
178
+ name: Cosine Recall@5
179
+ - type: cosine_recall@10
180
+ value: 0.9114285714285715
181
+ name: Cosine Recall@10
182
+ - type: cosine_ndcg@10
183
+ value: 0.8126517351231356
184
+ name: Cosine Ndcg@10
185
+ - type: cosine_mrr@10
186
+ value: 0.7807267573696143
187
+ name: Cosine Mrr@10
188
+ - type: cosine_map@100
189
+ value: 0.7841188299664252
190
+ name: Cosine Map@100
191
+ - task:
192
+ type: information-retrieval
193
+ name: Information Retrieval
194
+ dataset:
195
+ name: dim 256
196
+ type: dim_256
197
+ metrics:
198
+ - type: cosine_accuracy@1
199
+ value: 0.7028571428571428
200
+ name: Cosine Accuracy@1
201
+ - type: cosine_accuracy@3
202
+ value: 0.8357142857142857
203
+ name: Cosine Accuracy@3
204
+ - type: cosine_accuracy@5
205
+ value: 0.8685714285714285
206
+ name: Cosine Accuracy@5
207
+ - type: cosine_accuracy@10
208
+ value: 0.9071428571428571
209
+ name: Cosine Accuracy@10
210
+ - type: cosine_precision@1
211
+ value: 0.7028571428571428
212
+ name: Cosine Precision@1
213
+ - type: cosine_precision@3
214
+ value: 0.2785714285714286
215
+ name: Cosine Precision@3
216
+ - type: cosine_precision@5
217
+ value: 0.1737142857142857
218
+ name: Cosine Precision@5
219
+ - type: cosine_precision@10
220
+ value: 0.09071428571428572
221
+ name: Cosine Precision@10
222
+ - type: cosine_recall@1
223
+ value: 0.7028571428571428
224
+ name: Cosine Recall@1
225
+ - type: cosine_recall@3
226
+ value: 0.8357142857142857
227
+ name: Cosine Recall@3
228
+ - type: cosine_recall@5
229
+ value: 0.8685714285714285
230
+ name: Cosine Recall@5
231
+ - type: cosine_recall@10
232
+ value: 0.9071428571428571
233
+ name: Cosine Recall@10
234
+ - type: cosine_ndcg@10
235
+ value: 0.8086618947757659
236
+ name: Cosine Ndcg@10
237
+ - type: cosine_mrr@10
238
+ value: 0.7768820861678005
239
+ name: Cosine Mrr@10
240
+ - type: cosine_map@100
241
+ value: 0.7806177775944575
242
+ name: Cosine Map@100
243
+ - task:
244
+ type: information-retrieval
245
+ name: Information Retrieval
246
+ dataset:
247
+ name: dim 128
248
+ type: dim_128
249
+ metrics:
250
+ - type: cosine_accuracy@1
251
+ value: 0.6914285714285714
252
+ name: Cosine Accuracy@1
253
+ - type: cosine_accuracy@3
254
+ value: 0.82
255
+ name: Cosine Accuracy@3
256
+ - type: cosine_accuracy@5
257
+ value: 0.8557142857142858
258
+ name: Cosine Accuracy@5
259
+ - type: cosine_accuracy@10
260
+ value: 0.9014285714285715
261
+ name: Cosine Accuracy@10
262
+ - type: cosine_precision@1
263
+ value: 0.6914285714285714
264
+ name: Cosine Precision@1
265
+ - type: cosine_precision@3
266
+ value: 0.2733333333333334
267
+ name: Cosine Precision@3
268
+ - type: cosine_precision@5
269
+ value: 0.17114285714285712
270
+ name: Cosine Precision@5
271
+ - type: cosine_precision@10
272
+ value: 0.09014285714285714
273
+ name: Cosine Precision@10
274
+ - type: cosine_recall@1
275
+ value: 0.6914285714285714
276
+ name: Cosine Recall@1
277
+ - type: cosine_recall@3
278
+ value: 0.82
279
+ name: Cosine Recall@3
280
+ - type: cosine_recall@5
281
+ value: 0.8557142857142858
282
+ name: Cosine Recall@5
283
+ - type: cosine_recall@10
284
+ value: 0.9014285714285715
285
+ name: Cosine Recall@10
286
+ - type: cosine_ndcg@10
287
+ value: 0.7980982703041672
288
+ name: Cosine Ndcg@10
289
+ - type: cosine_mrr@10
290
+ value: 0.7650045351473919
291
+ name: Cosine Mrr@10
292
+ - type: cosine_map@100
293
+ value: 0.7688564414027702
294
+ name: Cosine Map@100
295
+ - task:
296
+ type: information-retrieval
297
+ name: Information Retrieval
298
+ dataset:
299
+ name: dim 64
300
+ type: dim_64
301
+ metrics:
302
+ - type: cosine_accuracy@1
303
+ value: 0.6542857142857142
304
+ name: Cosine Accuracy@1
305
+ - type: cosine_accuracy@3
306
+ value: 0.7885714285714286
307
+ name: Cosine Accuracy@3
308
+ - type: cosine_accuracy@5
309
+ value: 0.8328571428571429
310
+ name: Cosine Accuracy@5
311
+ - type: cosine_accuracy@10
312
+ value: 0.8828571428571429
313
+ name: Cosine Accuracy@10
314
+ - type: cosine_precision@1
315
+ value: 0.6542857142857142
316
+ name: Cosine Precision@1
317
+ - type: cosine_precision@3
318
+ value: 0.26285714285714284
319
+ name: Cosine Precision@3
320
+ - type: cosine_precision@5
321
+ value: 0.16657142857142856
322
+ name: Cosine Precision@5
323
+ - type: cosine_precision@10
324
+ value: 0.08828571428571427
325
+ name: Cosine Precision@10
326
+ - type: cosine_recall@1
327
+ value: 0.6542857142857142
328
+ name: Cosine Recall@1
329
+ - type: cosine_recall@3
330
+ value: 0.7885714285714286
331
+ name: Cosine Recall@3
332
+ - type: cosine_recall@5
333
+ value: 0.8328571428571429
334
+ name: Cosine Recall@5
335
+ - type: cosine_recall@10
336
+ value: 0.8828571428571429
337
+ name: Cosine Recall@10
338
+ - type: cosine_ndcg@10
339
+ value: 0.7689665884678363
340
+ name: Cosine Ndcg@10
341
+ - type: cosine_mrr@10
342
+ value: 0.7325351473922898
343
+ name: Cosine Mrr@10
344
+ - type: cosine_map@100
345
+ value: 0.7369423610264151
346
+ name: Cosine Map@100
347
+ ---
348
+
349
+ # BGE base Financial Matryoshka
350
+
351
+ 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.
352
+
353
+ ## Model Details
354
+
355
+ ### Model Description
356
+ - **Model Type:** Sentence Transformer
357
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
358
+ - **Maximum Sequence Length:** 512 tokens
359
+ - **Output Dimensionality:** 768 tokens
360
+ - **Similarity Function:** Cosine Similarity
361
+ <!-- - **Training Dataset:** Unknown -->
362
+ - **Language:** en
363
+ - **License:** apache-2.0
364
+
365
+ ### Model Sources
366
+
367
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
368
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
369
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
370
+
371
+ ### Full Model Architecture
372
+
373
+ ```
374
+ SentenceTransformer(
375
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
376
+ (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})
377
+ (2): Normalize()
378
+ )
379
+ ```
380
+
381
+ ## Usage
382
+
383
+ ### Direct Usage (Sentence Transformers)
384
+
385
+ First install the Sentence Transformers library:
386
+
387
+ ```bash
388
+ pip install -U sentence-transformers
389
+ ```
390
+
391
+ Then you can load this model and run inference.
392
+ ```python
393
+ from sentence_transformers import SentenceTransformer
394
+
395
+ # Download from the 🤗 Hub
396
+ model = SentenceTransformer("NickyNicky/bge-base-financial-matryoshka")
397
+ # Run inference
398
+ sentences = [
399
+ 'Our Records Management and Data Management service revenue growth is being negatively impacted by declining activity rates as stored records and tapes are becoming less active and more archival.',
400
+ 'How is Iron Mountain addressing the decline in activity rates in their Records and Data Management services?',
401
+ 'What services do companies that build fiber-based networks provide in the Connectivity & Platforms markets?',
402
+ ]
403
+ embeddings = model.encode(sentences)
404
+ print(embeddings.shape)
405
+ # [3, 768]
406
+
407
+ # Get the similarity scores for the embeddings
408
+ similarities = model.similarity(embeddings, embeddings)
409
+ print(similarities.shape)
410
+ # [3, 3]
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
+ * Dataset: `dim_768`
443
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
444
+
445
+ | Metric | Value |
446
+ |:--------------------|:-----------|
447
+ | cosine_accuracy@1 | 0.7057 |
448
+ | cosine_accuracy@3 | 0.8457 |
449
+ | cosine_accuracy@5 | 0.8786 |
450
+ | cosine_accuracy@10 | 0.9114 |
451
+ | cosine_precision@1 | 0.7057 |
452
+ | cosine_precision@3 | 0.2819 |
453
+ | cosine_precision@5 | 0.1757 |
454
+ | cosine_precision@10 | 0.0911 |
455
+ | cosine_recall@1 | 0.7057 |
456
+ | cosine_recall@3 | 0.8457 |
457
+ | cosine_recall@5 | 0.8786 |
458
+ | cosine_recall@10 | 0.9114 |
459
+ | cosine_ndcg@10 | 0.8125 |
460
+ | cosine_mrr@10 | 0.7804 |
461
+ | **cosine_map@100** | **0.7839** |
462
+
463
+ #### Information Retrieval
464
+ * Dataset: `dim_512`
465
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
466
+
467
+ | Metric | Value |
468
+ |:--------------------|:-----------|
469
+ | cosine_accuracy@1 | 0.7071 |
470
+ | cosine_accuracy@3 | 0.8429 |
471
+ | cosine_accuracy@5 | 0.8743 |
472
+ | cosine_accuracy@10 | 0.9114 |
473
+ | cosine_precision@1 | 0.7071 |
474
+ | cosine_precision@3 | 0.281 |
475
+ | cosine_precision@5 | 0.1749 |
476
+ | cosine_precision@10 | 0.0911 |
477
+ | cosine_recall@1 | 0.7071 |
478
+ | cosine_recall@3 | 0.8429 |
479
+ | cosine_recall@5 | 0.8743 |
480
+ | cosine_recall@10 | 0.9114 |
481
+ | cosine_ndcg@10 | 0.8127 |
482
+ | cosine_mrr@10 | 0.7807 |
483
+ | **cosine_map@100** | **0.7841** |
484
+
485
+ #### Information Retrieval
486
+ * Dataset: `dim_256`
487
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
488
+
489
+ | Metric | Value |
490
+ |:--------------------|:-----------|
491
+ | cosine_accuracy@1 | 0.7029 |
492
+ | cosine_accuracy@3 | 0.8357 |
493
+ | cosine_accuracy@5 | 0.8686 |
494
+ | cosine_accuracy@10 | 0.9071 |
495
+ | cosine_precision@1 | 0.7029 |
496
+ | cosine_precision@3 | 0.2786 |
497
+ | cosine_precision@5 | 0.1737 |
498
+ | cosine_precision@10 | 0.0907 |
499
+ | cosine_recall@1 | 0.7029 |
500
+ | cosine_recall@3 | 0.8357 |
501
+ | cosine_recall@5 | 0.8686 |
502
+ | cosine_recall@10 | 0.9071 |
503
+ | cosine_ndcg@10 | 0.8087 |
504
+ | cosine_mrr@10 | 0.7769 |
505
+ | **cosine_map@100** | **0.7806** |
506
+
507
+ #### Information Retrieval
508
+ * Dataset: `dim_128`
509
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
510
+
511
+ | Metric | Value |
512
+ |:--------------------|:-----------|
513
+ | cosine_accuracy@1 | 0.6914 |
514
+ | cosine_accuracy@3 | 0.82 |
515
+ | cosine_accuracy@5 | 0.8557 |
516
+ | cosine_accuracy@10 | 0.9014 |
517
+ | cosine_precision@1 | 0.6914 |
518
+ | cosine_precision@3 | 0.2733 |
519
+ | cosine_precision@5 | 0.1711 |
520
+ | cosine_precision@10 | 0.0901 |
521
+ | cosine_recall@1 | 0.6914 |
522
+ | cosine_recall@3 | 0.82 |
523
+ | cosine_recall@5 | 0.8557 |
524
+ | cosine_recall@10 | 0.9014 |
525
+ | cosine_ndcg@10 | 0.7981 |
526
+ | cosine_mrr@10 | 0.765 |
527
+ | **cosine_map@100** | **0.7689** |
528
+
529
+ #### Information Retrieval
530
+ * Dataset: `dim_64`
531
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
532
+
533
+ | Metric | Value |
534
+ |:--------------------|:-----------|
535
+ | cosine_accuracy@1 | 0.6543 |
536
+ | cosine_accuracy@3 | 0.7886 |
537
+ | cosine_accuracy@5 | 0.8329 |
538
+ | cosine_accuracy@10 | 0.8829 |
539
+ | cosine_precision@1 | 0.6543 |
540
+ | cosine_precision@3 | 0.2629 |
541
+ | cosine_precision@5 | 0.1666 |
542
+ | cosine_precision@10 | 0.0883 |
543
+ | cosine_recall@1 | 0.6543 |
544
+ | cosine_recall@3 | 0.7886 |
545
+ | cosine_recall@5 | 0.8329 |
546
+ | cosine_recall@10 | 0.8829 |
547
+ | cosine_ndcg@10 | 0.769 |
548
+ | cosine_mrr@10 | 0.7325 |
549
+ | **cosine_map@100** | **0.7369** |
550
+
551
+ <!--
552
+ ## Bias, Risks and Limitations
553
+
554
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
555
+ -->
556
+
557
+ <!--
558
+ ### Recommendations
559
+
560
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
561
+ -->
562
+
563
+ ## Training Details
564
+
565
+ ### Training Dataset
566
+
567
+ #### Unnamed Dataset
568
+
569
+
570
+ * Size: 6,300 training samples
571
+ * Columns: <code>positive</code> and <code>anchor</code>
572
+ * Approximate statistics based on the first 1000 samples:
573
+ | | positive | anchor |
574
+ |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
575
+ | type | string | string |
576
+ | details | <ul><li>min: 10 tokens</li><li>mean: 46.55 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.56 tokens</li><li>max: 42 tokens</li></ul> |
577
+ * Samples:
578
+ | positive | anchor |
579
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------|
580
+ | <code>Internationally, Visa Inc.'s commercial payments volume grew by 23% from $407 billion in 2021 to $500 billion in 2022.</code> | <code>What was the growth rate of Visa Inc.'s commercial payments volume internationally between 2021 and 2022?</code> |
581
+ | <code>The consolidated financial statements and accompanying notes listed in Part IV, Item 15(a)(1) of this Annual Report on Form 10-K are included immediately following Part IV hereof.</code> | <code>Where can one find the consolidated financial statements and accompanying notes in the Annual Report on Form 10-K?</code> |
582
+ | <code>The additional paid-in capital at the end of 2023 was recorded as $114,519 million.</code> | <code>What was the amount recorded for additional paid-in capital at the end of 2023?</code> |
583
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
584
+ ```json
585
+ {
586
+ "loss": "MultipleNegativesRankingLoss",
587
+ "matryoshka_dims": [
588
+ 768,
589
+ 512,
590
+ 256,
591
+ 128,
592
+ 64
593
+ ],
594
+ "matryoshka_weights": [
595
+ 1,
596
+ 1,
597
+ 1,
598
+ 1,
599
+ 1
600
+ ],
601
+ "n_dims_per_step": -1
602
+ }
603
+ ```
604
+
605
+ ### Training Hyperparameters
606
+ #### Non-Default Hyperparameters
607
+
608
+ - `eval_strategy`: epoch
609
+ - `per_device_train_batch_size`: 80
610
+ - `per_device_eval_batch_size`: 16
611
+ - `gradient_accumulation_steps`: 16
612
+ - `learning_rate`: 2e-05
613
+ - `num_train_epochs`: 15
614
+ - `lr_scheduler_type`: cosine
615
+ - `warmup_ratio`: 0.1
616
+ - `bf16`: True
617
+ - `tf32`: True
618
+ - `optim`: adamw_torch_fused
619
+ - `batch_sampler`: no_duplicates
620
+
621
+ #### All Hyperparameters
622
+ <details><summary>Click to expand</summary>
623
+
624
+ - `overwrite_output_dir`: False
625
+ - `do_predict`: False
626
+ - `eval_strategy`: epoch
627
+ - `prediction_loss_only`: True
628
+ - `per_device_train_batch_size`: 80
629
+ - `per_device_eval_batch_size`: 16
630
+ - `per_gpu_train_batch_size`: None
631
+ - `per_gpu_eval_batch_size`: None
632
+ - `gradient_accumulation_steps`: 16
633
+ - `eval_accumulation_steps`: None
634
+ - `learning_rate`: 2e-05
635
+ - `weight_decay`: 0.0
636
+ - `adam_beta1`: 0.9
637
+ - `adam_beta2`: 0.999
638
+ - `adam_epsilon`: 1e-08
639
+ - `max_grad_norm`: 1.0
640
+ - `num_train_epochs`: 15
641
+ - `max_steps`: -1
642
+ - `lr_scheduler_type`: cosine
643
+ - `lr_scheduler_kwargs`: {}
644
+ - `warmup_ratio`: 0.1
645
+ - `warmup_steps`: 0
646
+ - `log_level`: passive
647
+ - `log_level_replica`: warning
648
+ - `log_on_each_node`: True
649
+ - `logging_nan_inf_filter`: True
650
+ - `save_safetensors`: True
651
+ - `save_on_each_node`: False
652
+ - `save_only_model`: False
653
+ - `restore_callback_states_from_checkpoint`: False
654
+ - `no_cuda`: False
655
+ - `use_cpu`: False
656
+ - `use_mps_device`: False
657
+ - `seed`: 42
658
+ - `data_seed`: None
659
+ - `jit_mode_eval`: False
660
+ - `use_ipex`: False
661
+ - `bf16`: True
662
+ - `fp16`: False
663
+ - `fp16_opt_level`: O1
664
+ - `half_precision_backend`: auto
665
+ - `bf16_full_eval`: False
666
+ - `fp16_full_eval`: False
667
+ - `tf32`: True
668
+ - `local_rank`: 0
669
+ - `ddp_backend`: None
670
+ - `tpu_num_cores`: None
671
+ - `tpu_metrics_debug`: False
672
+ - `debug`: []
673
+ - `dataloader_drop_last`: False
674
+ - `dataloader_num_workers`: 0
675
+ - `dataloader_prefetch_factor`: None
676
+ - `past_index`: -1
677
+ - `disable_tqdm`: False
678
+ - `remove_unused_columns`: True
679
+ - `label_names`: None
680
+ - `load_best_model_at_end`: False
681
+ - `ignore_data_skip`: False
682
+ - `fsdp`: []
683
+ - `fsdp_min_num_params`: 0
684
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
685
+ - `fsdp_transformer_layer_cls_to_wrap`: None
686
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
687
+ - `deepspeed`: None
688
+ - `label_smoothing_factor`: 0.0
689
+ - `optim`: adamw_torch_fused
690
+ - `optim_args`: None
691
+ - `adafactor`: False
692
+ - `group_by_length`: False
693
+ - `length_column_name`: length
694
+ - `ddp_find_unused_parameters`: None
695
+ - `ddp_bucket_cap_mb`: None
696
+ - `ddp_broadcast_buffers`: False
697
+ - `dataloader_pin_memory`: True
698
+ - `dataloader_persistent_workers`: False
699
+ - `skip_memory_metrics`: True
700
+ - `use_legacy_prediction_loop`: False
701
+ - `push_to_hub`: False
702
+ - `resume_from_checkpoint`: None
703
+ - `hub_model_id`: None
704
+ - `hub_strategy`: every_save
705
+ - `hub_private_repo`: False
706
+ - `hub_always_push`: False
707
+ - `gradient_checkpointing`: False
708
+ - `gradient_checkpointing_kwargs`: None
709
+ - `include_inputs_for_metrics`: False
710
+ - `eval_do_concat_batches`: True
711
+ - `fp16_backend`: auto
712
+ - `push_to_hub_model_id`: None
713
+ - `push_to_hub_organization`: None
714
+ - `mp_parameters`:
715
+ - `auto_find_batch_size`: False
716
+ - `full_determinism`: False
717
+ - `torchdynamo`: None
718
+ - `ray_scope`: last
719
+ - `ddp_timeout`: 1800
720
+ - `torch_compile`: False
721
+ - `torch_compile_backend`: None
722
+ - `torch_compile_mode`: None
723
+ - `dispatch_batches`: None
724
+ - `split_batches`: None
725
+ - `include_tokens_per_second`: False
726
+ - `include_num_input_tokens_seen`: False
727
+ - `neftune_noise_alpha`: None
728
+ - `optim_target_modules`: None
729
+ - `batch_eval_metrics`: False
730
+ - `batch_sampler`: no_duplicates
731
+ - `multi_dataset_batch_sampler`: proportional
732
+
733
+ </details>
734
+
735
+ ### Training Logs
736
+ | Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 |
737
+ |:-------:|:----:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
738
+ | 0.8101 | 4 | - | 0.7066 | 0.7309 | 0.7390 | 0.6462 | 0.7441 |
739
+ | 1.8228 | 9 | - | 0.7394 | 0.7497 | 0.7630 | 0.6922 | 0.7650 |
740
+ | 2.0253 | 10 | 2.768 | - | - | - | - | - |
741
+ | 2.8354 | 14 | - | 0.7502 | 0.7625 | 0.7767 | 0.7208 | 0.7787 |
742
+ | 3.8481 | 19 | - | 0.7553 | 0.7714 | 0.7804 | 0.7234 | 0.7802 |
743
+ | 4.0506 | 20 | 1.1294 | - | - | - | - | - |
744
+ | 4.8608 | 24 | - | 0.7577 | 0.7769 | 0.7831 | 0.7327 | 0.7858 |
745
+ | 5.8734 | 29 | - | 0.7616 | 0.7775 | 0.7832 | 0.7335 | 0.7876 |
746
+ | 6.0759 | 30 | 0.7536 | - | - | - | - | - |
747
+ | 6.8861 | 34 | - | 0.7624 | 0.7788 | 0.7832 | 0.7352 | 0.7882 |
748
+ | 7.8987 | 39 | - | 0.7665 | 0.7795 | 0.7814 | 0.7359 | 0.7861 |
749
+ | 8.1013 | 40 | 0.5846 | - | - | - | - | - |
750
+ | 8.9114 | 44 | - | 0.7688 | 0.7801 | 0.7828 | 0.7360 | 0.7857 |
751
+ | 9.9241 | 49 | - | 0.7698 | 0.7804 | 0.7836 | 0.7367 | 0.7840 |
752
+ | 10.1266 | 50 | 0.5187 | - | - | - | - | - |
753
+ | 10.9367 | 54 | - | 0.7692 | 0.7801 | 0.7827 | 0.7383 | 0.7837 |
754
+ | 11.9494 | 59 | - | 0.7698 | 0.7801 | 0.7834 | 0.7377 | 0.7849 |
755
+ | 12.1519 | 60 | 0.4949 | 0.7689 | 0.7806 | 0.7841 | 0.7369 | 0.7839 |
756
+
757
+
758
+ ### Framework Versions
759
+ - Python: 3.10.12
760
+ - Sentence Transformers: 3.0.1
761
+ - Transformers: 4.41.2
762
+ - PyTorch: 2.2.0+cu121
763
+ - Accelerate: 0.31.0
764
+ - Datasets: 2.19.1
765
+ - Tokenizers: 0.19.1
766
+
767
+ ## Citation
768
+
769
+ ### BibTeX
770
+
771
+ #### Sentence Transformers
772
+ ```bibtex
773
+ @inproceedings{reimers-2019-sentence-bert,
774
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
775
+ author = "Reimers, Nils and Gurevych, Iryna",
776
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
777
+ month = "11",
778
+ year = "2019",
779
+ publisher = "Association for Computational Linguistics",
780
+ url = "https://arxiv.org/abs/1908.10084",
781
+ }
782
+ ```
783
+
784
+ #### MatryoshkaLoss
785
+ ```bibtex
786
+ @misc{kusupati2024matryoshka,
787
+ title={Matryoshka Representation Learning},
788
+ 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},
789
+ year={2024},
790
+ eprint={2205.13147},
791
+ archivePrefix={arXiv},
792
+ primaryClass={cs.LG}
793
+ }
794
+ ```
795
+
796
+ #### MultipleNegativesRankingLoss
797
+ ```bibtex
798
+ @misc{henderson2017efficient,
799
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
800
+ 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},
801
+ year={2017},
802
+ eprint={1705.00652},
803
+ archivePrefix={arXiv},
804
+ primaryClass={cs.CL}
805
+ }
806
+ ```
807
+
808
+ <!--
809
+ ## Glossary
810
+
811
+ *Clearly define terms in order to be accessible across audiences.*
812
+ -->
813
+
814
+ <!--
815
+ ## Model Card Authors
816
+
817
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
818
+ -->
819
+
820
+ <!--
821
+ ## Model Card Contact
822
+
823
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
824
+ -->
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.2.0+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e6af59f4540c6230602c0a7718506da18dacdd415dccba64da8a075ef7678f2
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