Downloads · 30 days
39
12% of all-time downloads
Gurveer05/paraphrase-mpnet-eedi-2024
paraphrase-mpnet-eedi-2024 is a sentence similarity model from Gurveer05. 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 sentence-transformers/paraphrase-mpnet-base-v2 on the csv dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semant…
Downloads · 30 days
39
12% of all-time downloads
All-time downloads
327
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-mpnet-base-v2 on the csv 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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
(1): Pooling({'word_embedding_dimension': 768, '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})
)
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("Gurveer05/paraphrase-mpnet-eedi-2024")
# Run inference
sentences = [
'Question:\nUnderstand key loci terms like equidistant and perpendicular. A set of axes: x-axis from -4 to 4, y-axis from -4 to 4. A red line is drawn from (-2,2) to (2,2). The red line is _________ to the y axis..\nAnswer: Equidistant',
'Does not know the meaning of perpendicular',
'Believes squaring a negative number just changes the sign',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# 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.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
| sentence1 | sentence2 | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 20 tokens</li><li>mean: 61.48 tokens</li><li>max: 312 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 14.98 tokens</li><li>max: 38 tokens</li></ul> |
| sentence1 | sentence2 |
|---|---|
| <code>Question:<br>Find missing angles in a scalene triangle. What is the size of angle p ? A triangle with angles labelled 49 degrees, 51 degrees and p [not to scale].<br>Answer: Not enough information</code> | <code>Does not know that angles in a triangle sum to 180 degrees</code> |
| <code>Question:<br>Solve quadratic equations using balancing. A student wishes to solve the equation below.<br><br>Which of the following is a correct next step?<br>(<br>(d+3)^2-25=0<br>)<br><br>Step 1 <br>(<br>(d+3)^2=25<br>).<br>Answer: d+3=12.5</code> | <code>Believes the inverse of square rooting is halving</code> |
| <code>Question:<br>Find missing angles using angles around a point. What is the size of angle x ? Angles around a point split into two parts, one is labelled 290 degrees and the other x.<br>Answer: 45°</code> | <code>Does not know that angles around a point sum to 360</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 32per_device_eval_batch_size: 32num_train_epochs: 20fp16: Trueload_best_model_at_end: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 32per_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: 1.0num_train_epochs: 20max_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: Truefp16_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: Trueignore_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: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss |
|---|---|---|
| 0.25 | 23 | 1.4213 |
| 0.5 | 46 | 1.0924 |
| 0.75 | 69 | 0.9586 |
| 1.0 | 92 | 0.8914 |
| 1.25 | 115 | 0.579 |
| 1.5 | 138 | 0.5327 |
| 1.75 | 161 | 0.4746 |
| 2.0 | 184 | 0.4323 |
| 2.25 | 207 | 0.3155 |
| 2.5 | 230 | 0.2763 |
| 2.75 | 253 | 0.2408 |
| 3.0 | 276 | 0.2677 |
| 3.25 | 299 | 0.1763 |
| 3.5 | 322 | 0.1815 |
| 3.75 | 345 | 0.1536 |
| 4.0 | 368 | 0.1789 |
| 4.25 | 391 | 0.1331 |
| 4.5 | 414 | 0.119 |
| 4.75 | 437 | 0.1183 |
| 5.0 | 460 | 0.1423 |
| 5.25 | 483 | 0.0979 |
| 5.5 | 506 | 0.0894 |
| 5.75 | 529 | 0.0816 |
| 6.0 | 552 | 0.0853 |
| 6.25 | 575 | 0.0779 |
| 6.5 | 598 | 0.0632 |
| 6.75 | 621 | 0.0618 |
| 7.0 | 644 | 0.0798 |
| 7.25 | 667 | 0.0536 |
| 7.5 | 690 | 0.0615 |
| 7.75 | 713 | 0.0473 |
| 8.0 | 736 | 0.0536 |
| 8.25 | 759 | 0.0392 |
| 8.5 | 782 | 0.0551 |
| 8.75 | 805 | 0.0405 |
| 9.0 | 828 | 0.0519 |
| 9.25 | 851 | 0.0299 |
| 9.5 | 874 | 0.0355 |
| 9.75 | 897 | 0.0337 |
| 10.0 | 920 | 0.0324 |
| 10.25 | 943 | 0.0283 |
| 10.5 | 966 | 0.0293 |
| 10.75 | 989 | 0.0248 |
| 11.0 | 1012 | 0.0281 |
| 11.25 | 1035 | 0.0142 |
| 11.5 | 1058 | 0.022 |
| 11.75 | 1081 | 0.0159 |
| 12.0 | 1104 | 0.0188 |
| 12.25 | 1127 | 0.0078 |
| 12.5 | 1150 | 0.0142 |
| 12.75 | 1173 | 0.0148 |
| 13.0 | 1196 | 0.0126 |
| 13.25 | 1219 | 0.0077 |
| 13.5 | 1242 | 0.0115 |
| 13.75 | 1265 | 0.0119 |
| 14.0 | 1288 | 0.0086 |
@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",
}
<!--
## 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.*
-->