GURU-model / README.md
saraleivam's picture
Add new SentenceTransformer model.
caa8cd6 verified
---
base_model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
datasets:
- sentence-transformers/msmarco-msmarco-distilbert-base-tas-b
language:
- en
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:1521
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: latency definition
sentences:
- "The Wizard of Oz movie musical premieres in Oconomowoc, Wisconsin. The Wizard\
\ of Oz, starring Judy Garland and featuring words and music by E.Y. â\x80\x9C\
Yipâ\x80\x9D Harburg and Harold Arlen, receives its world premiere in Oconomowoc,\
\ Wisconsin, on this day in 1939."
- Latency is a networking term to describe the total time it takes a data packet
to travel from one node to another. In other contexts, when a data packet is transmitted
and returned back to its source, the total time for the round trip is known as
latency.
- Definition - What does Latency mean? Latency is a networking term to describe
the total time it takes a data packet to travel from one node to another. In other
contexts, when a data packet is transmitted and returned back to its source, the
total time for the round trip is known as latency.
- source_sentence: activity based models business definition
sentences:
- Symptoms of a fungal lung infection depend on the underlying cause. Fungal lung
infection can cause cough, fatigue, and fever. Other symptoms include joint pains,
muscle aches, and loss of appetite. The fungus can spread from the lungs to the
skin, where it causes a rash and forms ulcers.
- Activity-based management (ABM) is a method of identifying and evaluating activities
that a business performs, using activity-based costing to carry out a value chain
analysis or a re-engineering initiative to improve strategic and operational decisions
in an organization.
- Business model design refers to the activity of designing a company's business
model. It is part of the business development and business strategy process and
involves design methods.his definition by Al-Debei and Avison (2008) indicates
that value proposition, value architecture, value finance, and value network articulate
the primary constructs or dimensions of business models.
- source_sentence: Swift Mobile Application Development.
sentences:
- iOS developer with experience in Swift and Xcode.
- Psychologist with trauma therapy experience.
- ' Especialista en marketing digital con experiencia en campañas de Google Ads
y Facebook Ads.'
- source_sentence: Curso de análisis de datos geoespaciales con QGIS
sentences:
- Analista geoespacial con habilidades en QGIS
- Analista financiero con habilidades en Excel avanzado y análisis de datos.
- Arquitecto con habilidades en diseño sostenible
- source_sentence: Gestión de proyectos con PRINCE2.
sentences:
- Diseñador de videojuegos con experiencia en Unity
- Diseñador gráfico con habilidades en branding.
- Gerente de proyectos con certificación PRINCE2.
---
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2) on the dataset and [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b) 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](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2) <!-- at revision 79f2382ceacceacdf38563d7c5d16b9ff8d725d6 -->
- **Maximum Sequence Length:** 128 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
- **Training Datasets:**
- dataset
- [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b)
- **Language:** en
<!-- - **License:** Unknown -->
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### 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:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("saraleivam/GURU-model")
# Run inference
sentences = [
'Gestión de proyectos con PRINCE2.',
'Gerente de proyectos con certificación PRINCE2.',
'Diseñador gráfico con habilidades en branding.',
]
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.*
-->
## Training Details
### Training Datasets
#### dataset
* Dataset: dataset
* Size: 521 training samples
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string | string |
| details | <ul><li>min: 5 tokens</li><li>mean: 18.18 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 19.73 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.27 tokens</li><li>max: 128 tokens</li></ul> |
* Samples:
| anchor | positive | negative |
|:-----------------------------------------------------------------------|:---------------------------------------------------------------------------|:------------------------------------------------------------|
| <code>Interactive data dashboards with JavaScript.</code> | <code>Data visualization expert with interactive dashboard skills.</code> | <code>Accountant with tax preparation skills.</code> |
| <code>Intro to neural networks for beginners.</code> | <code>Machine learning engineer with neural network skills.</code> | <code>Biologist with terrestrial ecology experience.</code> |
| <code>Data Analysis, Database Application, Statistical Analysis</code> | <code> Ingeniero en sistemas con experiencia en redes informáticas.</code> | <code>Escritora, años de experiencia</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
#### distilbert
* Dataset: [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b) at [e63dd83](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b/tree/e63dd8397db956cdde78e5e18c0d734585874db2)
* Size: 1,000 training samples
* Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
* Approximate statistics based on the first 1000 samples:
| | query | positive | negative |
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string | string |
| details | <ul><li>min: 4 tokens</li><li>mean: 9.95 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 84.21 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 79.55 tokens</li><li>max: 128 tokens</li></ul> |
* Samples:
| query | positive | negative |
|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <code>what are the liberal arts?</code> | <code>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.</code> | <code>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.</code> |
| <code>what is the mechanism of action of fibrinolytic or thrombolytic drugs?</code> | <code>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.</code> | <code>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).</code> |
| <code>what is normal plat count</code> | <code>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).</code> | <code>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.</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Datasets
#### dataset
* Dataset: dataset
* Size: 131 evaluation samples
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string | string |
| details | <ul><li>min: 6 tokens</li><li>mean: 20.15 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 21.82 tokens</li><li>max: 115 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 17.24 tokens</li><li>max: 124 tokens</li></ul> |
* Samples:
| anchor | positive | negative |
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <code>Intro to Neural Networks for Beginners.</code> | <code>Machine learning engineer with neural network skills.</code> | <code>Biologist with terrestrial ecology experience.</code> |
| <code>Estudiante de matemáticas de pregrado con opción en Ingeniería Biomédica, enfocada en aplicaciones en la industria. Habilidades en análisis de datos, investigación y trabajo en equipo para impulsar la toma de decisiones estratégicas. Experiencia en liderazgo de proyectos, manejo de Big Data y análisis de datos para mejorar procesos empresariales. Apasionada por aplicar habilidades analíticas en proyectos que generen valor.</code> | <code>Algorithms, Bioinformatics, Computer Programming, Python Programming, Computational Thinking, Data Structures, Data Analysis, Programming Principles, Computational Logic, Computer Programming Tools</code> | <code>Desarrolla habilidades de pensamiento crítico a través del estudio de grandes filósofos y sus teorías. Examina cuestiones fundamentales sobre la existencia, el conocimiento y la ética.</code> |
| <code>Data mining and big data analytics.</code> | <code>Data scientist with big data and data mining skills.</code> | <code>Nurse with primary care experience.</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
#### distilbert
* Dataset: [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b) at [e63dd83](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b/tree/e63dd8397db956cdde78e5e18c0d734585874db2)
* Size: 100 evaluation samples
* Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
* Approximate statistics based on the first 1000 samples:
| | query | positive | negative |
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string | string |
| details | <ul><li>min: 5 tokens</li><li>mean: 9.87 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 28 tokens</li><li>mean: 86.98 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 23 tokens</li><li>mean: 80.97 tokens</li><li>max: 128 tokens</li></ul> |
* Samples:
| query | positive | negative |
|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <code>when was the town of farragut tn incorporated</code> | <code>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.</code> | <code>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.</code> |
| <code>how long to roast a chicken</code> | <code>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.</code> | <code>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).</code> |
| <code>what is a hormone?</code> | <code>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.</code> | <code>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.</code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### All Hyperparameters
<details><summary>Click to expand</summary>
- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: no
- `prediction_loss_only`: True
- `per_device_train_batch_size`: 8
- `per_device_eval_batch_size`: 8
- `per_gpu_train_batch_size`: None
- `per_gpu_eval_batch_size`: None
- `gradient_accumulation_steps`: 1
- `eval_accumulation_steps`: None
- `learning_rate`: 5e-05
- `weight_decay`: 0.0
- `adam_beta1`: 0.9
- `adam_beta2`: 0.999
- `adam_epsilon`: 1e-08
- `max_grad_norm`: 1.0
- `num_train_epochs`: 3.0
- `max_steps`: -1
- `lr_scheduler_type`: linear
- `lr_scheduler_kwargs`: {}
- `warmup_ratio`: 0.0
- `warmup_steps`: 0
- `log_level`: passive
- `log_level_replica`: warning
- `log_on_each_node`: True
- `logging_nan_inf_filter`: True
- `save_safetensors`: True
- `save_on_each_node`: False
- `save_only_model`: False
- `restore_callback_states_from_checkpoint`: False
- `no_cuda`: False
- `use_cpu`: False
- `use_mps_device`: False
- `seed`: 42
- `data_seed`: None
- `jit_mode_eval`: False
- `use_ipex`: False
- `bf16`: False
- `fp16`: False
- `fp16_opt_level`: O1
- `half_precision_backend`: auto
- `bf16_full_eval`: False
- `fp16_full_eval`: False
- `tf32`: None
- `local_rank`: 0
- `ddp_backend`: None
- `tpu_num_cores`: None
- `tpu_metrics_debug`: False
- `debug`: []
- `dataloader_drop_last`: False
- `dataloader_num_workers`: 0
- `dataloader_prefetch_factor`: None
- `past_index`: -1
- `disable_tqdm`: False
- `remove_unused_columns`: True
- `label_names`: None
- `load_best_model_at_end`: False
- `ignore_data_skip`: False
- `fsdp`: []
- `fsdp_min_num_params`: 0
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
- `fsdp_transformer_layer_cls_to_wrap`: None
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
- `deepspeed`: None
- `label_smoothing_factor`: 0.0
- `optim`: adamw_torch
- `optim_args`: None
- `adafactor`: False
- `group_by_length`: False
- `length_column_name`: length
- `ddp_find_unused_parameters`: None
- `ddp_bucket_cap_mb`: None
- `ddp_broadcast_buffers`: False
- `dataloader_pin_memory`: True
- `dataloader_persistent_workers`: False
- `skip_memory_metrics`: True
- `use_legacy_prediction_loop`: False
- `push_to_hub`: False
- `resume_from_checkpoint`: None
- `hub_model_id`: None
- `hub_strategy`: every_save
- `hub_private_repo`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `eval_do_concat_batches`: True
- `fp16_backend`: auto
- `push_to_hub_model_id`: None
- `push_to_hub_organization`: None
- `mp_parameters`:
- `auto_find_batch_size`: False
- `full_determinism`: False
- `torchdynamo`: None
- `ray_scope`: last
- `ddp_timeout`: 1800
- `torch_compile`: False
- `torch_compile_backend`: None
- `torch_compile_mode`: None
- `dispatch_batches`: None
- `split_batches`: None
- `include_tokens_per_second`: False
- `include_num_input_tokens_seen`: False
- `neftune_noise_alpha`: None
- `optim_target_modules`: None
- `batch_eval_metrics`: False
- `batch_sampler`: batch_sampler
- `multi_dataset_batch_sampler`: proportional
</details>
### Training Logs
| Epoch | Step | Training Loss | distilbert loss | dataset loss |
|:------:|:----:|:-------------:|:---------------:|:------------:|
| 2.6178 | 500 | 0.362 | - | - |
| 3.0 | 573 | - | 1.2950 | 0.1712 |
### 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
```bibtex
@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
```bibtex
@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.*
-->