splendor1811 commited on
Commit
9c23eaf
·
verified ·
1 Parent(s): d8f041f

Add new SentenceTransformer model

Browse files
.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": 1024,
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
+ }
README.md ADDED
@@ -0,0 +1,628 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - vi
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - dense
10
+ - generated_from_trainer
11
+ - dataset_size:6066
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: splendor1811/BGE-base-banking-ONE-v0106
15
+ widget:
16
+ - source_sentence: HUYNHDEANHKHOA COMPANY LIMITED
17
+ sentences:
18
+ - SHYH JIUH INDUSTRIAL CO.,LTD
19
+ - KENG HIN ENGINEERING CO
20
+ - CTTNHHTHIETKE MYTHUAT VA TINHOC HUYNHDEANHKHOA
21
+ - source_sentence: YUEQING RONGSHENG ELECTRICAL APPLIANCES LTD.
22
+ sentences:
23
+ - RAUCH FRUCHTSÄFTE GMBH & CO OG
24
+ - YUEQING RONGSHENG INTRODUCED ELECTRICAL APPLIANCES CO., LTD
25
+ - BACH MY TRADING, SERVICES AND CONSTRUCTION COMPANY LIMITED
26
+ - source_sentence: ZHENFA TEXTILE COMPANY, LIMITED
27
+ sentences:
28
+ - DATANI LOGISTICS COMPANY LIMITED
29
+ - Quan Pham Electrical Equipment Co., Ltd.
30
+ - ZHENFA TEXTILE CO., LIMITED
31
+ - source_sentence: CONG TY TNHH KY THUAT VSI
32
+ sentences:
33
+ - CTCAD SERVICES TRADING COMPANY LIMITED
34
+ - CHAKTOMUK RESOURCES SUPPLY IMPORT EXPORT CO.,LTD
35
+ - VSI ENGINEERING COMPANY LIMITED
36
+ - source_sentence: VIET ANH DUONG CO., LTD
37
+ sentences:
38
+ - ROCK GRANITES
39
+ - CTY TNHH VIET ANH DUONG
40
+ - SOVAN SEUNGDEN CO.,LTD
41
+ pipeline_tag: sentence-similarity
42
+ library_name: sentence-transformers
43
+ metrics:
44
+ - cosine_accuracy@1
45
+ - cosine_accuracy@3
46
+ - cosine_accuracy@5
47
+ - cosine_accuracy@10
48
+ - cosine_precision@1
49
+ - cosine_precision@3
50
+ - cosine_precision@5
51
+ - cosine_precision@10
52
+ - cosine_recall@1
53
+ - cosine_recall@3
54
+ - cosine_recall@5
55
+ - cosine_recall@10
56
+ - cosine_ndcg@10
57
+ - cosine_mrr@10
58
+ - cosine_map@100
59
+ model-index:
60
+ - name: BGE-mapping-tool
61
+ results:
62
+ - task:
63
+ type: information-retrieval
64
+ name: Information Retrieval
65
+ dataset:
66
+ name: dim 1024
67
+ type: dim_1024
68
+ metrics:
69
+ - type: cosine_accuracy@1
70
+ value: 0.844213649851632
71
+ name: Cosine Accuracy@1
72
+ - type: cosine_accuracy@3
73
+ value: 0.9169139465875371
74
+ name: Cosine Accuracy@3
75
+ - type: cosine_accuracy@5
76
+ value: 0.9540059347181009
77
+ name: Cosine Accuracy@5
78
+ - type: cosine_accuracy@10
79
+ value: 0.983679525222552
80
+ name: Cosine Accuracy@10
81
+ - type: cosine_precision@1
82
+ value: 0.844213649851632
83
+ name: Cosine Precision@1
84
+ - type: cosine_precision@3
85
+ value: 0.8209693372898119
86
+ name: Cosine Precision@3
87
+ - type: cosine_precision@5
88
+ value: 0.8172106824925816
89
+ name: Cosine Precision@5
90
+ - type: cosine_precision@10
91
+ value: 0.7956973293768547
92
+ name: Cosine Precision@10
93
+ - type: cosine_recall@1
94
+ value: 0.04068450507619647
95
+ name: Cosine Recall@1
96
+ - type: cosine_recall@3
97
+ value: 0.11841496782149599
98
+ name: Cosine Recall@3
99
+ - type: cosine_recall@5
100
+ value: 0.1962584728163363
101
+ name: Cosine Recall@5
102
+ - type: cosine_recall@10
103
+ value: 0.38186014447142047
104
+ name: Cosine Recall@10
105
+ - type: cosine_ndcg@10
106
+ value: 0.8055555734311861
107
+ name: Cosine Ndcg@10
108
+ - type: cosine_mrr@10
109
+ value: 0.8893975790118221
110
+ name: Cosine Mrr@10
111
+ - type: cosine_map@100
112
+ value: 0.8042214818897099
113
+ name: Cosine Map@100
114
+ - task:
115
+ type: information-retrieval
116
+ name: Information Retrieval
117
+ dataset:
118
+ name: dim 768
119
+ type: dim_768
120
+ metrics:
121
+ - type: cosine_accuracy@1
122
+ value: 0.8501483679525222
123
+ name: Cosine Accuracy@1
124
+ - type: cosine_accuracy@3
125
+ value: 0.9124629080118695
126
+ name: Cosine Accuracy@3
127
+ - type: cosine_accuracy@5
128
+ value: 0.9525222551928784
129
+ name: Cosine Accuracy@5
130
+ - type: cosine_accuracy@10
131
+ value: 0.983679525222552
132
+ name: Cosine Accuracy@10
133
+ - type: cosine_precision@1
134
+ value: 0.8501483679525222
135
+ name: Cosine Precision@1
136
+ - type: cosine_precision@3
137
+ value: 0.8199802176063304
138
+ name: Cosine Precision@3
139
+ - type: cosine_precision@5
140
+ value: 0.8160237388724035
141
+ name: Cosine Precision@5
142
+ - type: cosine_precision@10
143
+ value: 0.7958456973293768
144
+ name: Cosine Precision@10
145
+ - type: cosine_recall@1
146
+ value: 0.040903524434681704
147
+ name: Cosine Recall@1
148
+ - type: cosine_recall@3
149
+ value: 0.1182842627204645
150
+ name: Cosine Recall@3
151
+ - type: cosine_recall@5
152
+ value: 0.1959109963561002
153
+ name: Cosine Recall@5
154
+ - type: cosine_recall@10
155
+ value: 0.38199438214275006
156
+ name: Cosine Recall@10
157
+ - type: cosine_ndcg@10
158
+ value: 0.8060214331494838
159
+ name: Cosine Ndcg@10
160
+ - type: cosine_mrr@10
161
+ value: 0.8915365503273512
162
+ name: Cosine Mrr@10
163
+ - type: cosine_map@100
164
+ value: 0.8045717264189338
165
+ name: Cosine Map@100
166
+ ---
167
+
168
+ # BGE-mapping-tool
169
+
170
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [splendor1811/BGE-base-banking-ONE-v0106](https://huggingface.co/splendor1811/BGE-base-banking-ONE-v0106) on the json dataset. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
171
+
172
+ ## Model Details
173
+
174
+ ### Model Description
175
+ - **Model Type:** Sentence Transformer
176
+ - **Base model:** [splendor1811/BGE-base-banking-ONE-v0106](https://huggingface.co/splendor1811/BGE-base-banking-ONE-v0106) <!-- at revision 9c233176fc7eb592572824ebb465bbe59997a308 -->
177
+ - **Maximum Sequence Length:** 8192 tokens
178
+ - **Output Dimensionality:** 1024 dimensions
179
+ - **Similarity Function:** Cosine Similarity
180
+ - **Training Dataset:**
181
+ - json
182
+ - **Language:** vi
183
+ - **License:** apache-2.0
184
+
185
+ ### Model Sources
186
+
187
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
188
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
189
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
190
+
191
+ ### Full Model Architecture
192
+
193
+ ```
194
+ SentenceTransformer(
195
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False, 'architecture': 'XLMRobertaModel'})
196
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
197
+ (2): Normalize()
198
+ )
199
+ ```
200
+
201
+ ## Usage
202
+
203
+ ### Direct Usage (Sentence Transformers)
204
+
205
+ First install the Sentence Transformers library:
206
+
207
+ ```bash
208
+ pip install -U sentence-transformers
209
+ ```
210
+
211
+ Then you can load this model and run inference.
212
+ ```python
213
+ from sentence_transformers import SentenceTransformer
214
+
215
+ # Download from the 🤗 Hub
216
+ model = SentenceTransformer("splendor1811/BGE-mapping-tool_epoch3")
217
+ # Run inference
218
+ sentences = [
219
+ 'VIET ANH DUONG CO., LTD',
220
+ 'CTY TNHH VIET ANH DUONG',
221
+ 'ROCK GRANITES',
222
+ ]
223
+ embeddings = model.encode(sentences)
224
+ print(embeddings.shape)
225
+ # [3, 1024]
226
+
227
+ # Get the similarity scores for the embeddings
228
+ similarities = model.similarity(embeddings, embeddings)
229
+ print(similarities)
230
+ # tensor([[ 1.0000, 0.9738, -0.0072],
231
+ # [ 0.9738, 1.0000, 0.0011],
232
+ # [-0.0072, 0.0011, 1.0000]])
233
+ ```
234
+
235
+ <!--
236
+ ### Direct Usage (Transformers)
237
+
238
+ <details><summary>Click to see the direct usage in Transformers</summary>
239
+
240
+ </details>
241
+ -->
242
+
243
+ <!--
244
+ ### Downstream Usage (Sentence Transformers)
245
+
246
+ You can finetune this model on your own dataset.
247
+
248
+ <details><summary>Click to expand</summary>
249
+
250
+ </details>
251
+ -->
252
+
253
+ <!--
254
+ ### Out-of-Scope Use
255
+
256
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
257
+ -->
258
+
259
+ ## Evaluation
260
+
261
+ ### Metrics
262
+
263
+ #### Information Retrieval
264
+
265
+ * Dataset: `dim_1024`
266
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
267
+ ```json
268
+ {
269
+ "truncate_dim": 1024
270
+ }
271
+ ```
272
+
273
+ | Metric | Value |
274
+ |:--------------------|:-----------|
275
+ | cosine_accuracy@1 | 0.8442 |
276
+ | cosine_accuracy@3 | 0.9169 |
277
+ | cosine_accuracy@5 | 0.954 |
278
+ | cosine_accuracy@10 | 0.9837 |
279
+ | cosine_precision@1 | 0.8442 |
280
+ | cosine_precision@3 | 0.821 |
281
+ | cosine_precision@5 | 0.8172 |
282
+ | cosine_precision@10 | 0.7957 |
283
+ | cosine_recall@1 | 0.0407 |
284
+ | cosine_recall@3 | 0.1184 |
285
+ | cosine_recall@5 | 0.1963 |
286
+ | cosine_recall@10 | 0.3819 |
287
+ | **cosine_ndcg@10** | **0.8056** |
288
+ | cosine_mrr@10 | 0.8894 |
289
+ | cosine_map@100 | 0.8042 |
290
+
291
+ #### Information Retrieval
292
+
293
+ * Dataset: `dim_768`
294
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
295
+ ```json
296
+ {
297
+ "truncate_dim": 768
298
+ }
299
+ ```
300
+
301
+ | Metric | Value |
302
+ |:--------------------|:----------|
303
+ | cosine_accuracy@1 | 0.8501 |
304
+ | cosine_accuracy@3 | 0.9125 |
305
+ | cosine_accuracy@5 | 0.9525 |
306
+ | cosine_accuracy@10 | 0.9837 |
307
+ | cosine_precision@1 | 0.8501 |
308
+ | cosine_precision@3 | 0.82 |
309
+ | cosine_precision@5 | 0.816 |
310
+ | cosine_precision@10 | 0.7958 |
311
+ | cosine_recall@1 | 0.0409 |
312
+ | cosine_recall@3 | 0.1183 |
313
+ | cosine_recall@5 | 0.1959 |
314
+ | cosine_recall@10 | 0.382 |
315
+ | **cosine_ndcg@10** | **0.806** |
316
+ | cosine_mrr@10 | 0.8915 |
317
+ | cosine_map@100 | 0.8046 |
318
+
319
+ <!--
320
+ ## Bias, Risks and Limitations
321
+
322
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
323
+ -->
324
+
325
+ <!--
326
+ ### Recommendations
327
+
328
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
329
+ -->
330
+
331
+ ## Training Details
332
+
333
+ ### Training Dataset
334
+
335
+ #### json
336
+
337
+ * Dataset: json
338
+ * Size: 6,066 training samples
339
+ * Columns: <code>anchor</code> and <code>positive</code>
340
+ * Approximate statistics based on the first 1000 samples:
341
+ | | anchor | positive |
342
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
343
+ | type | string | string |
344
+ | details | <ul><li>min: 4 tokens</li><li>mean: 15.22 tokens</li><li>max: 35 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.46 tokens</li><li>max: 48 tokens</li></ul> |
345
+ * Samples:
346
+ | anchor | positive |
347
+ |:-------------------------------------------------------------|:----------------------------------------------------------|
348
+ | <code>ZHONGSHAN CHINHAO MOLD HARDWARE COMPANY LIMITED</code> | <code>ZHONGSHAN CHINHAO MOLD HARDWARE CO., LTD.</code> |
349
+ | <code>Changshu Longte International Trade Co., Ltd</code> | <code>CHANGSHU LONGTE INTERNATIONAL TRADE CO., LTD</code> |
350
+ | <code>ACT CHEMICAL AND THERAPEUTIC LABORATORIES SARL</code> | <code>MEDICAL SUPPLIES PHARMACEUTICALS & EQUIPMENT</code> |
351
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
352
+ ```json
353
+ {
354
+ "loss": "MultipleNegativesRankingLoss",
355
+ "matryoshka_dims": [
356
+ 1024,
357
+ 768
358
+ ],
359
+ "matryoshka_weights": [
360
+ 1,
361
+ 1
362
+ ],
363
+ "n_dims_per_step": -1
364
+ }
365
+ ```
366
+
367
+ ### Training Hyperparameters
368
+ #### Non-Default Hyperparameters
369
+
370
+ - `eval_strategy`: epoch
371
+ - `gradient_accumulation_steps`: 8
372
+ - `learning_rate`: 2e-05
373
+ - `num_train_epochs`: 5
374
+ - `lr_scheduler_type`: cosine
375
+ - `warmup_ratio`: 0.1
376
+ - `bf16`: True
377
+ - `tf32`: False
378
+ - `load_best_model_at_end`: True
379
+ - `optim`: adamw_torch_fused
380
+ - `batch_sampler`: no_duplicates
381
+
382
+ #### All Hyperparameters
383
+ <details><summary>Click to expand</summary>
384
+
385
+ - `overwrite_output_dir`: False
386
+ - `do_predict`: False
387
+ - `eval_strategy`: epoch
388
+ - `prediction_loss_only`: True
389
+ - `per_device_train_batch_size`: 8
390
+ - `per_device_eval_batch_size`: 8
391
+ - `per_gpu_train_batch_size`: None
392
+ - `per_gpu_eval_batch_size`: None
393
+ - `gradient_accumulation_steps`: 8
394
+ - `eval_accumulation_steps`: None
395
+ - `torch_empty_cache_steps`: None
396
+ - `learning_rate`: 2e-05
397
+ - `weight_decay`: 0.0
398
+ - `adam_beta1`: 0.9
399
+ - `adam_beta2`: 0.999
400
+ - `adam_epsilon`: 1e-08
401
+ - `max_grad_norm`: 1.0
402
+ - `num_train_epochs`: 5
403
+ - `max_steps`: -1
404
+ - `lr_scheduler_type`: cosine
405
+ - `lr_scheduler_kwargs`: {}
406
+ - `warmup_ratio`: 0.1
407
+ - `warmup_steps`: 0
408
+ - `log_level`: passive
409
+ - `log_level_replica`: warning
410
+ - `log_on_each_node`: True
411
+ - `logging_nan_inf_filter`: True
412
+ - `save_safetensors`: True
413
+ - `save_on_each_node`: False
414
+ - `save_only_model`: False
415
+ - `restore_callback_states_from_checkpoint`: False
416
+ - `no_cuda`: False
417
+ - `use_cpu`: False
418
+ - `use_mps_device`: False
419
+ - `seed`: 42
420
+ - `data_seed`: None
421
+ - `jit_mode_eval`: False
422
+ - `use_ipex`: False
423
+ - `bf16`: True
424
+ - `fp16`: False
425
+ - `fp16_opt_level`: O1
426
+ - `half_precision_backend`: auto
427
+ - `bf16_full_eval`: False
428
+ - `fp16_full_eval`: False
429
+ - `tf32`: False
430
+ - `local_rank`: 0
431
+ - `ddp_backend`: None
432
+ - `tpu_num_cores`: None
433
+ - `tpu_metrics_debug`: False
434
+ - `debug`: []
435
+ - `dataloader_drop_last`: False
436
+ - `dataloader_num_workers`: 0
437
+ - `dataloader_prefetch_factor`: None
438
+ - `past_index`: -1
439
+ - `disable_tqdm`: False
440
+ - `remove_unused_columns`: True
441
+ - `label_names`: None
442
+ - `load_best_model_at_end`: True
443
+ - `ignore_data_skip`: False
444
+ - `fsdp`: []
445
+ - `fsdp_min_num_params`: 0
446
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
447
+ - `fsdp_transformer_layer_cls_to_wrap`: None
448
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
449
+ - `parallelism_config`: None
450
+ - `deepspeed`: None
451
+ - `label_smoothing_factor`: 0.0
452
+ - `optim`: adamw_torch_fused
453
+ - `optim_args`: None
454
+ - `adafactor`: False
455
+ - `group_by_length`: False
456
+ - `length_column_name`: length
457
+ - `ddp_find_unused_parameters`: None
458
+ - `ddp_bucket_cap_mb`: None
459
+ - `ddp_broadcast_buffers`: False
460
+ - `dataloader_pin_memory`: True
461
+ - `dataloader_persistent_workers`: False
462
+ - `skip_memory_metrics`: True
463
+ - `use_legacy_prediction_loop`: False
464
+ - `push_to_hub`: False
465
+ - `resume_from_checkpoint`: None
466
+ - `hub_model_id`: None
467
+ - `hub_strategy`: every_save
468
+ - `hub_private_repo`: None
469
+ - `hub_always_push`: False
470
+ - `hub_revision`: None
471
+ - `gradient_checkpointing`: False
472
+ - `gradient_checkpointing_kwargs`: None
473
+ - `include_inputs_for_metrics`: False
474
+ - `include_for_metrics`: []
475
+ - `eval_do_concat_batches`: True
476
+ - `fp16_backend`: auto
477
+ - `push_to_hub_model_id`: None
478
+ - `push_to_hub_organization`: None
479
+ - `mp_parameters`:
480
+ - `auto_find_batch_size`: False
481
+ - `full_determinism`: False
482
+ - `torchdynamo`: None
483
+ - `ray_scope`: last
484
+ - `ddp_timeout`: 1800
485
+ - `torch_compile`: False
486
+ - `torch_compile_backend`: None
487
+ - `torch_compile_mode`: None
488
+ - `include_tokens_per_second`: False
489
+ - `include_num_input_tokens_seen`: False
490
+ - `neftune_noise_alpha`: None
491
+ - `optim_target_modules`: None
492
+ - `batch_eval_metrics`: False
493
+ - `eval_on_start`: False
494
+ - `use_liger_kernel`: False
495
+ - `liger_kernel_config`: None
496
+ - `eval_use_gather_object`: False
497
+ - `average_tokens_across_devices`: False
498
+ - `prompts`: None
499
+ - `batch_sampler`: no_duplicates
500
+ - `multi_dataset_batch_sampler`: proportional
501
+ - `router_mapping`: {}
502
+ - `learning_rate_mapping`: {}
503
+
504
+ </details>
505
+
506
+ ### Training Logs
507
+ | Epoch | Step | Training Loss | dim_1024_cosine_ndcg@10 | dim_768_cosine_ndcg@10 |
508
+ |:-------:|:-------:|:-------------:|:-----------------------:|:----------------------:|
509
+ | 0.1054 | 10 | 0.4225 | - | - |
510
+ | 0.2108 | 20 | 0.2415 | - | - |
511
+ | 0.3162 | 30 | 0.1252 | - | - |
512
+ | 0.4216 | 40 | 0.0765 | - | - |
513
+ | 0.5270 | 50 | 0.0573 | - | - |
514
+ | 0.6324 | 60 | 0.0345 | - | - |
515
+ | 0.7378 | 70 | 0.0448 | - | - |
516
+ | 0.8432 | 80 | 0.0355 | - | - |
517
+ | 0.9486 | 90 | 0.0996 | - | - |
518
+ | 1.0 | 95 | - | 0.7994 | 0.7994 |
519
+ | 1.0527 | 100 | 0.0194 | - | - |
520
+ | 1.1581 | 110 | 0.0418 | - | - |
521
+ | 1.2635 | 120 | 0.0339 | - | - |
522
+ | 1.3689 | 130 | 0.0427 | - | - |
523
+ | 1.4743 | 140 | 0.0339 | - | - |
524
+ | 1.5797 | 150 | 0.0333 | - | - |
525
+ | 1.6851 | 160 | 0.0396 | - | - |
526
+ | 1.7905 | 170 | 0.0877 | - | - |
527
+ | 1.8959 | 180 | 0.0608 | - | - |
528
+ | 2.0 | 190 | 0.0352 | 0.8037 | 0.8031 |
529
+ | 2.1054 | 200 | 0.023 | - | - |
530
+ | 2.2108 | 210 | 0.0638 | - | - |
531
+ | 2.3162 | 220 | 0.0401 | - | - |
532
+ | 2.4216 | 230 | 0.0274 | - | - |
533
+ | 2.5270 | 240 | 0.0405 | - | - |
534
+ | 2.6324 | 250 | 0.0305 | - | - |
535
+ | 2.7378 | 260 | 0.0414 | - | - |
536
+ | 2.8432 | 270 | 0.0178 | - | - |
537
+ | 2.9486 | 280 | 0.0535 | - | - |
538
+ | 3.0 | 285 | - | 0.8008 | 0.8012 |
539
+ | 3.0527 | 290 | 0.0629 | - | - |
540
+ | 3.1581 | 300 | 0.0283 | - | - |
541
+ | 3.2635 | 310 | 0.0567 | - | - |
542
+ | 3.3689 | 320 | 0.0167 | - | - |
543
+ | 3.4743 | 330 | 0.0349 | - | - |
544
+ | 3.5797 | 340 | 0.053 | - | - |
545
+ | 3.6851 | 350 | 0.0517 | - | - |
546
+ | 3.7905 | 360 | 0.0603 | - | - |
547
+ | 3.8959 | 370 | 0.0323 | - | - |
548
+ | 4.0 | 380 | 0.0229 | 0.8042 | 0.8055 |
549
+ | 4.1054 | 390 | 0.0476 | - | - |
550
+ | 4.2108 | 400 | 0.06 | - | - |
551
+ | 4.3162 | 410 | 0.0412 | - | - |
552
+ | 4.4216 | 420 | 0.0553 | - | - |
553
+ | 4.5270 | 430 | 0.0446 | - | - |
554
+ | 4.6324 | 440 | 0.016 | - | - |
555
+ | 4.7378 | 450 | 0.0302 | - | - |
556
+ | 4.8432 | 460 | 0.0223 | - | - |
557
+ | 4.9486 | 470 | 0.0649 | - | - |
558
+ | **5.0** | **475** | **-** | **0.8056** | **0.806** |
559
+
560
+ * The bold row denotes the saved checkpoint.
561
+
562
+ ### Framework Versions
563
+ - Python: 3.11.13
564
+ - Sentence Transformers: 5.1.0
565
+ - Transformers: 4.56.1
566
+ - PyTorch: 2.6.0+cu124
567
+ - Accelerate: 1.8.1
568
+ - Datasets: 3.6.0
569
+ - Tokenizers: 0.22.0
570
+
571
+ ## Citation
572
+
573
+ ### BibTeX
574
+
575
+ #### Sentence Transformers
576
+ ```bibtex
577
+ @inproceedings{reimers-2019-sentence-bert,
578
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
579
+ author = "Reimers, Nils and Gurevych, Iryna",
580
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
581
+ month = "11",
582
+ year = "2019",
583
+ publisher = "Association for Computational Linguistics",
584
+ url = "https://arxiv.org/abs/1908.10084",
585
+ }
586
+ ```
587
+
588
+ #### MatryoshkaLoss
589
+ ```bibtex
590
+ @misc{kusupati2024matryoshka,
591
+ title={Matryoshka Representation Learning},
592
+ author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
593
+ year={2024},
594
+ eprint={2205.13147},
595
+ archivePrefix={arXiv},
596
+ primaryClass={cs.LG}
597
+ }
598
+ ```
599
+
600
+ #### MultipleNegativesRankingLoss
601
+ ```bibtex
602
+ @misc{henderson2017efficient,
603
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
604
+ 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},
605
+ year={2017},
606
+ eprint={1705.00652},
607
+ archivePrefix={arXiv},
608
+ primaryClass={cs.CL}
609
+ }
610
+ ```
611
+
612
+ <!--
613
+ ## Glossary
614
+
615
+ *Clearly define terms in order to be accessible across audiences.*
616
+ -->
617
+
618
+ <!--
619
+ ## Model Card Authors
620
+
621
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
622
+ -->
623
+
624
+ <!--
625
+ ## Model Card Contact
626
+
627
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
628
+ -->
config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "XLMRobertaModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "classifier_dropout": null,
8
+ "dtype": "float32",
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 8194,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "transformers_version": "4.56.1",
24
+ "type_vocab_size": 1,
25
+ "use_cache": true,
26
+ "vocab_size": 250002
27
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.0",
4
+ "transformers": "4.56.1",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {
8
+ "query": "",
9
+ "document": ""
10
+ },
11
+ "default_prompt_name": null,
12
+ "similarity_fn_name": "cosine",
13
+ "model_type": "SentenceTransformer"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1e0c03a836c0d6dbcae499e84979940eb3e86a092174782ed56c5fad8a6fe37
3
+ size 2271064456
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
3
+ "do_lower_case": false
4
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
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:222975faa02f5257c6e8c734e85973e48c8d42d7d37d90b894c73efa1841d76a
3
+ size 17083154
tokenizer_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "eos_token": "</s>",
48
+ "extra_special_tokens": {},
49
+ "mask_token": "<mask>",
50
+ "max_length": 8192,
51
+ "model_max_length": 8192,
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
+ "sp_model_kwargs": {},
58
+ "stride": 0,
59
+ "tokenizer_class": "XLMRobertaTokenizer",
60
+ "truncation_side": "right",
61
+ "truncation_strategy": "longest_first",
62
+ "unk_token": "<unk>"
63
+ }