chcho commited on
Commit
1a72b47
·
verified ·
1 Parent(s): 2a01185

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,728 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: Goodwill is recognized for the excess of the purchase price over
16
+ the fair value of tangible and identifiable intangible net assets of businesses
17
+ acquired. In evaluating goodwill impairment, a qualitative assessment is performed
18
+ to determine the likelihood that the fair value of a reporting unit is less than
19
+ its carrying amount. This might lead to further testing of goodwill for impairment,
20
+ which includes comparing the fair value of the reporting unit to its carrying
21
+ value (including attributable goodwill). Fair value for our reporting units is
22
+ determined using an income or market approach incorporating market participant
23
+ considerations and management’s assumptions.
24
+ sentences:
25
+ - How is goodwill reviewed for impairment in a company, and what methods are used
26
+ to determine the fair value of reporting units?
27
+ - What regulatory framework does the FCC currently apply to broadband internet access
28
+ services as of 2023?
29
+ - What were the total interest payments made by the company in 2023, 2022, and 2021?
30
+ - source_sentence: Part IV Item 15, titled 'Exhibits, Financial Statement Schedules',
31
+ includes the 'Index to Financial Statements' and the 'Index to Financial Statement
32
+ Schedules.'
33
+ sentences:
34
+ - What was the net cash from operations reported for the year ended June 30, 2023?
35
+ - Where would one find the 'Index to Financial Statements' and the 'Index to Financial
36
+ Statement Schedules' mentioned?
37
+ - What is the trajectory of the AMPTC for microinverters starting in 2030?
38
+ - source_sentence: As of December 31, 2023, the total amortized cost, net of valuation
39
+ allowance, for non-U.S. government securities amounted to $14,516 million.
40
+ sentences:
41
+ - How much federal net operating loss carryforwards did the company have at the
42
+ end of 2023, and how much of it is expected to be realized?
43
+ - What accounting principles are followed in the preparation of Goldman Sachs' consolidated
44
+ financial statements for 2023?
45
+ - What was the total amortized cost, net of valuation allowance, for non-U.S. government
46
+ securities as of December 31, 2023?
47
+ - source_sentence: Information about legal proceedings in the Annual Report on Form
48
+ 10-K is incorporated by reference under several notes and sections.
49
+ sentences:
50
+ - What method is used to provide information about legal proceedings in the Annual
51
+ Report on Form 10-K?
52
+ - What can cause delays in pharmaceutical product launches?
53
+ - What was the total amount of cash dividends declared by the company per share
54
+ in the fiscal year ending on October 1, 2023?
55
+ - source_sentence: MERS database revenues contain multiple performance obligations
56
+ related to each new loan registration and future transfers, and the revenues are
57
+ primarily recorded at the point in time of each transaction.
58
+ sentences:
59
+ - How are revenues from MERS database recognized?
60
+ - How did The Home Depot, Inc.'s basic earnings per share change from 2020 to 2022?
61
+ - How many active sellers and buyers did Etsy's marketplaces connect as of December
62
+ 31, 2023?
63
+ pipeline_tag: sentence-similarity
64
+ library_name: sentence-transformers
65
+ metrics:
66
+ - cosine_accuracy@1
67
+ - cosine_accuracy@3
68
+ - cosine_accuracy@5
69
+ - cosine_accuracy@10
70
+ - cosine_precision@1
71
+ - cosine_precision@3
72
+ - cosine_precision@5
73
+ - cosine_precision@10
74
+ - cosine_recall@1
75
+ - cosine_recall@3
76
+ - cosine_recall@5
77
+ - cosine_recall@10
78
+ - cosine_ndcg@10
79
+ - cosine_mrr@10
80
+ - cosine_map@100
81
+ model-index:
82
+ - name: BGE base Financial Matryoshka
83
+ results:
84
+ - task:
85
+ type: information-retrieval
86
+ name: Information Retrieval
87
+ dataset:
88
+ name: dim 768
89
+ type: dim_768
90
+ metrics:
91
+ - type: cosine_accuracy@1
92
+ value: 0.7228571428571429
93
+ name: Cosine Accuracy@1
94
+ - type: cosine_accuracy@3
95
+ value: 0.8528571428571429
96
+ name: Cosine Accuracy@3
97
+ - type: cosine_accuracy@5
98
+ value: 0.89
99
+ name: Cosine Accuracy@5
100
+ - type: cosine_accuracy@10
101
+ value: 0.9185714285714286
102
+ name: Cosine Accuracy@10
103
+ - type: cosine_precision@1
104
+ value: 0.7228571428571429
105
+ name: Cosine Precision@1
106
+ - type: cosine_precision@3
107
+ value: 0.2842857142857143
108
+ name: Cosine Precision@3
109
+ - type: cosine_precision@5
110
+ value: 0.17799999999999996
111
+ name: Cosine Precision@5
112
+ - type: cosine_precision@10
113
+ value: 0.09185714285714283
114
+ name: Cosine Precision@10
115
+ - type: cosine_recall@1
116
+ value: 0.7228571428571429
117
+ name: Cosine Recall@1
118
+ - type: cosine_recall@3
119
+ value: 0.8528571428571429
120
+ name: Cosine Recall@3
121
+ - type: cosine_recall@5
122
+ value: 0.89
123
+ name: Cosine Recall@5
124
+ - type: cosine_recall@10
125
+ value: 0.9185714285714286
126
+ name: Cosine Recall@10
127
+ - type: cosine_ndcg@10
128
+ value: 0.8244010006831627
129
+ name: Cosine Ndcg@10
130
+ - type: cosine_mrr@10
131
+ value: 0.7936836734693877
132
+ name: Cosine Mrr@10
133
+ - type: cosine_map@100
134
+ value: 0.7971656786986449
135
+ name: Cosine Map@100
136
+ - task:
137
+ type: information-retrieval
138
+ name: Information Retrieval
139
+ dataset:
140
+ name: dim 512
141
+ type: dim_512
142
+ metrics:
143
+ - type: cosine_accuracy@1
144
+ value: 0.7157142857142857
145
+ name: Cosine Accuracy@1
146
+ - type: cosine_accuracy@3
147
+ value: 0.8471428571428572
148
+ name: Cosine Accuracy@3
149
+ - type: cosine_accuracy@5
150
+ value: 0.8857142857142857
151
+ name: Cosine Accuracy@5
152
+ - type: cosine_accuracy@10
153
+ value: 0.9185714285714286
154
+ name: Cosine Accuracy@10
155
+ - type: cosine_precision@1
156
+ value: 0.7157142857142857
157
+ name: Cosine Precision@1
158
+ - type: cosine_precision@3
159
+ value: 0.28238095238095234
160
+ name: Cosine Precision@3
161
+ - type: cosine_precision@5
162
+ value: 0.17714285714285713
163
+ name: Cosine Precision@5
164
+ - type: cosine_precision@10
165
+ value: 0.09185714285714283
166
+ name: Cosine Precision@10
167
+ - type: cosine_recall@1
168
+ value: 0.7157142857142857
169
+ name: Cosine Recall@1
170
+ - type: cosine_recall@3
171
+ value: 0.8471428571428572
172
+ name: Cosine Recall@3
173
+ - type: cosine_recall@5
174
+ value: 0.8857142857142857
175
+ name: Cosine Recall@5
176
+ - type: cosine_recall@10
177
+ value: 0.9185714285714286
178
+ name: Cosine Recall@10
179
+ - type: cosine_ndcg@10
180
+ value: 0.8209116379330612
181
+ name: Cosine Ndcg@10
182
+ - type: cosine_mrr@10
183
+ value: 0.7891343537414967
184
+ name: Cosine Mrr@10
185
+ - type: cosine_map@100
186
+ value: 0.7926472335071902
187
+ name: Cosine Map@100
188
+ - task:
189
+ type: information-retrieval
190
+ name: Information Retrieval
191
+ dataset:
192
+ name: dim 256
193
+ type: dim_256
194
+ metrics:
195
+ - type: cosine_accuracy@1
196
+ value: 0.71
197
+ name: Cosine Accuracy@1
198
+ - type: cosine_accuracy@3
199
+ value: 0.8428571428571429
200
+ name: Cosine Accuracy@3
201
+ - type: cosine_accuracy@5
202
+ value: 0.8757142857142857
203
+ name: Cosine Accuracy@5
204
+ - type: cosine_accuracy@10
205
+ value: 0.9128571428571428
206
+ name: Cosine Accuracy@10
207
+ - type: cosine_precision@1
208
+ value: 0.71
209
+ name: Cosine Precision@1
210
+ - type: cosine_precision@3
211
+ value: 0.28095238095238095
212
+ name: Cosine Precision@3
213
+ - type: cosine_precision@5
214
+ value: 0.17514285714285713
215
+ name: Cosine Precision@5
216
+ - type: cosine_precision@10
217
+ value: 0.09128571428571428
218
+ name: Cosine Precision@10
219
+ - type: cosine_recall@1
220
+ value: 0.71
221
+ name: Cosine Recall@1
222
+ - type: cosine_recall@3
223
+ value: 0.8428571428571429
224
+ name: Cosine Recall@3
225
+ - type: cosine_recall@5
226
+ value: 0.8757142857142857
227
+ name: Cosine Recall@5
228
+ - type: cosine_recall@10
229
+ value: 0.9128571428571428
230
+ name: Cosine Recall@10
231
+ - type: cosine_ndcg@10
232
+ value: 0.8138965576076403
233
+ name: Cosine Ndcg@10
234
+ - type: cosine_mrr@10
235
+ value: 0.7818429705215417
236
+ name: Cosine Mrr@10
237
+ - type: cosine_map@100
238
+ value: 0.7855894139852542
239
+ name: Cosine Map@100
240
+ - task:
241
+ type: information-retrieval
242
+ name: Information Retrieval
243
+ dataset:
244
+ name: dim 128
245
+ type: dim_128
246
+ metrics:
247
+ - type: cosine_accuracy@1
248
+ value: 0.6871428571428572
249
+ name: Cosine Accuracy@1
250
+ - type: cosine_accuracy@3
251
+ value: 0.8185714285714286
252
+ name: Cosine Accuracy@3
253
+ - type: cosine_accuracy@5
254
+ value: 0.8628571428571429
255
+ name: Cosine Accuracy@5
256
+ - type: cosine_accuracy@10
257
+ value: 0.8971428571428571
258
+ name: Cosine Accuracy@10
259
+ - type: cosine_precision@1
260
+ value: 0.6871428571428572
261
+ name: Cosine Precision@1
262
+ - type: cosine_precision@3
263
+ value: 0.27285714285714285
264
+ name: Cosine Precision@3
265
+ - type: cosine_precision@5
266
+ value: 0.17257142857142854
267
+ name: Cosine Precision@5
268
+ - type: cosine_precision@10
269
+ value: 0.0897142857142857
270
+ name: Cosine Precision@10
271
+ - type: cosine_recall@1
272
+ value: 0.6871428571428572
273
+ name: Cosine Recall@1
274
+ - type: cosine_recall@3
275
+ value: 0.8185714285714286
276
+ name: Cosine Recall@3
277
+ - type: cosine_recall@5
278
+ value: 0.8628571428571429
279
+ name: Cosine Recall@5
280
+ - type: cosine_recall@10
281
+ value: 0.8971428571428571
282
+ name: Cosine Recall@10
283
+ - type: cosine_ndcg@10
284
+ value: 0.7953389524625682
285
+ name: Cosine Ndcg@10
286
+ - type: cosine_mrr@10
287
+ value: 0.7622392290249432
288
+ name: Cosine Mrr@10
289
+ - type: cosine_map@100
290
+ value: 0.7667451557566504
291
+ name: Cosine Map@100
292
+ - task:
293
+ type: information-retrieval
294
+ name: Information Retrieval
295
+ dataset:
296
+ name: dim 64
297
+ type: dim_64
298
+ metrics:
299
+ - type: cosine_accuracy@1
300
+ value: 0.6628571428571428
301
+ name: Cosine Accuracy@1
302
+ - type: cosine_accuracy@3
303
+ value: 0.7842857142857143
304
+ name: Cosine Accuracy@3
305
+ - type: cosine_accuracy@5
306
+ value: 0.8371428571428572
307
+ name: Cosine Accuracy@5
308
+ - type: cosine_accuracy@10
309
+ value: 0.8771428571428571
310
+ name: Cosine Accuracy@10
311
+ - type: cosine_precision@1
312
+ value: 0.6628571428571428
313
+ name: Cosine Precision@1
314
+ - type: cosine_precision@3
315
+ value: 0.26142857142857145
316
+ name: Cosine Precision@3
317
+ - type: cosine_precision@5
318
+ value: 0.1674285714285714
319
+ name: Cosine Precision@5
320
+ - type: cosine_precision@10
321
+ value: 0.0877142857142857
322
+ name: Cosine Precision@10
323
+ - type: cosine_recall@1
324
+ value: 0.6628571428571428
325
+ name: Cosine Recall@1
326
+ - type: cosine_recall@3
327
+ value: 0.7842857142857143
328
+ name: Cosine Recall@3
329
+ - type: cosine_recall@5
330
+ value: 0.8371428571428572
331
+ name: Cosine Recall@5
332
+ - type: cosine_recall@10
333
+ value: 0.8771428571428571
334
+ name: Cosine Recall@10
335
+ - type: cosine_ndcg@10
336
+ value: 0.7701231991584621
337
+ name: Cosine Ndcg@10
338
+ - type: cosine_mrr@10
339
+ value: 0.7357777777777779
340
+ name: Cosine Mrr@10
341
+ - type: cosine_map@100
342
+ value: 0.7410692697767751
343
+ name: Cosine Map@100
344
+ ---
345
+
346
+ # BGE base Financial Matryoshka
347
+
348
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) on the json dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
349
+
350
+ ## Model Details
351
+
352
+ ### Model Description
353
+ - **Model Type:** Sentence Transformer
354
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
355
+ - **Maximum Sequence Length:** 512 tokens
356
+ - **Output Dimensionality:** 768 dimensions
357
+ - **Similarity Function:** Cosine Similarity
358
+ - **Training Dataset:**
359
+ - json
360
+ - **Language:** en
361
+ - **License:** apache-2.0
362
+
363
+ ### Model Sources
364
+
365
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
366
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
367
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
368
+
369
+ ### Full Model Architecture
370
+
371
+ ```
372
+ SentenceTransformer(
373
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
374
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
375
+ (2): Normalize()
376
+ )
377
+ ```
378
+
379
+ ## Usage
380
+
381
+ ### Direct Usage (Sentence Transformers)
382
+
383
+ First install the Sentence Transformers library:
384
+
385
+ ```bash
386
+ pip install -U sentence-transformers
387
+ ```
388
+
389
+ Then you can load this model and run inference.
390
+ ```python
391
+ from sentence_transformers import SentenceTransformer
392
+
393
+ # Download from the 🤗 Hub
394
+ model = SentenceTransformer("chcho/bge-base-financial-matryoshka")
395
+ # Run inference
396
+ sentences = [
397
+ 'MERS database revenues contain multiple performance obligations related to each new loan registration and future transfers, and the revenues are primarily recorded at the point in time of each transaction.',
398
+ 'How are revenues from MERS database recognized?',
399
+ "How many active sellers and buyers did Etsy's marketplaces connect as of December 31, 2023?",
400
+ ]
401
+ embeddings = model.encode(sentences)
402
+ print(embeddings.shape)
403
+ # [3, 768]
404
+
405
+ # Get the similarity scores for the embeddings
406
+ similarities = model.similarity(embeddings, embeddings)
407
+ print(similarities.shape)
408
+ # [3, 3]
409
+ ```
410
+
411
+ <!--
412
+ ### Direct Usage (Transformers)
413
+
414
+ <details><summary>Click to see the direct usage in Transformers</summary>
415
+
416
+ </details>
417
+ -->
418
+
419
+ <!--
420
+ ### Downstream Usage (Sentence Transformers)
421
+
422
+ You can finetune this model on your own dataset.
423
+
424
+ <details><summary>Click to expand</summary>
425
+
426
+ </details>
427
+ -->
428
+
429
+ <!--
430
+ ### Out-of-Scope Use
431
+
432
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
433
+ -->
434
+
435
+ ## Evaluation
436
+
437
+ ### Metrics
438
+
439
+ #### Information Retrieval
440
+
441
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
442
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
443
+
444
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
445
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
446
+ | cosine_accuracy@1 | 0.7229 | 0.7157 | 0.71 | 0.6871 | 0.6629 |
447
+ | cosine_accuracy@3 | 0.8529 | 0.8471 | 0.8429 | 0.8186 | 0.7843 |
448
+ | cosine_accuracy@5 | 0.89 | 0.8857 | 0.8757 | 0.8629 | 0.8371 |
449
+ | cosine_accuracy@10 | 0.9186 | 0.9186 | 0.9129 | 0.8971 | 0.8771 |
450
+ | cosine_precision@1 | 0.7229 | 0.7157 | 0.71 | 0.6871 | 0.6629 |
451
+ | cosine_precision@3 | 0.2843 | 0.2824 | 0.281 | 0.2729 | 0.2614 |
452
+ | cosine_precision@5 | 0.178 | 0.1771 | 0.1751 | 0.1726 | 0.1674 |
453
+ | cosine_precision@10 | 0.0919 | 0.0919 | 0.0913 | 0.0897 | 0.0877 |
454
+ | cosine_recall@1 | 0.7229 | 0.7157 | 0.71 | 0.6871 | 0.6629 |
455
+ | cosine_recall@3 | 0.8529 | 0.8471 | 0.8429 | 0.8186 | 0.7843 |
456
+ | cosine_recall@5 | 0.89 | 0.8857 | 0.8757 | 0.8629 | 0.8371 |
457
+ | cosine_recall@10 | 0.9186 | 0.9186 | 0.9129 | 0.8971 | 0.8771 |
458
+ | **cosine_ndcg@10** | **0.8244** | **0.8209** | **0.8139** | **0.7953** | **0.7701** |
459
+ | cosine_mrr@10 | 0.7937 | 0.7891 | 0.7818 | 0.7622 | 0.7358 |
460
+ | cosine_map@100 | 0.7972 | 0.7926 | 0.7856 | 0.7667 | 0.7411 |
461
+
462
+ <!--
463
+ ## Bias, Risks and Limitations
464
+
465
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
466
+ -->
467
+
468
+ <!--
469
+ ### Recommendations
470
+
471
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
472
+ -->
473
+
474
+ ## Training Details
475
+
476
+ ### Training Dataset
477
+
478
+ #### json
479
+
480
+ * Dataset: json
481
+ * Size: 6,300 training samples
482
+ * Columns: <code>positive</code> and <code>anchor</code>
483
+ * Approximate statistics based on the first 1000 samples:
484
+ | | positive | anchor |
485
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
486
+ | type | string | string |
487
+ | details | <ul><li>min: 2 tokens</li><li>mean: 46.48 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 20.5 tokens</li><li>max: 51 tokens</li></ul> |
488
+ * Samples:
489
+ | positive | anchor |
490
+ |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
491
+ | <code>We use a variety of methodologies to determine the fair value of these assets, including discounted cash flow models, which include assumptions we believe are consistent with those a market participant would use.</code> | <code>How is the fair value of intangible assets determined within a company?</code> |
492
+ | <code>We continue to own a 35% minority ownership in Gentiva Hospice operations after it was restructured into a new stand-alone company.</code> | <code>What percentage minority ownership does the company retain in Gentiva Hospice after the restructuring?</code> |
493
+ | <code>The net interest income for the first quarter of 2023 was $14,448 million.</code> | <code>What was the net interest income for the first quarter of 2023?</code> |
494
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
495
+ ```json
496
+ {
497
+ "loss": "MultipleNegativesRankingLoss",
498
+ "matryoshka_dims": [
499
+ 768,
500
+ 512,
501
+ 256,
502
+ 128,
503
+ 64
504
+ ],
505
+ "matryoshka_weights": [
506
+ 1,
507
+ 1,
508
+ 1,
509
+ 1,
510
+ 1
511
+ ],
512
+ "n_dims_per_step": -1
513
+ }
514
+ ```
515
+
516
+ ### Training Hyperparameters
517
+ #### Non-Default Hyperparameters
518
+
519
+ - `eval_strategy`: epoch
520
+ - `per_device_train_batch_size`: 32
521
+ - `per_device_eval_batch_size`: 16
522
+ - `gradient_accumulation_steps`: 16
523
+ - `learning_rate`: 2e-05
524
+ - `num_train_epochs`: 4
525
+ - `lr_scheduler_type`: cosine
526
+ - `warmup_ratio`: 0.1
527
+ - `bf16`: True
528
+ - `tf32`: True
529
+ - `load_best_model_at_end`: True
530
+ - `optim`: adamw_torch_fused
531
+ - `batch_sampler`: no_duplicates
532
+
533
+ #### All Hyperparameters
534
+ <details><summary>Click to expand</summary>
535
+
536
+ - `overwrite_output_dir`: False
537
+ - `do_predict`: False
538
+ - `eval_strategy`: epoch
539
+ - `prediction_loss_only`: True
540
+ - `per_device_train_batch_size`: 32
541
+ - `per_device_eval_batch_size`: 16
542
+ - `per_gpu_train_batch_size`: None
543
+ - `per_gpu_eval_batch_size`: None
544
+ - `gradient_accumulation_steps`: 16
545
+ - `eval_accumulation_steps`: None
546
+ - `learning_rate`: 2e-05
547
+ - `weight_decay`: 0.0
548
+ - `adam_beta1`: 0.9
549
+ - `adam_beta2`: 0.999
550
+ - `adam_epsilon`: 1e-08
551
+ - `max_grad_norm`: 1.0
552
+ - `num_train_epochs`: 4
553
+ - `max_steps`: -1
554
+ - `lr_scheduler_type`: cosine
555
+ - `lr_scheduler_kwargs`: {}
556
+ - `warmup_ratio`: 0.1
557
+ - `warmup_steps`: 0
558
+ - `log_level`: passive
559
+ - `log_level_replica`: warning
560
+ - `log_on_each_node`: True
561
+ - `logging_nan_inf_filter`: True
562
+ - `save_safetensors`: True
563
+ - `save_on_each_node`: False
564
+ - `save_only_model`: False
565
+ - `restore_callback_states_from_checkpoint`: False
566
+ - `no_cuda`: False
567
+ - `use_cpu`: False
568
+ - `use_mps_device`: False
569
+ - `seed`: 42
570
+ - `data_seed`: None
571
+ - `jit_mode_eval`: False
572
+ - `use_ipex`: False
573
+ - `bf16`: True
574
+ - `fp16`: False
575
+ - `fp16_opt_level`: O1
576
+ - `half_precision_backend`: auto
577
+ - `bf16_full_eval`: False
578
+ - `fp16_full_eval`: False
579
+ - `tf32`: True
580
+ - `local_rank`: 0
581
+ - `ddp_backend`: None
582
+ - `tpu_num_cores`: None
583
+ - `tpu_metrics_debug`: False
584
+ - `debug`: []
585
+ - `dataloader_drop_last`: False
586
+ - `dataloader_num_workers`: 0
587
+ - `dataloader_prefetch_factor`: None
588
+ - `past_index`: -1
589
+ - `disable_tqdm`: False
590
+ - `remove_unused_columns`: True
591
+ - `label_names`: None
592
+ - `load_best_model_at_end`: True
593
+ - `ignore_data_skip`: False
594
+ - `fsdp`: []
595
+ - `fsdp_min_num_params`: 0
596
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
597
+ - `fsdp_transformer_layer_cls_to_wrap`: None
598
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
599
+ - `deepspeed`: None
600
+ - `label_smoothing_factor`: 0.0
601
+ - `optim`: adamw_torch_fused
602
+ - `optim_args`: None
603
+ - `adafactor`: False
604
+ - `group_by_length`: False
605
+ - `length_column_name`: length
606
+ - `ddp_find_unused_parameters`: None
607
+ - `ddp_bucket_cap_mb`: None
608
+ - `ddp_broadcast_buffers`: False
609
+ - `dataloader_pin_memory`: True
610
+ - `dataloader_persistent_workers`: False
611
+ - `skip_memory_metrics`: True
612
+ - `use_legacy_prediction_loop`: False
613
+ - `push_to_hub`: False
614
+ - `resume_from_checkpoint`: None
615
+ - `hub_model_id`: None
616
+ - `hub_strategy`: every_save
617
+ - `hub_private_repo`: False
618
+ - `hub_always_push`: False
619
+ - `gradient_checkpointing`: False
620
+ - `gradient_checkpointing_kwargs`: None
621
+ - `include_inputs_for_metrics`: False
622
+ - `eval_do_concat_batches`: True
623
+ - `fp16_backend`: auto
624
+ - `push_to_hub_model_id`: None
625
+ - `push_to_hub_organization`: None
626
+ - `mp_parameters`:
627
+ - `auto_find_batch_size`: False
628
+ - `full_determinism`: False
629
+ - `torchdynamo`: None
630
+ - `ray_scope`: last
631
+ - `ddp_timeout`: 1800
632
+ - `torch_compile`: False
633
+ - `torch_compile_backend`: None
634
+ - `torch_compile_mode`: None
635
+ - `dispatch_batches`: None
636
+ - `split_batches`: None
637
+ - `include_tokens_per_second`: False
638
+ - `include_num_input_tokens_seen`: False
639
+ - `neftune_noise_alpha`: None
640
+ - `optim_target_modules`: None
641
+ - `batch_eval_metrics`: False
642
+ - `prompts`: None
643
+ - `batch_sampler`: no_duplicates
644
+ - `multi_dataset_batch_sampler`: proportional
645
+
646
+ </details>
647
+
648
+ ### Training Logs
649
+ | 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 |
650
+ |:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
651
+ | 0.8122 | 10 | 1.5791 | - | - | - | - | - |
652
+ | 0.9746 | 12 | - | 0.8089 | 0.8028 | 0.7958 | 0.7714 | 0.7428 |
653
+ | 1.6244 | 20 | 0.6637 | - | - | - | - | - |
654
+ | 1.9492 | 24 | - | 0.8209 | 0.8166 | 0.8109 | 0.7913 | 0.7615 |
655
+ | 2.4365 | 30 | 0.5072 | - | - | - | - | - |
656
+ | **2.9239** | **36** | **-** | **0.8229** | **0.82** | **0.8133** | **0.7959** | **0.7704** |
657
+ | 3.2487 | 40 | 0.394 | - | - | - | - | - |
658
+ | 3.8985 | 48 | - | 0.8244 | 0.8209 | 0.8139 | 0.7953 | 0.7701 |
659
+
660
+ * The bold row denotes the saved checkpoint.
661
+
662
+ ### Framework Versions
663
+ - Python: 3.9.5
664
+ - Sentence Transformers: 3.3.1
665
+ - Transformers: 4.41.2
666
+ - PyTorch: 2.1.2+cu121
667
+ - Accelerate: 0.27.2
668
+ - Datasets: 2.19.1
669
+ - Tokenizers: 0.19.1
670
+
671
+ ## Citation
672
+
673
+ ### BibTeX
674
+
675
+ #### Sentence Transformers
676
+ ```bibtex
677
+ @inproceedings{reimers-2019-sentence-bert,
678
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
679
+ author = "Reimers, Nils and Gurevych, Iryna",
680
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
681
+ month = "11",
682
+ year = "2019",
683
+ publisher = "Association for Computational Linguistics",
684
+ url = "https://arxiv.org/abs/1908.10084",
685
+ }
686
+ ```
687
+
688
+ #### MatryoshkaLoss
689
+ ```bibtex
690
+ @misc{kusupati2024matryoshka,
691
+ title={Matryoshka Representation Learning},
692
+ 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},
693
+ year={2024},
694
+ eprint={2205.13147},
695
+ archivePrefix={arXiv},
696
+ primaryClass={cs.LG}
697
+ }
698
+ ```
699
+
700
+ #### MultipleNegativesRankingLoss
701
+ ```bibtex
702
+ @misc{henderson2017efficient,
703
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
704
+ 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},
705
+ year={2017},
706
+ eprint={1705.00652},
707
+ archivePrefix={arXiv},
708
+ primaryClass={cs.CL}
709
+ }
710
+ ```
711
+
712
+ <!--
713
+ ## Glossary
714
+
715
+ *Clearly define terms in order to be accessible across audiences.*
716
+ -->
717
+
718
+ <!--
719
+ ## Model Card Authors
720
+
721
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
722
+ -->
723
+
724
+ <!--
725
+ ## Model Card Contact
726
+
727
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
728
+ -->
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:de8acbcffd19065d9183107c169494fe25c1babbc8c030a6743752ecc7534d93
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