---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:3560698
- loss:ModifiedMatryoshkaLoss
base_model: google-bert/bert-base-multilingual-cased
widget:
- source_sentence: And then finally, turn it back to the real world.
sentences:
- Y luego, finalmente, devolver eso al mundo real.
- Parece que el único rasgo que sobrevive a la decapitación es la vanidad.
- y yo digo que no estoy seguro. Voy a pensarlo a groso modo.
- source_sentence: Figure out some of the other options that are much better.
sentences:
- Piensen en otras de las opciones que son mucho mejores.
- Éste solía ser un tema bipartidista, y sé que en este grupo realmente lo es.
- El acuerdo general de paz para Sudán firmado en 2005 resultó ser menos amplio
que lo previsto, y sus disposiciones aún podrían engendrar un retorno a gran escala
de la guerra entre el norte y el sur.
- source_sentence: 'The call to action I offer today -- my TED wish -- is this: Honor
the treaties.'
sentences:
- Esta es la intersección más directa, obvia, de las dos cosas.
- 'El llamado a la acción que propongo hoy, mi TED Wish, es el siguiente: Honrar
los tratados.'
- Los restaurantes del condado se pueden contar con los dedos de una mano... Barbacoa
Bunn es mi favorito.
- source_sentence: So for us, this was a graphic public campaign called Connect Bertie.
sentences:
- Para nosotros esto era una campaña gráfica llamada Conecta a Bertie.
- En cambio, los líderes locales se comprometieron a revisarlos más adelante.
- Con el tiempo, la gente hace lo que se le paga por hacer.
- source_sentence: And in the audio world that's when the microphone gets too close
to its sound source, and then it gets in this self-destructive loop that creates
a very unpleasant sound.
sentences:
- Esta es una mina de Zimbabwe en este momento.
- Estábamos en la I-40.
- Y, en el mundo del audio, es cuando el micrófono se acerca demasiado a su fuente
de sonido, y entra en este bucle autodestructivo que crea un sonido muy desagradable.
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- negative_mse
model-index:
- name: SentenceTransformer based on google-bert/bert-base-multilingual-cased
results:
- task:
type: knowledge-distillation
name: Knowledge Distillation
dataset:
name: MSE val en es
type: MSE-val-en-es
metrics:
- type: negative_mse
value: -29.5114666223526
name: Negative Mse
- task:
type: knowledge-distillation
name: Knowledge Distillation
dataset:
name: MSE val en pt
type: MSE-val-en-pt
metrics:
- type: negative_mse
value: -29.913604259490967
name: Negative Mse
- task:
type: knowledge-distillation
name: Knowledge Distillation
dataset:
name: MSE val en pt br
type: MSE-val-en-pt-br
metrics:
- type: negative_mse
value: -27.732226252555847
name: Negative Mse
---
# SentenceTransformer based on google-bert/bert-base-multilingual-cased
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google-bert/bert-base-multilingual-cased](https://huggingface.co/google-bert/bert-base-multilingual-cased). 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:** [google-bert/bert-base-multilingual-cased](https://huggingface.co/google-bert/bert-base-multilingual-cased)
- **Maximum Sequence Length:** 128 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': 128, '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("luanafelbarros/TriLingual-BERT-Distil")
# Run inference
sentences = [
"And in the audio world that's when the microphone gets too close to its sound source, and then it gets in this self-destructive loop that creates a very unpleasant sound.",
'Y, en el mundo del audio, es cuando el micrófono se acerca demasiado a su fuente de sonido, y entra en este bucle autodestructivo que crea un sonido muy desagradable.',
'Esta es una mina de Zimbabwe en este momento.',
]
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]
```
## Evaluation
### Metrics
#### Knowledge Distillation
* Datasets: `MSE-val-en-es`, `MSE-val-en-pt` and `MSE-val-en-pt-br`
* Evaluated with [MSEEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.MSEEvaluator)
| Metric | MSE-val-en-es | MSE-val-en-pt | MSE-val-en-pt-br |
|:-----------------|:--------------|:--------------|:-----------------|
| **negative_mse** | **-29.5115** | **-29.9136** | **-27.7322** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 3,560,698 training samples
* Columns: english, non_english, and label
* Approximate statistics based on the first 1000 samples:
| | english | non_english | label |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-------------------------------------|
| type | string | string | list |
| details |
And then there are certain conceptual things that can also benefit from hand calculating, but I think they're relatively small in number. | Y luego hay ciertas aspectos conceptuales que pueden beneficiarse del cálculo a mano pero creo que son relativamente pocos. | [-0.04180986061692238, 0.12620249390602112, -0.14501447975635529, 0.09695684909820557, -0.10850819200277328, ...] |
| One thing I often ask about is ancient Greek and how this relates. | Algo que pregunto a menudo es sobre el griego antiguo y cómo se relaciona. | [0.0034368489868938923, -0.02741478756070137, -0.09426739811897278, 0.04873204976320267, -0.008266829885542393, ...] |
| See, the thing we're doing right now is we're forcing people to learn mathematics. | Vean, lo que estamos haciendo ahora es forzar a la gente a aprender matemáticas. | [-0.05048828944563866, 0.2713043689727783, 0.024581076577305794, -0.07316197454929352, -0.044288791716098785, ...] |
* Loss: __main__.ModifiedMatryoshkaLoss with these parameters:
```json
{
"loss": "MSELoss",
"matryoshka_dims": [
768,
512,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 6,974 evaluation samples
* Columns: english, non_english, and label
* Approximate statistics based on the first 1000 samples:
| | english | non_english | label |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-------------------------------------|
| type | string | string | list |
| details | Thank you so much, Chris. | Muchas gracias Chris. | [-0.1432434469461441, -0.10335833579301834, -0.07549277693033218, -0.1542435735464096, 0.009247343055903912, ...] |
| And it's truly a great honor to have the opportunity to come to this stage twice; I'm extremely grateful. | Y es en verdad un gran honor tener la oportunidad de venir a este escenario por segunda vez. Estoy extremadamente agradecido. | [0.02740730345249176, -0.0601208470761776, -0.023767368867993355, 0.02245006151497364, 0.007412586361169815, ...] |
| I have been blown away by this conference, and I want to thank all of you for the many nice comments about what I had to say the other night. | He quedado conmovido por esta conferencia, y deseo agradecer a todos ustedes sus amables comentarios acerca de lo que tenía que decir la otra noche. | [-0.09117366373538971, 0.08627621084451675, -0.05912208557128906, -0.007647979073226452, 0.0008422975661233068, ...] |
* Loss: __main__.ModifiedMatryoshkaLoss with these parameters:
```json
{
"loss": "MSELoss",
"matryoshka_dims": [
768,
512,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 200
- `per_device_eval_batch_size`: 200
- `learning_rate`: 2e-05
- `num_train_epochs`: 2
- `warmup_ratio`: 0.1
- `fp16`: True
- `label_names`: ['label']
#### All Hyperparameters