IlhamEbdesk commited on
Commit
177a6fe
1 Parent(s): e642a69

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,763 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:700
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: Goodwill arising from the acquisition of Xilinx was valued at $22,784
35
+ million, attributed mainly to increased synergies expected from the integration
36
+ of Xilinx into the Company's Embedded and Data Center segments.
37
+ sentences:
38
+ - What growth strategy does lululemon plan to employ for their operations in China
39
+ Mainland?
40
+ - What was the fair value of the goodwill generated from the acquisition of Xilinx?
41
+ - How did the products gross margin percentage change from 2022 to 2023?
42
+ - source_sentence: In 2023, UnitedHealthcare's regulated subsidiaries paid $8.0 billion
43
+ in dividends to their parent companies.
44
+ sentences:
45
+ - What amount did UnitedHealthcare's regulated subsidiaries pay as dividends to
46
+ their parent companies in 2023?
47
+ - What initiative does the Basel, Rotterdam and Stockholm Conventions focus on?
48
+ - What is the primary target of Palantir's customer acquisition strategy?
49
+ - source_sentence: These assumptions about future disposition of inventory are inherently
50
+ uncertain and changes in our estimates and assumptions may cause us to realize
51
+ material write-downs in the future.
52
+ sentences:
53
+ - How did the return on average common stockholders’ equity (GAAP) change from 2021
54
+ to 2023?
55
+ - What is the effect of changes in inventory estimates on the company's financial
56
+ statements?
57
+ - What is the principal business experience of David M. Chojnowski before his current
58
+ role as Senior Vice President and Controller?
59
+ - source_sentence: During the years ended December 31, 2021, 2022 and 2023, the weighted-average
60
+ fair value of stock options granted under the Plans was $96.50, $79.75 and $65.22
61
+ per share, respectively.
62
+ sentences:
63
+ - What was the weighted-average grant-date fair value of stock options granted in
64
+ 2021, 2022, and 2023?
65
+ - What major weather events contributed to the increase in losses reported in 2023?
66
+ - What is the V2MOM, and how is it used within the company?
67
+ - source_sentence: During fiscal year 2023, we repurchased 10.4 million shares for
68
+ approximately $1,295 million.
69
+ sentences:
70
+ - How much does Kroger plan to invest in training its associates in 2023?
71
+ - What total amount was spent on share repurchases during fiscal year 2023?
72
+ - What judicial decision occurred in August 2023 regarding the antitrust lawsuits
73
+ against the airlines?
74
+ model-index:
75
+ - name: BGE base Financial Matryoshka
76
+ results:
77
+ - task:
78
+ type: information-retrieval
79
+ name: Information Retrieval
80
+ dataset:
81
+ name: dim 768
82
+ type: dim_768
83
+ metrics:
84
+ - type: cosine_accuracy@1
85
+ value: 0.6742857142857143
86
+ name: Cosine Accuracy@1
87
+ - type: cosine_accuracy@3
88
+ value: 0.8052380952380952
89
+ name: Cosine Accuracy@3
90
+ - type: cosine_accuracy@5
91
+ value: 0.8458730158730159
92
+ name: Cosine Accuracy@5
93
+ - type: cosine_accuracy@10
94
+ value: 0.8933333333333333
95
+ name: Cosine Accuracy@10
96
+ - type: cosine_precision@1
97
+ value: 0.6742857142857143
98
+ name: Cosine Precision@1
99
+ - type: cosine_precision@3
100
+ value: 0.26841269841269844
101
+ name: Cosine Precision@3
102
+ - type: cosine_precision@5
103
+ value: 0.16917460317460317
104
+ name: Cosine Precision@5
105
+ - type: cosine_precision@10
106
+ value: 0.08933333333333332
107
+ name: Cosine Precision@10
108
+ - type: cosine_recall@1
109
+ value: 0.6742857142857143
110
+ name: Cosine Recall@1
111
+ - type: cosine_recall@3
112
+ value: 0.8052380952380952
113
+ name: Cosine Recall@3
114
+ - type: cosine_recall@5
115
+ value: 0.8458730158730159
116
+ name: Cosine Recall@5
117
+ - type: cosine_recall@10
118
+ value: 0.8933333333333333
119
+ name: Cosine Recall@10
120
+ - type: cosine_ndcg@10
121
+ value: 0.7837644898436449
122
+ name: Cosine Ndcg@10
123
+ - type: cosine_mrr@10
124
+ value: 0.7486834215167553
125
+ name: Cosine Mrr@10
126
+ - type: cosine_map@100
127
+ value: 0.7524444605977678
128
+ name: Cosine Map@100
129
+ - task:
130
+ type: information-retrieval
131
+ name: Information Retrieval
132
+ dataset:
133
+ name: dim 512
134
+ type: dim_512
135
+ metrics:
136
+ - type: cosine_accuracy@1
137
+ value: 0.669047619047619
138
+ name: Cosine Accuracy@1
139
+ - type: cosine_accuracy@3
140
+ value: 0.8023809523809524
141
+ name: Cosine Accuracy@3
142
+ - type: cosine_accuracy@5
143
+ value: 0.8444444444444444
144
+ name: Cosine Accuracy@5
145
+ - type: cosine_accuracy@10
146
+ value: 0.893015873015873
147
+ name: Cosine Accuracy@10
148
+ - type: cosine_precision@1
149
+ value: 0.669047619047619
150
+ name: Cosine Precision@1
151
+ - type: cosine_precision@3
152
+ value: 0.26746031746031745
153
+ name: Cosine Precision@3
154
+ - type: cosine_precision@5
155
+ value: 0.1688888888888889
156
+ name: Cosine Precision@5
157
+ - type: cosine_precision@10
158
+ value: 0.08930158730158728
159
+ name: Cosine Precision@10
160
+ - type: cosine_recall@1
161
+ value: 0.669047619047619
162
+ name: Cosine Recall@1
163
+ - type: cosine_recall@3
164
+ value: 0.8023809523809524
165
+ name: Cosine Recall@3
166
+ - type: cosine_recall@5
167
+ value: 0.8444444444444444
168
+ name: Cosine Recall@5
169
+ - type: cosine_recall@10
170
+ value: 0.893015873015873
171
+ name: Cosine Recall@10
172
+ - type: cosine_ndcg@10
173
+ value: 0.7805515576068588
174
+ name: Cosine Ndcg@10
175
+ - type: cosine_mrr@10
176
+ value: 0.744609410430839
177
+ name: Cosine Mrr@10
178
+ - type: cosine_map@100
179
+ value: 0.7483879357643801
180
+ name: Cosine Map@100
181
+ - task:
182
+ type: information-retrieval
183
+ name: Information Retrieval
184
+ dataset:
185
+ name: dim 256
186
+ type: dim_256
187
+ metrics:
188
+ - type: cosine_accuracy@1
189
+ value: 0.6623809523809524
190
+ name: Cosine Accuracy@1
191
+ - type: cosine_accuracy@3
192
+ value: 0.7933333333333333
193
+ name: Cosine Accuracy@3
194
+ - type: cosine_accuracy@5
195
+ value: 0.8334920634920635
196
+ name: Cosine Accuracy@5
197
+ - type: cosine_accuracy@10
198
+ value: 0.8831746031746032
199
+ name: Cosine Accuracy@10
200
+ - type: cosine_precision@1
201
+ value: 0.6623809523809524
202
+ name: Cosine Precision@1
203
+ - type: cosine_precision@3
204
+ value: 0.2644444444444444
205
+ name: Cosine Precision@3
206
+ - type: cosine_precision@5
207
+ value: 0.16669841269841268
208
+ name: Cosine Precision@5
209
+ - type: cosine_precision@10
210
+ value: 0.08831746031746031
211
+ name: Cosine Precision@10
212
+ - type: cosine_recall@1
213
+ value: 0.6623809523809524
214
+ name: Cosine Recall@1
215
+ - type: cosine_recall@3
216
+ value: 0.7933333333333333
217
+ name: Cosine Recall@3
218
+ - type: cosine_recall@5
219
+ value: 0.8334920634920635
220
+ name: Cosine Recall@5
221
+ - type: cosine_recall@10
222
+ value: 0.8831746031746032
223
+ name: Cosine Recall@10
224
+ - type: cosine_ndcg@10
225
+ value: 0.772554826031694
226
+ name: Cosine Ndcg@10
227
+ - type: cosine_mrr@10
228
+ value: 0.7372027588813304
229
+ name: Cosine Mrr@10
230
+ - type: cosine_map@100
231
+ value: 0.7413385015201707
232
+ name: Cosine Map@100
233
+ - task:
234
+ type: information-retrieval
235
+ name: Information Retrieval
236
+ dataset:
237
+ name: dim 128
238
+ type: dim_128
239
+ metrics:
240
+ - type: cosine_accuracy@1
241
+ value: 0.6419047619047619
242
+ name: Cosine Accuracy@1
243
+ - type: cosine_accuracy@3
244
+ value: 0.7698412698412699
245
+ name: Cosine Accuracy@3
246
+ - type: cosine_accuracy@5
247
+ value: 0.8131746031746032
248
+ name: Cosine Accuracy@5
249
+ - type: cosine_accuracy@10
250
+ value: 0.8628571428571429
251
+ name: Cosine Accuracy@10
252
+ - type: cosine_precision@1
253
+ value: 0.6419047619047619
254
+ name: Cosine Precision@1
255
+ - type: cosine_precision@3
256
+ value: 0.2566137566137566
257
+ name: Cosine Precision@3
258
+ - type: cosine_precision@5
259
+ value: 0.16263492063492063
260
+ name: Cosine Precision@5
261
+ - type: cosine_precision@10
262
+ value: 0.08628571428571427
263
+ name: Cosine Precision@10
264
+ - type: cosine_recall@1
265
+ value: 0.6419047619047619
266
+ name: Cosine Recall@1
267
+ - type: cosine_recall@3
268
+ value: 0.7698412698412699
269
+ name: Cosine Recall@3
270
+ - type: cosine_recall@5
271
+ value: 0.8131746031746032
272
+ name: Cosine Recall@5
273
+ - type: cosine_recall@10
274
+ value: 0.8628571428571429
275
+ name: Cosine Recall@10
276
+ - type: cosine_ndcg@10
277
+ value: 0.7522219583193863
278
+ name: Cosine Ndcg@10
279
+ - type: cosine_mrr@10
280
+ value: 0.7168462459057695
281
+ name: Cosine Mrr@10
282
+ - type: cosine_map@100
283
+ value: 0.7216902902285594
284
+ name: Cosine Map@100
285
+ - task:
286
+ type: information-retrieval
287
+ name: Information Retrieval
288
+ dataset:
289
+ name: dim 64
290
+ type: dim_64
291
+ metrics:
292
+ - type: cosine_accuracy@1
293
+ value: 0.5901587301587301
294
+ name: Cosine Accuracy@1
295
+ - type: cosine_accuracy@3
296
+ value: 0.7241269841269842
297
+ name: Cosine Accuracy@3
298
+ - type: cosine_accuracy@5
299
+ value: 0.7661904761904762
300
+ name: Cosine Accuracy@5
301
+ - type: cosine_accuracy@10
302
+ value: 0.8185714285714286
303
+ name: Cosine Accuracy@10
304
+ - type: cosine_precision@1
305
+ value: 0.5901587301587301
306
+ name: Cosine Precision@1
307
+ - type: cosine_precision@3
308
+ value: 0.24137566137566135
309
+ name: Cosine Precision@3
310
+ - type: cosine_precision@5
311
+ value: 0.15323809523809523
312
+ name: Cosine Precision@5
313
+ - type: cosine_precision@10
314
+ value: 0.08185714285714285
315
+ name: Cosine Precision@10
316
+ - type: cosine_recall@1
317
+ value: 0.5901587301587301
318
+ name: Cosine Recall@1
319
+ - type: cosine_recall@3
320
+ value: 0.7241269841269842
321
+ name: Cosine Recall@3
322
+ - type: cosine_recall@5
323
+ value: 0.7661904761904762
324
+ name: Cosine Recall@5
325
+ - type: cosine_recall@10
326
+ value: 0.8185714285714286
327
+ name: Cosine Recall@10
328
+ - type: cosine_ndcg@10
329
+ value: 0.7039266407844053
330
+ name: Cosine Ndcg@10
331
+ - type: cosine_mrr@10
332
+ value: 0.6673720710506443
333
+ name: Cosine Mrr@10
334
+ - type: cosine_map@100
335
+ value: 0.6731612260450521
336
+ name: Cosine Map@100
337
+ ---
338
+
339
+ # BGE base Financial Matryoshka
340
+
341
+ 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.
342
+
343
+ ## Model Details
344
+
345
+ ### Model Description
346
+ - **Model Type:** Sentence Transformer
347
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
348
+ - **Maximum Sequence Length:** 512 tokens
349
+ - **Output Dimensionality:** 768 tokens
350
+ - **Similarity Function:** Cosine Similarity
351
+ <!-- - **Training Dataset:** Unknown -->
352
+ - **Language:** en
353
+ - **License:** apache-2.0
354
+
355
+ ### Model Sources
356
+
357
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
358
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
359
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
360
+
361
+ ### Full Model Architecture
362
+
363
+ ```
364
+ SentenceTransformer(
365
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
366
+ (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})
367
+ (2): Normalize()
368
+ )
369
+ ```
370
+
371
+ ## Usage
372
+
373
+ ### Direct Usage (Sentence Transformers)
374
+
375
+ First install the Sentence Transformers library:
376
+
377
+ ```bash
378
+ pip install -U sentence-transformers
379
+ ```
380
+
381
+ Then you can load this model and run inference.
382
+ ```python
383
+ from sentence_transformers import SentenceTransformer
384
+
385
+ # Download from the 🤗 Hub
386
+ model = SentenceTransformer("IlhamEbdesk/bge-base-financial-matryoshka_test")
387
+ # Run inference
388
+ sentences = [
389
+ 'During fiscal year 2023, we repurchased 10.4 million shares for approximately $1,295 million.',
390
+ 'What total amount was spent on share repurchases during fiscal year 2023?',
391
+ 'What judicial decision occurred in August 2023 regarding the antitrust lawsuits against the airlines?',
392
+ ]
393
+ embeddings = model.encode(sentences)
394
+ print(embeddings.shape)
395
+ # [3, 768]
396
+
397
+ # Get the similarity scores for the embeddings
398
+ similarities = model.similarity(embeddings, embeddings)
399
+ print(similarities.shape)
400
+ # [3, 3]
401
+ ```
402
+
403
+ <!--
404
+ ### Direct Usage (Transformers)
405
+
406
+ <details><summary>Click to see the direct usage in Transformers</summary>
407
+
408
+ </details>
409
+ -->
410
+
411
+ <!--
412
+ ### Downstream Usage (Sentence Transformers)
413
+
414
+ You can finetune this model on your own dataset.
415
+
416
+ <details><summary>Click to expand</summary>
417
+
418
+ </details>
419
+ -->
420
+
421
+ <!--
422
+ ### Out-of-Scope Use
423
+
424
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
425
+ -->
426
+
427
+ ## Evaluation
428
+
429
+ ### Metrics
430
+
431
+ #### Information Retrieval
432
+ * Dataset: `dim_768`
433
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
434
+
435
+ | Metric | Value |
436
+ |:--------------------|:-----------|
437
+ | cosine_accuracy@1 | 0.6743 |
438
+ | cosine_accuracy@3 | 0.8052 |
439
+ | cosine_accuracy@5 | 0.8459 |
440
+ | cosine_accuracy@10 | 0.8933 |
441
+ | cosine_precision@1 | 0.6743 |
442
+ | cosine_precision@3 | 0.2684 |
443
+ | cosine_precision@5 | 0.1692 |
444
+ | cosine_precision@10 | 0.0893 |
445
+ | cosine_recall@1 | 0.6743 |
446
+ | cosine_recall@3 | 0.8052 |
447
+ | cosine_recall@5 | 0.8459 |
448
+ | cosine_recall@10 | 0.8933 |
449
+ | cosine_ndcg@10 | 0.7838 |
450
+ | cosine_mrr@10 | 0.7487 |
451
+ | **cosine_map@100** | **0.7524** |
452
+
453
+ #### Information Retrieval
454
+ * Dataset: `dim_512`
455
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
456
+
457
+ | Metric | Value |
458
+ |:--------------------|:-----------|
459
+ | cosine_accuracy@1 | 0.669 |
460
+ | cosine_accuracy@3 | 0.8024 |
461
+ | cosine_accuracy@5 | 0.8444 |
462
+ | cosine_accuracy@10 | 0.893 |
463
+ | cosine_precision@1 | 0.669 |
464
+ | cosine_precision@3 | 0.2675 |
465
+ | cosine_precision@5 | 0.1689 |
466
+ | cosine_precision@10 | 0.0893 |
467
+ | cosine_recall@1 | 0.669 |
468
+ | cosine_recall@3 | 0.8024 |
469
+ | cosine_recall@5 | 0.8444 |
470
+ | cosine_recall@10 | 0.893 |
471
+ | cosine_ndcg@10 | 0.7806 |
472
+ | cosine_mrr@10 | 0.7446 |
473
+ | **cosine_map@100** | **0.7484** |
474
+
475
+ #### Information Retrieval
476
+ * Dataset: `dim_256`
477
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
478
+
479
+ | Metric | Value |
480
+ |:--------------------|:-----------|
481
+ | cosine_accuracy@1 | 0.6624 |
482
+ | cosine_accuracy@3 | 0.7933 |
483
+ | cosine_accuracy@5 | 0.8335 |
484
+ | cosine_accuracy@10 | 0.8832 |
485
+ | cosine_precision@1 | 0.6624 |
486
+ | cosine_precision@3 | 0.2644 |
487
+ | cosine_precision@5 | 0.1667 |
488
+ | cosine_precision@10 | 0.0883 |
489
+ | cosine_recall@1 | 0.6624 |
490
+ | cosine_recall@3 | 0.7933 |
491
+ | cosine_recall@5 | 0.8335 |
492
+ | cosine_recall@10 | 0.8832 |
493
+ | cosine_ndcg@10 | 0.7726 |
494
+ | cosine_mrr@10 | 0.7372 |
495
+ | **cosine_map@100** | **0.7413** |
496
+
497
+ #### Information Retrieval
498
+ * Dataset: `dim_128`
499
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
500
+
501
+ | Metric | Value |
502
+ |:--------------------|:-----------|
503
+ | cosine_accuracy@1 | 0.6419 |
504
+ | cosine_accuracy@3 | 0.7698 |
505
+ | cosine_accuracy@5 | 0.8132 |
506
+ | cosine_accuracy@10 | 0.8629 |
507
+ | cosine_precision@1 | 0.6419 |
508
+ | cosine_precision@3 | 0.2566 |
509
+ | cosine_precision@5 | 0.1626 |
510
+ | cosine_precision@10 | 0.0863 |
511
+ | cosine_recall@1 | 0.6419 |
512
+ | cosine_recall@3 | 0.7698 |
513
+ | cosine_recall@5 | 0.8132 |
514
+ | cosine_recall@10 | 0.8629 |
515
+ | cosine_ndcg@10 | 0.7522 |
516
+ | cosine_mrr@10 | 0.7168 |
517
+ | **cosine_map@100** | **0.7217** |
518
+
519
+ #### Information Retrieval
520
+ * Dataset: `dim_64`
521
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
522
+
523
+ | Metric | Value |
524
+ |:--------------------|:-----------|
525
+ | cosine_accuracy@1 | 0.5902 |
526
+ | cosine_accuracy@3 | 0.7241 |
527
+ | cosine_accuracy@5 | 0.7662 |
528
+ | cosine_accuracy@10 | 0.8186 |
529
+ | cosine_precision@1 | 0.5902 |
530
+ | cosine_precision@3 | 0.2414 |
531
+ | cosine_precision@5 | 0.1532 |
532
+ | cosine_precision@10 | 0.0819 |
533
+ | cosine_recall@1 | 0.5902 |
534
+ | cosine_recall@3 | 0.7241 |
535
+ | cosine_recall@5 | 0.7662 |
536
+ | cosine_recall@10 | 0.8186 |
537
+ | cosine_ndcg@10 | 0.7039 |
538
+ | cosine_mrr@10 | 0.6674 |
539
+ | **cosine_map@100** | **0.6732** |
540
+
541
+ <!--
542
+ ## Bias, Risks and Limitations
543
+
544
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
545
+ -->
546
+
547
+ <!--
548
+ ### Recommendations
549
+
550
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
551
+ -->
552
+
553
+ ## Training Details
554
+
555
+ ### Training Hyperparameters
556
+ #### Non-Default Hyperparameters
557
+
558
+ - `eval_strategy`: epoch
559
+ - `per_device_train_batch_size`: 32
560
+ - `per_device_eval_batch_size`: 16
561
+ - `gradient_accumulation_steps`: 16
562
+ - `learning_rate`: 2e-05
563
+ - `num_train_epochs`: 4
564
+ - `lr_scheduler_type`: cosine
565
+ - `warmup_ratio`: 0.1
566
+ - `tf32`: False
567
+ - `load_best_model_at_end`: True
568
+ - `optim`: adamw_torch_fused
569
+ - `batch_sampler`: no_duplicates
570
+
571
+ #### All Hyperparameters
572
+ <details><summary>Click to expand</summary>
573
+
574
+ - `overwrite_output_dir`: False
575
+ - `do_predict`: False
576
+ - `eval_strategy`: epoch
577
+ - `prediction_loss_only`: True
578
+ - `per_device_train_batch_size`: 32
579
+ - `per_device_eval_batch_size`: 16
580
+ - `per_gpu_train_batch_size`: None
581
+ - `per_gpu_eval_batch_size`: None
582
+ - `gradient_accumulation_steps`: 16
583
+ - `eval_accumulation_steps`: None
584
+ - `learning_rate`: 2e-05
585
+ - `weight_decay`: 0.0
586
+ - `adam_beta1`: 0.9
587
+ - `adam_beta2`: 0.999
588
+ - `adam_epsilon`: 1e-08
589
+ - `max_grad_norm`: 1.0
590
+ - `num_train_epochs`: 4
591
+ - `max_steps`: -1
592
+ - `lr_scheduler_type`: cosine
593
+ - `lr_scheduler_kwargs`: {}
594
+ - `warmup_ratio`: 0.1
595
+ - `warmup_steps`: 0
596
+ - `log_level`: passive
597
+ - `log_level_replica`: warning
598
+ - `log_on_each_node`: True
599
+ - `logging_nan_inf_filter`: True
600
+ - `save_safetensors`: True
601
+ - `save_on_each_node`: False
602
+ - `save_only_model`: False
603
+ - `restore_callback_states_from_checkpoint`: False
604
+ - `no_cuda`: False
605
+ - `use_cpu`: False
606
+ - `use_mps_device`: False
607
+ - `seed`: 42
608
+ - `data_seed`: None
609
+ - `jit_mode_eval`: False
610
+ - `use_ipex`: False
611
+ - `bf16`: False
612
+ - `fp16`: False
613
+ - `fp16_opt_level`: O1
614
+ - `half_precision_backend`: auto
615
+ - `bf16_full_eval`: False
616
+ - `fp16_full_eval`: False
617
+ - `tf32`: False
618
+ - `local_rank`: 0
619
+ - `ddp_backend`: None
620
+ - `tpu_num_cores`: None
621
+ - `tpu_metrics_debug`: False
622
+ - `debug`: []
623
+ - `dataloader_drop_last`: False
624
+ - `dataloader_num_workers`: 0
625
+ - `dataloader_prefetch_factor`: None
626
+ - `past_index`: -1
627
+ - `disable_tqdm`: False
628
+ - `remove_unused_columns`: True
629
+ - `label_names`: None
630
+ - `load_best_model_at_end`: True
631
+ - `ignore_data_skip`: False
632
+ - `fsdp`: []
633
+ - `fsdp_min_num_params`: 0
634
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
635
+ - `fsdp_transformer_layer_cls_to_wrap`: None
636
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
637
+ - `deepspeed`: None
638
+ - `label_smoothing_factor`: 0.0
639
+ - `optim`: adamw_torch_fused
640
+ - `optim_args`: None
641
+ - `adafactor`: False
642
+ - `group_by_length`: False
643
+ - `length_column_name`: length
644
+ - `ddp_find_unused_parameters`: None
645
+ - `ddp_bucket_cap_mb`: None
646
+ - `ddp_broadcast_buffers`: False
647
+ - `dataloader_pin_memory`: True
648
+ - `dataloader_persistent_workers`: False
649
+ - `skip_memory_metrics`: True
650
+ - `use_legacy_prediction_loop`: False
651
+ - `push_to_hub`: False
652
+ - `resume_from_checkpoint`: None
653
+ - `hub_model_id`: None
654
+ - `hub_strategy`: every_save
655
+ - `hub_private_repo`: False
656
+ - `hub_always_push`: False
657
+ - `gradient_checkpointing`: False
658
+ - `gradient_checkpointing_kwargs`: None
659
+ - `include_inputs_for_metrics`: False
660
+ - `eval_do_concat_batches`: True
661
+ - `fp16_backend`: auto
662
+ - `push_to_hub_model_id`: None
663
+ - `push_to_hub_organization`: None
664
+ - `mp_parameters`:
665
+ - `auto_find_batch_size`: False
666
+ - `full_determinism`: False
667
+ - `torchdynamo`: None
668
+ - `ray_scope`: last
669
+ - `ddp_timeout`: 1800
670
+ - `torch_compile`: False
671
+ - `torch_compile_backend`: None
672
+ - `torch_compile_mode`: None
673
+ - `dispatch_batches`: None
674
+ - `split_batches`: None
675
+ - `include_tokens_per_second`: False
676
+ - `include_num_input_tokens_seen`: False
677
+ - `neftune_noise_alpha`: None
678
+ - `optim_target_modules`: None
679
+ - `batch_eval_metrics`: False
680
+ - `batch_sampler`: no_duplicates
681
+ - `multi_dataset_batch_sampler`: proportional
682
+
683
+ </details>
684
+
685
+ ### Training Logs
686
+ | Epoch | Step | 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 |
687
+ |:----------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
688
+ | 0.7273 | 1 | 0.6718 | 0.7044 | 0.7160 | 0.6086 | 0.7194 |
689
+ | 1.4545 | 2 | 0.6897 | 0.7192 | 0.7298 | 0.6329 | 0.7314 |
690
+ | **2.9091** | **4** | **0.7051** | **0.7292** | **0.7387** | **0.6504** | **0.7409** |
691
+ | 0.7273 | 1 | 0.7051 | 0.7292 | 0.7387 | 0.6504 | 0.7409 |
692
+ | 1.4545 | 2 | 0.7148 | 0.7366 | 0.7446 | 0.6636 | 0.7473 |
693
+ | **2.9091** | **4** | **0.7217** | **0.7413** | **0.7484** | **0.6732** | **0.7524** |
694
+
695
+ * The bold row denotes the saved checkpoint.
696
+
697
+ ### Framework Versions
698
+ - Python: 3.10.12
699
+ - Sentence Transformers: 3.0.1
700
+ - Transformers: 4.41.2
701
+ - PyTorch: 2.1.2+cu121
702
+ - Accelerate: 0.32.1
703
+ - Datasets: 2.19.1
704
+ - Tokenizers: 0.19.1
705
+
706
+ ## Citation
707
+
708
+ ### BibTeX
709
+
710
+ #### Sentence Transformers
711
+ ```bibtex
712
+ @inproceedings{reimers-2019-sentence-bert,
713
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
714
+ author = "Reimers, Nils and Gurevych, Iryna",
715
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
716
+ month = "11",
717
+ year = "2019",
718
+ publisher = "Association for Computational Linguistics",
719
+ url = "https://arxiv.org/abs/1908.10084",
720
+ }
721
+ ```
722
+
723
+ #### MatryoshkaLoss
724
+ ```bibtex
725
+ @misc{kusupati2024matryoshka,
726
+ title={Matryoshka Representation Learning},
727
+ 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},
728
+ year={2024},
729
+ eprint={2205.13147},
730
+ archivePrefix={arXiv},
731
+ primaryClass={cs.LG}
732
+ }
733
+ ```
734
+
735
+ #### MultipleNegativesRankingLoss
736
+ ```bibtex
737
+ @misc{henderson2017efficient,
738
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
739
+ 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},
740
+ year={2017},
741
+ eprint={1705.00652},
742
+ archivePrefix={arXiv},
743
+ primaryClass={cs.CL}
744
+ }
745
+ ```
746
+
747
+ <!--
748
+ ## Glossary
749
+
750
+ *Clearly define terms in order to be accessible across audiences.*
751
+ -->
752
+
753
+ <!--
754
+ ## Model Card Authors
755
+
756
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
757
+ -->
758
+
759
+ <!--
760
+ ## Model Card Contact
761
+
762
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
763
+ -->
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:a1921aa5bf84e4dac4d889b28114218da2d913ef14fa6d29b31ca30c723356d1
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