aired commited on
Commit
635e308
·
verified ·
1 Parent(s): 1fff965

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,729 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:6300
11
+ - loss:MatryoshkaLoss
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: BAAI/bge-base-en-v1.5
14
+ widget:
15
+ - source_sentence: We enter into forward currency contracts in order to hedge a portion
16
+ of the foreign currency exposure associated with the translation of our net investment
17
+ in our Canadian subsidiary.
18
+ sentences:
19
+ - How much did Delta Air Lines spend on debt and finance lease obligations in 2023?
20
+ - What mechanisms does the company use to hedge foreign currency exposure for its
21
+ Canadian subsidiary?
22
+ - How did operating overhead expenses change for NIKE from fiscal 2022 to fiscal
23
+ 2023?
24
+ - source_sentence: We calculate return on invested hat capital (ROIC) by dividing
25
+ adjusted ROIC operating profit for the prior four quarters by the average invested
26
+ capital.
27
+ sentences:
28
+ - What was the fair value of U.S. government and agency securities as of June 30,
29
+ 2022?
30
+ - How is the Return on Invested Capital (ROIC) calculated?
31
+ - What business outcomes is HPE focused on accelerating with its technological solutions?
32
+ - source_sentence: Expenses from our comparable owned and leased hotels increased
33
+ $137 million, on a currency neutral basis, as a result of increased occupancy
34
+ and cost inflation both driving higher labor costs, utilities and other operating
35
+ expenses, as well as an increase in rent expense.
36
+ sentences:
37
+ - How did the expenses from comparable owned and leased hotels change and what were
38
+ the contributing factors?
39
+ - What do environmental laws require from suppliers in terms of operations?
40
+ - What energy management technologies does the Enphase bidirectional EV charger
41
+ integrate with?
42
+ - source_sentence: The Advancing Agility & Automation Initiative at The Hershey Company
43
+ is projected to result in total pre-tax costs of $200,000 to $250,000 from inception
44
+ through 2026. This includes costs for program office execution and third-party
45
+ costs supporting the design and implementation of the new organizational structure,
46
+ as well as implementation and technology capability costs and employee severance
47
+ and related separation benefits.
48
+ sentences:
49
+ - What was the total amortization expense for The Hershey Company in 2021?
50
+ - How much did net cash used in financing activities decrease in fiscal 2023 compared
51
+ to the previous fiscal year?
52
+ - What is the total projected pre-tax cost of The Hershey Company's Advancing Agility
53
+ & Automation Initiative through 2026?
54
+ - source_sentence: Structural costs typically do not have a directly proportionate
55
+ relationship to production volume and include costs such as manufacturing, engineering,
56
+ and administrative expenses. These costs can be adjusted over time in response
57
+ to external factors.
58
+ sentences:
59
+ - How does Ford Motor Company handle its structural costs in relation to production
60
+ volume changes?
61
+ - What were the total future minimum lease payments under all non-cancelable operating
62
+ leases for the company as of December 31, 2023?
63
+ - What guidelines does the FASB provide for the measurement of fair value when quoted
64
+ prices are not available?
65
+ pipeline_tag: sentence-similarity
66
+ library_name: sentence-transformers
67
+ metrics:
68
+ - cosine_accuracy@1
69
+ - cosine_accuracy@3
70
+ - cosine_accuracy@5
71
+ - cosine_accuracy@10
72
+ - cosine_precision@1
73
+ - cosine_precision@3
74
+ - cosine_precision@5
75
+ - cosine_precision@10
76
+ - cosine_recall@1
77
+ - cosine_recall@3
78
+ - cosine_recall@5
79
+ - cosine_recall@10
80
+ - cosine_ndcg@10
81
+ - cosine_mrr@10
82
+ - cosine_map@100
83
+ model-index:
84
+ - name: BGE base Financial Matryoshka
85
+ results:
86
+ - task:
87
+ type: information-retrieval
88
+ name: Information Retrieval
89
+ dataset:
90
+ name: dim 768
91
+ type: dim_768
92
+ metrics:
93
+ - type: cosine_accuracy@1
94
+ value: 0.72
95
+ name: Cosine Accuracy@1
96
+ - type: cosine_accuracy@3
97
+ value: 0.8257142857142857
98
+ name: Cosine Accuracy@3
99
+ - type: cosine_accuracy@5
100
+ value: 0.8585714285714285
101
+ name: Cosine Accuracy@5
102
+ - type: cosine_accuracy@10
103
+ value: 0.8942857142857142
104
+ name: Cosine Accuracy@10
105
+ - type: cosine_precision@1
106
+ value: 0.72
107
+ name: Cosine Precision@1
108
+ - type: cosine_precision@3
109
+ value: 0.2752380952380953
110
+ name: Cosine Precision@3
111
+ - type: cosine_precision@5
112
+ value: 0.1717142857142857
113
+ name: Cosine Precision@5
114
+ - type: cosine_precision@10
115
+ value: 0.08942857142857143
116
+ name: Cosine Precision@10
117
+ - type: cosine_recall@1
118
+ value: 0.72
119
+ name: Cosine Recall@1
120
+ - type: cosine_recall@3
121
+ value: 0.8257142857142857
122
+ name: Cosine Recall@3
123
+ - type: cosine_recall@5
124
+ value: 0.8585714285714285
125
+ name: Cosine Recall@5
126
+ - type: cosine_recall@10
127
+ value: 0.8942857142857142
128
+ name: Cosine Recall@10
129
+ - type: cosine_ndcg@10
130
+ value: 0.8077694527772951
131
+ name: Cosine Ndcg@10
132
+ - type: cosine_mrr@10
133
+ value: 0.7800079365079364
134
+ name: Cosine Mrr@10
135
+ - type: cosine_map@100
136
+ value: 0.7837848752496734
137
+ name: Cosine Map@100
138
+ - task:
139
+ type: information-retrieval
140
+ name: Information Retrieval
141
+ dataset:
142
+ name: dim 512
143
+ type: dim_512
144
+ metrics:
145
+ - type: cosine_accuracy@1
146
+ value: 0.7157142857142857
147
+ name: Cosine Accuracy@1
148
+ - type: cosine_accuracy@3
149
+ value: 0.8242857142857143
150
+ name: Cosine Accuracy@3
151
+ - type: cosine_accuracy@5
152
+ value: 0.8642857142857143
153
+ name: Cosine Accuracy@5
154
+ - type: cosine_accuracy@10
155
+ value: 0.8914285714285715
156
+ name: Cosine Accuracy@10
157
+ - type: cosine_precision@1
158
+ value: 0.7157142857142857
159
+ name: Cosine Precision@1
160
+ - type: cosine_precision@3
161
+ value: 0.2747619047619047
162
+ name: Cosine Precision@3
163
+ - type: cosine_precision@5
164
+ value: 0.17285714285714285
165
+ name: Cosine Precision@5
166
+ - type: cosine_precision@10
167
+ value: 0.08914285714285713
168
+ name: Cosine Precision@10
169
+ - type: cosine_recall@1
170
+ value: 0.7157142857142857
171
+ name: Cosine Recall@1
172
+ - type: cosine_recall@3
173
+ value: 0.8242857142857143
174
+ name: Cosine Recall@3
175
+ - type: cosine_recall@5
176
+ value: 0.8642857142857143
177
+ name: Cosine Recall@5
178
+ - type: cosine_recall@10
179
+ value: 0.8914285714285715
180
+ name: Cosine Recall@10
181
+ - type: cosine_ndcg@10
182
+ value: 0.805259563189015
183
+ name: Cosine Ndcg@10
184
+ - type: cosine_mrr@10
185
+ value: 0.7773735827664396
186
+ name: Cosine Mrr@10
187
+ - type: cosine_map@100
188
+ value: 0.7813006780341183
189
+ name: Cosine Map@100
190
+ - task:
191
+ type: information-retrieval
192
+ name: Information Retrieval
193
+ dataset:
194
+ name: dim 256
195
+ type: dim_256
196
+ metrics:
197
+ - type: cosine_accuracy@1
198
+ value: 0.7028571428571428
199
+ name: Cosine Accuracy@1
200
+ - type: cosine_accuracy@3
201
+ value: 0.8171428571428572
202
+ name: Cosine Accuracy@3
203
+ - type: cosine_accuracy@5
204
+ value: 0.8542857142857143
205
+ name: Cosine Accuracy@5
206
+ - type: cosine_accuracy@10
207
+ value: 0.8814285714285715
208
+ name: Cosine Accuracy@10
209
+ - type: cosine_precision@1
210
+ value: 0.7028571428571428
211
+ name: Cosine Precision@1
212
+ - type: cosine_precision@3
213
+ value: 0.2723809523809524
214
+ name: Cosine Precision@3
215
+ - type: cosine_precision@5
216
+ value: 0.17085714285714285
217
+ name: Cosine Precision@5
218
+ - type: cosine_precision@10
219
+ value: 0.08814285714285712
220
+ name: Cosine Precision@10
221
+ - type: cosine_recall@1
222
+ value: 0.7028571428571428
223
+ name: Cosine Recall@1
224
+ - type: cosine_recall@3
225
+ value: 0.8171428571428572
226
+ name: Cosine Recall@3
227
+ - type: cosine_recall@5
228
+ value: 0.8542857142857143
229
+ name: Cosine Recall@5
230
+ - type: cosine_recall@10
231
+ value: 0.8814285714285715
232
+ name: Cosine Recall@10
233
+ - type: cosine_ndcg@10
234
+ value: 0.7945503213768784
235
+ name: Cosine Ndcg@10
236
+ - type: cosine_mrr@10
237
+ value: 0.7664075963718817
238
+ name: Cosine Mrr@10
239
+ - type: cosine_map@100
240
+ value: 0.7709929668571353
241
+ name: Cosine Map@100
242
+ - task:
243
+ type: information-retrieval
244
+ name: Information Retrieval
245
+ dataset:
246
+ name: dim 128
247
+ type: dim_128
248
+ metrics:
249
+ - type: cosine_accuracy@1
250
+ value: 0.6785714285714286
251
+ name: Cosine Accuracy@1
252
+ - type: cosine_accuracy@3
253
+ value: 0.8028571428571428
254
+ name: Cosine Accuracy@3
255
+ - type: cosine_accuracy@5
256
+ value: 0.8542857142857143
257
+ name: Cosine Accuracy@5
258
+ - type: cosine_accuracy@10
259
+ value: 0.8814285714285715
260
+ name: Cosine Accuracy@10
261
+ - type: cosine_precision@1
262
+ value: 0.6785714285714286
263
+ name: Cosine Precision@1
264
+ - type: cosine_precision@3
265
+ value: 0.26761904761904765
266
+ name: Cosine Precision@3
267
+ - type: cosine_precision@5
268
+ value: 0.17085714285714285
269
+ name: Cosine Precision@5
270
+ - type: cosine_precision@10
271
+ value: 0.08814285714285712
272
+ name: Cosine Precision@10
273
+ - type: cosine_recall@1
274
+ value: 0.6785714285714286
275
+ name: Cosine Recall@1
276
+ - type: cosine_recall@3
277
+ value: 0.8028571428571428
278
+ name: Cosine Recall@3
279
+ - type: cosine_recall@5
280
+ value: 0.8542857142857143
281
+ name: Cosine Recall@5
282
+ - type: cosine_recall@10
283
+ value: 0.8814285714285715
284
+ name: Cosine Recall@10
285
+ - type: cosine_ndcg@10
286
+ value: 0.7829387132685872
287
+ name: Cosine Ndcg@10
288
+ - type: cosine_mrr@10
289
+ value: 0.7509529478458048
290
+ name: Cosine Mrr@10
291
+ - type: cosine_map@100
292
+ value: 0.7549309056916426
293
+ name: Cosine Map@100
294
+ - task:
295
+ type: information-retrieval
296
+ name: Information Retrieval
297
+ dataset:
298
+ name: dim 64
299
+ type: dim_64
300
+ metrics:
301
+ - type: cosine_accuracy@1
302
+ value: 0.6485714285714286
303
+ name: Cosine Accuracy@1
304
+ - type: cosine_accuracy@3
305
+ value: 0.77
306
+ name: Cosine Accuracy@3
307
+ - type: cosine_accuracy@5
308
+ value: 0.8142857142857143
309
+ name: Cosine Accuracy@5
310
+ - type: cosine_accuracy@10
311
+ value: 0.8657142857142858
312
+ name: Cosine Accuracy@10
313
+ - type: cosine_precision@1
314
+ value: 0.6485714285714286
315
+ name: Cosine Precision@1
316
+ - type: cosine_precision@3
317
+ value: 0.2566666666666667
318
+ name: Cosine Precision@3
319
+ - type: cosine_precision@5
320
+ value: 0.16285714285714287
321
+ name: Cosine Precision@5
322
+ - type: cosine_precision@10
323
+ value: 0.08657142857142856
324
+ name: Cosine Precision@10
325
+ - type: cosine_recall@1
326
+ value: 0.6485714285714286
327
+ name: Cosine Recall@1
328
+ - type: cosine_recall@3
329
+ value: 0.77
330
+ name: Cosine Recall@3
331
+ - type: cosine_recall@5
332
+ value: 0.8142857142857143
333
+ name: Cosine Recall@5
334
+ - type: cosine_recall@10
335
+ value: 0.8657142857142858
336
+ name: Cosine Recall@10
337
+ - type: cosine_ndcg@10
338
+ value: 0.755512484642688
339
+ name: Cosine Ndcg@10
340
+ - type: cosine_mrr@10
341
+ value: 0.7203905895691608
342
+ name: Cosine Mrr@10
343
+ - type: cosine_map@100
344
+ value: 0.7247515061294347
345
+ name: Cosine Map@100
346
+ ---
347
+
348
+ # BGE base Financial Matryoshka
349
+
350
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) on the json dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
351
+
352
+ ## Model Details
353
+
354
+ ### Model Description
355
+ - **Model Type:** Sentence Transformer
356
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
357
+ - **Maximum Sequence Length:** 512 tokens
358
+ - **Output Dimensionality:** 768 dimensions
359
+ - **Similarity Function:** Cosine Similarity
360
+ - **Training Dataset:**
361
+ - json
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("aired/bge-base-financial-matryoshka")
397
+ # Run inference
398
+ sentences = [
399
+ 'Structural costs typically do not have a directly proportionate relationship to production volume and include costs such as manufacturing, engineering, and administrative expenses. These costs can be adjusted over time in response to external factors.',
400
+ 'How does Ford Motor Company handle its structural costs in relation to production volume changes?',
401
+ 'What were the total future minimum lease payments under all non-cancelable operating leases for the company as of December 31, 2023?',
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
+
443
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
444
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
445
+
446
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
447
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
448
+ | cosine_accuracy@1 | 0.72 | 0.7157 | 0.7029 | 0.6786 | 0.6486 |
449
+ | cosine_accuracy@3 | 0.8257 | 0.8243 | 0.8171 | 0.8029 | 0.77 |
450
+ | cosine_accuracy@5 | 0.8586 | 0.8643 | 0.8543 | 0.8543 | 0.8143 |
451
+ | cosine_accuracy@10 | 0.8943 | 0.8914 | 0.8814 | 0.8814 | 0.8657 |
452
+ | cosine_precision@1 | 0.72 | 0.7157 | 0.7029 | 0.6786 | 0.6486 |
453
+ | cosine_precision@3 | 0.2752 | 0.2748 | 0.2724 | 0.2676 | 0.2567 |
454
+ | cosine_precision@5 | 0.1717 | 0.1729 | 0.1709 | 0.1709 | 0.1629 |
455
+ | cosine_precision@10 | 0.0894 | 0.0891 | 0.0881 | 0.0881 | 0.0866 |
456
+ | cosine_recall@1 | 0.72 | 0.7157 | 0.7029 | 0.6786 | 0.6486 |
457
+ | cosine_recall@3 | 0.8257 | 0.8243 | 0.8171 | 0.8029 | 0.77 |
458
+ | cosine_recall@5 | 0.8586 | 0.8643 | 0.8543 | 0.8543 | 0.8143 |
459
+ | cosine_recall@10 | 0.8943 | 0.8914 | 0.8814 | 0.8814 | 0.8657 |
460
+ | **cosine_ndcg@10** | **0.8078** | **0.8053** | **0.7946** | **0.7829** | **0.7555** |
461
+ | cosine_mrr@10 | 0.78 | 0.7774 | 0.7664 | 0.751 | 0.7204 |
462
+ | cosine_map@100 | 0.7838 | 0.7813 | 0.771 | 0.7549 | 0.7248 |
463
+
464
+ <!--
465
+ ## Bias, Risks and Limitations
466
+
467
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
468
+ -->
469
+
470
+ <!--
471
+ ### Recommendations
472
+
473
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
474
+ -->
475
+
476
+ ## Training Details
477
+
478
+ ### Training Dataset
479
+
480
+ #### json
481
+
482
+ * Dataset: json
483
+ * Size: 6,300 training samples
484
+ * Columns: <code>positive</code> and <code>anchor</code>
485
+ * Approximate statistics based on the first 1000 samples:
486
+ | | positive | anchor |
487
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
488
+ | type | string | string |
489
+ | details | <ul><li>min: 9 tokens</li><li>mean: 45.81 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.45 tokens</li><li>max: 42 tokens</li></ul> |
490
+ * Samples:
491
+ | positive | anchor |
492
+ |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------|
493
+ | <code>GEICO markets its policies mainly by direct response methods where most customers apply for coverage directly to the company via the Internet or over the telephone.</code> | <code>What are the primary marketing methods used by GEICO?</code> |
494
+ | <code>In addition, most group health plans and issuers of group or individual health insurance coverage are required to disclose personalized pricing information to their participants, beneficiaries, and enrollees through an online consumer tool, by phone, or in paper form, upon request. Cost estimates must be provided in real-time based on cost-sharing information that is accurate at the time of the request.</code> | <code>What are the requirements for health insurers and group health plans in providing cost estimates to consumers?</code> |
495
+ | <code>Fair values of indefinite-lived intangible assets are determined based on the income approach.</code> | <code>What method is used to determine the fair value of indefinite-lived intangible assets?</code> |
496
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
497
+ ```json
498
+ {
499
+ "loss": "MultipleNegativesRankingLoss",
500
+ "matryoshka_dims": [
501
+ 768,
502
+ 512,
503
+ 256,
504
+ 128,
505
+ 64
506
+ ],
507
+ "matryoshka_weights": [
508
+ 1,
509
+ 1,
510
+ 1,
511
+ 1,
512
+ 1
513
+ ],
514
+ "n_dims_per_step": -1
515
+ }
516
+ ```
517
+
518
+ ### Training Hyperparameters
519
+ #### Non-Default Hyperparameters
520
+
521
+ - `eval_strategy`: epoch
522
+ - `per_device_train_batch_size`: 32
523
+ - `per_device_eval_batch_size`: 16
524
+ - `gradient_accumulation_steps`: 16
525
+ - `learning_rate`: 2e-05
526
+ - `num_train_epochs`: 4
527
+ - `lr_scheduler_type`: cosine
528
+ - `warmup_ratio`: 0.1
529
+ - `fp16`: True
530
+ - `load_best_model_at_end`: True
531
+ - `optim`: adamw_torch_fused
532
+ - `batch_sampler`: no_duplicates
533
+
534
+ #### All Hyperparameters
535
+ <details><summary>Click to expand</summary>
536
+
537
+ - `overwrite_output_dir`: False
538
+ - `do_predict`: False
539
+ - `eval_strategy`: epoch
540
+ - `prediction_loss_only`: True
541
+ - `per_device_train_batch_size`: 32
542
+ - `per_device_eval_batch_size`: 16
543
+ - `per_gpu_train_batch_size`: None
544
+ - `per_gpu_eval_batch_size`: None
545
+ - `gradient_accumulation_steps`: 16
546
+ - `eval_accumulation_steps`: None
547
+ - `learning_rate`: 2e-05
548
+ - `weight_decay`: 0.0
549
+ - `adam_beta1`: 0.9
550
+ - `adam_beta2`: 0.999
551
+ - `adam_epsilon`: 1e-08
552
+ - `max_grad_norm`: 1.0
553
+ - `num_train_epochs`: 4
554
+ - `max_steps`: -1
555
+ - `lr_scheduler_type`: cosine
556
+ - `lr_scheduler_kwargs`: {}
557
+ - `warmup_ratio`: 0.1
558
+ - `warmup_steps`: 0
559
+ - `log_level`: passive
560
+ - `log_level_replica`: warning
561
+ - `log_on_each_node`: True
562
+ - `logging_nan_inf_filter`: True
563
+ - `save_safetensors`: True
564
+ - `save_on_each_node`: False
565
+ - `save_only_model`: False
566
+ - `restore_callback_states_from_checkpoint`: False
567
+ - `no_cuda`: False
568
+ - `use_cpu`: False
569
+ - `use_mps_device`: False
570
+ - `seed`: 42
571
+ - `data_seed`: None
572
+ - `jit_mode_eval`: False
573
+ - `use_ipex`: False
574
+ - `bf16`: False
575
+ - `fp16`: True
576
+ - `fp16_opt_level`: O1
577
+ - `half_precision_backend`: auto
578
+ - `bf16_full_eval`: False
579
+ - `fp16_full_eval`: False
580
+ - `tf32`: None
581
+ - `local_rank`: 0
582
+ - `ddp_backend`: None
583
+ - `tpu_num_cores`: None
584
+ - `tpu_metrics_debug`: False
585
+ - `debug`: []
586
+ - `dataloader_drop_last`: False
587
+ - `dataloader_num_workers`: 0
588
+ - `dataloader_prefetch_factor`: None
589
+ - `past_index`: -1
590
+ - `disable_tqdm`: False
591
+ - `remove_unused_columns`: True
592
+ - `label_names`: None
593
+ - `load_best_model_at_end`: True
594
+ - `ignore_data_skip`: False
595
+ - `fsdp`: []
596
+ - `fsdp_min_num_params`: 0
597
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
598
+ - `fsdp_transformer_layer_cls_to_wrap`: None
599
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
600
+ - `deepspeed`: None
601
+ - `label_smoothing_factor`: 0.0
602
+ - `optim`: adamw_torch_fused
603
+ - `optim_args`: None
604
+ - `adafactor`: False
605
+ - `group_by_length`: False
606
+ - `length_column_name`: length
607
+ - `ddp_find_unused_parameters`: None
608
+ - `ddp_bucket_cap_mb`: None
609
+ - `ddp_broadcast_buffers`: False
610
+ - `dataloader_pin_memory`: True
611
+ - `dataloader_persistent_workers`: False
612
+ - `skip_memory_metrics`: True
613
+ - `use_legacy_prediction_loop`: False
614
+ - `push_to_hub`: False
615
+ - `resume_from_checkpoint`: None
616
+ - `hub_model_id`: None
617
+ - `hub_strategy`: every_save
618
+ - `hub_private_repo`: False
619
+ - `hub_always_push`: False
620
+ - `gradient_checkpointing`: False
621
+ - `gradient_checkpointing_kwargs`: None
622
+ - `include_inputs_for_metrics`: False
623
+ - `eval_do_concat_batches`: True
624
+ - `fp16_backend`: auto
625
+ - `push_to_hub_model_id`: None
626
+ - `push_to_hub_organization`: None
627
+ - `mp_parameters`:
628
+ - `auto_find_batch_size`: False
629
+ - `full_determinism`: False
630
+ - `torchdynamo`: None
631
+ - `ray_scope`: last
632
+ - `ddp_timeout`: 1800
633
+ - `torch_compile`: False
634
+ - `torch_compile_backend`: None
635
+ - `torch_compile_mode`: None
636
+ - `dispatch_batches`: None
637
+ - `split_batches`: None
638
+ - `include_tokens_per_second`: False
639
+ - `include_num_input_tokens_seen`: False
640
+ - `neftune_noise_alpha`: None
641
+ - `optim_target_modules`: None
642
+ - `batch_eval_metrics`: False
643
+ - `prompts`: None
644
+ - `batch_sampler`: no_duplicates
645
+ - `multi_dataset_batch_sampler`: proportional
646
+
647
+ </details>
648
+
649
+ ### Training Logs
650
+ | Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
651
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
652
+ | 0.8122 | 10 | 1.6045 | - | - | - | - | - |
653
+ | 0.9746 | 12 | - | 0.7895 | 0.7895 | 0.7764 | 0.7680 | 0.7277 |
654
+ | 1.6244 | 20 | 0.6975 | - | - | - | - | - |
655
+ | 1.9492 | 24 | - | 0.8044 | 0.8026 | 0.7924 | 0.7819 | 0.7515 |
656
+ | 2.4365 | 30 | 0.4732 | - | - | - | - | - |
657
+ | 2.9239 | 36 | - | 0.8064 | 0.8060 | 0.7944 | 0.7825 | 0.7549 |
658
+ | 3.2487 | 40 | 0.4182 | - | - | - | - | - |
659
+ | **3.8985** | **48** | **-** | **0.8078** | **0.8053** | **0.7946** | **0.7829** | **0.7555** |
660
+
661
+ * The bold row denotes the saved checkpoint.
662
+
663
+ ### Framework Versions
664
+ - Python: 3.10.12
665
+ - Sentence Transformers: 3.3.1
666
+ - Transformers: 4.41.2
667
+ - PyTorch: 2.1.2+cu121
668
+ - Accelerate: 1.1.1
669
+ - Datasets: 2.19.1
670
+ - Tokenizers: 0.19.1
671
+
672
+ ## Citation
673
+
674
+ ### BibTeX
675
+
676
+ #### Sentence Transformers
677
+ ```bibtex
678
+ @inproceedings{reimers-2019-sentence-bert,
679
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
680
+ author = "Reimers, Nils and Gurevych, Iryna",
681
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
682
+ month = "11",
683
+ year = "2019",
684
+ publisher = "Association for Computational Linguistics",
685
+ url = "https://arxiv.org/abs/1908.10084",
686
+ }
687
+ ```
688
+
689
+ #### MatryoshkaLoss
690
+ ```bibtex
691
+ @misc{kusupati2024matryoshka,
692
+ title={Matryoshka Representation Learning},
693
+ 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},
694
+ year={2024},
695
+ eprint={2205.13147},
696
+ archivePrefix={arXiv},
697
+ primaryClass={cs.LG}
698
+ }
699
+ ```
700
+
701
+ #### MultipleNegativesRankingLoss
702
+ ```bibtex
703
+ @misc{henderson2017efficient,
704
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
705
+ 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},
706
+ year={2017},
707
+ eprint={1705.00652},
708
+ archivePrefix={arXiv},
709
+ primaryClass={cs.CL}
710
+ }
711
+ ```
712
+
713
+ <!--
714
+ ## Glossary
715
+
716
+ *Clearly define terms in order to be accessible across audiences.*
717
+ -->
718
+
719
+ <!--
720
+ ## Model Card Authors
721
+
722
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
723
+ -->
724
+
725
+ <!--
726
+ ## Model Card Contact
727
+
728
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
729
+ -->
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.3.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e37b9e88c7e158ea27e937e732cc54361c291b63bc061d8b1b9276834036b787
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