Init version of LaBSE-kbd model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- 2_Dense/config.json +1 -0
- 2_Dense/model.safetensors +3 -0
- README.md +521 -0
- config.json +32 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +26 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +3 -0
- tokenizer_config.json +59 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": true,
|
4 |
+
"pooling_mode_mean_tokens": false,
|
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 |
+
}
|
2_Dense/config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
|
2_Dense/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:992990d6f469e8332310d44a3874c4a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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sentence-similarity
|
5 |
+
- feature-extraction
|
6 |
+
- generated_from_trainer
|
7 |
+
- dataset_size:3395988
|
8 |
+
- loss:MultipleNegativesRankingLoss
|
9 |
+
base_model: sentence-transformers/LaBSE
|
10 |
+
widget:
|
11 |
+
- source_sentence: Tom grabbed Mary's elbow.
|
12 |
+
sentences:
|
13 |
+
- Tom, Mary'yi dirseğinden kavradı.
|
14 |
+
- Stay with her.
|
15 |
+
- Pourquoi a-t-il mangé l'abeille ?
|
16 |
+
- source_sentence: Жизнь - это тень.
|
17 |
+
sentences:
|
18 |
+
- Life is a shadow.
|
19 |
+
- I'm almost always at home on Sundays.
|
20 |
+
- Henüz bir vizem yok.
|
21 |
+
- source_sentence: Are you working tomorrow?
|
22 |
+
sentences:
|
23 |
+
- Yarın çalışacak mısın?
|
24 |
+
- Нобэ хуабей дыдэт.
|
25 |
+
- Мэри къэшэн имыIэну жеIэ.
|
26 |
+
- source_sentence: Вы нарушили закон.
|
27 |
+
sentences:
|
28 |
+
- Ахэр Iейщ.
|
29 |
+
- Tom war drei Tage nicht da.
|
30 |
+
- Vous avez enfreint la loi.
|
31 |
+
- source_sentence: We've never seen Tom this angry before.
|
32 |
+
sentences:
|
33 |
+
- Tom'u daha önce asla bu kadar öfkeli görmedik.
|
34 |
+
- Soyez attentive aux voleurs à la tire.
|
35 |
+
- Endişeli görünüyorsun.
|
36 |
+
pipeline_tag: sentence-similarity
|
37 |
+
library_name: sentence-transformers
|
38 |
+
metrics:
|
39 |
+
- pearson_cosine
|
40 |
+
- spearman_cosine
|
41 |
+
model-index:
|
42 |
+
- name: SentenceTransformer based on sentence-transformers/LaBSE
|
43 |
+
results:
|
44 |
+
- task:
|
45 |
+
type: semantic-similarity
|
46 |
+
name: Semantic Similarity
|
47 |
+
dataset:
|
48 |
+
name: validation
|
49 |
+
type: validation
|
50 |
+
metrics:
|
51 |
+
- type: pearson_cosine
|
52 |
+
value: -0.2799955028525394
|
53 |
+
name: Pearson Cosine
|
54 |
+
- type: spearman_cosine
|
55 |
+
value: -0.32115994644018286
|
56 |
+
name: Spearman Cosine
|
57 |
+
---
|
58 |
+
|
59 |
+
# SentenceTransformer based on sentence-transformers/LaBSE
|
60 |
+
|
61 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/LaBSE](https://huggingface.co/sentence-transformers/LaBSE). 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.
|
62 |
+
|
63 |
+
## Model Details
|
64 |
+
|
65 |
+
### Model Description
|
66 |
+
- **Model Type:** Sentence Transformer
|
67 |
+
- **Base model:** [sentence-transformers/LaBSE](https://huggingface.co/sentence-transformers/LaBSE) <!-- at revision b7f947194ceae0ddf90bafe213722569e274ad28 -->
|
68 |
+
- **Maximum Sequence Length:** 256 tokens
|
69 |
+
- **Output Dimensionality:** 768 dimensions
|
70 |
+
- **Similarity Function:** Cosine Similarity
|
71 |
+
<!-- - **Training Dataset:** Unknown -->
|
72 |
+
<!-- - **Language:** Unknown -->
|
73 |
+
<!-- - **License:** Unknown -->
|
74 |
+
|
75 |
+
### Model Sources
|
76 |
+
|
77 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
78 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
79 |
+
- **HF中国镜像站:** [Sentence Transformers on HF中国镜像站](https://huggingface.co/models?library=sentence-transformers)
|
80 |
+
|
81 |
+
### Full Model Architecture
|
82 |
+
|
83 |
+
```
|
84 |
+
SentenceTransformer(
|
85 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
|
86 |
+
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
87 |
+
(2): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
|
88 |
+
(3): Normalize()
|
89 |
+
)
|
90 |
+
```
|
91 |
+
|
92 |
+
## Usage
|
93 |
+
|
94 |
+
### Direct Usage (Sentence Transformers)
|
95 |
+
|
96 |
+
First install the Sentence Transformers library:
|
97 |
+
|
98 |
+
```bash
|
99 |
+
pip install -U sentence-transformers
|
100 |
+
```
|
101 |
+
|
102 |
+
Then you can load this model and run inference.
|
103 |
+
```python
|
104 |
+
from sentence_transformers import SentenceTransformer
|
105 |
+
|
106 |
+
# Download from the 🤗 Hub
|
107 |
+
model = SentenceTransformer("panagoa/LaBSE-kbd-v0.2")
|
108 |
+
# Run inference
|
109 |
+
sentences = [
|
110 |
+
"We've never seen Tom this angry before.",
|
111 |
+
"Tom'u daha önce asla bu kadar öfkeli görmedik.",
|
112 |
+
'Soyez attentive aux voleurs à la tire.',
|
113 |
+
]
|
114 |
+
embeddings = model.encode(sentences)
|
115 |
+
print(embeddings.shape)
|
116 |
+
# [3, 768]
|
117 |
+
|
118 |
+
# Get the similarity scores for the embeddings
|
119 |
+
similarities = model.similarity(embeddings, embeddings)
|
120 |
+
print(similarities.shape)
|
121 |
+
# [3, 3]
|
122 |
+
```
|
123 |
+
|
124 |
+
<!--
|
125 |
+
### Direct Usage (Transformers)
|
126 |
+
|
127 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
128 |
+
|
129 |
+
</details>
|
130 |
+
-->
|
131 |
+
|
132 |
+
<!--
|
133 |
+
### Downstream Usage (Sentence Transformers)
|
134 |
+
|
135 |
+
You can finetune this model on your own dataset.
|
136 |
+
|
137 |
+
<details><summary>Click to expand</summary>
|
138 |
+
|
139 |
+
</details>
|
140 |
+
-->
|
141 |
+
|
142 |
+
<!--
|
143 |
+
### Out-of-Scope Use
|
144 |
+
|
145 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
146 |
+
-->
|
147 |
+
|
148 |
+
## Evaluation
|
149 |
+
|
150 |
+
### Metrics
|
151 |
+
|
152 |
+
#### Semantic Similarity
|
153 |
+
|
154 |
+
* Dataset: `validation`
|
155 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
156 |
+
|
157 |
+
| Metric | Value |
|
158 |
+
|:--------------------|:------------|
|
159 |
+
| pearson_cosine | -0.28 |
|
160 |
+
| **spearman_cosine** | **-0.3212** |
|
161 |
+
|
162 |
+
<!--
|
163 |
+
## Bias, Risks and Limitations
|
164 |
+
|
165 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
166 |
+
-->
|
167 |
+
|
168 |
+
<!--
|
169 |
+
### Recommendations
|
170 |
+
|
171 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
172 |
+
-->
|
173 |
+
|
174 |
+
## Training Details
|
175 |
+
|
176 |
+
### Training Dataset
|
177 |
+
|
178 |
+
#### Unnamed Dataset
|
179 |
+
|
180 |
+
* Size: 3,395,988 training samples
|
181 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
182 |
+
* Approximate statistics based on the first 1000 samples:
|
183 |
+
| | sentence_0 | sentence_1 | label |
|
184 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------|
|
185 |
+
| type | string | string | float |
|
186 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 10.33 tokens</li><li>max: 50 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.81 tokens</li><li>max: 46 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.36</li><li>max: 0.98</li></ul> |
|
187 |
+
* Samples:
|
188 |
+
| sentence_0 | sentence_1 | label |
|
189 |
+
|:---------------------------------------|:--------------------------------------------|:--------------------------------|
|
190 |
+
| <code>Почему вас это удивило?</code> | <code>Сыт ар щIывгъэщIэгъуар?</code> | <code>0.9298050403594972</code> |
|
191 |
+
| <code>Ребёнка кто-нибудь видел?</code> | <code>Quelqu'un a-t-il vu l'enfant ?</code> | <code>0.0</code> |
|
192 |
+
| <code>Marie se couchait.</code> | <code>Мэри гъуэлъырт.</code> | <code>0.9330472946166992</code> |
|
193 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
194 |
+
```json
|
195 |
+
{
|
196 |
+
"scale": 20.0,
|
197 |
+
"similarity_fct": "cos_sim"
|
198 |
+
}
|
199 |
+
```
|
200 |
+
|
201 |
+
### Training Hyperparameters
|
202 |
+
#### Non-Default Hyperparameters
|
203 |
+
|
204 |
+
- `eval_strategy`: steps
|
205 |
+
- `per_device_train_batch_size`: 16
|
206 |
+
- `per_device_eval_batch_size`: 16
|
207 |
+
- `num_train_epochs`: 2
|
208 |
+
- `multi_dataset_batch_sampler`: round_robin
|
209 |
+
|
210 |
+
#### All Hyperparameters
|
211 |
+
<details><summary>Click to expand</summary>
|
212 |
+
|
213 |
+
- `overwrite_output_dir`: False
|
214 |
+
- `do_predict`: False
|
215 |
+
- `eval_strategy`: steps
|
216 |
+
- `prediction_loss_only`: True
|
217 |
+
- `per_device_train_batch_size`: 16
|
218 |
+
- `per_device_eval_batch_size`: 16
|
219 |
+
- `per_gpu_train_batch_size`: None
|
220 |
+
- `per_gpu_eval_batch_size`: None
|
221 |
+
- `gradient_accumulation_steps`: 1
|
222 |
+
- `eval_accumulation_steps`: None
|
223 |
+
- `torch_empty_cache_steps`: None
|
224 |
+
- `learning_rate`: 5e-05
|
225 |
+
- `weight_decay`: 0.0
|
226 |
+
- `adam_beta1`: 0.9
|
227 |
+
- `adam_beta2`: 0.999
|
228 |
+
- `adam_epsilon`: 1e-08
|
229 |
+
- `max_grad_norm`: 1.0
|
230 |
+
- `num_train_epochs`: 2
|
231 |
+
- `max_steps`: -1
|
232 |
+
- `lr_scheduler_type`: linear
|
233 |
+
- `lr_scheduler_kwargs`: {}
|
234 |
+
- `warmup_ratio`: 0.0
|
235 |
+
- `warmup_steps`: 0
|
236 |
+
- `log_level`: passive
|
237 |
+
- `log_level_replica`: warning
|
238 |
+
- `log_on_each_node`: True
|
239 |
+
- `logging_nan_inf_filter`: True
|
240 |
+
- `save_safetensors`: True
|
241 |
+
- `save_on_each_node`: False
|
242 |
+
- `save_only_model`: False
|
243 |
+
- `restore_callback_states_from_checkpoint`: False
|
244 |
+
- `no_cuda`: False
|
245 |
+
- `use_cpu`: False
|
246 |
+
- `use_mps_device`: False
|
247 |
+
- `seed`: 42
|
248 |
+
- `data_seed`: None
|
249 |
+
- `jit_mode_eval`: False
|
250 |
+
- `use_ipex`: False
|
251 |
+
- `bf16`: False
|
252 |
+
- `fp16`: False
|
253 |
+
- `fp16_opt_level`: O1
|
254 |
+
- `half_precision_backend`: auto
|
255 |
+
- `bf16_full_eval`: False
|
256 |
+
- `fp16_full_eval`: False
|
257 |
+
- `tf32`: None
|
258 |
+
- `local_rank`: 0
|
259 |
+
- `ddp_backend`: None
|
260 |
+
- `tpu_num_cores`: None
|
261 |
+
- `tpu_metrics_debug`: False
|
262 |
+
- `debug`: []
|
263 |
+
- `dataloader_drop_last`: False
|
264 |
+
- `dataloader_num_workers`: 0
|
265 |
+
- `dataloader_prefetch_factor`: None
|
266 |
+
- `past_index`: -1
|
267 |
+
- `disable_tqdm`: False
|
268 |
+
- `remove_unused_columns`: True
|
269 |
+
- `label_names`: None
|
270 |
+
- `load_best_model_at_end`: False
|
271 |
+
- `ignore_data_skip`: False
|
272 |
+
- `fsdp`: []
|
273 |
+
- `fsdp_min_num_params`: 0
|
274 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
275 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
276 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
277 |
+
- `deepspeed`: None
|
278 |
+
- `label_smoothing_factor`: 0.0
|
279 |
+
- `optim`: adamw_torch
|
280 |
+
- `optim_args`: None
|
281 |
+
- `adafactor`: False
|
282 |
+
- `group_by_length`: False
|
283 |
+
- `length_column_name`: length
|
284 |
+
- `ddp_find_unused_parameters`: None
|
285 |
+
- `ddp_bucket_cap_mb`: None
|
286 |
+
- `ddp_broadcast_buffers`: False
|
287 |
+
- `dataloader_pin_memory`: True
|
288 |
+
- `dataloader_persistent_workers`: False
|
289 |
+
- `skip_memory_metrics`: True
|
290 |
+
- `use_legacy_prediction_loop`: False
|
291 |
+
- `push_to_hub`: False
|
292 |
+
- `resume_from_checkpoint`: None
|
293 |
+
- `hub_model_id`: None
|
294 |
+
- `hub_strategy`: every_save
|
295 |
+
- `hub_private_repo`: None
|
296 |
+
- `hub_always_push`: False
|
297 |
+
- `gradient_checkpointing`: False
|
298 |
+
- `gradient_checkpointing_kwargs`: None
|
299 |
+
- `include_inputs_for_metrics`: False
|
300 |
+
- `include_for_metrics`: []
|
301 |
+
- `eval_do_concat_batches`: True
|
302 |
+
- `fp16_backend`: auto
|
303 |
+
- `push_to_hub_model_id`: None
|
304 |
+
- `push_to_hub_organization`: None
|
305 |
+
- `mp_parameters`:
|
306 |
+
- `auto_find_batch_size`: False
|
307 |
+
- `full_determinism`: False
|
308 |
+
- `torchdynamo`: None
|
309 |
+
- `ray_scope`: last
|
310 |
+
- `ddp_timeout`: 1800
|
311 |
+
- `torch_compile`: False
|
312 |
+
- `torch_compile_backend`: None
|
313 |
+
- `torch_compile_mode`: None
|
314 |
+
- `dispatch_batches`: None
|
315 |
+
- `split_batches`: None
|
316 |
+
- `include_tokens_per_second`: False
|
317 |
+
- `include_num_input_tokens_seen`: False
|
318 |
+
- `neftune_noise_alpha`: None
|
319 |
+
- `optim_target_modules`: None
|
320 |
+
- `batch_eval_metrics`: False
|
321 |
+
- `eval_on_start`: False
|
322 |
+
- `use_liger_kernel`: False
|
323 |
+
- `eval_use_gather_object`: False
|
324 |
+
- `average_tokens_across_devices`: False
|
325 |
+
- `prompts`: None
|
326 |
+
- `batch_sampler`: batch_sampler
|
327 |
+
- `multi_dataset_batch_sampler`: round_robin
|
328 |
+
|
329 |
+
</details>
|
330 |
+
|
331 |
+
### Training Logs
|
332 |
+
<details><summary>Click to expand</summary>
|
333 |
+
|
334 |
+
| Epoch | Step | Training Loss | validation_spearman_cosine |
|
335 |
+
|:------:|:-----:|:-------------:|:--------------------------:|
|
336 |
+
| 0.0005 | 100 | - | -0.7761 |
|
337 |
+
| 0.0009 | 200 | - | -0.7598 |
|
338 |
+
| 0.0014 | 300 | - | -0.7485 |
|
339 |
+
| 0.0019 | 400 | - | -0.7412 |
|
340 |
+
| 0.0024 | 500 | 0.2864 | -0.7354 |
|
341 |
+
| 0.0028 | 600 | - | -0.7307 |
|
342 |
+
| 0.0033 | 700 | - | -0.7191 |
|
343 |
+
| 0.0038 | 800 | - | -0.7206 |
|
344 |
+
| 0.0042 | 900 | - | -0.7197 |
|
345 |
+
| 0.0047 | 1000 | 0.0463 | -0.7037 |
|
346 |
+
| 0.0052 | 1100 | - | -0.6866 |
|
347 |
+
| 0.0057 | 1200 | - | -0.6798 |
|
348 |
+
| 0.0061 | 1300 | - | -0.6844 |
|
349 |
+
| 0.0066 | 1400 | - | -0.6716 |
|
350 |
+
| 0.0071 | 1500 | 0.0184 | -0.6658 |
|
351 |
+
| 0.0075 | 1600 | - | -0.6620 |
|
352 |
+
| 0.0080 | 1700 | - | -0.6532 |
|
353 |
+
| 0.0085 | 1800 | - | -0.6455 |
|
354 |
+
| 0.0090 | 1900 | - | -0.6452 |
|
355 |
+
| 0.0094 | 2000 | 0.011 | -0.6360 |
|
356 |
+
| 0.0099 | 2100 | - | -0.6240 |
|
357 |
+
| 0.0104 | 2200 | - | -0.6220 |
|
358 |
+
| 0.0108 | 2300 | - | -0.6294 |
|
359 |
+
| 0.0113 | 2400 | - | -0.6038 |
|
360 |
+
| 0.0118 | 2500 | 0.0092 | -0.6116 |
|
361 |
+
| 0.0122 | 2600 | - | -0.5996 |
|
362 |
+
| 0.0127 | 2700 | - | -0.6120 |
|
363 |
+
| 0.0132 | 2800 | - | -0.5940 |
|
364 |
+
| 0.0137 | 2900 | - | -0.5848 |
|
365 |
+
| 0.0141 | 3000 | 0.0071 | -0.5958 |
|
366 |
+
| 0.0146 | 3100 | - | -0.5840 |
|
367 |
+
| 0.0151 | 3200 | - | -0.5944 |
|
368 |
+
| 0.0155 | 3300 | - | -0.5895 |
|
369 |
+
| 0.0160 | 3400 | - | -0.5849 |
|
370 |
+
| 0.0165 | 3500 | 0.0056 | -0.5708 |
|
371 |
+
| 0.0005 | 100 | - | -0.5686 |
|
372 |
+
| 0.0009 | 200 | - | -0.5608 |
|
373 |
+
| 0.0014 | 300 | - | -0.5587 |
|
374 |
+
| 0.0024 | 500 | 0.0053 | - |
|
375 |
+
| 0.0047 | 1000 | 0.0081 | -0.5882 |
|
376 |
+
| 0.0071 | 1500 | 0.0058 | - |
|
377 |
+
| 0.0094 | 2000 | 0.0064 | -0.5127 |
|
378 |
+
| 0.0118 | 2500 | 0.004 | - |
|
379 |
+
| 0.0141 | 3000 | 0.0042 | -0.4934 |
|
380 |
+
| 0.0165 | 3500 | 0.0048 | - |
|
381 |
+
| 0.0188 | 4000 | 0.0036 | -0.4762 |
|
382 |
+
| 0.0212 | 4500 | 0.0051 | - |
|
383 |
+
| 0.0236 | 5000 | 0.0054 | -0.4754 |
|
384 |
+
| 0.0259 | 5500 | 0.0054 | - |
|
385 |
+
| 0.0283 | 6000 | 0.0054 | -0.4609 |
|
386 |
+
| 0.0306 | 6500 | 0.0044 | - |
|
387 |
+
| 0.0330 | 7000 | 0.0048 | -0.4716 |
|
388 |
+
| 0.0353 | 7500 | 0.0061 | - |
|
389 |
+
| 0.0377 | 8000 | 0.0018 | -0.4293 |
|
390 |
+
| 0.0400 | 8500 | 0.0047 | - |
|
391 |
+
| 0.0424 | 9000 | 0.0043 | -0.4311 |
|
392 |
+
| 0.0448 | 9500 | 0.0034 | - |
|
393 |
+
| 0.0471 | 10000 | 0.0041 | -0.4429 |
|
394 |
+
| 0.0495 | 10500 | 0.0028 | - |
|
395 |
+
| 0.0518 | 11000 | 0.0032 | -0.4324 |
|
396 |
+
| 0.0542 | 11500 | 0.0025 | - |
|
397 |
+
| 0.0565 | 12000 | 0.0037 | -0.4374 |
|
398 |
+
| 0.0589 | 12500 | 0.003 | - |
|
399 |
+
| 0.0612 | 13000 | 0.005 | -0.4522 |
|
400 |
+
| 0.0636 | 13500 | 0.0051 | - |
|
401 |
+
| 0.0660 | 14000 | 0.0048 | -0.3994 |
|
402 |
+
| 0.0683 | 14500 | 0.0034 | - |
|
403 |
+
| 0.0707 | 15000 | 0.0032 | -0.4148 |
|
404 |
+
| 0.0730 | 15500 | 0.0046 | - |
|
405 |
+
| 0.0754 | 16000 | 0.0026 | -0.3848 |
|
406 |
+
| 0.0777 | 16500 | 0.0036 | - |
|
407 |
+
| 0.0801 | 17000 | 0.0051 | -0.3845 |
|
408 |
+
| 0.0824 | 17500 | 0.0031 | - |
|
409 |
+
| 0.0848 | 18000 | 0.0035 | -0.3500 |
|
410 |
+
| 0.0872 | 18500 | 0.0028 | - |
|
411 |
+
| 0.0895 | 19000 | 0.0021 | -0.3634 |
|
412 |
+
| 0.0919 | 19500 | 0.0025 | - |
|
413 |
+
| 0.0942 | 20000 | 0.0023 | -0.3428 |
|
414 |
+
| 0.0966 | 20500 | 0.0042 | - |
|
415 |
+
| 0.0989 | 21000 | 0.0038 | -0.3432 |
|
416 |
+
| 0.1013 | 21500 | 0.005 | - |
|
417 |
+
| 0.1037 | 22000 | 0.0024 | -0.3515 |
|
418 |
+
| 0.1060 | 22500 | 0.0029 | - |
|
419 |
+
| 0.1084 | 23000 | 0.0033 | -0.3929 |
|
420 |
+
| 0.1107 | 23500 | 0.003 | - |
|
421 |
+
| 0.1131 | 24000 | 0.0029 | -0.3309 |
|
422 |
+
| 0.1154 | 24500 | 0.0038 | - |
|
423 |
+
| 0.1178 | 25000 | 0.0028 | -0.3369 |
|
424 |
+
| 0.1201 | 25500 | 0.0025 | - |
|
425 |
+
| 0.1225 | 26000 | 0.002 | -0.3257 |
|
426 |
+
| 0.1249 | 26500 | 0.0025 | - |
|
427 |
+
| 0.1272 | 27000 | 0.0033 | -0.3659 |
|
428 |
+
| 0.1296 | 27500 | 0.0023 | - |
|
429 |
+
| 0.1319 | 28000 | 0.0031 | -0.3208 |
|
430 |
+
| 0.1343 | 28500 | 0.0027 | - |
|
431 |
+
| 0.1366 | 29000 | 0.0031 | -0.3298 |
|
432 |
+
| 0.1390 | 29500 | 0.0047 | - |
|
433 |
+
| 0.1413 | 30000 | 0.003 | -0.3460 |
|
434 |
+
| 0.1437 | 30500 | 0.004 | - |
|
435 |
+
| 0.1461 | 31000 | 0.0027 | -0.3567 |
|
436 |
+
| 0.1484 | 31500 | 0.0063 | - |
|
437 |
+
| 0.1508 | 32000 | 0.003 | -0.3382 |
|
438 |
+
| 0.1531 | 32500 | 0.0022 | - |
|
439 |
+
| 0.1555 | 33000 | 0.0048 | -0.3475 |
|
440 |
+
| 0.1578 | 33500 | 0.0021 | - |
|
441 |
+
| 0.1602 | 34000 | 0.0043 | -0.3323 |
|
442 |
+
| 0.1625 | 34500 | 0.0031 | - |
|
443 |
+
| 0.1649 | 35000 | 0.0024 | -0.3207 |
|
444 |
+
| 0.1673 | 35500 | 0.0029 | - |
|
445 |
+
| 0.1696 | 36000 | 0.0032 | -0.3004 |
|
446 |
+
| 0.1720 | 36500 | 0.0046 | - |
|
447 |
+
| 0.1743 | 37000 | 0.0033 | -0.3085 |
|
448 |
+
| 0.1767 | 37500 | 0.002 | - |
|
449 |
+
| 0.1790 | 38000 | 0.0022 | -0.3270 |
|
450 |
+
| 0.1814 | 38500 | 0.0036 | - |
|
451 |
+
| 0.1837 | 39000 | 0.0034 | -0.3042 |
|
452 |
+
| 0.1861 | 39500 | 0.0034 | - |
|
453 |
+
| 0.1885 | 40000 | 0.0016 | -0.3193 |
|
454 |
+
| 0.1908 | 40500 | 0.0026 | - |
|
455 |
+
| 0.1932 | 41000 | 0.0028 | -0.2945 |
|
456 |
+
| 0.1955 | 41500 | 0.0031 | - |
|
457 |
+
| 0.1979 | 42000 | 0.0016 | -0.2942 |
|
458 |
+
| 0.2002 | 42500 | 0.0021 | - |
|
459 |
+
| 0.2026 | 43000 | 0.003 | -0.2998 |
|
460 |
+
| 0.2049 | 43500 | 0.0042 | - |
|
461 |
+
| 0.2073 | 44000 | 0.0023 | -0.3245 |
|
462 |
+
| 0.2097 | 44500 | 0.0018 | - |
|
463 |
+
| 0.2120 | 45000 | 0.0021 | -0.3212 |
|
464 |
+
|
465 |
+
</details>
|
466 |
+
|
467 |
+
### Framework Versions
|
468 |
+
- Python: 3.11.11
|
469 |
+
- Sentence Transformers: 3.4.1
|
470 |
+
- Transformers: 4.48.3
|
471 |
+
- PyTorch: 2.5.1+cu124
|
472 |
+
- Accelerate: 1.3.0
|
473 |
+
- Datasets: 3.3.2
|
474 |
+
- Tokenizers: 0.21.0
|
475 |
+
|
476 |
+
## Citation
|
477 |
+
|
478 |
+
### BibTeX
|
479 |
+
|
480 |
+
#### Sentence Transformers
|
481 |
+
```bibtex
|
482 |
+
@inproceedings{reimers-2019-sentence-bert,
|
483 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
484 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
485 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
486 |
+
month = "11",
|
487 |
+
year = "2019",
|
488 |
+
publisher = "Association for Computational Linguistics",
|
489 |
+
url = "https://arxiv.org/abs/1908.10084",
|
490 |
+
}
|
491 |
+
```
|
492 |
+
|
493 |
+
#### MultipleNegativesRankingLoss
|
494 |
+
```bibtex
|
495 |
+
@misc{henderson2017efficient,
|
496 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
497 |
+
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},
|
498 |
+
year={2017},
|
499 |
+
eprint={1705.00652},
|
500 |
+
archivePrefix={arXiv},
|
501 |
+
primaryClass={cs.CL}
|
502 |
+
}
|
503 |
+
```
|
504 |
+
|
505 |
+
<!--
|
506 |
+
## Glossary
|
507 |
+
|
508 |
+
*Clearly define terms in order to be accessible across audiences.*
|
509 |
+
-->
|
510 |
+
|
511 |
+
<!--
|
512 |
+
## Model Card Authors
|
513 |
+
|
514 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
515 |
+
-->
|
516 |
+
|
517 |
+
<!--
|
518 |
+
## Model Card Contact
|
519 |
+
|
520 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
521 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/LaBSE",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-12,
|
16 |
+
"max_position_embeddings": 512,
|
17 |
+
"model_type": "bert",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"pad_token_id": 0,
|
21 |
+
"pooler_fc_size": 768,
|
22 |
+
"pooler_num_attention_heads": 12,
|
23 |
+
"pooler_num_fc_layers": 3,
|
24 |
+
"pooler_size_per_head": 128,
|
25 |
+
"pooler_type": "first_token_transform",
|
26 |
+
"position_embedding_type": "absolute",
|
27 |
+
"torch_dtype": "float32",
|
28 |
+
"transformers_version": "4.48.3",
|
29 |
+
"type_vocab_size": 2,
|
30 |
+
"use_cache": true,
|
31 |
+
"vocab_size": 501153
|
32 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.4.1",
|
4 |
+
"transformers": "4.48.3",
|
5 |
+
"pytorch": "2.5.1+cu124"
|
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:1fe280b11724b508e3e83ae1bacc5e13647958fecbe3231caffd0ef70484735e
|
3 |
+
size 1883730160
|
modules.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Dense",
|
18 |
+
"type": "sentence_transformers.models.Dense"
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"idx": 3,
|
22 |
+
"name": "3",
|
23 |
+
"path": "3_Normalize",
|
24 |
+
"type": "sentence_transformers.models.Normalize"
|
25 |
+
}
|
26 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 256,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:92262b29204f8fdc169a63f9005a0e311a16262cef4d96ecfe2a7ed638662ed3
|
3 |
+
size 13632172
|
tokenizer_config.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_basic_tokenize": true,
|
47 |
+
"do_lower_case": false,
|
48 |
+
"extra_special_tokens": {},
|
49 |
+
"full_tokenizer_file": null,
|
50 |
+
"mask_token": "[MASK]",
|
51 |
+
"model_max_length": 256,
|
52 |
+
"never_split": null,
|
53 |
+
"pad_token": "[PAD]",
|
54 |
+
"sep_token": "[SEP]",
|
55 |
+
"strip_accents": null,
|
56 |
+
"tokenize_chinese_chars": true,
|
57 |
+
"tokenizer_class": "BertTokenizer",
|
58 |
+
"unk_token": "[UNK]"
|
59 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|