---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:91044
- loss:CosineSimilarityLoss
base_model: hiiamsid/sentence_similarity_spanish_es
widget:
- source_sentence: ¿Cuánto debo pagar por la llave con código VA34P?
sentences:
- ¿La llave HY5P pertenece a qué marca?
- ¿Cuál es el valor actual de VA34P JMA?
- ¿Cuánto cuesta la llave ME4P?
- source_sentence: ¿Me puedes decir cuánto vale TOYOTA (TOY43) 2 BOTONES HILUX TOYO04?
sentences:
- ¿Cuánto debo pagar por la llave con código CAB?
- ¿Qué llave tiene el código TOYO04?
- ¿Qué código tiene la LETRA D?
- source_sentence: ¿Tienen disponible la NISSAN DER LOGO?
sentences:
- ¿Cuál es el valor actual de NISSAN DER LOGO?
- ¿La llave MZ13A pertenece a qué marca?
- ¿CARRIAGE TENSION SPRING 017-24 tiene un precio accesible?
- source_sentence: ¿Qué código tiene la GLOBE DER PEQ MKS?
sentences:
- ¿Qué llave tiene el código YM021?
- ¿Qué llave tiene el código MER03?
- ¿Cuánto cuesta la llave VP095?
- source_sentence: ¿Qué modelo corresponde al código YP107?
sentences:
- ¿La llave TE4 pertenece a qué marca?
- ¿Me puedes decir cuánto vale FANAL?
- ¿Cuánto cuesta la llave P123VE?
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on hiiamsid/sentence_similarity_spanish_es
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [hiiamsid/sentence_similarity_spanish_es](https://huggingface.co/hiiamsid/sentence_similarity_spanish_es). 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:** [hiiamsid/sentence_similarity_spanish_es](https://huggingface.co/hiiamsid/sentence_similarity_spanish_es)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
### 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': 512, 'do_lower_case': False}) with Transformer model: BertModel
(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("sd-dreambooth-library/mks-similarity")
# Run inference
sentences = [
'¿Qué modelo corresponde al código YP107?',
'¿Cuánto cuesta la llave P123VE?',
'¿La llave TE4 pertenece a qué marca?',
]
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 Dataset
#### Unnamed Dataset
* Size: 91,044 training samples
* Columns: sentence1, sentence2, and label
* Approximate statistics based on the first 1000 samples:
| | sentence1 | sentence2 | label |
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
| type | string | string | float |
| details |
¿CY1 HELLO KITTY CORAZONES tiene un precio accesible? | ¿Cuánto cuesta la llave CY43? | 0.0 |
| ¿Qué modelo corresponde al código OP12? | ¿Me puedes decir cuánto vale CHEVROLET GM29? | 0.0 |
| ¿YALE PERSONAJE HULK tiene un precio accesible? | ¿Cuánto debo pagar por la llave con código YP117? | 1.0 |
* Loss: [CosineSimilarityLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
```json
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 10,116 evaluation samples
* Columns: sentence1, sentence2, and label
* Approximate statistics based on the first 1000 samples:
| | sentence1 | sentence2 | label |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------|
| type | string | string | float |
| details | ¿Cuál es el precio de la AM3 AMERICAN LOCK? | ¿Cuánto debo pagar por la llave con código AM3? | 1.0 |
| ¿Cuánto debo pagar por la llave con código MAS9? | ¿La llave MAS9 pertenece a qué marca? | 1.0 |
| ¿La llave YP113 pertenece a qué marca? | ¿Qué llave tiene el código E029? | 0.0 |
* Loss: [CosineSimilarityLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
```json
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 32
- `per_device_eval_batch_size`: 32
- `num_train_epochs`: 2
- `warmup_ratio`: 0.1
- `fp16`: True
#### All Hyperparameters