---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:68828
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
widget:
- source_sentence: Men is de toegangssleutels verloren
sentences:
- De centrale verwarming
- niet dringend
- Weg
- source_sentence: De bovenste constructie
sentences:
- Voldoende warm water in de hele woning
- daklekkage
- lek in kraan
- source_sentence: De box in het souterrain
sentences:
- Vloer
- lift niet
- Nood uitgang
- source_sentence: balkon
sentences:
- de brievenbus
- uitgang garage dicht
- afvoer de douche
- source_sentence: De deur naar de kelderboxen is stuk
sentences:
- deur met dranger
- De beugel om de plek vrij te houden
- kelderboxen deur
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy
- cosine_accuracy_threshold
- cosine_f1
- cosine_f1_threshold
- cosine_precision
- cosine_recall
- cosine_ap
- cosine_mcc
model-index:
- name: SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
results:
- task:
type: binary-classification
name: Binary Classification
dataset:
name: Unknown
type: unknown
metrics:
- type: cosine_accuracy
value: 0.982086820083682
name: Cosine Accuracy
- type: cosine_accuracy_threshold
value: 0.733125627040863
name: Cosine Accuracy Threshold
- type: cosine_f1
value: 0.9821498371335505
name: Cosine F1
- type: cosine_f1_threshold
value: 0.733125627040863
name: Cosine F1 Threshold
- type: cosine_precision
value: 0.9787068293949623
name: Cosine Precision
- type: cosine_recall
value: 0.9856171548117155
name: Cosine Recall
- type: cosine_ap
value: 0.9972864020390366
name: Cosine Ap
- type: cosine_mcc
value: 0.964197674565882
name: Cosine Mcc
---
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-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-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
- **Maximum Sequence Length:** 64 tokens
- **Output Dimensionality:** 384 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': 64, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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("PrabalAryal/Sentence_Transformer_v0.0.4")
# Run inference
sentences = [
'De deur naar de kelderboxen is stuk',
'kelderboxen deur',
'deur met dranger',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Binary Classification
* Evaluated with [BinaryClassificationEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
| Metric | Value |
|:--------------------------|:-----------|
| cosine_accuracy | 0.9821 |
| cosine_accuracy_threshold | 0.7331 |
| cosine_f1 | 0.9821 |
| cosine_f1_threshold | 0.7331 |
| cosine_precision | 0.9787 |
| cosine_recall | 0.9856 |
| **cosine_ap** | **0.9973** |
| cosine_mcc | 0.9642 |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 68,828 training samples
* Columns: sentence_0, sentence_1, and label
* Approximate statistics based on the first 1000 samples:
| | sentence_0 | sentence_1 | label |
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
| type | string | string | float |
| details |
De sluiting van de toegangspoort is stuk | slot defect | 1.0 |
| Woning | trapafgang | 0.0 |
| De sleutels zijn kwijt | Nie | 0.0 |
* Loss: [MultipleNegativesRankingLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 64
- `per_device_eval_batch_size`: 64
- `num_train_epochs`: 10
- `fp16`: True
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters