Add new SentenceTransformer model.
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +10 -0
- README.md +540 -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,540 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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[]
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
metrics:
|
7 |
+
- cosine_accuracy
|
8 |
+
- cosine_accuracy_threshold
|
9 |
+
- cosine_f1
|
10 |
+
- cosine_f1_threshold
|
11 |
+
- cosine_precision
|
12 |
+
- cosine_recall
|
13 |
+
- cosine_ap
|
14 |
+
- dot_accuracy
|
15 |
+
- dot_accuracy_threshold
|
16 |
+
- dot_f1
|
17 |
+
- dot_f1_threshold
|
18 |
+
- dot_precision
|
19 |
+
- dot_recall
|
20 |
+
- dot_ap
|
21 |
+
- manhattan_accuracy
|
22 |
+
- manhattan_accuracy_threshold
|
23 |
+
- manhattan_f1
|
24 |
+
- manhattan_f1_threshold
|
25 |
+
- manhattan_precision
|
26 |
+
- manhattan_recall
|
27 |
+
- manhattan_ap
|
28 |
+
- euclidean_accuracy
|
29 |
+
- euclidean_accuracy_threshold
|
30 |
+
- euclidean_f1
|
31 |
+
- euclidean_f1_threshold
|
32 |
+
- euclidean_precision
|
33 |
+
- euclidean_recall
|
34 |
+
- euclidean_ap
|
35 |
+
- max_accuracy
|
36 |
+
- max_accuracy_threshold
|
37 |
+
- max_f1
|
38 |
+
- max_f1_threshold
|
39 |
+
- max_precision
|
40 |
+
- max_recall
|
41 |
+
- max_ap
|
42 |
+
pipeline_tag: sentence-similarity
|
43 |
+
tags:
|
44 |
+
- sentence-transformers
|
45 |
+
- sentence-similarity
|
46 |
+
- feature-extraction
|
47 |
+
- generated_from_trainer
|
48 |
+
- dataset_size:410745
|
49 |
+
- loss:ContrastiveLoss
|
50 |
+
widget:
|
51 |
+
- source_sentence: وینچ
|
52 |
+
sentences:
|
53 |
+
- ترقه شکلاتی ( هفت ترقه ) ناریه پارس درجه 1 بسته 15 عددی ترقه شکلاتی ( هفت ترقه
|
54 |
+
) ناریه پارس درجه 1 بسته 15 عددی 10عدد ناریه ترقه شکلاتی هفت ترقه بار تازه بدون
|
55 |
+
رطوبت وخرابی مارک معتبر نورافشانی
|
56 |
+
- پارچه میکرو کجراه
|
57 |
+
- Car winch-1500LBS-KARA وینچ خودرو آفرود ۶۸۰ کیلوگرم کارا ۱۵۰۰lbs وینچ خودرویی
|
58 |
+
(جلو ماشینی) 1500LBS کارا (KARA)
|
59 |
+
- source_sentence: ' وسپا '
|
60 |
+
sentences:
|
61 |
+
- پولوشرت زرد وسپا
|
62 |
+
- دوچرخه بند سقفی لیفان X70 ایکس 70 آلومینیومی طرح منابو
|
63 |
+
- دوچرخه ویوا Oxygen سایز 26 دوچرخه 26 ويوا OXYGEN دوچرخه کوهستان ویوا مدل OXYGEN
|
64 |
+
سایز 26
|
65 |
+
- source_sentence: دوچرخه المپیا سایز 27 5
|
66 |
+
sentences:
|
67 |
+
- دوچرخه شهری المپیا کد 16220 سایز 16 دوچرخه شهری المپیا کد 16220 سایز 16 دوچرخه
|
68 |
+
المپیا کد 16220 سایز 16 - OLYMPIA
|
69 |
+
- لامپ اس ام دی خودرو مدل 8B بسته 2 عددی
|
70 |
+
- قیمت کمپرس سنج موتور
|
71 |
+
- source_sentence: دچرخه ی
|
72 |
+
sentences:
|
73 |
+
- هیدروفیشیال ۷ کاره نیوفیس پلاس متور سنگین ۲۰۲۲
|
74 |
+
- جامدادی کیوت
|
75 |
+
- جعبه ی کادو ی رنگی
|
76 |
+
- source_sentence: هایومکس
|
77 |
+
sentences:
|
78 |
+
- انگشتر حدید صینی کد2439
|
79 |
+
- ژل هایومکس ولومایزر 2 سی سی
|
80 |
+
- دزدگیر پاناتک مدل P-CA501 دزدگیر پاناتک P-CA501-2 دزدگیر پاناتک مدل P-CA501-2
|
81 |
+
model-index:
|
82 |
+
- name: SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
83 |
+
results:
|
84 |
+
- task:
|
85 |
+
type: binary-classification
|
86 |
+
name: Binary Classification
|
87 |
+
dataset:
|
88 |
+
name: Unknown
|
89 |
+
type: unknown
|
90 |
+
metrics:
|
91 |
+
- type: cosine_accuracy
|
92 |
+
value: 0.8531738206358597
|
93 |
+
name: Cosine Accuracy
|
94 |
+
- type: cosine_accuracy_threshold
|
95 |
+
value: 0.763870358467102
|
96 |
+
name: Cosine Accuracy Threshold
|
97 |
+
- type: cosine_f1
|
98 |
+
value: 0.9032999224561303
|
99 |
+
name: Cosine F1
|
100 |
+
- type: cosine_f1_threshold
|
101 |
+
value: 0.7447167634963989
|
102 |
+
name: Cosine F1 Threshold
|
103 |
+
- type: cosine_precision
|
104 |
+
value: 0.8649689236015621
|
105 |
+
name: Cosine Precision
|
106 |
+
- type: cosine_recall
|
107 |
+
value: 0.9451857194374323
|
108 |
+
name: Cosine Recall
|
109 |
+
- type: cosine_ap
|
110 |
+
value: 0.9354580013152192
|
111 |
+
name: Cosine Ap
|
112 |
+
- type: dot_accuracy
|
113 |
+
value: 0.8179627073336401
|
114 |
+
name: Dot Accuracy
|
115 |
+
- type: dot_accuracy_threshold
|
116 |
+
value: 17.24372100830078
|
117 |
+
name: Dot Accuracy Threshold
|
118 |
+
- type: dot_f1
|
119 |
+
value: 0.8831898479427548
|
120 |
+
name: Dot F1
|
121 |
+
- type: dot_f1_threshold
|
122 |
+
value: 16.905807495117188
|
123 |
+
name: Dot F1 Threshold
|
124 |
+
- type: dot_precision
|
125 |
+
value: 0.8255042324171805
|
126 |
+
name: Dot Precision
|
127 |
+
- type: dot_recall
|
128 |
+
value: 0.9495432143286453
|
129 |
+
name: Dot Recall
|
130 |
+
- type: dot_ap
|
131 |
+
value: 0.9192801272426158
|
132 |
+
name: Dot Ap
|
133 |
+
- type: manhattan_accuracy
|
134 |
+
value: 0.8484629374000306
|
135 |
+
name: Manhattan Accuracy
|
136 |
+
- type: manhattan_accuracy_threshold
|
137 |
+
value: 56.168235778808594
|
138 |
+
name: Manhattan Accuracy Threshold
|
139 |
+
- type: manhattan_f1
|
140 |
+
value: 0.9006901291486498
|
141 |
+
name: Manhattan F1
|
142 |
+
- type: manhattan_f1_threshold
|
143 |
+
value: 57.448089599609375
|
144 |
+
name: Manhattan F1 Threshold
|
145 |
+
- type: manhattan_precision
|
146 |
+
value: 0.8601706503309084
|
147 |
+
name: Manhattan Precision
|
148 |
+
- type: manhattan_recall
|
149 |
+
value: 0.9452157711263373
|
150 |
+
name: Manhattan Recall
|
151 |
+
- type: manhattan_ap
|
152 |
+
value: 0.9331690796886208
|
153 |
+
name: Manhattan Ap
|
154 |
+
- type: euclidean_accuracy
|
155 |
+
value: 0.8485944039089375
|
156 |
+
name: Euclidean Accuracy
|
157 |
+
- type: euclidean_accuracy_threshold
|
158 |
+
value: 3.5569825172424316
|
159 |
+
name: Euclidean Accuracy Threshold
|
160 |
+
- type: euclidean_f1
|
161 |
+
value: 0.9009756516265629
|
162 |
+
name: Euclidean F1
|
163 |
+
- type: euclidean_f1_threshold
|
164 |
+
value: 3.694398880004883
|
165 |
+
name: Euclidean F1 Threshold
|
166 |
+
- type: euclidean_precision
|
167 |
+
value: 0.8597717468465025
|
168 |
+
name: Euclidean Precision
|
169 |
+
- type: euclidean_recall
|
170 |
+
value: 0.9463276836158192
|
171 |
+
name: Euclidean Recall
|
172 |
+
- type: euclidean_ap
|
173 |
+
value: 0.9332275611001725
|
174 |
+
name: Euclidean Ap
|
175 |
+
- type: max_accuracy
|
176 |
+
value: 0.8531738206358597
|
177 |
+
name: Max Accuracy
|
178 |
+
- type: max_accuracy_threshold
|
179 |
+
value: 56.168235778808594
|
180 |
+
name: Max Accuracy Threshold
|
181 |
+
- type: max_f1
|
182 |
+
value: 0.9032999224561303
|
183 |
+
name: Max F1
|
184 |
+
- type: max_f1_threshold
|
185 |
+
value: 57.448089599609375
|
186 |
+
name: Max F1 Threshold
|
187 |
+
- type: max_precision
|
188 |
+
value: 0.8649689236015621
|
189 |
+
name: Max Precision
|
190 |
+
- type: max_recall
|
191 |
+
value: 0.9495432143286453
|
192 |
+
name: Max Recall
|
193 |
+
- type: max_ap
|
194 |
+
value: 0.9354580013152192
|
195 |
+
name: Max Ap
|
196 |
+
---
|
197 |
+
|
198 |
+
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
199 |
+
|
200 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
201 |
+
|
202 |
+
## Model Details
|
203 |
+
|
204 |
+
### Model Description
|
205 |
+
- **Model Type:** Sentence Transformer
|
206 |
+
- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision bf3bf13ab40c3157080a7ab344c831b9ad18b5eb -->
|
207 |
+
- **Maximum Sequence Length:** 128 tokens
|
208 |
+
- **Output Dimensionality:** 384 tokens
|
209 |
+
- **Similarity Function:** Cosine Similarity
|
210 |
+
<!-- - **Training Dataset:** Unknown -->
|
211 |
+
<!-- - **Language:** Unknown -->
|
212 |
+
<!-- - **License:** Unknown -->
|
213 |
+
|
214 |
+
### Model Sources
|
215 |
+
|
216 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
217 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
218 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
219 |
+
|
220 |
+
### Full Model Architecture
|
221 |
+
|
222 |
+
```
|
223 |
+
SentenceTransformer(
|
224 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
225 |
+
(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})
|
226 |
+
)
|
227 |
+
```
|
228 |
+
|
229 |
+
## Usage
|
230 |
+
|
231 |
+
### Direct Usage (Sentence Transformers)
|
232 |
+
|
233 |
+
First install the Sentence Transformers library:
|
234 |
+
|
235 |
+
```bash
|
236 |
+
pip install -U sentence-transformers
|
237 |
+
```
|
238 |
+
|
239 |
+
Then you can load this model and run inference.
|
240 |
+
```python
|
241 |
+
from sentence_transformers import SentenceTransformer
|
242 |
+
|
243 |
+
# Download from the 🤗 Hub
|
244 |
+
model = SentenceTransformer("DashReza7/sentence-transformers_paraphrase-multilingual-MiniLM-L12-v2_FINETUNED_on_torob_data_v5")
|
245 |
+
# Run inference
|
246 |
+
sentences = [
|
247 |
+
'هایومکس',
|
248 |
+
'ژل هایومکس ولومایزر 2 سی سی',
|
249 |
+
'دزدگیر پاناتک مدل P-CA501 دزدگیر پاناتک P-CA501-2 دزدگیر پاناتک مدل P-CA501-2',
|
250 |
+
]
|
251 |
+
embeddings = model.encode(sentences)
|
252 |
+
print(embeddings.shape)
|
253 |
+
# [3, 384]
|
254 |
+
|
255 |
+
# Get the similarity scores for the embeddings
|
256 |
+
similarities = model.similarity(embeddings, embeddings)
|
257 |
+
print(similarities.shape)
|
258 |
+
# [3, 3]
|
259 |
+
```
|
260 |
+
|
261 |
+
<!--
|
262 |
+
### Direct Usage (Transformers)
|
263 |
+
|
264 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
265 |
+
|
266 |
+
</details>
|
267 |
+
-->
|
268 |
+
|
269 |
+
<!--
|
270 |
+
### Downstream Usage (Sentence Transformers)
|
271 |
+
|
272 |
+
You can finetune this model on your own dataset.
|
273 |
+
|
274 |
+
<details><summary>Click to expand</summary>
|
275 |
+
|
276 |
+
</details>
|
277 |
+
-->
|
278 |
+
|
279 |
+
<!--
|
280 |
+
### Out-of-Scope Use
|
281 |
+
|
282 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
283 |
+
-->
|
284 |
+
|
285 |
+
## Evaluation
|
286 |
+
|
287 |
+
### Metrics
|
288 |
+
|
289 |
+
#### Binary Classification
|
290 |
+
|
291 |
+
* Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
|
292 |
+
|
293 |
+
| Metric | Value |
|
294 |
+
|:-----------------------------|:-----------|
|
295 |
+
| cosine_accuracy | 0.8532 |
|
296 |
+
| cosine_accuracy_threshold | 0.7639 |
|
297 |
+
| cosine_f1 | 0.9033 |
|
298 |
+
| cosine_f1_threshold | 0.7447 |
|
299 |
+
| cosine_precision | 0.865 |
|
300 |
+
| cosine_recall | 0.9452 |
|
301 |
+
| cosine_ap | 0.9355 |
|
302 |
+
| dot_accuracy | 0.818 |
|
303 |
+
| dot_accuracy_threshold | 17.2437 |
|
304 |
+
| dot_f1 | 0.8832 |
|
305 |
+
| dot_f1_threshold | 16.9058 |
|
306 |
+
| dot_precision | 0.8255 |
|
307 |
+
| dot_recall | 0.9495 |
|
308 |
+
| dot_ap | 0.9193 |
|
309 |
+
| manhattan_accuracy | 0.8485 |
|
310 |
+
| manhattan_accuracy_threshold | 56.1682 |
|
311 |
+
| manhattan_f1 | 0.9007 |
|
312 |
+
| manhattan_f1_threshold | 57.4481 |
|
313 |
+
| manhattan_precision | 0.8602 |
|
314 |
+
| manhattan_recall | 0.9452 |
|
315 |
+
| manhattan_ap | 0.9332 |
|
316 |
+
| euclidean_accuracy | 0.8486 |
|
317 |
+
| euclidean_accuracy_threshold | 3.557 |
|
318 |
+
| euclidean_f1 | 0.901 |
|
319 |
+
| euclidean_f1_threshold | 3.6944 |
|
320 |
+
| euclidean_precision | 0.8598 |
|
321 |
+
| euclidean_recall | 0.9463 |
|
322 |
+
| euclidean_ap | 0.9332 |
|
323 |
+
| max_accuracy | 0.8532 |
|
324 |
+
| max_accuracy_threshold | 56.1682 |
|
325 |
+
| max_f1 | 0.9033 |
|
326 |
+
| max_f1_threshold | 57.4481 |
|
327 |
+
| max_precision | 0.865 |
|
328 |
+
| max_recall | 0.9495 |
|
329 |
+
| **max_ap** | **0.9355** |
|
330 |
+
|
331 |
+
<!--
|
332 |
+
## Bias, Risks and Limitations
|
333 |
+
|
334 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
335 |
+
-->
|
336 |
+
|
337 |
+
<!--
|
338 |
+
### Recommendations
|
339 |
+
|
340 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
341 |
+
-->
|
342 |
+
|
343 |
+
## Training Details
|
344 |
+
|
345 |
+
### Training Hyperparameters
|
346 |
+
#### Non-Default Hyperparameters
|
347 |
+
|
348 |
+
- `eval_strategy`: steps
|
349 |
+
- `per_device_train_batch_size`: 256
|
350 |
+
- `per_device_eval_batch_size`: 256
|
351 |
+
- `learning_rate`: 2e-05
|
352 |
+
- `num_train_epochs`: 2
|
353 |
+
- `warmup_ratio`: 0.1
|
354 |
+
- `fp16`: True
|
355 |
+
|
356 |
+
#### All Hyperparameters
|
357 |
+
<details><summary>Click to expand</summary>
|
358 |
+
|
359 |
+
- `overwrite_output_dir`: False
|
360 |
+
- `do_predict`: False
|
361 |
+
- `eval_strategy`: steps
|
362 |
+
- `prediction_loss_only`: True
|
363 |
+
- `per_device_train_batch_size`: 256
|
364 |
+
- `per_device_eval_batch_size`: 256
|
365 |
+
- `per_gpu_train_batch_size`: None
|
366 |
+
- `per_gpu_eval_batch_size`: None
|
367 |
+
- `gradient_accumulation_steps`: 1
|
368 |
+
- `eval_accumulation_steps`: None
|
369 |
+
- `learning_rate`: 2e-05
|
370 |
+
- `weight_decay`: 0.0
|
371 |
+
- `adam_beta1`: 0.9
|
372 |
+
- `adam_beta2`: 0.999
|
373 |
+
- `adam_epsilon`: 1e-08
|
374 |
+
- `max_grad_norm`: 1.0
|
375 |
+
- `num_train_epochs`: 2
|
376 |
+
- `max_steps`: -1
|
377 |
+
- `lr_scheduler_type`: linear
|
378 |
+
- `lr_scheduler_kwargs`: {}
|
379 |
+
- `warmup_ratio`: 0.1
|
380 |
+
- `warmup_steps`: 0
|
381 |
+
- `log_level`: passive
|
382 |
+
- `log_level_replica`: warning
|
383 |
+
- `log_on_each_node`: True
|
384 |
+
- `logging_nan_inf_filter`: True
|
385 |
+
- `save_safetensors`: True
|
386 |
+
- `save_on_each_node`: False
|
387 |
+
- `save_only_model`: False
|
388 |
+
- `restore_callback_states_from_checkpoint`: False
|
389 |
+
- `no_cuda`: False
|
390 |
+
- `use_cpu`: False
|
391 |
+
- `use_mps_device`: False
|
392 |
+
- `seed`: 42
|
393 |
+
- `data_seed`: None
|
394 |
+
- `jit_mode_eval`: False
|
395 |
+
- `use_ipex`: False
|
396 |
+
- `bf16`: False
|
397 |
+
- `fp16`: True
|
398 |
+
- `fp16_opt_level`: O1
|
399 |
+
- `half_precision_backend`: auto
|
400 |
+
- `bf16_full_eval`: False
|
401 |
+
- `fp16_full_eval`: False
|
402 |
+
- `tf32`: None
|
403 |
+
- `local_rank`: 0
|
404 |
+
- `ddp_backend`: None
|
405 |
+
- `tpu_num_cores`: None
|
406 |
+
- `tpu_metrics_debug`: False
|
407 |
+
- `debug`: []
|
408 |
+
- `dataloader_drop_last`: False
|
409 |
+
- `dataloader_num_workers`: 0
|
410 |
+
- `dataloader_prefetch_factor`: None
|
411 |
+
- `past_index`: -1
|
412 |
+
- `disable_tqdm`: False
|
413 |
+
- `remove_unused_columns`: True
|
414 |
+
- `label_names`: None
|
415 |
+
- `load_best_model_at_end`: False
|
416 |
+
- `ignore_data_skip`: False
|
417 |
+
- `fsdp`: []
|
418 |
+
- `fsdp_min_num_params`: 0
|
419 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
420 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
421 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
422 |
+
- `deepspeed`: None
|
423 |
+
- `label_smoothing_factor`: 0.0
|
424 |
+
- `optim`: adamw_torch
|
425 |
+
- `optim_args`: None
|
426 |
+
- `adafactor`: False
|
427 |
+
- `group_by_length`: False
|
428 |
+
- `length_column_name`: length
|
429 |
+
- `ddp_find_unused_parameters`: None
|
430 |
+
- `ddp_bucket_cap_mb`: None
|
431 |
+
- `ddp_broadcast_buffers`: False
|
432 |
+
- `dataloader_pin_memory`: True
|
433 |
+
- `dataloader_persistent_workers`: False
|
434 |
+
- `skip_memory_metrics`: True
|
435 |
+
- `use_legacy_prediction_loop`: False
|
436 |
+
- `push_to_hub`: False
|
437 |
+
- `resume_from_checkpoint`: None
|
438 |
+
- `hub_model_id`: None
|
439 |
+
- `hub_strategy`: every_save
|
440 |
+
- `hub_private_repo`: False
|
441 |
+
- `hub_always_push`: False
|
442 |
+
- `gradient_checkpointing`: False
|
443 |
+
- `gradient_checkpointing_kwargs`: None
|
444 |
+
- `include_inputs_for_metrics`: False
|
445 |
+
- `eval_do_concat_batches`: True
|
446 |
+
- `fp16_backend`: auto
|
447 |
+
- `push_to_hub_model_id`: None
|
448 |
+
- `push_to_hub_organization`: None
|
449 |
+
- `mp_parameters`:
|
450 |
+
- `auto_find_batch_size`: False
|
451 |
+
- `full_determinism`: False
|
452 |
+
- `torchdynamo`: None
|
453 |
+
- `ray_scope`: last
|
454 |
+
- `ddp_timeout`: 1800
|
455 |
+
- `torch_compile`: False
|
456 |
+
- `torch_compile_backend`: None
|
457 |
+
- `torch_compile_mode`: None
|
458 |
+
- `dispatch_batches`: None
|
459 |
+
- `split_batches`: None
|
460 |
+
- `include_tokens_per_second`: False
|
461 |
+
- `include_num_input_tokens_seen`: False
|
462 |
+
- `neftune_noise_alpha`: None
|
463 |
+
- `optim_target_modules`: None
|
464 |
+
- `batch_eval_metrics`: False
|
465 |
+
- `eval_on_start`: False
|
466 |
+
- `batch_sampler`: batch_sampler
|
467 |
+
- `multi_dataset_batch_sampler`: proportional
|
468 |
+
|
469 |
+
</details>
|
470 |
+
|
471 |
+
### Training Logs
|
472 |
+
| Epoch | Step | Training Loss | max_ap |
|
473 |
+
|:------:|:----:|:-------------:|:------:|
|
474 |
+
| None | 0 | - | 0.8131 |
|
475 |
+
| 0.3115 | 500 | 0.0256 | - |
|
476 |
+
| 0.6231 | 1000 | 0.0179 | - |
|
477 |
+
| 0.9346 | 1500 | 0.0165 | - |
|
478 |
+
| 1.2461 | 2000 | 0.0152 | - |
|
479 |
+
| 1.5576 | 2500 | 0.0148 | - |
|
480 |
+
| 1.8692 | 3000 | 0.0144 | - |
|
481 |
+
| 2.0 | 3210 | - | 0.9355 |
|
482 |
+
|
483 |
+
|
484 |
+
### Framework Versions
|
485 |
+
- Python: 3.10.12
|
486 |
+
- Sentence Transformers: 3.0.1
|
487 |
+
- Transformers: 4.42.4
|
488 |
+
- PyTorch: 2.4.0+cu121
|
489 |
+
- Accelerate: 0.32.1
|
490 |
+
- Datasets: 2.21.0
|
491 |
+
- Tokenizers: 0.19.1
|
492 |
+
|
493 |
+
## Citation
|
494 |
+
|
495 |
+
### BibTeX
|
496 |
+
|
497 |
+
#### Sentence Transformers
|
498 |
+
```bibtex
|
499 |
+
@inproceedings{reimers-2019-sentence-bert,
|
500 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
501 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
502 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
503 |
+
month = "11",
|
504 |
+
year = "2019",
|
505 |
+
publisher = "Association for Computational Linguistics",
|
506 |
+
url = "https://arxiv.org/abs/1908.10084",
|
507 |
+
}
|
508 |
+
```
|
509 |
+
|
510 |
+
#### ContrastiveLoss
|
511 |
+
```bibtex
|
512 |
+
@inproceedings{hadsell2006dimensionality,
|
513 |
+
author={Hadsell, R. and Chopra, S. and LeCun, Y.},
|
514 |
+
booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
|
515 |
+
title={Dimensionality Reduction by Learning an Invariant Mapping},
|
516 |
+
year={2006},
|
517 |
+
volume={2},
|
518 |
+
number={},
|
519 |
+
pages={1735-1742},
|
520 |
+
doi={10.1109/CVPR.2006.100}
|
521 |
+
}
|
522 |
+
```
|
523 |
+
|
524 |
+
<!--
|
525 |
+
## Glossary
|
526 |
+
|
527 |
+
*Clearly define terms in order to be accessible across audiences.*
|
528 |
+
-->
|
529 |
+
|
530 |
+
<!--
|
531 |
+
## Model Card Authors
|
532 |
+
|
533 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
534 |
+
-->
|
535 |
+
|
536 |
+
<!--
|
537 |
+
## Model Card Contact
|
538 |
+
|
539 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
540 |
+
-->
|
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.42.4",
|
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.42.4",
|
5 |
+
"pytorch": "2.4.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:bea1729e8232abb0d1fa1f6312b739a8d711893b3780e11b7df328518c42dfef
|
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
|