Downloads · 30 days
56
15% of all-time downloads
magnifi/bge-small-en-v1.5-ft-orc-0813
bge-small-en-v1.5-ft-orc-0813 is a sentence similarity model from magnifi. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
This is a sentence-transformers model finetuned from BAAI/bge-small-en-v1.5. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, par…
Downloads · 30 days
56
15% of all-time downloads
All-time downloads
366
Public
Parameters
33.4M
133 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors133 MB · 99%
From the Hugging Face model README
This is a sentence-transformers model finetuned from BAAI/bge-small-en-v1.5. 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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
(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})
(2): Normalize()
)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'how should I play [TICKER] futures contracts',
'[]',
'[{"get_attribute([\'<TICKER1>\'],[\'returns\'],\'<DATES>\')": "live_price_<TICKER1>"}]',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.7192 |
| cosine_accuracy@3 | 0.9247 |
| cosine_accuracy@5 | 0.9521 |
| cosine_accuracy@10 | 0.9795 |
| cosine_precision@1 | 0.7192 |
| cosine_precision@3 | 0.3082 |
| cosine_precision@5 | 0.1904 |
| cosine_precision@10 | 0.0979 |
| cosine_recall@1 | 0.02 |
| cosine_recall@3 | 0.0257 |
| cosine_recall@5 | 0.0264 |
| cosine_recall@10 | 0.0272 |
| cosine_ndcg@10 | 0.1887 |
| cosine_mrr@10 | 0.8171 |
| cosine_map@100 | 0.0227 |
| dot_accuracy@1 | 0.7192 |
| dot_accuracy@3 | 0.9247 |
| dot_accuracy@5 | 0.9521 |
| dot_accuracy@10 | 0.9795 |
| dot_precision@1 | 0.7192 |
| dot_precision@3 | 0.3082 |
| dot_precision@5 | 0.1904 |
| dot_precision@10 | 0.0979 |
| dot_recall@1 | 0.02 |
| dot_recall@3 | 0.0257 |
| dot_recall@5 | 0.0264 |
| dot_recall@10 | 0.0272 |
| dot_ndcg@10 | 0.1887 |
| dot_mrr@10 | 0.8171 |
| dot_map@100 | 0.0227 |
| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 4 tokens</li><li>mean: 11.9 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 67.55 tokens</li><li>max: 194 tokens</li></ul> |
| sentence_0 | sentence_1 |
|---|---|
| <code>Profitability of [TICKER]</code> | <code>[{"get_attribute(['<TICKER1>'],['cash flow profitability'],'<DATES>')": "profitability_<TICKER1>"}]</code> |
| <code>[TICKER] momentum</code> | <code>[{"get_attribute(['<TICKER1>'],['momentum'],'<DATES>')": "momentum_<TICKER1>"}]</code> |
| <code>what was the total return of [TICKER] for 2023</code> | <code>[{"get_attribute(['<TICKER1>'],['returns'],'<DATES>')": "performance_data_<TICKER1>"}]</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 10per_device_eval_batch_size: 10num_train_epochs: 6multi_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 10per_device_eval_batch_size: 10per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 6max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Falsefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Falsehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseeval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseeval_use_gather_object: Falsebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | cosine_map@100 |
|---|---|---|
| 0.04 | 2 | 0.0137 |
| 0.08 | 4 | 0.0137 |
| 0.12 | 6 | 0.0138 |
| 0.16 | 8 | 0.0142 |
| 0.2 | 10 | 0.0144 |
| 0.24 | 12 | 0.0147 |
| 0.28 | 14 | 0.0149 |
| 0.32 | 16 | 0.0151 |
| 0.36 | 18 | 0.0155 |
| 0.4 | 20 | 0.0166 |
| 0.44 | 22 | 0.0170 |
| 0.48 | 24 | 0.0174 |
| 0.52 | 26 | 0.0179 |
| 0.56 | 28 | 0.0181 |
| 0.6 | 30 | 0.0184 |
| 0.64 | 32 | 0.0186 |
| 0.68 | 34 | 0.0189 |
| 0.72 | 36 | 0.0191 |
| 0.76 | 38 | 0.0192 |
| 0.8 | 40 | 0.0195 |
| 0.84 | 42 | 0.0195 |
| 0.88 | 44 | 0.0195 |
| 0.92 | 46 | 0.0195 |
| 0.96 | 48 | 0.0196 |
| 1.0 | 50 | 0.0197 |
| 1.04 | 52 | 0.0196 |
| 1.08 | 54 | 0.0198 |
| 1.12 | 56 | 0.0200 |
| 1.16 | 58 | 0.0202 |
| 1.2 | 60 | 0.0202 |
| 1.24 | 62 | 0.0205 |
| 1.28 | 64 | 0.0206 |
| 1.32 | 66 | 0.0207 |
| 1.3600 | 68 | 0.0208 |
| 1.4 | 70 | 0.0208 |
| 1.44 | 72 | 0.0209 |
| 1.48 | 74 | 0.0210 |
| 1.52 | 76 | 0.0211 |
| 1.56 | 78 | 0.0211 |
| 1.6 | 80 | 0.0209 |
| 1.6400 | 82 | 0.0210 |
| 1.6800 | 84 | 0.0209 |
| 1.72 | 86 | 0.0209 |
| 1.76 | 88 | 0.0210 |
| 1.8 | 90 | 0.0211 |
| 1.8400 | 92 | 0.0211 |
| 1.88 | 94 | 0.0211 |
| 1.92 | 96 | 0.0214 |
| 1.96 | 98 | 0.0216 |
| 2.0 | 100 | 0.0218 |
| 2.04 | 102 | 0.0217 |
| 2.08 | 104 | 0.0217 |
| 2.12 | 106 | 0.0219 |
| 2.16 | 108 | 0.0221 |
| 2.2 | 110 | 0.0219 |
| 2.24 | 112 | 0.0217 |
| 2.2800 | 114 | 0.0217 |
| 2.32 | 116 | 0.0217 |
| 2.36 | 118 | 0.0218 |
| 2.4 | 120 | 0.0219 |
| 2.44 | 122 | 0.0219 |
| 2.48 | 124 | 0.0219 |
| 2.52 | 126 | 0.0222 |
| 2.56 | 128 | 0.0220 |
| 2.6 | 130 | 0.0221 |
| 2.64 | 132 | 0.0221 |
| 2.68 | 134 | 0.0221 |
| 2.7200 | 136 | 0.0221 |
| 2.76 | 138 | 0.0222 |
| 2.8 | 140 | 0.0222 |
| 2.84 | 142 | 0.0224 |
| 2.88 | 144 | 0.0224 |
| 2.92 | 146 | 0.0223 |
| 2.96 | 148 | 0.0224 |
| 3.0 | 150 | 0.0223 |
| 3.04 | 152 | 0.0223 |
| 3.08 | 154 | 0.0223 |
| 3.12 | 156 | 0.0223 |
| 3.16 | 158 | 0.0223 |
| 3.2 | 160 | 0.0223 |
| 3.24 | 162 | 0.0223 |
| 3.2800 | 164 | 0.0223 |
| 3.32 | 166 | 0.0223 |
| 3.36 | 168 | 0.0223 |
| 3.4 | 170 | 0.0223 |
| 3.44 | 172 | 0.0224 |
| 3.48 | 174 | 0.0224 |
| 3.52 | 176 | 0.0225 |
| 3.56 | 178 | 0.0224 |
| 3.6 | 180 | 0.0224 |
| 3.64 | 182 | 0.0224 |
| 3.68 | 184 | 0.0225 |
| 3.7200 | 186 | 0.0225 |
| 3.76 | 188 | 0.0225 |
| 3.8 | 190 | 0.0225 |
| 3.84 | 192 | 0.0225 |
| 3.88 | 194 | 0.0225 |
| 3.92 | 196 | 0.0226 |
| 3.96 | 198 | 0.0226 |
| 4.0 | 200 | 0.0226 |
| 4.04 | 202 | 0.0226 |
| 4.08 | 204 | 0.0226 |
| 4.12 | 206 | 0.0226 |
| 4.16 | 208 | 0.0225 |
| 4.2 | 210 | 0.0225 |
| 4.24 | 212 | 0.0225 |
| 4.28 | 214 | 0.0225 |
| 4.32 | 216 | 0.0225 |
| 4.36 | 218 | 0.0226 |
| 4.4 | 220 | 0.0227 |
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
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},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->