SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-mpnet-base-v2 on the dataset, distilbert, spanish, all-nli-triplet and stsb datasets. 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.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
- Maximum Sequence Length: 128 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
- Training Datasets:
- dataset
- distilbert
- spanish
- all-nli-triplet
- stsb
- Languages: en, es
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(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})
)
Usage
Direct Usage (Sentence Transformers)
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("saraleivam/GURU-model2")
# Run inference
sentences = [
'what creates a bunion',
"A bunionette , or tailor's bunion, is one that develops at the base of the little toe. When the long bone that connects to the toe (metatarsal ) bends away from the foot, the little toe bends inward and the joint swells or enlarges. Other factors that can lead to a bunion include: Loose ligaments in the foot.",
'A bunion is a bony bump that forms on the joint at the base of your big toe. It forms when your big toe pushes against your next toe, forcing the joint of your big toe to get bigger and stick out. The skin over the bunion might be red and sore. Wearing tight, narrow shoes might cause bunions or make them worse. Bunions also can develop as a result of an inherited structural defect, stress on your foot or a medical condition, such as arthritis. Smaller bunions (bunionettes) can develop on the joint of your little toe. Nov. 08, 2016.',
]
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]
Training Details
Training Datasets
dataset
- Dataset: dataset
- Size: 521 training samples
- Columns:
anchor
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
anchor positive negative type string string string details - min: 5 tokens
- mean: 18.41 tokens
- max: 128 tokens
- min: 4 tokens
- mean: 19.98 tokens
- max: 128 tokens
- min: 4 tokens
- mean: 15.84 tokens
- max: 128 tokens
- Samples:
anchor positive negative Advanced data analysis with R.
Data analyst with R and statistical modeling experience.
Interior designer with space decoration skills.
Introduction to quantum machine learning.
AI researcher with quantum machine learning skills.
Pharmacist with pharmaceutical care skills.
Fundamentos de diseño de experiencia de usuario (UX).
Diseñador UX con habilidades en investigación de usuarios.
Abogado con habilidades en derecho civil.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
distilbert
- Dataset: distilbert at e63dd83
- Size: 1,000 training samples
- Columns:
query
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
query positive negative type string string string details - min: 4 tokens
- mean: 9.95 tokens
- max: 28 tokens
- min: 18 tokens
- mean: 84.21 tokens
- max: 128 tokens
- min: 4 tokens
- mean: 79.55 tokens
- max: 128 tokens
- Samples:
query positive negative what are the liberal arts?
liberal arts. 1. the academic course of instruction at a college intended to provide general knowledge and comprising the arts, humanities, natural sciences, and social sciences, as opposed to professional or technical subjects.
liberal arts definition The areas of learning that cultivate general intellectual ability rather than technical or professional skills. Liberal arts is often used as a synonym for humanities, because literature, languages, history, and philosophy are often considered the primary subjects of the liberal arts.
what is the mechanism of action of fibrinolytic or thrombolytic drugs?
Baillière's Clinical Haematology. 6 Mechanism of action of the thrombolytic agents. 6 Mechanism of action of the thrombolytic agents JEFFREY I. WEITZ Fibrin formed during the haemostatic, inflammatory or tissue repair process serves a temporary role, and must be degraded to restore normal tissue function and structure.
Thrombolytic drugs such as tPA are often the first line of defense in treating some forms of ischemic stroke. The stroke occurs when fibrin strands in the blood trap blood cells and platelets, forming a clot in an artery to the brain (A).
what is normal plat count
78 Followers. A. Platelets are the tiny blood cells that help stop bleeding by binding together to form a clump or plug at sites of injury inside blood vessels. A normal platelet count is between 150,000 and 450,000 platelets per microliter (one-millionth of a liter, abbreviated mcL).The average platelet count is 237,000 per mcL in men and 266,000 per mcL in women.8 Followers. A. Platelets are the tiny blood cells that help stop bleeding by binding together to form a clump or plug at sites of injury inside blood vessels. A normal platelet count is between 150,000 and 450,000 platelets per microliter (one-millionth of a liter, abbreviated mcL).
The normal number of platelets is between 150 and 400 million per millilitre (ml) of blood. Most pregnant women have normal numbers of platelets, but about eight per cent of pregnant women have a slight drop in their platelet count.Your count is below normal if you have between 100 and 150 million platelets per ml of blood.our platelet count will look something like Plat. 160x10.9/L, which means you have a platelet count of 160, which is in the normal range. If your platelet count is low, the blood test should be done again. This will keep track of whether or not your count is dropping.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
spanish
- Dataset: spanish at de18671
- Size: 1,000 training samples
- Columns:
sentence1
,sentence2
,score
, andsource
- Approximate statistics based on the first 1000 samples:
sentence1 sentence2 score source type string string float string details - min: 9 tokens
- mean: 27.57 tokens
- max: 49 tokens
- min: 10 tokens
- mean: 27.6 tokens
- max: 56 tokens
- min: 0.0
- mean: 0.51
- max: 1.0
- min: 4 tokens
- mean: 4.0 tokens
- max: 4 tokens
- Samples:
sentence1 sentence2 score source La comida china tradicional se basa en la filosofía de equilibrio entre el yin y el yang, y el uso de ingredientes frescos.
Los principios de la cocina china se centran en el equilibrio entre los sabores dulce y salado, así como en el uso de productos naturales.
0.4
GPT
El neokantismo es una corriente filosófica que busca revitalizar los principios del pensamiento de Immanuel Kant en el contexto moderno.
Los neokantianos buscan actualizar los conceptos de Immanuel Kant para aplicarlos a la filosofía contemporánea.
0.4
GPT
La teoría de la paridad del poder adquisitivo sostiene que en el largo plazo, los tipos de cambio entre dos monedas deben ajustarse para reflejar las diferencias en los niveles de precios de los países.
La teoría de la paridad del poder adquisitivo se refiere a la relación entre los niveles de precios de los países y los tipos de cambio entre dos monedas, con el objetivo de mantener el equilibrio a largo plazo.
0.3
GPT
- Loss:
CoSENTLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "pairwise_cos_sim" }
all-nli-triplet
- Dataset: all-nli-triplet at d482672
- Size: 10,000 training samples
- Columns:
anchor
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
anchor positive negative type string string string details - min: 7 tokens
- mean: 10.9 tokens
- max: 52 tokens
- min: 6 tokens
- mean: 13.62 tokens
- max: 42 tokens
- min: 5 tokens
- mean: 14.76 tokens
- max: 55 tokens
- Samples:
anchor positive negative A person on a horse jumps over a broken down airplane.
A person is outdoors, on a horse.
A person is at a diner, ordering an omelette.
Children smiling and waving at camera
There are children present
The kids are frowning
A boy is jumping on skateboard in the middle of a red bridge.
The boy does a skateboarding trick.
The boy skates down the sidewalk.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
stsb
- Dataset: stsb at ab7a5ac
- Size: 5,749 training samples
- Columns:
sentence1
,sentence2
, andscore
- Approximate statistics based on the first 1000 samples:
sentence1 sentence2 score type string string float details - min: 6 tokens
- mean: 11.08 tokens
- max: 30 tokens
- min: 7 tokens
- mean: 11.05 tokens
- max: 30 tokens
- min: 0.0
- mean: 0.54
- max: 1.0
- Samples:
sentence1 sentence2 score A plane is taking off.
An air plane is taking off.
1.0
A man is playing a large flute.
A man is playing a flute.
0.76
A man is spreading shreded cheese on a pizza.
A man is spreading shredded cheese on an uncooked pizza.
0.76
- Loss:
CoSENTLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "pairwise_cos_sim" }
Evaluation Datasets
dataset
- Dataset: dataset
- Size: 131 evaluation samples
- Columns:
anchor
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
anchor positive negative type string string string details - min: 7 tokens
- mean: 19.38 tokens
- max: 128 tokens
- min: 4 tokens
- mean: 20.61 tokens
- max: 128 tokens
- min: 6 tokens
- mean: 16.47 tokens
- max: 122 tokens
- Samples:
anchor positive negative Curso de matemáticas avanzadas para ingeniería
Ingeniero con habilidades en cálculo y álgebra avanzada
Chef con experiencia en repostería
Fundamentos de análisis financiero y gestión de riesgos
Analista financiero con habilidades en gestión de riesgos y análisis de inversiones
Chef con experiencia en cocina tradicion
Project Management with Agile Methodologies and Scrum.
Project manager with skills in Scrum and agile methodologies.
Mechanical engineer with structural design experience.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
distilbert
- Dataset: distilbert at e63dd83
- Size: 100 evaluation samples
- Columns:
query
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
query positive negative type string string string details - min: 5 tokens
- mean: 9.87 tokens
- max: 19 tokens
- min: 28 tokens
- mean: 86.98 tokens
- max: 128 tokens
- min: 23 tokens
- mean: 80.97 tokens
- max: 128 tokens
- Samples:
query positive negative when was the town of farragut tn incorporated
In January of 1980, residents decided to incorporate by an overwhelming margin. The Town of Farragut was incorporated on January 16, 1980, with the first board of Mayor and Alderman elected on April 1, 1980.
Farragut is a town which straddles both Knox and Loudon counties in Tennessee. It is a suburb of Knoxville. The town's population was 20,676 at the 2010 census. It is included in the Knoxville Metropolitan Area. The town is named in honor of American Civil War Admiral David Farragut, who was born just east of Farragut at Campbell's Station in 1801.
how long to roast a chicken
There are two methods for roasting a whole chicken: Regular method: 1 Preheat oven to 350 degrees F (175 degrees C). 2 Roast whole (thawed) chickens for 20 minutes per pound, plus an additional 15 minutes.
1 Roast the chicken at 450 degrees for 20 minutes, then reduce the heat to 400 degrees and continue roasting for about 40 minutes (or until the internal temperature reaches about 175 to 180 degrees F. about 1 hour or a little less).
what is a hormone?
What Are Hormones, And What Do They Do? Hormones are special chemical messengers in the body that are created in the endocrine glands. These messengers control most major bodily functions, from simple basic needs like hunger to complex systems like reproduction, and even the emotions and mood. Understanding the major hormones and what they do will help patients take control of their health. Prostaglandins.
Hormone is a chemical substance that is produced in one part of the body (by an endocrine gland) and is carried in the blood to other distant organs or tissues where it acts to modify their structure or function.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
all-nli-triplet
- Dataset: all-nli-triplet at d482672
- Size: 100 evaluation samples
- Columns:
anchor
,positive
, andnegative
- Approximate statistics based on the first 1000 samples:
anchor positive negative type string string string details - min: 7 tokens
- mean: 7.0 tokens
- max: 7 tokens
- min: 9 tokens
- mean: 20.62 tokens
- max: 78 tokens
- min: 11 tokens
- mean: 16.0 tokens
- max: 21 tokens
- Samples:
anchor positive negative The men are outside.
A man in a green and white "Irish" baseball uniform is lunging forward as though to throw the ball underhand as an older man in umpire's uniform looks on.
Two men are leaning out of a window and looking at something to the right of them.
The men are outside.
Three men getting some kind of grass together on a windy day.
Two women work on a project outdoors.
The men are outside.
Three men getting some kind of grass together on a windy day.
Two men are leaning out of a window and looking at something to the right of them.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
stsb
- Dataset: stsb at ab7a5ac
- Size: 1,500 evaluation samples
- Columns:
sentence1
,sentence2
, andscore
- Approximate statistics based on the first 1000 samples:
sentence1 sentence2 score type string string float details - min: 5 tokens
- mean: 16.55 tokens
- max: 47 tokens
- min: 7 tokens
- mean: 16.5 tokens
- max: 47 tokens
- min: 0.0
- mean: 0.47
- max: 1.0
- Samples:
sentence1 sentence2 score A man with a hard hat is dancing.
A man wearing a hard hat is dancing.
1.0
A young child is riding a horse.
A child is riding a horse.
0.95
A man is feeding a mouse to a snake.
The man is feeding a mouse to the snake.
1.0
- Loss:
CoSENTLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "pairwise_cos_sim" }
Training Hyperparameters
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: noprediction_loss_only
: Trueper_device_train_batch_size
: 8per_device_eval_batch_size
: 8per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonelearning_rate
: 5e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1.0num_train_epochs
: 3.0max_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
: Falsebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: proportional
Training Logs
Epoch | Step | Training Loss | distilbert loss | all-nli-triplet loss | stsb loss | dataset loss |
---|---|---|---|---|---|---|
0.2188 | 500 | 1.9313 | - | - | - | - |
0.4376 | 1000 | 1.766 | - | - | - | - |
0.6565 | 1500 | 1.6605 | - | - | - | - |
0.8753 | 2000 | 1.6541 | - | - | - | - |
1.0941 | 2500 | 1.6496 | - | - | - | - |
1.3129 | 3000 | 1.4151 | - | - | - | - |
1.5317 | 3500 | 1.3921 | - | - | - | - |
1.7505 | 4000 | 1.301 | - | - | - | - |
1.9694 | 4500 | 1.3356 | - | - | - | - |
2.1882 | 5000 | 1.212 | - | - | - | - |
2.4070 | 5500 | 1.1476 | - | - | - | - |
2.6258 | 6000 | 1.1854 | - | - | - | - |
2.8446 | 6500 | 1.0177 | - | - | - | - |
3.0 | 6855 | - | 1.3369 | 2.6425 | 4.8295 | 0.0736 |
Framework Versions
- Python: 3.9.13
- Sentence Transformers: 3.0.1
- Transformers: 4.41.2
- PyTorch: 2.3.1+cpu
- Accelerate: 0.31.0
- Datasets: 2.20.0
- Tokenizers: 0.19.1
Citation
BibTeX
Sentence Transformers
@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",
}
MultipleNegativesRankingLoss
@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}
}
CoSENTLoss
@online{kexuefm-8847,
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
author={Su Jianlin},
year={2022},
month={Jan},
url={https://kexue.fm/archives/8847},
}
- Downloads last month
- 2
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.