MistyDragon commited on
Commit
4f188e5
·
verified ·
1 Parent(s): 9c1a5d9

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
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,713 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-small-en-v1.5
14
+ widget:
15
+ - source_sentence: During the year ended December 31, 2023, cash flows used in investing
16
+ activities also included proceeds from the sale of our investment in Saudi Cinema
17
+ Company, LLC of $30.0 million.
18
+ sentences:
19
+ - What are some of the risks associated with the company's ability to maintain its
20
+ concession in Macao and gaming license in Singapore?
21
+ - What were the proceeds from the sale of investment in Saudi Cinema Company, LLC
22
+ during 2023?
23
+ - What financial impact did the change in accounting estimate regarding server and
24
+ network equipment have on Microsoft in fiscal year 2023?
25
+ - source_sentence: During 2023, U.S. sales of natural gas averaged 4.7 billion cubic
26
+ feet per day.
27
+ sentences:
28
+ - What constitutes a material weakness in internal control over financial reporting,
29
+ according to the criteria set by COSO?
30
+ - What was Chevron's total average daily sales of natural gas in the U.S. in 2023?
31
+ - What total amount of assets were measured at fair value as of January 31, 2022,
32
+ and how is this divided across the fair value hierarchy levels?
33
+ - source_sentence: The net cash provided by operating activities during fiscal 2023
34
+ was related to net income of $208 million, adjusted for non-cash items including
35
+ $3.8 billion of depreciation and amortization and $3.3 billion related to stock-based
36
+ compensation expense.
37
+ sentences:
38
+ - What was the net cash provided by operating activities for fiscal 2023?
39
+ - How does Nike protect its intellectual property rights against infringement?
40
+ - What specific feature does the Peloton Bike+ offer regarding workout experience?
41
+ - source_sentence: Year-over-Year Changes in Operating Results for 2023 compared to
42
+ 2022 showed a decrease of $1,858 million for FedEx Express, an increase of $498
43
+ million for FedEx Ground, and an increase of $262 million for FedEx Freight.
44
+ sentences:
45
+ - How did comparable sales growth, including fuel, contribute to net sales for Sam's
46
+ Club in fiscal 2023?
47
+ - What is the role of Level 1, Level 2, and Level 3 inputs in the fair value hierarchy
48
+ according to ASC 820?
49
+ - What were the operating results changes year-over-year for the FedEx Express,
50
+ Ground, and Freight segments in 2023 compared to 2022?
51
+ - source_sentence: Caterpillar Insurance Co. Ltd. is registered as a Class 2 (General
52
+ Business) and Class B (Long-Term) insurer with the Bermuda Monetary Authority.
53
+ sentences:
54
+ - What types of insurance licenses does Caterpillar Insurance Co. Ltd. hold in Bermuda?
55
+ - What is indicated by 'Item 8' in a financial document?
56
+ - What does Gross Merchandise Volume (GMV) represent in financial terms?
57
+ pipeline_tag: sentence-similarity
58
+ library_name: sentence-transformers
59
+ metrics:
60
+ - cosine_accuracy@1
61
+ - cosine_accuracy@3
62
+ - cosine_accuracy@5
63
+ - cosine_accuracy@10
64
+ - cosine_precision@1
65
+ - cosine_precision@3
66
+ - cosine_precision@5
67
+ - cosine_precision@10
68
+ - cosine_recall@1
69
+ - cosine_recall@3
70
+ - cosine_recall@5
71
+ - cosine_recall@10
72
+ - cosine_ndcg@10
73
+ - cosine_mrr@10
74
+ - cosine_map@100
75
+ model-index:
76
+ - name: BGE base Financial Matryoshka
77
+ results:
78
+ - task:
79
+ type: information-retrieval
80
+ name: Information Retrieval
81
+ dataset:
82
+ name: dim 256
83
+ type: dim_256
84
+ metrics:
85
+ - type: cosine_accuracy@1
86
+ value: 0.6985714285714286
87
+ name: Cosine Accuracy@1
88
+ - type: cosine_accuracy@3
89
+ value: 0.8314285714285714
90
+ name: Cosine Accuracy@3
91
+ - type: cosine_accuracy@5
92
+ value: 0.8728571428571429
93
+ name: Cosine Accuracy@5
94
+ - type: cosine_accuracy@10
95
+ value: 0.9171428571428571
96
+ name: Cosine Accuracy@10
97
+ - type: cosine_precision@1
98
+ value: 0.6985714285714286
99
+ name: Cosine Precision@1
100
+ - type: cosine_precision@3
101
+ value: 0.27714285714285714
102
+ name: Cosine Precision@3
103
+ - type: cosine_precision@5
104
+ value: 0.17457142857142854
105
+ name: Cosine Precision@5
106
+ - type: cosine_precision@10
107
+ value: 0.09171428571428569
108
+ name: Cosine Precision@10
109
+ - type: cosine_recall@1
110
+ value: 0.6985714285714286
111
+ name: Cosine Recall@1
112
+ - type: cosine_recall@3
113
+ value: 0.8314285714285714
114
+ name: Cosine Recall@3
115
+ - type: cosine_recall@5
116
+ value: 0.8728571428571429
117
+ name: Cosine Recall@5
118
+ - type: cosine_recall@10
119
+ value: 0.9171428571428571
120
+ name: Cosine Recall@10
121
+ - type: cosine_ndcg@10
122
+ value: 0.8091312862711041
123
+ name: Cosine Ndcg@10
124
+ - type: cosine_mrr@10
125
+ value: 0.7744716553287979
126
+ name: Cosine Mrr@10
127
+ - type: cosine_map@100
128
+ value: 0.778107400978576
129
+ name: Cosine Map@100
130
+ - task:
131
+ type: information-retrieval
132
+ name: Information Retrieval
133
+ dataset:
134
+ name: dim 128
135
+ type: dim_128
136
+ metrics:
137
+ - type: cosine_accuracy@1
138
+ value: 0.6771428571428572
139
+ name: Cosine Accuracy@1
140
+ - type: cosine_accuracy@3
141
+ value: 0.8171428571428572
142
+ name: Cosine Accuracy@3
143
+ - type: cosine_accuracy@5
144
+ value: 0.8642857142857143
145
+ name: Cosine Accuracy@5
146
+ - type: cosine_accuracy@10
147
+ value: 0.9171428571428571
148
+ name: Cosine Accuracy@10
149
+ - type: cosine_precision@1
150
+ value: 0.6771428571428572
151
+ name: Cosine Precision@1
152
+ - type: cosine_precision@3
153
+ value: 0.2723809523809524
154
+ name: Cosine Precision@3
155
+ - type: cosine_precision@5
156
+ value: 0.17285714285714285
157
+ name: Cosine Precision@5
158
+ - type: cosine_precision@10
159
+ value: 0.09171428571428569
160
+ name: Cosine Precision@10
161
+ - type: cosine_recall@1
162
+ value: 0.6771428571428572
163
+ name: Cosine Recall@1
164
+ - type: cosine_recall@3
165
+ value: 0.8171428571428572
166
+ name: Cosine Recall@3
167
+ - type: cosine_recall@5
168
+ value: 0.8642857142857143
169
+ name: Cosine Recall@5
170
+ - type: cosine_recall@10
171
+ value: 0.9171428571428571
172
+ name: Cosine Recall@10
173
+ - type: cosine_ndcg@10
174
+ value: 0.7978178514618532
175
+ name: Cosine Ndcg@10
176
+ - type: cosine_mrr@10
177
+ value: 0.7596043083900226
178
+ name: Cosine Mrr@10
179
+ - type: cosine_map@100
180
+ value: 0.7625576612954725
181
+ name: Cosine Map@100
182
+ - task:
183
+ type: information-retrieval
184
+ name: Information Retrieval
185
+ dataset:
186
+ name: dim 64
187
+ type: dim_64
188
+ metrics:
189
+ - type: cosine_accuracy@1
190
+ value: 0.66
191
+ name: Cosine Accuracy@1
192
+ - type: cosine_accuracy@3
193
+ value: 0.8014285714285714
194
+ name: Cosine Accuracy@3
195
+ - type: cosine_accuracy@5
196
+ value: 0.8542857142857143
197
+ name: Cosine Accuracy@5
198
+ - type: cosine_accuracy@10
199
+ value: 0.9028571428571428
200
+ name: Cosine Accuracy@10
201
+ - type: cosine_precision@1
202
+ value: 0.66
203
+ name: Cosine Precision@1
204
+ - type: cosine_precision@3
205
+ value: 0.2671428571428571
206
+ name: Cosine Precision@3
207
+ - type: cosine_precision@5
208
+ value: 0.17085714285714285
209
+ name: Cosine Precision@5
210
+ - type: cosine_precision@10
211
+ value: 0.09028571428571427
212
+ name: Cosine Precision@10
213
+ - type: cosine_recall@1
214
+ value: 0.66
215
+ name: Cosine Recall@1
216
+ - type: cosine_recall@3
217
+ value: 0.8014285714285714
218
+ name: Cosine Recall@3
219
+ - type: cosine_recall@5
220
+ value: 0.8542857142857143
221
+ name: Cosine Recall@5
222
+ - type: cosine_recall@10
223
+ value: 0.9028571428571428
224
+ name: Cosine Recall@10
225
+ - type: cosine_ndcg@10
226
+ value: 0.7797125058125993
227
+ name: Cosine Ndcg@10
228
+ - type: cosine_mrr@10
229
+ value: 0.7404512471655325
230
+ name: Cosine Mrr@10
231
+ - type: cosine_map@100
232
+ value: 0.7439184556821083
233
+ name: Cosine Map@100
234
+ ---
235
+
236
+ # BGE base Financial Matryoshka
237
+
238
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) on the json dataset. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
239
+
240
+ ## Model Details
241
+
242
+ ### Model Description
243
+ - **Model Type:** Sentence Transformer
244
+ - **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
245
+ - **Maximum Sequence Length:** 512 tokens
246
+ - **Output Dimensionality:** 384 dimensions
247
+ - **Similarity Function:** Cosine Similarity
248
+ - **Training Dataset:**
249
+ - json
250
+ - **Language:** en
251
+ - **License:** apache-2.0
252
+
253
+ ### Model Sources
254
+
255
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
256
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
257
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
258
+
259
+ ### Full Model Architecture
260
+
261
+ ```
262
+ SentenceTransformer(
263
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
264
+ (1): Pooling({'word_embedding_dimension': 384, '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})
265
+ (2): Normalize()
266
+ )
267
+ ```
268
+
269
+ ## Usage
270
+
271
+ ### Direct Usage (Sentence Transformers)
272
+
273
+ First install the Sentence Transformers library:
274
+
275
+ ```bash
276
+ pip install -U sentence-transformers
277
+ ```
278
+
279
+ Then you can load this model and run inference.
280
+ ```python
281
+ from sentence_transformers import SentenceTransformer
282
+
283
+ # Download from the 🤗 Hub
284
+ model = SentenceTransformer("MistyDragon/bge-small-financial-matryoshka")
285
+ # Run inference
286
+ sentences = [
287
+ 'Caterpillar Insurance Co. Ltd. is registered as a Class 2 (General Business) and Class B (Long-Term) insurer with the Bermuda Monetary Authority.',
288
+ 'What types of insurance licenses does Caterpillar Insurance Co. Ltd. hold in Bermuda?',
289
+ "What is indicated by 'Item 8' in a financial document?",
290
+ ]
291
+ embeddings = model.encode(sentences)
292
+ print(embeddings.shape)
293
+ # [3, 384]
294
+
295
+ # Get the similarity scores for the embeddings
296
+ similarities = model.similarity(embeddings, embeddings)
297
+ print(similarities.shape)
298
+ # [3, 3]
299
+ ```
300
+
301
+ <!--
302
+ ### Direct Usage (Transformers)
303
+
304
+ <details><summary>Click to see the direct usage in Transformers</summary>
305
+
306
+ </details>
307
+ -->
308
+
309
+ <!--
310
+ ### Downstream Usage (Sentence Transformers)
311
+
312
+ You can finetune this model on your own dataset.
313
+
314
+ <details><summary>Click to expand</summary>
315
+
316
+ </details>
317
+ -->
318
+
319
+ <!--
320
+ ### Out-of-Scope Use
321
+
322
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
323
+ -->
324
+
325
+ ## Evaluation
326
+
327
+ ### Metrics
328
+
329
+ #### Information Retrieval
330
+
331
+ * Dataset: `dim_256`
332
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
333
+ ```json
334
+ {
335
+ "truncate_dim": 256
336
+ }
337
+ ```
338
+
339
+ | Metric | Value |
340
+ |:--------------------|:-----------|
341
+ | cosine_accuracy@1 | 0.6986 |
342
+ | cosine_accuracy@3 | 0.8314 |
343
+ | cosine_accuracy@5 | 0.8729 |
344
+ | cosine_accuracy@10 | 0.9171 |
345
+ | cosine_precision@1 | 0.6986 |
346
+ | cosine_precision@3 | 0.2771 |
347
+ | cosine_precision@5 | 0.1746 |
348
+ | cosine_precision@10 | 0.0917 |
349
+ | cosine_recall@1 | 0.6986 |
350
+ | cosine_recall@3 | 0.8314 |
351
+ | cosine_recall@5 | 0.8729 |
352
+ | cosine_recall@10 | 0.9171 |
353
+ | **cosine_ndcg@10** | **0.8091** |
354
+ | cosine_mrr@10 | 0.7745 |
355
+ | cosine_map@100 | 0.7781 |
356
+
357
+ #### Information Retrieval
358
+
359
+ * Dataset: `dim_128`
360
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
361
+ ```json
362
+ {
363
+ "truncate_dim": 128
364
+ }
365
+ ```
366
+
367
+ | Metric | Value |
368
+ |:--------------------|:-----------|
369
+ | cosine_accuracy@1 | 0.6771 |
370
+ | cosine_accuracy@3 | 0.8171 |
371
+ | cosine_accuracy@5 | 0.8643 |
372
+ | cosine_accuracy@10 | 0.9171 |
373
+ | cosine_precision@1 | 0.6771 |
374
+ | cosine_precision@3 | 0.2724 |
375
+ | cosine_precision@5 | 0.1729 |
376
+ | cosine_precision@10 | 0.0917 |
377
+ | cosine_recall@1 | 0.6771 |
378
+ | cosine_recall@3 | 0.8171 |
379
+ | cosine_recall@5 | 0.8643 |
380
+ | cosine_recall@10 | 0.9171 |
381
+ | **cosine_ndcg@10** | **0.7978** |
382
+ | cosine_mrr@10 | 0.7596 |
383
+ | cosine_map@100 | 0.7626 |
384
+
385
+ #### Information Retrieval
386
+
387
+ * Dataset: `dim_64`
388
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
389
+ ```json
390
+ {
391
+ "truncate_dim": 64
392
+ }
393
+ ```
394
+
395
+ | Metric | Value |
396
+ |:--------------------|:-----------|
397
+ | cosine_accuracy@1 | 0.66 |
398
+ | cosine_accuracy@3 | 0.8014 |
399
+ | cosine_accuracy@5 | 0.8543 |
400
+ | cosine_accuracy@10 | 0.9029 |
401
+ | cosine_precision@1 | 0.66 |
402
+ | cosine_precision@3 | 0.2671 |
403
+ | cosine_precision@5 | 0.1709 |
404
+ | cosine_precision@10 | 0.0903 |
405
+ | cosine_recall@1 | 0.66 |
406
+ | cosine_recall@3 | 0.8014 |
407
+ | cosine_recall@5 | 0.8543 |
408
+ | cosine_recall@10 | 0.9029 |
409
+ | **cosine_ndcg@10** | **0.7797** |
410
+ | cosine_mrr@10 | 0.7405 |
411
+ | cosine_map@100 | 0.7439 |
412
+
413
+ <!--
414
+ ## Bias, Risks and Limitations
415
+
416
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
417
+ -->
418
+
419
+ <!--
420
+ ### Recommendations
421
+
422
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
423
+ -->
424
+
425
+ ## Training Details
426
+
427
+ ### Training Dataset
428
+
429
+ #### json
430
+
431
+ * Dataset: json
432
+ * Size: 6,300 training samples
433
+ * Columns: <code>positive</code> and <code>anchor</code>
434
+ * Approximate statistics based on the first 1000 samples:
435
+ | | positive | anchor |
436
+ |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
437
+ | type | string | string |
438
+ | details | <ul><li>min: 10 tokens</li><li>mean: 47.77 tokens</li><li>max: 439 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 20.48 tokens</li><li>max: 45 tokens</li></ul> |
439
+ * Samples:
440
+ | positive | anchor |
441
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------|
442
+ | <code>Return on investment (ROI) | 12.7 | % | | 14.9 | %</code> | <code>What was the return on investment (ROI) for the average invested capital in the latest period and how did this compare to the prior period?</code> |
443
+ | <code>According to the terms of the Senior Credit Facilities, cash amounts exceeding $175 million can be deducted from the total debt in the leverage ratio calculation, though this is subject to certain restrictions.</code> | <code>How does the Senior Credit Facilities' treatment of cash affect the calculation of the leverage ratio?</code> |
444
+ | <code>In 2023, approximately 67% of the total U.S. dialysis patient service revenues were generated from government-based programs.</code> | <code>What percentage of the total U.S. dialysis patient service revenues were generated from government-based programs in 2023?</code> |
445
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
446
+ ```json
447
+ {
448
+ "loss": "MultipleNegativesRankingLoss",
449
+ "matryoshka_dims": [
450
+ 256,
451
+ 128,
452
+ 64
453
+ ],
454
+ "matryoshka_weights": [
455
+ 1,
456
+ 1,
457
+ 1
458
+ ],
459
+ "n_dims_per_step": -1
460
+ }
461
+ ```
462
+
463
+ ### Training Hyperparameters
464
+ #### Non-Default Hyperparameters
465
+
466
+ - `eval_strategy`: epoch
467
+ - `per_device_eval_batch_size`: 16
468
+ - `gradient_accumulation_steps`: 8
469
+ - `learning_rate`: 2e-05
470
+ - `num_train_epochs`: 4
471
+ - `lr_scheduler_type`: cosine
472
+ - `warmup_ratio`: 0.1
473
+ - `bf16`: True
474
+ - `tf32`: False
475
+ - `load_best_model_at_end`: True
476
+ - `optim`: adamw_torch_fused
477
+ - `batch_sampler`: no_duplicates
478
+
479
+ #### All Hyperparameters
480
+ <details><summary>Click to expand</summary>
481
+
482
+ - `overwrite_output_dir`: False
483
+ - `do_predict`: False
484
+ - `eval_strategy`: epoch
485
+ - `prediction_loss_only`: True
486
+ - `per_device_train_batch_size`: 8
487
+ - `per_device_eval_batch_size`: 16
488
+ - `per_gpu_train_batch_size`: None
489
+ - `per_gpu_eval_batch_size`: None
490
+ - `gradient_accumulation_steps`: 8
491
+ - `eval_accumulation_steps`: None
492
+ - `torch_empty_cache_steps`: None
493
+ - `learning_rate`: 2e-05
494
+ - `weight_decay`: 0.0
495
+ - `adam_beta1`: 0.9
496
+ - `adam_beta2`: 0.999
497
+ - `adam_epsilon`: 1e-08
498
+ - `max_grad_norm`: 1.0
499
+ - `num_train_epochs`: 4
500
+ - `max_steps`: -1
501
+ - `lr_scheduler_type`: cosine
502
+ - `lr_scheduler_kwargs`: {}
503
+ - `warmup_ratio`: 0.1
504
+ - `warmup_steps`: 0
505
+ - `log_level`: passive
506
+ - `log_level_replica`: warning
507
+ - `log_on_each_node`: True
508
+ - `logging_nan_inf_filter`: True
509
+ - `save_safetensors`: True
510
+ - `save_on_each_node`: False
511
+ - `save_only_model`: False
512
+ - `restore_callback_states_from_checkpoint`: False
513
+ - `no_cuda`: False
514
+ - `use_cpu`: False
515
+ - `use_mps_device`: False
516
+ - `seed`: 42
517
+ - `data_seed`: None
518
+ - `jit_mode_eval`: False
519
+ - `use_ipex`: False
520
+ - `bf16`: True
521
+ - `fp16`: False
522
+ - `fp16_opt_level`: O1
523
+ - `half_precision_backend`: auto
524
+ - `bf16_full_eval`: False
525
+ - `fp16_full_eval`: False
526
+ - `tf32`: False
527
+ - `local_rank`: 0
528
+ - `ddp_backend`: None
529
+ - `tpu_num_cores`: None
530
+ - `tpu_metrics_debug`: False
531
+ - `debug`: []
532
+ - `dataloader_drop_last`: False
533
+ - `dataloader_num_workers`: 0
534
+ - `dataloader_prefetch_factor`: None
535
+ - `past_index`: -1
536
+ - `disable_tqdm`: False
537
+ - `remove_unused_columns`: True
538
+ - `label_names`: None
539
+ - `load_best_model_at_end`: True
540
+ - `ignore_data_skip`: False
541
+ - `fsdp`: []
542
+ - `fsdp_min_num_params`: 0
543
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
544
+ - `fsdp_transformer_layer_cls_to_wrap`: None
545
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
546
+ - `deepspeed`: None
547
+ - `label_smoothing_factor`: 0.0
548
+ - `optim`: adamw_torch_fused
549
+ - `optim_args`: None
550
+ - `adafactor`: False
551
+ - `group_by_length`: False
552
+ - `length_column_name`: length
553
+ - `ddp_find_unused_parameters`: None
554
+ - `ddp_bucket_cap_mb`: None
555
+ - `ddp_broadcast_buffers`: False
556
+ - `dataloader_pin_memory`: True
557
+ - `dataloader_persistent_workers`: False
558
+ - `skip_memory_metrics`: True
559
+ - `use_legacy_prediction_loop`: False
560
+ - `push_to_hub`: False
561
+ - `resume_from_checkpoint`: None
562
+ - `hub_model_id`: None
563
+ - `hub_strategy`: every_save
564
+ - `hub_private_repo`: None
565
+ - `hub_always_push`: False
566
+ - `gradient_checkpointing`: False
567
+ - `gradient_checkpointing_kwargs`: None
568
+ - `include_inputs_for_metrics`: False
569
+ - `include_for_metrics`: []
570
+ - `eval_do_concat_batches`: True
571
+ - `fp16_backend`: auto
572
+ - `push_to_hub_model_id`: None
573
+ - `push_to_hub_organization`: None
574
+ - `mp_parameters`:
575
+ - `auto_find_batch_size`: False
576
+ - `full_determinism`: False
577
+ - `torchdynamo`: None
578
+ - `ray_scope`: last
579
+ - `ddp_timeout`: 1800
580
+ - `torch_compile`: False
581
+ - `torch_compile_backend`: None
582
+ - `torch_compile_mode`: None
583
+ - `include_tokens_per_second`: False
584
+ - `include_num_input_tokens_seen`: False
585
+ - `neftune_noise_alpha`: None
586
+ - `optim_target_modules`: None
587
+ - `batch_eval_metrics`: False
588
+ - `eval_on_start`: False
589
+ - `use_liger_kernel`: False
590
+ - `eval_use_gather_object`: False
591
+ - `average_tokens_across_devices`: False
592
+ - `prompts`: None
593
+ - `batch_sampler`: no_duplicates
594
+ - `multi_dataset_batch_sampler`: proportional
595
+
596
+ </details>
597
+
598
+ ### Training Logs
599
+ | Epoch | Step | Training Loss | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
600
+ |:-------:|:-------:|:-------------:|:----------------------:|:----------------------:|:---------------------:|
601
+ | 0.1015 | 10 | 4.9287 | - | - | - |
602
+ | 0.2030 | 20 | 3.7753 | - | - | - |
603
+ | 0.3046 | 30 | 2.7807 | - | - | - |
604
+ | 0.4061 | 40 | 2.6642 | - | - | - |
605
+ | 0.5076 | 50 | 1.8158 | - | - | - |
606
+ | 0.6091 | 60 | 1.2895 | - | - | - |
607
+ | 0.7107 | 70 | 1.356 | - | - | - |
608
+ | 0.8122 | 80 | 1.2217 | - | - | - |
609
+ | 0.9137 | 90 | 1.2548 | - | - | - |
610
+ | 1.0 | 99 | - | 0.7949 | 0.7853 | 0.7609 |
611
+ | 1.0102 | 100 | 1.1693 | - | - | - |
612
+ | 1.1117 | 110 | 1.0828 | - | - | - |
613
+ | 1.2132 | 120 | 0.9545 | - | - | - |
614
+ | 1.3147 | 130 | 1.1774 | - | - | - |
615
+ | 1.4162 | 140 | 0.55 | - | - | - |
616
+ | 1.5178 | 150 | 0.891 | - | - | - |
617
+ | 1.6193 | 160 | 0.9661 | - | - | - |
618
+ | 1.7208 | 170 | 0.9355 | - | - | - |
619
+ | 1.8223 | 180 | 0.9888 | - | - | - |
620
+ | 1.9239 | 190 | 1.0157 | - | - | - |
621
+ | 2.0 | 198 | - | 0.8067 | 0.7945 | 0.7742 |
622
+ | 2.0203 | 200 | 0.7944 | - | - | - |
623
+ | 2.1218 | 210 | 0.5637 | - | - | - |
624
+ | 2.2234 | 220 | 0.3895 | - | - | - |
625
+ | 2.3249 | 230 | 1.0888 | - | - | - |
626
+ | 2.4264 | 240 | 0.8784 | - | - | - |
627
+ | 2.5279 | 250 | 0.5746 | - | - | - |
628
+ | 2.6294 | 260 | 1.064 | - | - | - |
629
+ | 2.7310 | 270 | 0.8036 | - | - | - |
630
+ | 2.8325 | 280 | 0.6005 | - | - | - |
631
+ | 2.9340 | 290 | 0.7571 | - | - | - |
632
+ | **3.0** | **297** | **-** | **0.81** | **0.7982** | **0.7785** |
633
+ | 3.0305 | 300 | 0.6178 | - | - | - |
634
+ | 3.1320 | 310 | 0.5013 | - | - | - |
635
+ | 3.2335 | 320 | 0.7171 | - | - | - |
636
+ | 3.3350 | 330 | 0.5717 | - | - | - |
637
+ | 3.4365 | 340 | 0.7031 | - | - | - |
638
+ | 3.5381 | 350 | 0.8601 | - | - | - |
639
+ | 3.6396 | 360 | 0.597 | - | - | - |
640
+ | 3.7411 | 370 | 0.4611 | - | - | - |
641
+ | 3.8426 | 380 | 0.6503 | - | - | - |
642
+ | 3.9442 | 390 | 0.3176 | - | - | - |
643
+ | 4.0 | 396 | - | 0.8091 | 0.7978 | 0.7797 |
644
+
645
+ * The bold row denotes the saved checkpoint.
646
+
647
+ ### Framework Versions
648
+ - Python: 3.11.13
649
+ - Sentence Transformers: 4.1.0
650
+ - Transformers: 4.52.4
651
+ - PyTorch: 2.6.0+cu124
652
+ - Accelerate: 1.8.1
653
+ - Datasets: 3.6.0
654
+ - Tokenizers: 0.21.1
655
+
656
+ ## Citation
657
+
658
+ ### BibTeX
659
+
660
+ #### Sentence Transformers
661
+ ```bibtex
662
+ @inproceedings{reimers-2019-sentence-bert,
663
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
664
+ author = "Reimers, Nils and Gurevych, Iryna",
665
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
666
+ month = "11",
667
+ year = "2019",
668
+ publisher = "Association for Computational Linguistics",
669
+ url = "https://arxiv.org/abs/1908.10084",
670
+ }
671
+ ```
672
+
673
+ #### MatryoshkaLoss
674
+ ```bibtex
675
+ @misc{kusupati2024matryoshka,
676
+ title={Matryoshka Representation Learning},
677
+ 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},
678
+ year={2024},
679
+ eprint={2205.13147},
680
+ archivePrefix={arXiv},
681
+ primaryClass={cs.LG}
682
+ }
683
+ ```
684
+
685
+ #### MultipleNegativesRankingLoss
686
+ ```bibtex
687
+ @misc{henderson2017efficient,
688
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
689
+ 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},
690
+ year={2017},
691
+ eprint={1705.00652},
692
+ archivePrefix={arXiv},
693
+ primaryClass={cs.CL}
694
+ }
695
+ ```
696
+
697
+ <!--
698
+ ## Glossary
699
+
700
+ *Clearly define terms in order to be accessible across audiences.*
701
+ -->
702
+
703
+ <!--
704
+ ## Model Card Authors
705
+
706
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
707
+ -->
708
+
709
+ <!--
710
+ ## Model Card Contact
711
+
712
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
713
+ -->
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 384,
10
+ "id2label": {
11
+ "0": "LABEL_0"
12
+ },
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 1536,
15
+ "label2id": {
16
+ "LABEL_0": 0
17
+ },
18
+ "layer_norm_eps": 1e-12,
19
+ "max_position_embeddings": 512,
20
+ "model_type": "bert",
21
+ "num_attention_heads": 12,
22
+ "num_hidden_layers": 12,
23
+ "pad_token_id": 0,
24
+ "position_embedding_type": "absolute",
25
+ "torch_dtype": "float32",
26
+ "transformers_version": "4.52.4",
27
+ "type_vocab_size": 2,
28
+ "use_cache": true,
29
+ "vocab_size": 30522
30
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.1.0",
4
+ "transformers": "4.52.4",
5
+ "pytorch": "2.6.0+cu124"
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:36e895b05dd2bb1c9dfbe164f22b72586226b2a133265b0dde5d0630453d98b0
3
+ size 133462128
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff