luanafelbarros
commited on
Commit
•
129b493
1
Parent(s):
eaf0e1f
Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +491 -0
- config.json +31 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,491 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sentence-similarity
|
5 |
+
- feature-extraction
|
6 |
+
- generated_from_trainer
|
7 |
+
- dataset_size:3560698
|
8 |
+
- loss:ModifiedMatryoshkaLoss
|
9 |
+
base_model: google-bert/bert-base-multilingual-cased
|
10 |
+
widget:
|
11 |
+
- source_sentence: This is a mine in Zimbabwe right now.
|
12 |
+
sentences:
|
13 |
+
- Esta es una mina de Zimbabwe en este momento.
|
14 |
+
- Transformar eso en una respuesta con forma matemática.
|
15 |
+
- Centrarse en el liderazgo, la diplomacia y el diseño institucional ayuda también
|
16 |
+
a explicar los intentos de paz que fracasan, o que no perduran.
|
17 |
+
- source_sentence: '"You want me to deliver human rights throughout my global supply
|
18 |
+
chain.'
|
19 |
+
sentences:
|
20 |
+
- '"Quieres que respete los Derechos Humanos en la cadena mundial de suministro.'
|
21 |
+
- ¿Qué queremos decir cuando decimos que hacemos matemática... ...o que enseñamos
|
22 |
+
matemática?
|
23 |
+
- Así que criamos moscas cuyos cerebros fueron salpicados más o menos al azar con
|
24 |
+
células direccionables por la luz.
|
25 |
+
- source_sentence: Figure out some of the other options that are much better.
|
26 |
+
sentences:
|
27 |
+
- En Kirguistán, en las últimas semanas, ocurrieron niveles de violencia sin precedentes
|
28 |
+
entre los kirguíes étnicos y los uzbecos étnicos.
|
29 |
+
- Piensen en otras de las opciones que son mucho mejores.
|
30 |
+
- La película sale -- la película es una versión en película de la presentación
|
31 |
+
de las diapositivas que di hace dos noches, excepto que es mucho más entretenida.
|
32 |
+
- source_sentence: I've become very close with them, and they've welcomed me like
|
33 |
+
family.
|
34 |
+
sentences:
|
35 |
+
- he logrado una relación estrecha con ellos; soy como de la familia.
|
36 |
+
- O que los oídos se oigan a sí mismos... simplemente es imposible;
|
37 |
+
- Es un producto farmacéutico.
|
38 |
+
- source_sentence: All the grayed-out species disappear.
|
39 |
+
sentences:
|
40 |
+
- 'Los diamantes: quizá todos hemos oído hablar de la película "Diamante de sangre".'
|
41 |
+
- Hay un vacío total de capital creativo en Bertie.
|
42 |
+
- Van a desaparecer todas las especies en gris.
|
43 |
+
pipeline_tag: sentence-similarity
|
44 |
+
library_name: sentence-transformers
|
45 |
+
metrics:
|
46 |
+
- negative_mse
|
47 |
+
model-index:
|
48 |
+
- name: SentenceTransformer based on google-bert/bert-base-multilingual-cased
|
49 |
+
results:
|
50 |
+
- task:
|
51 |
+
type: knowledge-distillation
|
52 |
+
name: Knowledge Distillation
|
53 |
+
dataset:
|
54 |
+
name: MSE val en es
|
55 |
+
type: MSE-val-en-es
|
56 |
+
metrics:
|
57 |
+
- type: negative_mse
|
58 |
+
value: -33.77506732940674
|
59 |
+
name: Negative Mse
|
60 |
+
- task:
|
61 |
+
type: knowledge-distillation
|
62 |
+
name: Knowledge Distillation
|
63 |
+
dataset:
|
64 |
+
name: MSE val en pt
|
65 |
+
type: MSE-val-en-pt
|
66 |
+
metrics:
|
67 |
+
- type: negative_mse
|
68 |
+
value: -34.092217683792114
|
69 |
+
name: Negative Mse
|
70 |
+
- task:
|
71 |
+
type: knowledge-distillation
|
72 |
+
name: Knowledge Distillation
|
73 |
+
dataset:
|
74 |
+
name: MSE val en pt br
|
75 |
+
type: MSE-val-en-pt-br
|
76 |
+
metrics:
|
77 |
+
- type: negative_mse
|
78 |
+
value: -32.07869827747345
|
79 |
+
name: Negative Mse
|
80 |
+
---
|
81 |
+
|
82 |
+
# SentenceTransformer based on google-bert/bert-base-multilingual-cased
|
83 |
+
|
84 |
+
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.
|
85 |
+
|
86 |
+
## Model Details
|
87 |
+
|
88 |
+
### Model Description
|
89 |
+
- **Model Type:** Sentence Transformer
|
90 |
+
- **Base model:** [google-bert/bert-base-multilingual-cased](https://huggingface.co/google-bert/bert-base-multilingual-cased) <!-- at revision 3f076fdb1ab68d5b2880cb87a0886f315b8146f8 -->
|
91 |
+
- **Maximum Sequence Length:** 128 tokens
|
92 |
+
- **Output Dimensionality:** 768 dimensions
|
93 |
+
- **Similarity Function:** Cosine Similarity
|
94 |
+
<!-- - **Training Dataset:** Unknown -->
|
95 |
+
<!-- - **Language:** Unknown -->
|
96 |
+
<!-- - **License:** Unknown -->
|
97 |
+
|
98 |
+
### Model Sources
|
99 |
+
|
100 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
101 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
102 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
103 |
+
|
104 |
+
### Full Model Architecture
|
105 |
+
|
106 |
+
```
|
107 |
+
SentenceTransformer(
|
108 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
109 |
+
(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})
|
110 |
+
)
|
111 |
+
```
|
112 |
+
|
113 |
+
## Usage
|
114 |
+
|
115 |
+
### Direct Usage (Sentence Transformers)
|
116 |
+
|
117 |
+
First install the Sentence Transformers library:
|
118 |
+
|
119 |
+
```bash
|
120 |
+
pip install -U sentence-transformers
|
121 |
+
```
|
122 |
+
|
123 |
+
Then you can load this model and run inference.
|
124 |
+
```python
|
125 |
+
from sentence_transformers import SentenceTransformer
|
126 |
+
|
127 |
+
# Download from the 🤗 Hub
|
128 |
+
model = SentenceTransformer("luanafelbarros/bert-en-es-pt-matryoshka_v3")
|
129 |
+
# Run inference
|
130 |
+
sentences = [
|
131 |
+
'All the grayed-out species disappear.',
|
132 |
+
'Van a desaparecer todas las especies en gris.',
|
133 |
+
'Los diamantes: quizá todos hemos oído hablar de la película "Diamante de sangre".',
|
134 |
+
]
|
135 |
+
embeddings = model.encode(sentences)
|
136 |
+
print(embeddings.shape)
|
137 |
+
# [3, 768]
|
138 |
+
|
139 |
+
# Get the similarity scores for the embeddings
|
140 |
+
similarities = model.similarity(embeddings, embeddings)
|
141 |
+
print(similarities.shape)
|
142 |
+
# [3, 3]
|
143 |
+
```
|
144 |
+
|
145 |
+
<!--
|
146 |
+
### Direct Usage (Transformers)
|
147 |
+
|
148 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
149 |
+
|
150 |
+
</details>
|
151 |
+
-->
|
152 |
+
|
153 |
+
<!--
|
154 |
+
### Downstream Usage (Sentence Transformers)
|
155 |
+
|
156 |
+
You can finetune this model on your own dataset.
|
157 |
+
|
158 |
+
<details><summary>Click to expand</summary>
|
159 |
+
|
160 |
+
</details>
|
161 |
+
-->
|
162 |
+
|
163 |
+
<!--
|
164 |
+
### Out-of-Scope Use
|
165 |
+
|
166 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
167 |
+
-->
|
168 |
+
|
169 |
+
## Evaluation
|
170 |
+
|
171 |
+
### Metrics
|
172 |
+
|
173 |
+
#### Knowledge Distillation
|
174 |
+
|
175 |
+
* Datasets: `MSE-val-en-es`, `MSE-val-en-pt` and `MSE-val-en-pt-br`
|
176 |
+
* Evaluated with [<code>MSEEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.MSEEvaluator)
|
177 |
+
|
178 |
+
| Metric | MSE-val-en-es | MSE-val-en-pt | MSE-val-en-pt-br |
|
179 |
+
|:-----------------|:--------------|:--------------|:-----------------|
|
180 |
+
| **negative_mse** | **-33.7751** | **-34.0922** | **-32.0787** |
|
181 |
+
|
182 |
+
<!--
|
183 |
+
## Bias, Risks and Limitations
|
184 |
+
|
185 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
186 |
+
-->
|
187 |
+
|
188 |
+
<!--
|
189 |
+
### Recommendations
|
190 |
+
|
191 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
192 |
+
-->
|
193 |
+
|
194 |
+
## Training Details
|
195 |
+
|
196 |
+
### Training Dataset
|
197 |
+
|
198 |
+
#### Unnamed Dataset
|
199 |
+
|
200 |
+
|
201 |
+
* Size: 3,560,698 training samples
|
202 |
+
* Columns: <code>english</code>, <code>non_english</code>, and <code>label</code>
|
203 |
+
* Approximate statistics based on the first 1000 samples:
|
204 |
+
| | english | non_english | label |
|
205 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-------------------------------------|
|
206 |
+
| type | string | string | list |
|
207 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 25.46 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 26.67 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>size: 768 elements</li></ul> |
|
208 |
+
* Samples:
|
209 |
+
| english | non_english | label |
|
210 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
|
211 |
+
| <code>And then there are certain conceptual things that can also benefit from hand calculating, but I think they're relatively small in number.</code> | <code>Y luego hay ciertas aspectos conceptuales que pueden beneficiarse del cálculo a mano pero creo que son relativamente pocos.</code> | <code>[-0.015244179405272007, 0.04601434990763664, -0.052873335778713226, 0.03535117208957672, -0.039562877267599106, ...]</code> |
|
212 |
+
| <code>One thing I often ask about is ancient Greek and how this relates.</code> | <code>Algo que pregunto a menudo es sobre el griego antiguo y cómo se relaciona.</code> | <code>[0.0012022971641272306, -0.009590390138328075, -0.032977133989334106, 0.017047710716724396, -0.0028919472824782133, ...]</code> |
|
213 |
+
| <code>See, the thing we're doing right now is we're forcing people to learn mathematics.</code> | <code>Vean, lo que estamos haciendo ahora es forzar a la gente a aprender matemáticas.</code> | <code>[-0.01942082867026329, 0.1043599545955658, 0.009455358609557152, -0.02814248949289322, -0.017036128789186478, ...]</code> |
|
214 |
+
* Loss: <code>__main__.ModifiedMatryoshkaLoss</code> with these parameters:
|
215 |
+
```json
|
216 |
+
{
|
217 |
+
"loss": "MSELoss",
|
218 |
+
"matryoshka_dims": [
|
219 |
+
768,
|
220 |
+
512,
|
221 |
+
256,
|
222 |
+
128,
|
223 |
+
64
|
224 |
+
],
|
225 |
+
"matryoshka_weights": [
|
226 |
+
1,
|
227 |
+
1,
|
228 |
+
1,
|
229 |
+
1,
|
230 |
+
1
|
231 |
+
],
|
232 |
+
"n_dims_per_step": -1
|
233 |
+
}
|
234 |
+
```
|
235 |
+
|
236 |
+
### Evaluation Dataset
|
237 |
+
|
238 |
+
#### Unnamed Dataset
|
239 |
+
|
240 |
+
|
241 |
+
* Size: 6,974 evaluation samples
|
242 |
+
* Columns: <code>english</code>, <code>non_english</code>, and <code>label</code>
|
243 |
+
* Approximate statistics based on the first 1000 samples:
|
244 |
+
| | english | non_english | label |
|
245 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-------------------------------------|
|
246 |
+
| type | string | string | list |
|
247 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 25.68 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 27.31 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>size: 768 elements</li></ul> |
|
248 |
+
* Samples:
|
249 |
+
| english | non_english | label |
|
250 |
+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------|
|
251 |
+
| <code>Thank you so much, Chris.</code> | <code>Muchas gracias Chris.</code> | <code>[-0.0616779662668705, -0.044504180550575256, -0.032505787909030914, -0.06641441583633423, 0.003981734160333872, ...]</code> |
|
252 |
+
| <code>And it's truly a great honor to have the opportunity to come to this stage twice; I'm extremely grateful.</code> | <code>Y es en verdad un gran honor tener la oportunidad de venir a este escenario por segunda vez. Estoy extremadamente agradecido.</code> | <code>[0.011398598551750183, -0.02500401996076107, -0.009884790517389774, 0.009336900897324085, 0.003082842566072941, ...]</code> |
|
253 |
+
| <code>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.</code> | <code>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.</code> | <code>[-0.03842132166028023, 0.03635749593377113, -0.02491452544927597, -0.0032229204662144184, 0.0003549510147422552, ...]</code> |
|
254 |
+
* Loss: <code>__main__.ModifiedMatryoshkaLoss</code> with these parameters:
|
255 |
+
```json
|
256 |
+
{
|
257 |
+
"loss": "MSELoss",
|
258 |
+
"matryoshka_dims": [
|
259 |
+
768,
|
260 |
+
512,
|
261 |
+
256,
|
262 |
+
128,
|
263 |
+
64
|
264 |
+
],
|
265 |
+
"matryoshka_weights": [
|
266 |
+
1,
|
267 |
+
1,
|
268 |
+
1,
|
269 |
+
1,
|
270 |
+
1
|
271 |
+
],
|
272 |
+
"n_dims_per_step": -1
|
273 |
+
}
|
274 |
+
```
|
275 |
+
|
276 |
+
### Training Hyperparameters
|
277 |
+
#### Non-Default Hyperparameters
|
278 |
+
|
279 |
+
- `eval_strategy`: steps
|
280 |
+
- `per_device_train_batch_size`: 200
|
281 |
+
- `per_device_eval_batch_size`: 200
|
282 |
+
- `learning_rate`: 2e-05
|
283 |
+
- `num_train_epochs`: 2
|
284 |
+
- `warmup_ratio`: 0.1
|
285 |
+
- `fp16`: True
|
286 |
+
- `label_names`: ['label']
|
287 |
+
|
288 |
+
#### All Hyperparameters
|
289 |
+
<details><summary>Click to expand</summary>
|
290 |
+
|
291 |
+
- `overwrite_output_dir`: False
|
292 |
+
- `do_predict`: False
|
293 |
+
- `eval_strategy`: steps
|
294 |
+
- `prediction_loss_only`: True
|
295 |
+
- `per_device_train_batch_size`: 200
|
296 |
+
- `per_device_eval_batch_size`: 200
|
297 |
+
- `per_gpu_train_batch_size`: None
|
298 |
+
- `per_gpu_eval_batch_size`: None
|
299 |
+
- `gradient_accumulation_steps`: 1
|
300 |
+
- `eval_accumulation_steps`: None
|
301 |
+
- `torch_empty_cache_steps`: None
|
302 |
+
- `learning_rate`: 2e-05
|
303 |
+
- `weight_decay`: 0.0
|
304 |
+
- `adam_beta1`: 0.9
|
305 |
+
- `adam_beta2`: 0.999
|
306 |
+
- `adam_epsilon`: 1e-08
|
307 |
+
- `max_grad_norm`: 1.0
|
308 |
+
- `num_train_epochs`: 2
|
309 |
+
- `max_steps`: -1
|
310 |
+
- `lr_scheduler_type`: linear
|
311 |
+
- `lr_scheduler_kwargs`: {}
|
312 |
+
- `warmup_ratio`: 0.1
|
313 |
+
- `warmup_steps`: 0
|
314 |
+
- `log_level`: passive
|
315 |
+
- `log_level_replica`: warning
|
316 |
+
- `log_on_each_node`: True
|
317 |
+
- `logging_nan_inf_filter`: True
|
318 |
+
- `save_safetensors`: True
|
319 |
+
- `save_on_each_node`: False
|
320 |
+
- `save_only_model`: False
|
321 |
+
- `restore_callback_states_from_checkpoint`: False
|
322 |
+
- `no_cuda`: False
|
323 |
+
- `use_cpu`: False
|
324 |
+
- `use_mps_device`: False
|
325 |
+
- `seed`: 42
|
326 |
+
- `data_seed`: None
|
327 |
+
- `jit_mode_eval`: False
|
328 |
+
- `use_ipex`: False
|
329 |
+
- `bf16`: False
|
330 |
+
- `fp16`: True
|
331 |
+
- `fp16_opt_level`: O1
|
332 |
+
- `half_precision_backend`: auto
|
333 |
+
- `bf16_full_eval`: False
|
334 |
+
- `fp16_full_eval`: False
|
335 |
+
- `tf32`: None
|
336 |
+
- `local_rank`: 0
|
337 |
+
- `ddp_backend`: None
|
338 |
+
- `tpu_num_cores`: None
|
339 |
+
- `tpu_metrics_debug`: False
|
340 |
+
- `debug`: []
|
341 |
+
- `dataloader_drop_last`: False
|
342 |
+
- `dataloader_num_workers`: 0
|
343 |
+
- `dataloader_prefetch_factor`: None
|
344 |
+
- `past_index`: -1
|
345 |
+
- `disable_tqdm`: False
|
346 |
+
- `remove_unused_columns`: True
|
347 |
+
- `label_names`: ['label']
|
348 |
+
- `load_best_model_at_end`: False
|
349 |
+
- `ignore_data_skip`: False
|
350 |
+
- `fsdp`: []
|
351 |
+
- `fsdp_min_num_params`: 0
|
352 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
353 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
354 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
355 |
+
- `deepspeed`: None
|
356 |
+
- `label_smoothing_factor`: 0.0
|
357 |
+
- `optim`: adamw_torch
|
358 |
+
- `optim_args`: None
|
359 |
+
- `adafactor`: False
|
360 |
+
- `group_by_length`: False
|
361 |
+
- `length_column_name`: length
|
362 |
+
- `ddp_find_unused_parameters`: None
|
363 |
+
- `ddp_bucket_cap_mb`: None
|
364 |
+
- `ddp_broadcast_buffers`: False
|
365 |
+
- `dataloader_pin_memory`: True
|
366 |
+
- `dataloader_persistent_workers`: False
|
367 |
+
- `skip_memory_metrics`: True
|
368 |
+
- `use_legacy_prediction_loop`: False
|
369 |
+
- `push_to_hub`: False
|
370 |
+
- `resume_from_checkpoint`: None
|
371 |
+
- `hub_model_id`: None
|
372 |
+
- `hub_strategy`: every_save
|
373 |
+
- `hub_private_repo`: False
|
374 |
+
- `hub_always_push`: False
|
375 |
+
- `gradient_checkpointing`: False
|
376 |
+
- `gradient_checkpointing_kwargs`: None
|
377 |
+
- `include_inputs_for_metrics`: False
|
378 |
+
- `include_for_metrics`: []
|
379 |
+
- `eval_do_concat_batches`: True
|
380 |
+
- `fp16_backend`: auto
|
381 |
+
- `push_to_hub_model_id`: None
|
382 |
+
- `push_to_hub_organization`: None
|
383 |
+
- `mp_parameters`:
|
384 |
+
- `auto_find_batch_size`: False
|
385 |
+
- `full_determinism`: False
|
386 |
+
- `torchdynamo`: None
|
387 |
+
- `ray_scope`: last
|
388 |
+
- `ddp_timeout`: 1800
|
389 |
+
- `torch_compile`: False
|
390 |
+
- `torch_compile_backend`: None
|
391 |
+
- `torch_compile_mode`: None
|
392 |
+
- `dispatch_batches`: None
|
393 |
+
- `split_batches`: None
|
394 |
+
- `include_tokens_per_second`: False
|
395 |
+
- `include_num_input_tokens_seen`: False
|
396 |
+
- `neftune_noise_alpha`: None
|
397 |
+
- `optim_target_modules`: None
|
398 |
+
- `batch_eval_metrics`: False
|
399 |
+
- `eval_on_start`: False
|
400 |
+
- `use_liger_kernel`: False
|
401 |
+
- `eval_use_gather_object`: False
|
402 |
+
- `average_tokens_across_devices`: False
|
403 |
+
- `prompts`: None
|
404 |
+
- `batch_sampler`: batch_sampler
|
405 |
+
- `multi_dataset_batch_sampler`: proportional
|
406 |
+
|
407 |
+
</details>
|
408 |
+
|
409 |
+
### Training Logs
|
410 |
+
| Epoch | Step | Training Loss | Validation Loss | MSE-val-en-es_negative_mse | MSE-val-en-pt_negative_mse | MSE-val-en-pt-br_negative_mse |
|
411 |
+
|:------:|:-----:|:-------------:|:---------------:|:--------------------------:|:--------------------------:|:-----------------------------:|
|
412 |
+
| 0.0562 | 1000 | 0.0283 | 0.0251 | -22.4432 | -22.0406 | -25.1401 |
|
413 |
+
| 0.1123 | 2000 | 0.0241 | 0.0227 | -24.1255 | -23.9880 | -24.7731 |
|
414 |
+
| 0.1685 | 3000 | 0.0224 | 0.0214 | -25.3630 | -25.2889 | -25.4316 |
|
415 |
+
| 0.2247 | 4000 | 0.0214 | 0.0205 | -27.9225 | -28.0038 | -27.3050 |
|
416 |
+
| 0.2808 | 5000 | 0.0206 | 0.0199 | -29.4189 | -29.5093 | -28.8545 |
|
417 |
+
| 0.3370 | 6000 | 0.0202 | 0.0194 | -30.3190 | -30.4212 | -29.4919 |
|
418 |
+
| 0.3932 | 7000 | 0.0198 | 0.0191 | -31.3278 | -31.4753 | -30.3090 |
|
419 |
+
| 0.4493 | 8000 | 0.0195 | 0.0188 | -31.4089 | -31.6387 | -30.3325 |
|
420 |
+
| 0.5055 | 9000 | 0.0193 | 0.0186 | -32.0598 | -32.2536 | -30.9067 |
|
421 |
+
| 0.5617 | 10000 | 0.0191 | 0.0184 | -32.0989 | -32.2766 | -31.0155 |
|
422 |
+
| 0.6178 | 11000 | 0.0189 | 0.0183 | -32.2449 | -32.4302 | -30.9863 |
|
423 |
+
| 0.6740 | 12000 | 0.0187 | 0.0181 | -32.5800 | -32.8070 | -31.2254 |
|
424 |
+
| 0.7302 | 13000 | 0.0186 | 0.0180 | -32.9225 | -33.1228 | -31.5803 |
|
425 |
+
| 0.7863 | 14000 | 0.0185 | 0.0179 | -32.9227 | -33.1304 | -31.5169 |
|
426 |
+
| 0.8425 | 15000 | 0.0184 | 0.0178 | -33.0181 | -33.2681 | -31.5791 |
|
427 |
+
| 0.8987 | 16000 | 0.0183 | 0.0177 | -33.1309 | -33.3638 | -31.6113 |
|
428 |
+
| 0.9548 | 17000 | 0.0182 | 0.0176 | -33.1635 | -33.4414 | -31.6507 |
|
429 |
+
| 1.0110 | 18000 | 0.0181 | 0.0175 | -33.3615 | -33.6376 | -31.8086 |
|
430 |
+
| 1.0672 | 19000 | 0.018 | 0.0175 | -33.5781 | -33.8775 | -32.0611 |
|
431 |
+
| 1.1233 | 20000 | 0.0179 | 0.0174 | -33.5645 | -33.8531 | -32.0438 |
|
432 |
+
| 1.1795 | 21000 | 0.0179 | 0.0173 | -33.6646 | -33.9817 | -32.0500 |
|
433 |
+
| 1.2357 | 22000 | 0.0179 | 0.0173 | -33.7056 | -34.0088 | -32.1065 |
|
434 |
+
| 1.2918 | 23000 | 0.0178 | 0.0173 | -33.7397 | -34.0153 | -32.1810 |
|
435 |
+
| 1.3480 | 24000 | 0.0178 | 0.0172 | -33.7863 | -34.0887 | -32.1103 |
|
436 |
+
| 1.4042 | 25000 | 0.0177 | 0.0172 | -33.7981 | -34.0863 | -32.1683 |
|
437 |
+
| 1.4603 | 26000 | 0.0177 | 0.0171 | -33.7458 | -34.0451 | -32.0611 |
|
438 |
+
| 1.5165 | 27000 | 0.0177 | 0.0171 | -33.7650 | -34.0652 | -32.1565 |
|
439 |
+
| 1.5727 | 28000 | 0.0176 | 0.0171 | -33.7347 | -34.0446 | -32.0698 |
|
440 |
+
| 1.6288 | 29000 | 0.0176 | 0.0171 | -33.8011 | -34.1169 | -32.0683 |
|
441 |
+
| 1.6850 | 30000 | 0.0176 | 0.0170 | -33.7949 | -34.1010 | -32.1128 |
|
442 |
+
| 1.7412 | 31000 | 0.0176 | 0.0170 | -33.7713 | -34.0857 | -32.1020 |
|
443 |
+
| 1.7973 | 32000 | 0.0176 | 0.0170 | -33.8393 | -34.1676 | -32.1371 |
|
444 |
+
| 1.8535 | 33000 | 0.0175 | 0.0170 | -33.7687 | -34.0887 | -32.0748 |
|
445 |
+
| 1.9097 | 34000 | 0.0175 | 0.0170 | -33.7614 | -34.0854 | -32.0550 |
|
446 |
+
| 1.9659 | 35000 | 0.0175 | 0.0170 | -33.7751 | -34.0922 | -32.0787 |
|
447 |
+
|
448 |
+
|
449 |
+
### Framework Versions
|
450 |
+
- Python: 3.10.12
|
451 |
+
- Sentence Transformers: 3.3.1
|
452 |
+
- Transformers: 4.46.3
|
453 |
+
- PyTorch: 2.5.1+cu121
|
454 |
+
- Accelerate: 1.1.1
|
455 |
+
- Datasets: 3.1.0
|
456 |
+
- Tokenizers: 0.20.3
|
457 |
+
|
458 |
+
## Citation
|
459 |
+
|
460 |
+
### BibTeX
|
461 |
+
|
462 |
+
#### Sentence Transformers
|
463 |
+
```bibtex
|
464 |
+
@inproceedings{reimers-2019-sentence-bert,
|
465 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
466 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
467 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
468 |
+
month = "11",
|
469 |
+
year = "2019",
|
470 |
+
publisher = "Association for Computational Linguistics",
|
471 |
+
url = "https://arxiv.org/abs/1908.10084",
|
472 |
+
}
|
473 |
+
```
|
474 |
+
|
475 |
+
<!--
|
476 |
+
## Glossary
|
477 |
+
|
478 |
+
*Clearly define terms in order to be accessible across audiences.*
|
479 |
+
-->
|
480 |
+
|
481 |
+
<!--
|
482 |
+
## Model Card Authors
|
483 |
+
|
484 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
485 |
+
-->
|
486 |
+
|
487 |
+
<!--
|
488 |
+
## Model Card Contact
|
489 |
+
|
490 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
491 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google-bert/bert-base-multilingual-cased",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"pooler_fc_size": 768,
|
21 |
+
"pooler_num_attention_heads": 12,
|
22 |
+
"pooler_num_fc_layers": 3,
|
23 |
+
"pooler_size_per_head": 128,
|
24 |
+
"pooler_type": "first_token_transform",
|
25 |
+
"position_embedding_type": "absolute",
|
26 |
+
"torch_dtype": "float32",
|
27 |
+
"transformers_version": "4.46.3",
|
28 |
+
"type_vocab_size": 2,
|
29 |
+
"use_cache": true,
|
30 |
+
"vocab_size": 119547
|
31 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.3.1",
|
4 |
+
"transformers": "4.46.3",
|
5 |
+
"pytorch": "2.5.1+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": "cosine"
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0bb3a2efcc34f1e9153c6bdc7faf9162c9c9f547ff61d4b37dbf7ab91d0f498c
|
3 |
+
size 711436136
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 128,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": false,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": false,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "BertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|