Commit
•
43ddc56
1
Parent(s):
b2371e8
Add new SentenceTransformer model.
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +10 -0
- README.md +366 -0
- config.json +26 -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 +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +64 -0
- unigram.json +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ 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
|
37 |
+
unigram.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
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,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
pipeline_tag: sentence-similarity
|
7 |
+
tags:
|
8 |
+
- sentence-transformers
|
9 |
+
- sentence-similarity
|
10 |
+
- feature-extraction
|
11 |
+
- generated_from_trainer
|
12 |
+
- dataset_size:453
|
13 |
+
- loss:MultipleNegativesRankingLoss
|
14 |
+
widget:
|
15 |
+
- source_sentence: Introduction to blockchain technology.
|
16 |
+
sentences:
|
17 |
+
- Desarrollador de software con experiencia en APIs RESTful
|
18 |
+
- Graphic designer with Adobe Illustrator skills.
|
19 |
+
- Blockchain developer with smart contract experience.
|
20 |
+
- source_sentence: Advanced English for international business.
|
21 |
+
sentences:
|
22 |
+
- Sales executive fluent in English with international sales experience.
|
23 |
+
- Desarrollador de aplicaciones móviles con experiencia en Kotlin
|
24 |
+
- Nurse with pediatric care skills.
|
25 |
+
- source_sentence: Speech recognition technology fundamentals.
|
26 |
+
sentences:
|
27 |
+
- Front-end developer with advanced CSS and responsive web design skills.
|
28 |
+
- Speech recognition engineer with ASR system development skills.
|
29 |
+
- Doctor with radiology experience.
|
30 |
+
- source_sentence: Desarrollo de videojuegos con Godot
|
31 |
+
sentences:
|
32 |
+
- UX designer with web application design skills.
|
33 |
+
- Desarrollador de videojuegos con experiencia en Godot
|
34 |
+
- Profesor de arte con experiencia en escultura
|
35 |
+
- source_sentence: Data Analysis, Database Application, Statistical Analysis
|
36 |
+
sentences:
|
37 |
+
- Escritora, años de experiencia
|
38 |
+
- Machine learning engineer with neural network skills.
|
39 |
+
- ' Ingeniero en sistemas con experiencia en redes informáticas.'
|
40 |
+
---
|
41 |
+
|
42 |
+
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
43 |
+
|
44 |
+
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) on the dataset dataset. 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.
|
45 |
+
|
46 |
+
## Model Details
|
47 |
+
|
48 |
+
### Model Description
|
49 |
+
- **Model Type:** Sentence Transformer
|
50 |
+
- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision bf3bf13ab40c3157080a7ab344c831b9ad18b5eb -->
|
51 |
+
- **Maximum Sequence Length:** 128 tokens
|
52 |
+
- **Output Dimensionality:** 384 tokens
|
53 |
+
- **Similarity Function:** Cosine Similarity
|
54 |
+
- **Training Dataset:**
|
55 |
+
- dataset
|
56 |
+
<!-- - **Language:** Unknown -->
|
57 |
+
<!-- - **License:** Unknown -->
|
58 |
+
|
59 |
+
### Model Sources
|
60 |
+
|
61 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
62 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
63 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
64 |
+
|
65 |
+
### Full Model Architecture
|
66 |
+
|
67 |
+
```
|
68 |
+
SentenceTransformer(
|
69 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
70 |
+
(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})
|
71 |
+
)
|
72 |
+
```
|
73 |
+
|
74 |
+
## Usage
|
75 |
+
|
76 |
+
### Direct Usage (Sentence Transformers)
|
77 |
+
|
78 |
+
First install the Sentence Transformers library:
|
79 |
+
|
80 |
+
```bash
|
81 |
+
pip install -U sentence-transformers
|
82 |
+
```
|
83 |
+
|
84 |
+
Then you can load this model and run inference.
|
85 |
+
```python
|
86 |
+
from sentence_transformers import SentenceTransformer
|
87 |
+
|
88 |
+
# Download from the 🤗 Hub
|
89 |
+
model = SentenceTransformer("saraleivam/GURU-trained-model")
|
90 |
+
# Run inference
|
91 |
+
sentences = [
|
92 |
+
'Data Analysis, Database Application, Statistical Analysis',
|
93 |
+
' Ingeniero en sistemas con experiencia en redes informáticas.',
|
94 |
+
'Escritora, años de experiencia',
|
95 |
+
]
|
96 |
+
embeddings = model.encode(sentences)
|
97 |
+
print(embeddings.shape)
|
98 |
+
# [3, 384]
|
99 |
+
|
100 |
+
# Get the similarity scores for the embeddings
|
101 |
+
similarities = model.similarity(embeddings, embeddings)
|
102 |
+
print(similarities.shape)
|
103 |
+
# [3, 3]
|
104 |
+
```
|
105 |
+
|
106 |
+
<!--
|
107 |
+
### Direct Usage (Transformers)
|
108 |
+
|
109 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
110 |
+
|
111 |
+
</details>
|
112 |
+
-->
|
113 |
+
|
114 |
+
<!--
|
115 |
+
### Downstream Usage (Sentence Transformers)
|
116 |
+
|
117 |
+
You can finetune this model on your own dataset.
|
118 |
+
|
119 |
+
<details><summary>Click to expand</summary>
|
120 |
+
|
121 |
+
</details>
|
122 |
+
-->
|
123 |
+
|
124 |
+
<!--
|
125 |
+
### Out-of-Scope Use
|
126 |
+
|
127 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
128 |
+
-->
|
129 |
+
|
130 |
+
<!--
|
131 |
+
## Bias, Risks and Limitations
|
132 |
+
|
133 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
134 |
+
-->
|
135 |
+
|
136 |
+
<!--
|
137 |
+
### Recommendations
|
138 |
+
|
139 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
140 |
+
-->
|
141 |
+
|
142 |
+
## Training Details
|
143 |
+
|
144 |
+
### Training Dataset
|
145 |
+
|
146 |
+
#### dataset
|
147 |
+
|
148 |
+
* Dataset: dataset
|
149 |
+
* Size: 453 training samples
|
150 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
151 |
+
* Approximate statistics based on the first 1000 samples:
|
152 |
+
| | anchor | positive | negative |
|
153 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
154 |
+
| type | string | string | string |
|
155 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 11.26 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.48 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 10.33 tokens</li><li>max: 16 tokens</li></ul> |
|
156 |
+
* Samples:
|
157 |
+
| anchor | positive | negative |
|
158 |
+
|:-------------------------------------------------------|:---------------------------------------------------------------------------------------|:--------------------------------------------------------------------|
|
159 |
+
| <code>Fundamentos de ingeniería de software</code> | <code>Ingeniero de software con experiencia en principios de diseño de software</code> | <code>Enfermera con experiencia en atención geriátrica</code> |
|
160 |
+
| <code>Data science for healthcare applications.</code> | <code>Data scientist with healthcare data analysis skills.</code> | <code>Lawyer with criminal law experience.</code> |
|
161 |
+
| <code>Programación orientada a objetos en Java.</code> | <code>Ingeniero de software con experiencia en desarrollo backend con Java.</code> | <code>Farmacéutico con habilidades en atención farmacéutica.</code> |
|
162 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
163 |
+
```json
|
164 |
+
{
|
165 |
+
"scale": 20.0,
|
166 |
+
"similarity_fct": "cos_sim"
|
167 |
+
}
|
168 |
+
```
|
169 |
+
|
170 |
+
### Evaluation Dataset
|
171 |
+
|
172 |
+
#### dataset
|
173 |
+
|
174 |
+
* Dataset: dataset
|
175 |
+
* Size: 114 evaluation samples
|
176 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
177 |
+
* Approximate statistics based on the first 1000 samples:
|
178 |
+
| | anchor | positive | negative |
|
179 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
180 |
+
| type | string | string | string |
|
181 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 11.23 tokens</li><li>max: 17 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.31 tokens</li><li>max: 21 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 10.49 tokens</li><li>max: 16 tokens</li></ul> |
|
182 |
+
* Samples:
|
183 |
+
| anchor | positive | negative |
|
184 |
+
|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------|
|
185 |
+
| <code>Microservices architecture and design.</code> | <code>Software architect with microservices design and implementation skills.</code> | <code>Literature professor with literary criticism experience.</code> |
|
186 |
+
| <code>Developing VR applications with Unity.</code> | <code>VR developer with Unity skills.</code> | <code>Pharmacist with pharmaceutical care skills.</code> |
|
187 |
+
| <code>Curso de desarrollo personal y habilidades de comunicación efectiva.</code> | <code> Coach de vida con experiencia en desarrollo personal y habilidades de comunicación.</code> | <code> Ingeniero ambiental con habilidades en gestión de residuos.</code> |
|
188 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
189 |
+
```json
|
190 |
+
{
|
191 |
+
"scale": 20.0,
|
192 |
+
"similarity_fct": "cos_sim"
|
193 |
+
}
|
194 |
+
```
|
195 |
+
|
196 |
+
### Training Hyperparameters
|
197 |
+
|
198 |
+
#### All Hyperparameters
|
199 |
+
<details><summary>Click to expand</summary>
|
200 |
+
|
201 |
+
- `overwrite_output_dir`: False
|
202 |
+
- `do_predict`: False
|
203 |
+
- `eval_strategy`: no
|
204 |
+
- `prediction_loss_only`: True
|
205 |
+
- `per_device_train_batch_size`: 8
|
206 |
+
- `per_device_eval_batch_size`: 8
|
207 |
+
- `per_gpu_train_batch_size`: None
|
208 |
+
- `per_gpu_eval_batch_size`: None
|
209 |
+
- `gradient_accumulation_steps`: 1
|
210 |
+
- `eval_accumulation_steps`: None
|
211 |
+
- `learning_rate`: 5e-05
|
212 |
+
- `weight_decay`: 0.0
|
213 |
+
- `adam_beta1`: 0.9
|
214 |
+
- `adam_beta2`: 0.999
|
215 |
+
- `adam_epsilon`: 1e-08
|
216 |
+
- `max_grad_norm`: 1.0
|
217 |
+
- `num_train_epochs`: 3.0
|
218 |
+
- `max_steps`: -1
|
219 |
+
- `lr_scheduler_type`: linear
|
220 |
+
- `lr_scheduler_kwargs`: {}
|
221 |
+
- `warmup_ratio`: 0.0
|
222 |
+
- `warmup_steps`: 0
|
223 |
+
- `log_level`: passive
|
224 |
+
- `log_level_replica`: warning
|
225 |
+
- `log_on_each_node`: True
|
226 |
+
- `logging_nan_inf_filter`: True
|
227 |
+
- `save_safetensors`: True
|
228 |
+
- `save_on_each_node`: False
|
229 |
+
- `save_only_model`: False
|
230 |
+
- `restore_callback_states_from_checkpoint`: False
|
231 |
+
- `no_cuda`: False
|
232 |
+
- `use_cpu`: False
|
233 |
+
- `use_mps_device`: False
|
234 |
+
- `seed`: 42
|
235 |
+
- `data_seed`: None
|
236 |
+
- `jit_mode_eval`: False
|
237 |
+
- `use_ipex`: False
|
238 |
+
- `bf16`: False
|
239 |
+
- `fp16`: False
|
240 |
+
- `fp16_opt_level`: O1
|
241 |
+
- `half_precision_backend`: auto
|
242 |
+
- `bf16_full_eval`: False
|
243 |
+
- `fp16_full_eval`: False
|
244 |
+
- `tf32`: None
|
245 |
+
- `local_rank`: 0
|
246 |
+
- `ddp_backend`: None
|
247 |
+
- `tpu_num_cores`: None
|
248 |
+
- `tpu_metrics_debug`: False
|
249 |
+
- `debug`: []
|
250 |
+
- `dataloader_drop_last`: False
|
251 |
+
- `dataloader_num_workers`: 0
|
252 |
+
- `dataloader_prefetch_factor`: None
|
253 |
+
- `past_index`: -1
|
254 |
+
- `disable_tqdm`: False
|
255 |
+
- `remove_unused_columns`: True
|
256 |
+
- `label_names`: None
|
257 |
+
- `load_best_model_at_end`: False
|
258 |
+
- `ignore_data_skip`: False
|
259 |
+
- `fsdp`: []
|
260 |
+
- `fsdp_min_num_params`: 0
|
261 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
262 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
263 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
264 |
+
- `deepspeed`: None
|
265 |
+
- `label_smoothing_factor`: 0.0
|
266 |
+
- `optim`: adamw_torch
|
267 |
+
- `optim_args`: None
|
268 |
+
- `adafactor`: False
|
269 |
+
- `group_by_length`: False
|
270 |
+
- `length_column_name`: length
|
271 |
+
- `ddp_find_unused_parameters`: None
|
272 |
+
- `ddp_bucket_cap_mb`: None
|
273 |
+
- `ddp_broadcast_buffers`: False
|
274 |
+
- `dataloader_pin_memory`: True
|
275 |
+
- `dataloader_persistent_workers`: False
|
276 |
+
- `skip_memory_metrics`: True
|
277 |
+
- `use_legacy_prediction_loop`: False
|
278 |
+
- `push_to_hub`: False
|
279 |
+
- `resume_from_checkpoint`: None
|
280 |
+
- `hub_model_id`: None
|
281 |
+
- `hub_strategy`: every_save
|
282 |
+
- `hub_private_repo`: False
|
283 |
+
- `hub_always_push`: False
|
284 |
+
- `gradient_checkpointing`: False
|
285 |
+
- `gradient_checkpointing_kwargs`: None
|
286 |
+
- `include_inputs_for_metrics`: False
|
287 |
+
- `eval_do_concat_batches`: True
|
288 |
+
- `fp16_backend`: auto
|
289 |
+
- `push_to_hub_model_id`: None
|
290 |
+
- `push_to_hub_organization`: None
|
291 |
+
- `mp_parameters`:
|
292 |
+
- `auto_find_batch_size`: False
|
293 |
+
- `full_determinism`: False
|
294 |
+
- `torchdynamo`: None
|
295 |
+
- `ray_scope`: last
|
296 |
+
- `ddp_timeout`: 1800
|
297 |
+
- `torch_compile`: False
|
298 |
+
- `torch_compile_backend`: None
|
299 |
+
- `torch_compile_mode`: None
|
300 |
+
- `dispatch_batches`: None
|
301 |
+
- `split_batches`: None
|
302 |
+
- `include_tokens_per_second`: False
|
303 |
+
- `include_num_input_tokens_seen`: False
|
304 |
+
- `neftune_noise_alpha`: None
|
305 |
+
- `optim_target_modules`: None
|
306 |
+
- `batch_eval_metrics`: False
|
307 |
+
- `batch_sampler`: batch_sampler
|
308 |
+
- `multi_dataset_batch_sampler`: proportional
|
309 |
+
|
310 |
+
</details>
|
311 |
+
|
312 |
+
### Framework Versions
|
313 |
+
- Python: 3.10.12
|
314 |
+
- Sentence Transformers: 3.0.1
|
315 |
+
- Transformers: 4.41.2
|
316 |
+
- PyTorch: 2.3.0+cu121
|
317 |
+
- Accelerate: 0.31.0
|
318 |
+
- Datasets: 2.20.0
|
319 |
+
- Tokenizers: 0.19.1
|
320 |
+
|
321 |
+
## Citation
|
322 |
+
|
323 |
+
### BibTeX
|
324 |
+
|
325 |
+
#### Sentence Transformers
|
326 |
+
```bibtex
|
327 |
+
@inproceedings{reimers-2019-sentence-bert,
|
328 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
329 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
330 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
331 |
+
month = "11",
|
332 |
+
year = "2019",
|
333 |
+
publisher = "Association for Computational Linguistics",
|
334 |
+
url = "https://arxiv.org/abs/1908.10084",
|
335 |
+
}
|
336 |
+
```
|
337 |
+
|
338 |
+
#### MultipleNegativesRankingLoss
|
339 |
+
```bibtex
|
340 |
+
@misc{henderson2017efficient,
|
341 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
342 |
+
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},
|
343 |
+
year={2017},
|
344 |
+
eprint={1705.00652},
|
345 |
+
archivePrefix={arXiv},
|
346 |
+
primaryClass={cs.CL}
|
347 |
+
}
|
348 |
+
```
|
349 |
+
|
350 |
+
<!--
|
351 |
+
## Glossary
|
352 |
+
|
353 |
+
*Clearly define terms in order to be accessible across audiences.*
|
354 |
+
-->
|
355 |
+
|
356 |
+
<!--
|
357 |
+
## Model Card Authors
|
358 |
+
|
359 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
360 |
+
-->
|
361 |
+
|
362 |
+
<!--
|
363 |
+
## Model Card Contact
|
364 |
+
|
365 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
366 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
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 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.2",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 250037
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.41.2",
|
5 |
+
"pytorch": "2.3.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:de2844a6d4a6f31f542287b75dbee92e8b3c6a3d403b01250e28931b2230f6df
|
3 |
+
size 470637416
|
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,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
|
3 |
+
size 17082987
|
tokenizer_config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<s>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "<pad>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "</s>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "<unk>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"250001": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "<s>",
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "<s>",
|
47 |
+
"do_lower_case": true,
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"mask_token": "<mask>",
|
50 |
+
"max_length": 128,
|
51 |
+
"model_max_length": 128,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "</s>",
|
57 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "<unk>"
|
64 |
+
}
|
unigram.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
|
3 |
+
size 14763260
|