Downloads · 30 days
5
3% of all-time downloads
Bharatdeep-H/stella_finetuned_en_dataset_to_mine_negatives_from
stella_finetuned_en_dataset_to_mine_negatives_from is a sentence similarity model from Bharatdeep-H. 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 NovaSearch/stellaen400Mv5 on the csv dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarit…
Downloads · 30 days
5
3% of all-time downloads
All-time downloads
194
Public
Parameters
434M
1.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.7 GB · 100%
From the Hugging Face model README
This is a sentence-transformers model finetuned from NovaSearch/stella_en_400M_v5 on the csv dataset. It maps sentences & paragraphs to a 1024-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': False}) with Transformer model: NewModel
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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): Dense({'in_features': 1024, 'out_features': 1024, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity'})
)
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("Bharatdeep-H/stella_finetuned_en_dataset_to_mine_negatives_from")
# Run inference
sentences = [
'day I was acquitted 12/12/12 i hocus45th GP SERVICES USA CDC CENTERS FOR DISH CONTROL AND P EXCLUSIVE: Per the CDC There Are Nearly Twice As Many Vaccine Related Deaths SO FAR in 2021 (1,755) Than All the Vaccine Deaths this Past Decade (994) For information about vaccines. visit who.int.',
'“Thousands of COVID Vaccine Injuries and 13 U.S. Deaths Reported in December Alone”; “In December, 3,916 COVID vaccine-related adverse events, including 13 deaths, were reported to VAERS”',
'Side effects of the first published vaccine According to Pfizer documents, 1,200 deaths.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# 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 | 0.9714 |
| query | answer | negative | |
|---|---|---|---|
| type | string | string | string |
| details | <ul><li>min: 5 tokens</li><li>mean: 83.66 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 19.17 tokens</li><li>max: 141 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 18.69 tokens</li><li>max: 120 tokens</li></ul> |
| query | answer | negative |
|---|---|---|
| <code>YEAST EXTRACK C DDees.co NO AFTER 40 YEARS OF RESEARCH, THERE IS A VACCINE AGAINST AIDS AFTER 76 YEARS OF RESEARCH, NO THERE IS A VACCINE AGAINST INFLUENZA AFTER 100 YEARS OF RESEARCH, NO THERE IS A VACCINE AGAINST CANCER BUT AFTER ONLY 6 MONTHS THERE IS A VACCINE AGAINST A "VIRUS" THAT APPEARED "FROM SUDDEN" AND THOSE WHO</code> | <code>After years of research there is no vaccine against AIDS, cancer and influenza, but in 6 months there is a vaccine against covid-19</code> | <code>Chronology of decline in vaccine effectiveness shows that immunizers are not effective</code> |
| <code>Donald J. Trump [USER] Trump We have reports of NIGERIA supporting Iran ACTIVELY and PASSIVELY....just got of the phone with secretary Pompeo....the USA MUST and WILL respond to terrorist nations IMMEDIATELY! 12:11 AM - 08 Jan 2020 244,391 Retweets 319,284 Likes 167K [244K Follow 319K</code> | <code>US President Donald Trump threatens to attack Nigeria</code> | <code>Vice President of the United States Mike Pence unfollowed President Donald Trump on Twitter and put a picture of Joe Biden and Kamala Harris on the profile cover</code> |
| <code>4 k 40 years worth of research... *no vaccine for HIV cancer MA At least 100 years of research...no vaccine for Ongoing research... no vaccine for the common cold Less than a year for a Covid vaccine? I think I'll pass on that shot!! PIC COLLAGE</code> | <code>Vaccines for HIV, cold and cancer should deter you from getting the Covid-19 vaccine</code> | <code>Anticovid vaccines cause deterioration of the immune system and AIDS</code> |
{
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
"triplet_margin": 5
}
| query | answer | negative | |
|---|---|---|---|
| type | string | string | string |
| details | <ul><li>min: 5 tokens</li><li>mean: 73.2 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 19.27 tokens</li><li>max: 103 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 19.3 tokens</li><li>max: 179 tokens</li></ul> |
| query | answer | negative |
|---|---|---|
| <code>--- Nora Al Riyadh Tik Tok Replying to [USER]</code> | <code>A restaurant in Riyadh in one of the malls, the opening of the meal is free, of course, Corona in the farthest corner is surprising</code> | <code>Video of Rakhi Sawant wearing a hijab to support protestors in Karnataka</code> |
| <code>SQUID FOR BRAZIL BELTER SALT Corumbau pasil Milk</code> | <code>Lula expelled from the city of Itanagrà in Bahia in May 2021. The Army had to provide security.</code> | <code>All workers in Gardenia Philippines bread factory COVID-19 positive in July 2020</code> |
| <code>I just ran out of words William Barr, Attorney General of the America literally most important person of all the American court system just publicly denounced that there has been electoral fraud 2rad10 TM [USER].6h US Attorney General William Barr denounces Vote-by-mail fraud. OM BLITZER [USER] THE WITH THE WITH SITUATION WOLFOOTION WOLF S BLITZE ROOM OUTZER TH HE WITH DERNIE CNN EXCLUSIVE Jimmy Carter & James Baker WOLF ONE-ON-ONE WITH ATTORNEY GENERAL WILLIAM BARR CAN WELL DEEST</code> | <code>The US attorney general denounces that there has been electoral fraud</code> | <code>Hillary Clinton appeared before the US justice on June 2, 2020</code> |
{
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
"triplet_margin": 5
}
eval_strategy: stepsper_device_train_batch_size: 2learning_rate: 3e-05max_steps: 4000lr_scheduler_type: cosinewarmup_ratio: 0.2bf16: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 2per_device_eval_batch_size: 8per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 3e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 3.0max_steps: 4000lr_scheduler_type: cosinelr_scheduler_kwargs: {}warmup_ratio: 0.2warmup_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: Truefp16: 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: Nonehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_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: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | Validation Loss | cosine_accuracy |
|---|---|---|---|---|
| 0.0016 | 100 | 1.6958 | - | - |
| 0.0032 | 200 | 1.3647 | - | - |
| 0.0049 | 300 | 1.1698 | - | - |
| 0.0065 | 400 | 0.8551 | - | - |
| 0.0081 | 500 | 0.8275 | - | - |
| 0.0097 | 600 | 0.8878 | - | - |
| 0.0113 | 700 | 0.9717 | - | - |
| 0.0130 | 800 | 1.0219 | - | - |
| 0.0146 | 900 | 0.9074 | - | - |
| 0.0162 | 1000 | 0.903 | 0.8201 | 0.9452 |
| 0.0178 | 1100 | 0.9236 | - | - |
| 0.0194 | 1200 | 0.7935 | - | - |
| 0.0211 | 1300 | 1.0483 | - | - |
| 0.0227 | 1400 | 1.0878 | - | - |
| 0.0243 | 1500 | 0.9258 | - | - |
| 0.0259 | 1600 | 1.011 | - | - |
| 0.0275 | 1700 | 0.7785 | - | - |
| 0.0292 | 1800 | 0.7643 | - | - |
| 0.0308 | 1900 | 0.9918 | - | - |
| 0.0324 | 2000 | 0.7941 | 0.7678 | 0.9387 |
| 0.0340 | 2100 | 1.106 | - | - |
| 0.0356 | 2200 | 0.7571 | - | - |
| 0.0373 | 2300 | 0.6687 | - | - |
| 0.0389 | 2400 | 0.6914 | - | - |
| 0.0405 | 2500 | 0.5925 | - | - |
| 0.0421 | 2600 | 0.8085 | - | - |
| 0.0437 | 2700 | 0.5775 | - | - |
| 0.0454 | 2800 | 0.5051 | - | - |
| 0.0470 | 2900 | 0.6894 | - | - |
| 0.0486 | 3000 | 0.4202 | 0.4875 | 0.9667 |
| 0.0502 | 3100 | 0.4704 | - | - |
| 0.0518 | 3200 | 0.4511 | - | - |
| 0.0535 | 3300 | 0.3991 | - | - |
| 0.0551 | 3400 | 0.4166 | - | - |
| 0.0567 | 3500 | 0.3402 | - | - |
| 0.0583 | 3600 | 0.6621 | - | - |
| 0.0599 | 3700 | 0.5999 | - | - |
| 0.0616 | 3800 | 0.443 | - | - |
| 0.0632 | 3900 | 0.6503 | - | - |
| 0.0648 | 4000 | 0.42 | 0.4156 | 0.9714 |
@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{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
<!--
## 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.*
-->