ppuva1 commited on
Commit
b8e4b41
·
verified ·
1 Parent(s): c25d34d

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,503 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ tags:
4
+ - sentence-transformers
5
+ - sentence-similarity
6
+ - feature-extraction
7
+ - generated_from_trainer
8
+ - dataset_size:6300
9
+ - loss:MatryoshkaLoss
10
+ - loss:MultipleNegativesRankingLoss
11
+ base_model: BAAI/bge-base-en-v1.5
12
+ metrics:
13
+ - cosine_accuracy@1
14
+ - cosine_accuracy@3
15
+ - cosine_accuracy@5
16
+ - cosine_accuracy@10
17
+ - cosine_precision@1
18
+ - cosine_precision@3
19
+ - cosine_precision@5
20
+ - cosine_precision@10
21
+ - cosine_recall@1
22
+ - cosine_recall@3
23
+ - cosine_recall@5
24
+ - cosine_recall@10
25
+ - cosine_ndcg@10
26
+ - cosine_mrr@10
27
+ - cosine_map@100
28
+ widget:
29
+ - source_sentence: The Financial Statements and Supplementary Data are listed under
30
+ 'Item 15. Exhibits and Financial Statement Schedules' as part of this Report.
31
+ sentences:
32
+ - Under ASO contracts, who retains the risk of financing health benefits costs?
33
+ - Under which item are the Financial Statements and Supplementary Data listed in
34
+ the report?
35
+ - How much did interest income increase for Enphase Energy in the year ended December
36
+ 31, 2023 compared to 2022?
37
+ - source_sentence: The company is involved in various legal actions in the ordinary
38
+ course of business, and some of these may be styled as class-action lawsuits.
39
+ sentences:
40
+ - How many Dollar Tree Plus stores were there as of January 28, 2023?
41
+ - Are there any class-action lawsuits among the legal actions faced by the company?
42
+ - What are the components referred to in Item 8 of financial documents?
43
+ - source_sentence: In 2021, the net cash provided by operating activities was $3,264
44
+ million and it increased to $6,464 million by 2023.
45
+ sentences:
46
+ - What was the net increase in cash provided by operating activities from 2021 to
47
+ 2023?
48
+ - What specific competitive advantages does IBM leverage in the hybrid cloud infrastructure
49
+ market?
50
+ - How many unvested restricted stock awards were there as of December 31, 2022,
51
+ and what was the weighted-average grant price at that time?
52
+ - source_sentence: We have assets for foreign net operating losses of $133.5 million,
53
+ with various expiration dates (and in some cases no expiration date), subject
54
+ to a valuation stand
55
+ sentences:
56
+ - What page in IBM’s 2023 Form 10-K is reserved for the Financial Statement Schedule?
57
+ - What were the primary sources and uses of cash that contributed to the $7.8 billion
58
+ increase in cash and cash equivalents during 2023?
59
+ - What is the total value of foreign net operating losses reported, and what is
60
+ the valuation allowance percentage applied to them?
61
+ - source_sentence: The Company uses cash flow hedges to minimize the variability in
62
+ cash flows of assets or liabilities or forecasted transactions caused by fluctuations
63
+ in foreign currency exchange rates, commodity prices or interest. The changes
64
+ in the fair values of derivatives designated as cash flow hedges are recorded
65
+ in AOCI and are reclassified into the line item in our consolidated statement
66
+ of income in which the hedged items are recorded in the same period the hedged
67
+ items affect earnings.
68
+ sentences:
69
+ - What financial instruments does the Company use to minimize the variability in
70
+ cash flows due to fluctuations in foreign currency exchange rates, commodity prices,
71
+ or interest rates?
72
+ - Why is the Asia Pacific reporting unit considered at risk of future goodwill impairment?
73
+ - What constituted the majority of the cost of revenues in the discussed financial
74
+ year?
75
+ pipeline_tag: sentence-similarity
76
+ model-index:
77
+ - name: SentenceTransformer based on BAAI/bge-base-en-v1.5
78
+ results:
79
+ - task:
80
+ type: information-retrieval
81
+ name: Information Retrieval
82
+ dataset:
83
+ name: dim 512
84
+ type: dim_512
85
+ metrics:
86
+ - type: cosine_accuracy@1
87
+ value: 0.7285714285714285
88
+ name: Cosine Accuracy@1
89
+ - type: cosine_accuracy@3
90
+ value: 0.83
91
+ name: Cosine Accuracy@3
92
+ - type: cosine_accuracy@5
93
+ value: 0.8685714285714285
94
+ name: Cosine Accuracy@5
95
+ - type: cosine_accuracy@10
96
+ value: 0.9128571428571428
97
+ name: Cosine Accuracy@10
98
+ - type: cosine_precision@1
99
+ value: 0.7285714285714285
100
+ name: Cosine Precision@1
101
+ - type: cosine_precision@3
102
+ value: 0.27666666666666667
103
+ name: Cosine Precision@3
104
+ - type: cosine_precision@5
105
+ value: 0.1737142857142857
106
+ name: Cosine Precision@5
107
+ - type: cosine_precision@10
108
+ value: 0.09128571428571428
109
+ name: Cosine Precision@10
110
+ - type: cosine_recall@1
111
+ value: 0.7285714285714285
112
+ name: Cosine Recall@1
113
+ - type: cosine_recall@3
114
+ value: 0.83
115
+ name: Cosine Recall@3
116
+ - type: cosine_recall@5
117
+ value: 0.8685714285714285
118
+ name: Cosine Recall@5
119
+ - type: cosine_recall@10
120
+ value: 0.9128571428571428
121
+ name: Cosine Recall@10
122
+ - type: cosine_ndcg@10
123
+ value: 0.8196512798721632
124
+ name: Cosine Ndcg@10
125
+ - type: cosine_mrr@10
126
+ value: 0.7899614512471653
127
+ name: Cosine Mrr@10
128
+ - type: cosine_map@100
129
+ value: 0.7931894941486222
130
+ name: Cosine Map@100
131
+ ---
132
+
133
+ # SentenceTransformer based on BAAI/bge-base-en-v1.5
134
+
135
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
136
+
137
+ ## Model Details
138
+
139
+ ### Model Description
140
+ - **Model Type:** Sentence Transformer
141
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
142
+ - **Maximum Sequence Length:** 512 tokens
143
+ - **Output Dimensionality:** 768 tokens
144
+ - **Similarity Function:** Cosine Similarity
145
+ <!-- - **Training Dataset:** Unknown -->
146
+ <!-- - **Language:** Unknown -->
147
+ <!-- - **License:** Unknown -->
148
+
149
+ ### Model Sources
150
+
151
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
152
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
153
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
154
+
155
+ ### Full Model Architecture
156
+
157
+ ```
158
+ SentenceTransformer(
159
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
160
+ (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})
161
+ (2): Normalize()
162
+ )
163
+ ```
164
+
165
+ ## Usage
166
+
167
+ ### Direct Usage (Sentence Transformers)
168
+
169
+ First install the Sentence Transformers library:
170
+
171
+ ```bash
172
+ pip install -U sentence-transformers
173
+ ```
174
+
175
+ Then you can load this model and run inference.
176
+ ```python
177
+ from sentence_transformers import SentenceTransformer
178
+
179
+ # Download from the 🤗 Hub
180
+ model = SentenceTransformer("ppuva1/bge-base-financial-matryoshka-2")
181
+ # Run inference
182
+ sentences = [
183
+ 'The Company uses cash flow hedges to minimize the variability in cash flows of assets or liabilities or forecasted transactions caused by fluctuations in foreign currency exchange rates, commodity prices or interest. The changes in the fair values of derivatives designated as cash flow hedges are recorded in AOCI and are reclassified into the line item in our consolidated statement of income in which the hedged items are recorded in the same period the hedged items affect earnings.',
184
+ 'What financial instruments does the Company use to minimize the variability in cash flows due to fluctuations in foreign currency exchange rates, commodity prices, or interest rates?',
185
+ 'Why is the Asia Pacific reporting unit considered at risk of future goodwill impairment?',
186
+ ]
187
+ embeddings = model.encode(sentences)
188
+ print(embeddings.shape)
189
+ # [3, 768]
190
+
191
+ # Get the similarity scores for the embeddings
192
+ similarities = model.similarity(embeddings, embeddings)
193
+ print(similarities.shape)
194
+ # [3, 3]
195
+ ```
196
+
197
+ <!--
198
+ ### Direct Usage (Transformers)
199
+
200
+ <details><summary>Click to see the direct usage in Transformers</summary>
201
+
202
+ </details>
203
+ -->
204
+
205
+ <!--
206
+ ### Downstream Usage (Sentence Transformers)
207
+
208
+ You can finetune this model on your own dataset.
209
+
210
+ <details><summary>Click to expand</summary>
211
+
212
+ </details>
213
+ -->
214
+
215
+ <!--
216
+ ### Out-of-Scope Use
217
+
218
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
219
+ -->
220
+
221
+ ## Evaluation
222
+
223
+ ### Metrics
224
+
225
+ #### Information Retrieval
226
+ * Dataset: `dim_512`
227
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
228
+
229
+ | Metric | Value |
230
+ |:--------------------|:-----------|
231
+ | cosine_accuracy@1 | 0.7286 |
232
+ | cosine_accuracy@3 | 0.83 |
233
+ | cosine_accuracy@5 | 0.8686 |
234
+ | cosine_accuracy@10 | 0.9129 |
235
+ | cosine_precision@1 | 0.7286 |
236
+ | cosine_precision@3 | 0.2767 |
237
+ | cosine_precision@5 | 0.1737 |
238
+ | cosine_precision@10 | 0.0913 |
239
+ | cosine_recall@1 | 0.7286 |
240
+ | cosine_recall@3 | 0.83 |
241
+ | cosine_recall@5 | 0.8686 |
242
+ | cosine_recall@10 | 0.9129 |
243
+ | cosine_ndcg@10 | 0.8197 |
244
+ | cosine_mrr@10 | 0.79 |
245
+ | **cosine_map@100** | **0.7932** |
246
+
247
+ <!--
248
+ ## Bias, Risks and Limitations
249
+
250
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
251
+ -->
252
+
253
+ <!--
254
+ ### Recommendations
255
+
256
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
257
+ -->
258
+
259
+ ## Training Details
260
+
261
+ ### Training Dataset
262
+
263
+ #### Unnamed Dataset
264
+
265
+
266
+ * Size: 6,300 training samples
267
+ * Columns: <code>positive</code> and <code>anchor</code>
268
+ * Approximate statistics based on the first 1000 samples:
269
+ | | positive | anchor |
270
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
271
+ | type | string | string |
272
+ | details | <ul><li>min: 4 tokens</li><li>mean: 46.01 tokens</li><li>max: 205 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 20.43 tokens</li><li>max: 46 tokens</li></ul> |
273
+ * Samples:
274
+ | positive | anchor |
275
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
276
+ | <code>The company's SEC filings are available to the public over the internet at the SEC's website at www.sec.gov. The SEC filings are also available free of charge on the company's website at ir.hilton.com as soon as reasonably practicable after they are filed with or furnished to the SEC.</code> | <code>Where can public access the company's SEC filings?</code> |
277
+ | <code>Garmin’s operations are subject to various environmental laws, including laws addressing air and water pollution and management of hazardous substances and wastes.</code> | <code>What aspects of Garmin's business are subject to environmental laws?</code> |
278
+ | <code>Adjusted EBITDA does not reflect certain litigation expenses, consisting of legal settlements and related fees for specific proceedings that we have determined arise outside of the ordinary course of business.</code> | <code>How does Adjusted EBITDA treat expenses related to litigation?</code> |
279
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
280
+ ```json
281
+ {
282
+ "loss": "MultipleNegativesRankingLoss",
283
+ "matryoshka_dims": [
284
+ 512
285
+ ],
286
+ "matryoshka_weights": [
287
+ 1
288
+ ],
289
+ "n_dims_per_step": -1
290
+ }
291
+ ```
292
+
293
+ ### Training Hyperparameters
294
+ #### Non-Default Hyperparameters
295
+
296
+ - `eval_strategy`: epoch
297
+ - `per_device_train_batch_size`: 32
298
+ - `per_device_eval_batch_size`: 16
299
+ - `gradient_accumulation_steps`: 16
300
+ - `learning_rate`: 2e-05
301
+ - `num_train_epochs`: 5
302
+ - `lr_scheduler_type`: cosine
303
+ - `warmup_ratio`: 0.1
304
+ - `load_best_model_at_end`: True
305
+ - `batch_sampler`: no_duplicates
306
+
307
+ #### All Hyperparameters
308
+ <details><summary>Click to expand</summary>
309
+
310
+ - `overwrite_output_dir`: False
311
+ - `do_predict`: False
312
+ - `eval_strategy`: epoch
313
+ - `prediction_loss_only`: True
314
+ - `per_device_train_batch_size`: 32
315
+ - `per_device_eval_batch_size`: 16
316
+ - `per_gpu_train_batch_size`: None
317
+ - `per_gpu_eval_batch_size`: None
318
+ - `gradient_accumulation_steps`: 16
319
+ - `eval_accumulation_steps`: None
320
+ - `torch_empty_cache_steps`: None
321
+ - `learning_rate`: 2e-05
322
+ - `weight_decay`: 0.0
323
+ - `adam_beta1`: 0.9
324
+ - `adam_beta2`: 0.999
325
+ - `adam_epsilon`: 1e-08
326
+ - `max_grad_norm`: 1.0
327
+ - `num_train_epochs`: 5
328
+ - `max_steps`: -1
329
+ - `lr_scheduler_type`: cosine
330
+ - `lr_scheduler_kwargs`: {}
331
+ - `warmup_ratio`: 0.1
332
+ - `warmup_steps`: 0
333
+ - `log_level`: passive
334
+ - `log_level_replica`: warning
335
+ - `log_on_each_node`: True
336
+ - `logging_nan_inf_filter`: True
337
+ - `save_safetensors`: True
338
+ - `save_on_each_node`: False
339
+ - `save_only_model`: False
340
+ - `restore_callback_states_from_checkpoint`: False
341
+ - `no_cuda`: False
342
+ - `use_cpu`: False
343
+ - `use_mps_device`: False
344
+ - `seed`: 42
345
+ - `data_seed`: None
346
+ - `jit_mode_eval`: False
347
+ - `use_ipex`: False
348
+ - `bf16`: False
349
+ - `fp16`: False
350
+ - `fp16_opt_level`: O1
351
+ - `half_precision_backend`: auto
352
+ - `bf16_full_eval`: False
353
+ - `fp16_full_eval`: False
354
+ - `tf32`: None
355
+ - `local_rank`: 0
356
+ - `ddp_backend`: None
357
+ - `tpu_num_cores`: None
358
+ - `tpu_metrics_debug`: False
359
+ - `debug`: []
360
+ - `dataloader_drop_last`: False
361
+ - `dataloader_num_workers`: 0
362
+ - `dataloader_prefetch_factor`: None
363
+ - `past_index`: -1
364
+ - `disable_tqdm`: False
365
+ - `remove_unused_columns`: True
366
+ - `label_names`: None
367
+ - `load_best_model_at_end`: True
368
+ - `ignore_data_skip`: False
369
+ - `fsdp`: []
370
+ - `fsdp_min_num_params`: 0
371
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
372
+ - `fsdp_transformer_layer_cls_to_wrap`: None
373
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
374
+ - `deepspeed`: None
375
+ - `label_smoothing_factor`: 0.0
376
+ - `optim`: adamw_torch
377
+ - `optim_args`: None
378
+ - `adafactor`: False
379
+ - `group_by_length`: False
380
+ - `length_column_name`: length
381
+ - `ddp_find_unused_parameters`: None
382
+ - `ddp_bucket_cap_mb`: None
383
+ - `ddp_broadcast_buffers`: False
384
+ - `dataloader_pin_memory`: True
385
+ - `dataloader_persistent_workers`: False
386
+ - `skip_memory_metrics`: True
387
+ - `use_legacy_prediction_loop`: False
388
+ - `push_to_hub`: False
389
+ - `resume_from_checkpoint`: None
390
+ - `hub_model_id`: None
391
+ - `hub_strategy`: every_save
392
+ - `hub_private_repo`: False
393
+ - `hub_always_push`: False
394
+ - `gradient_checkpointing`: False
395
+ - `gradient_checkpointing_kwargs`: None
396
+ - `include_inputs_for_metrics`: False
397
+ - `eval_do_concat_batches`: True
398
+ - `fp16_backend`: auto
399
+ - `push_to_hub_model_id`: None
400
+ - `push_to_hub_organization`: None
401
+ - `mp_parameters`:
402
+ - `auto_find_batch_size`: False
403
+ - `full_determinism`: False
404
+ - `torchdynamo`: None
405
+ - `ray_scope`: last
406
+ - `ddp_timeout`: 1800
407
+ - `torch_compile`: False
408
+ - `torch_compile_backend`: None
409
+ - `torch_compile_mode`: None
410
+ - `dispatch_batches`: None
411
+ - `split_batches`: None
412
+ - `include_tokens_per_second`: False
413
+ - `include_num_input_tokens_seen`: False
414
+ - `neftune_noise_alpha`: None
415
+ - `optim_target_modules`: None
416
+ - `batch_eval_metrics`: False
417
+ - `eval_on_start`: False
418
+ - `use_liger_kernel`: False
419
+ - `eval_use_gather_object`: False
420
+ - `batch_sampler`: no_duplicates
421
+ - `multi_dataset_batch_sampler`: proportional
422
+
423
+ </details>
424
+
425
+ ### Training Logs
426
+ | Epoch | Step | dim_512_cosine_map@100 |
427
+ |:----------:|:------:|:----------------------:|
428
+ | 0 | 0 | 0.7260 |
429
+ | 0.9746 | 12 | 0.7815 |
430
+ | 1.9492 | 24 | 0.7872 |
431
+ | 2.9239 | 36 | 0.7899 |
432
+ | 3.9797 | 49 | 0.7926 |
433
+ | **4.8731** | **60** | **0.7932** |
434
+
435
+ * The bold row denotes the saved checkpoint.
436
+
437
+ ### Framework Versions
438
+ - Python: 3.11.8
439
+ - Sentence Transformers: 3.1.1
440
+ - Transformers: 4.45.2
441
+ - PyTorch: 2.4.1
442
+ - Accelerate: 0.34.2
443
+ - Datasets: 3.2.0
444
+ - Tokenizers: 0.20.0
445
+
446
+ ## Citation
447
+
448
+ ### BibTeX
449
+
450
+ #### Sentence Transformers
451
+ ```bibtex
452
+ @inproceedings{reimers-2019-sentence-bert,
453
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
454
+ author = "Reimers, Nils and Gurevych, Iryna",
455
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
456
+ month = "11",
457
+ year = "2019",
458
+ publisher = "Association for Computational Linguistics",
459
+ url = "https://arxiv.org/abs/1908.10084",
460
+ }
461
+ ```
462
+
463
+ #### MatryoshkaLoss
464
+ ```bibtex
465
+ @misc{kusupati2024matryoshka,
466
+ title={Matryoshka Representation Learning},
467
+ 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},
468
+ year={2024},
469
+ eprint={2205.13147},
470
+ archivePrefix={arXiv},
471
+ primaryClass={cs.LG}
472
+ }
473
+ ```
474
+
475
+ #### MultipleNegativesRankingLoss
476
+ ```bibtex
477
+ @misc{henderson2017efficient,
478
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
479
+ 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},
480
+ year={2017},
481
+ eprint={1705.00652},
482
+ archivePrefix={arXiv},
483
+ primaryClass={cs.CL}
484
+ }
485
+ ```
486
+
487
+ <!--
488
+ ## Glossary
489
+
490
+ *Clearly define terms in order to be accessible across audiences.*
491
+ -->
492
+
493
+ <!--
494
+ ## Model Card Authors
495
+
496
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
497
+ -->
498
+
499
+ <!--
500
+ ## Model Card Contact
501
+
502
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
503
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bge-base-financial-matryoshka",
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.45.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.1.1",
4
+ "transformers": "4.45.2",
5
+ "pytorch": "2.4.1"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b010d5b4e1d500c0d3dfe2e6e1c0ceb5443c2d9abc0b0852e2df58311321e28c
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,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 512,
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff