blazed-05 commited on
Commit
9ccf005
·
verified ·
1 Parent(s): 6d4fcb7

Upload fine-tuned E5 model for Algerian Darija retrieval

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,5 @@
 
 
 
 
 
 
1
+ {
2
+ "embedding_dimension": 1024,
3
+ "pooling_mode": "mean",
4
+ "include_prompt": true
5
+ }
README.md ADDED
@@ -0,0 +1,512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:38376
9
+ - loss:CachedMultipleNegativesRankingLoss
10
+ - loss:MultipleNegativesRankingLoss
11
+ base_model: intfloat/multilingual-e5-large
12
+ widget:
13
+ - source_sentence: 'query: تقولي 60 نقاش، أنا نقول كل واحد يقدر يدي 20 دقيقة ولا حتى
14
+ ساعة، كيما تحب. غير كملها، راها صايي خلصت، هذا ما كان.'
15
+ sentences:
16
+ - 'query: You seem heartless, by the way. It''s not like what you think.'
17
+ - 'query: No, no, this is amazing.'
18
+ - 'query: You tell me 60 discussions, I say each one could take 20 minutes or even
19
+ an hour, it''s up to you. Just finish it, it''s already done, that''s enough.'
20
+ - source_sentence: 'query: لا لا لا، قلبي راي وجعني، قلبي راي يحرقني. بصراحة، راني
21
+ غايظة روحي. راح يتزوج وحدة أخرى هي اللي تربيهم وتزيد تربيني معاهم، وتاخد ولادي
22
+ وتعطيهم لوحدة أخرى.'
23
+ sentences:
24
+ - 'query: No, no, no, my heart hurts, my heart is aching. Honestly, I feel sorry
25
+ for myself. He''ll marry another woman who will raise them and even raise me with
26
+ them, and she''ll take my kids and give them to another woman.'
27
+ - 'query: Come on Shawkat, tell Aunt Dalia ''nighty nighty nighty.'' Shawkat, come
28
+ on, stop being grumpy, come here, I brought you food.'
29
+ - 'query: Lake'
30
+ - source_sentence: 'query: حكاية خيالية هذي تاع العباد لي ما يحلموش.'
31
+ sentences:
32
+ - 'query: He told me, ''You fold it.'''
33
+ - 'query: You light up the screen, precious lady. It''s lit up because of you and
34
+ your beautiful sweet voice. May God protect you, and may we always see you. Thank
35
+ you, thank you. Do you gossip about your neighbors or not?'
36
+ - 'query: It''s a myth about people who don''t dream.'
37
+ - source_sentence: 'query: الموسم الجاي، شباب بلوزداد راح يكملو التعاقد مع اللاعب
38
+ تاعكم الواعر. عقلت عليه؟ هذاك اللي غلب اتحاد العاصمة في روما، وراح لبرشلونة، ودار
39
+ هذاك الفيلم؟ دروك راه متألق مع زينة، مسجل كثر من ثلاثين مساهمة في الأهداف ست مرات.'
40
+ sentences:
41
+ - 'query: Next season, CRB will complete the signing of your outstanding player.
42
+ Remember him? The one who smashed USMA in Rome, went to Barcelona, and did that
43
+ movie? Now he’s shining with Zeina, recording over thirty goal contributions six
44
+ times.'
45
+ - 'query: Just take out the stuff.'
46
+ - 'query: So, what''s all this commotion and fighting about? In the end, you removed
47
+ him during the fasting hours.'
48
+ - source_sentence: 'query: هادشي كاع صار في الماتش بين المغرب وألمانيا.'
49
+ sentences:
50
+ - 'query: Let me finish the session with Abeer and then I''ll call you to explain
51
+ the matter to me properly.'
52
+ - 'query: It was all in the Morocco vs Germany match.'
53
+ - 'query: Don''t worry, I will marry him, live a beautiful life, and we will be
54
+ happy, God willing.'
55
+ pipeline_tag: sentence-similarity
56
+ library_name: sentence-transformers
57
+ metrics:
58
+ - src2trg_accuracy
59
+ - trg2src_accuracy
60
+ - mean_accuracy
61
+ model-index:
62
+ - name: SentenceTransformer based on intfloat/multilingual-e5-large
63
+ results:
64
+ - task:
65
+ type: translation
66
+ name: Translation
67
+ dataset:
68
+ name: dev
69
+ type: dev
70
+ metrics:
71
+ - type: src2trg_accuracy
72
+ value: 0.9938962360122076
73
+ name: Src2Trg Accuracy
74
+ - type: trg2src_accuracy
75
+ value: 0.9959308240081384
76
+ name: Trg2Src Accuracy
77
+ - type: mean_accuracy
78
+ value: 0.994913530010173
79
+ name: Mean Accuracy
80
+ ---
81
+
82
+ # SentenceTransformer based on intfloat/multilingual-e5-large
83
+
84
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
85
+
86
+ ## Model Details
87
+
88
+ ### Model Description
89
+ - **Model Type:** Sentence Transformer
90
+ - **Base model:** [intfloat/multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) <!-- at revision 3d7cfbdacd47fdda877c5cd8a79fbcc4f2a574f3 -->
91
+ - **Maximum Sequence Length:** 128 tokens
92
+ - **Output Dimensionality:** 1024 dimensions
93
+ - **Similarity Function:** Cosine Similarity
94
+ - **Supported Modality:** Text
95
+ <!-- - **Training Dataset:** Unknown -->
96
+ <!-- - **Language:** Unknown -->
97
+ <!-- - **License:** Unknown -->
98
+
99
+ ### Model Sources
100
+
101
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
102
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
103
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
104
+
105
+ ### Full Model Architecture
106
+
107
+ ```
108
+ SentenceTransformer(
109
+ (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'XLMRobertaModel'})
110
+ (1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'mean', 'include_prompt': True})
111
+ (2): Normalize({})
112
+ )
113
+ ```
114
+
115
+ ## Usage
116
+
117
+ ### Direct Usage (Sentence Transformers)
118
+
119
+ First install the Sentence Transformers library:
120
+
121
+ ```bash
122
+ pip install -U sentence-transformers
123
+ ```
124
+ Then you can load this model and run inference.
125
+ ```python
126
+ from sentence_transformers import SentenceTransformer
127
+
128
+ # Download from the 🤗 Hub
129
+ model = SentenceTransformer("blazed-05/Fixar-Embedding")
130
+ # Run inference
131
+ sentences = [
132
+ 'query: هادشي كاع صار في الماتش بين المغرب وألمانيا.',
133
+ 'query: It was all in the Morocco vs Germany match.',
134
+ "query: Don't worry, I will marry him, live a beautiful life, and we will be happy, God willing.",
135
+ ]
136
+ embeddings = model.encode(sentences)
137
+ print(embeddings.shape)
138
+ # [3, 1024]
139
+
140
+ # Get the similarity scores for the embeddings
141
+ similarities = model.similarity(embeddings, embeddings)
142
+ print(similarities)
143
+ # tensor([[1.0000, 0.7384, 0.0340],
144
+ # [0.7384, 1.0000, 0.0877],
145
+ # [0.0340, 0.0877, 1.0000]])
146
+ ```
147
+ <!--
148
+ ### Direct Usage (Transformers)
149
+
150
+ <details><summary>Click to see the direct usage in Transformers</summary>
151
+
152
+ </details>
153
+ -->
154
+
155
+ <!--
156
+ ### Downstream Usage (Sentence Transformers)
157
+
158
+ You can finetune this model on your own dataset.
159
+
160
+ <details><summary>Click to expand</summary>
161
+
162
+ </details>
163
+ -->
164
+
165
+ <!--
166
+ ### Out-of-Scope Use
167
+
168
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
169
+ -->
170
+
171
+ ## Evaluation
172
+
173
+ ### Metrics
174
+
175
+ #### Translation
176
+
177
+ * Dataset: `dev`
178
+ * Evaluated with [<code>TranslationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.sentence_transformer.evaluation.TranslationEvaluator)
179
+
180
+ | Metric | Value |
181
+ |:------------------|:-----------|
182
+ | src2trg_accuracy | 0.9939 |
183
+ | trg2src_accuracy | 0.9959 |
184
+ | **mean_accuracy** | **0.9949** |
185
+
186
+ <!--
187
+ ## Bias, Risks and Limitations
188
+
189
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
190
+ -->
191
+
192
+ <!--
193
+ ### Recommendations
194
+
195
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
196
+ -->
197
+
198
+ ## Training Details
199
+
200
+ ### Training Dataset
201
+
202
+ #### Unnamed Dataset
203
+
204
+ * Size: 38,376 training samples
205
+ * Columns: <code>anchor</code> and <code>positive</code>
206
+ * Approximate statistics based on the first 100 samples:
207
+ | | anchor | positive |
208
+ |:---------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
209
+ | type | string | string |
210
+ | modality | text | text |
211
+ | details | <ul><li>min: 6 tokens</li><li>mean: 28.82 tokens</li><li>max: 93 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 26.72 tokens</li><li>max: 90 tokens</li></ul> |
212
+ * Samples:
213
+ | anchor | positive |
214
+ |:--------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------|
215
+ | <code>query: علاش ما راكش حاب تآمن بلي نحبك صح؟ ما بقيتش نقدر نعيش بلا بيك. علاش ما راكش مآمني؟ علاش ما حابش تآمن؟</code> | <code>query: Why don't you want to believe that I truly love you? I can't live without you anymore. Why don't you believe me? Why won't you believe?</code> |
216
+ | <code>query: الكاجو صح كاين منه؟</code> | <code>query: Is cashew real?</code> |
217
+ | <code>query: راني نقولك، شوف، راني نقرا في الجامعة هنايا. دخلت لانفورماتيك، معنتها راني قافز ونقرا بزاف.</code> | <code>query: I'm telling you, look, I'm studying at university here. I got into Computer Science, which means I'm smart and I study hard.</code> |
218
+ * Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
219
+ ```json
220
+ {
221
+ "scale": 50.0,
222
+ "similarity_fct": "cos_sim",
223
+ "mini_batch_size": 32,
224
+ "mini_batch_num_tokens": null,
225
+ "gather_across_devices": false,
226
+ "directions": [
227
+ "query_to_doc",
228
+ "doc_to_query"
229
+ ],
230
+ "partition_mode": "per_direction",
231
+ "hardness_mode": null,
232
+ "hardness_strength": 0.0
233
+ }
234
+ ```
235
+
236
+ ### Evaluation Dataset
237
+
238
+ #### Unnamed Dataset
239
+
240
+ * Size: 983 evaluation samples
241
+ * Columns: <code>anchor</code> and <code>positive</code>
242
+ * Approximate statistics based on the first 100 samples:
243
+ | | anchor | positive |
244
+ |:---------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
245
+ | type | string | string |
246
+ | modality | text | text |
247
+ | details | <ul><li>min: 8 tokens</li><li>mean: 29.47 tokens</li><li>max: 86 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 27.2 tokens</li><li>max: 76 tokens</li></ul> |
248
+ * Samples:
249
+ | anchor | positive |
250
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
251
+ | <code>query: يعطيك الصحة بزاف، الماكلة تاعكم هايلة، والهضرة تاعك على واجهة دزاير البحرية في الحلقات اللي فاتو، وبالخصوص كي رحنا نديرو دورة قدام المرسى، كانت حلقة بزاف شبابة.</code> | <code>query: Thank you so much, your food is amazing, and your talk about the Algiers waterfront in the previous episodes, especially when we went for a walk by the bay, was a really beautiful episode.</code> |
252
+ | <code>query: بصراحة، في البداية بدينا بسنيوة بطاطا بالدجاج، روز، وملوخية. لقينا بلي كاين طلب، ايه، ومن نهار لنهار بقاو نزيدو حوايج واحد خرين، نزيدو الماكلة.</code> | <code>query: Honestly, we first started with a tray of potatoes with chicken, rice, and molokhia. We found that there was demand, yes, and day after day we kept adding more things, adding more food.</code> |
253
+ | <code>query: الاولى، ما قطعتهاش من التحت في النهاية. جيبها لهنا، والله العظيم غير نقبضها. هاهنا، المورصو تاعك كبير بزاف.</code> | <code>query: First, you didn't cut it from the bottom at the end. Bring it here, I swear to God I'll flip it. Here, your piece is way too big.</code> |
254
+ * Loss: [<code>CachedMultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cachedmultiplenegativesrankingloss) with these parameters:
255
+ ```json
256
+ {
257
+ "scale": 50.0,
258
+ "similarity_fct": "cos_sim",
259
+ "mini_batch_size": 32,
260
+ "mini_batch_num_tokens": null,
261
+ "gather_across_devices": false,
262
+ "directions": [
263
+ "query_to_doc",
264
+ "doc_to_query"
265
+ ],
266
+ "partition_mode": "per_direction",
267
+ "hardness_mode": null,
268
+ "hardness_strength": 0.0
269
+ }
270
+ ```
271
+
272
+ ### Training Hyperparameters
273
+ #### Non-Default Hyperparameters
274
+
275
+ - `per_device_train_batch_size`: 128
276
+ - `learning_rate`: 1e-05
277
+ - `warmup_steps`: 0.1
278
+ - `weight_decay`: 0.01
279
+ - `fp16`: True
280
+ - `per_device_eval_batch_size`: 128
281
+ - `data_seed`: 42
282
+ - `batch_sampler`: no_duplicates
283
+
284
+ #### All Hyperparameters
285
+ <details><summary>Click to expand</summary>
286
+
287
+ - `per_device_train_batch_size`: 128
288
+ - `num_train_epochs`: 3
289
+ - `max_steps`: -1
290
+ - `learning_rate`: 1e-05
291
+ - `lr_scheduler_type`: linear
292
+ - `lr_scheduler_kwargs`: None
293
+ - `warmup_steps`: 0.1
294
+ - `optim`: adamw_torch_fused
295
+ - `optim_args`: None
296
+ - `weight_decay`: 0.01
297
+ - `adam_beta1`: 0.9
298
+ - `adam_beta2`: 0.999
299
+ - `adam_epsilon`: 1e-08
300
+ - `optim_target_modules`: None
301
+ - `gradient_accumulation_steps`: 1
302
+ - `average_tokens_across_devices`: True
303
+ - `max_grad_norm`: 1.0
304
+ - `label_smoothing_factor`: 0.0
305
+ - `bf16`: False
306
+ - `fp16`: True
307
+ - `bf16_full_eval`: False
308
+ - `fp16_full_eval`: False
309
+ - `tf32`: None
310
+ - `gradient_checkpointing`: False
311
+ - `gradient_checkpointing_kwargs`: None
312
+ - `torch_compile`: False
313
+ - `torch_compile_backend`: None
314
+ - `torch_compile_mode`: None
315
+ - `use_liger_kernel`: False
316
+ - `liger_kernel_config`: None
317
+ - `use_cache`: False
318
+ - `neftune_noise_alpha`: None
319
+ - `torch_empty_cache_steps`: None
320
+ - `auto_find_batch_size`: False
321
+ - `log_on_each_node`: True
322
+ - `logging_nan_inf_filter`: True
323
+ - `include_num_input_tokens_seen`: no
324
+ - `log_level`: passive
325
+ - `log_level_replica`: warning
326
+ - `disable_tqdm`: False
327
+ - `project`: huggingface
328
+ - `trackio_space_id`: None
329
+ - `trackio_bucket_id`: None
330
+ - `trackio_static_space_id`: None
331
+ - `per_device_eval_batch_size`: 128
332
+ - `prediction_loss_only`: True
333
+ - `eval_on_start`: False
334
+ - `eval_do_concat_batches`: True
335
+ - `eval_use_gather_object`: False
336
+ - `eval_accumulation_steps`: None
337
+ - `include_for_metrics`: []
338
+ - `batch_eval_metrics`: False
339
+ - `save_only_model`: False
340
+ - `save_on_each_node`: False
341
+ - `enable_jit_checkpoint`: False
342
+ - `push_to_hub`: False
343
+ - `hub_private_repo`: None
344
+ - `hub_model_id`: None
345
+ - `hub_strategy`: every_save
346
+ - `hub_always_push`: False
347
+ - `hub_revision`: None
348
+ - `load_best_model_at_end`: False
349
+ - `ignore_data_skip`: False
350
+ - `restore_callback_states_from_checkpoint`: False
351
+ - `full_determinism`: False
352
+ - `seed`: 42
353
+ - `data_seed`: 42
354
+ - `use_cpu`: False
355
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
356
+ - `parallelism_config`: None
357
+ - `dataloader_drop_last`: False
358
+ - `dataloader_num_workers`: 0
359
+ - `dataloader_pin_memory`: True
360
+ - `dataloader_persistent_workers`: False
361
+ - `dataloader_prefetch_factor`: None
362
+ - `dataloader_multiprocessing_context`: None
363
+ - `dataloader_in_order`: True
364
+ - `remove_unused_columns`: True
365
+ - `label_names`: None
366
+ - `train_sampling_strategy`: random
367
+ - `length_column_name`: length
368
+ - `ddp_find_unused_parameters`: None
369
+ - `ddp_bucket_cap_mb`: None
370
+ - `ddp_broadcast_buffers`: False
371
+ - `ddp_static_graph`: None
372
+ - `ddp_backend`: None
373
+ - `ddp_timeout`: 1800
374
+ - `fsdp`: None
375
+ - `fsdp_config`: None
376
+ - `deepspeed`: None
377
+ - `debug`: []
378
+ - `skip_memory_metrics`: True
379
+ - `do_predict`: False
380
+ - `resume_from_checkpoint`: None
381
+ - `local_rank`: -1
382
+ - `prompts`: None
383
+ - `batch_sampler`: no_duplicates
384
+ - `multi_dataset_batch_sampler`: proportional
385
+ - `router_mapping`: {}
386
+ - `learning_rate_mapping`: {}
387
+ - `warmup_ratio`: None
388
+
389
+ </details>
390
+
391
+ ### Training Logs
392
+ | Epoch | Step | Training Loss | Validation Loss | dev_mean_accuracy |
393
+ |:------:|:----:|:-------------:|:---------------:|:-----------------:|
394
+ | -1 | -1 | - | - | 0.8850 |
395
+ | 0.0833 | 25 | 1.0043 | - | - |
396
+ | 0.1667 | 50 | 0.1348 | - | - |
397
+ | 0.25 | 75 | 0.0493 | - | - |
398
+ | 0.3333 | 100 | 0.0310 | 0.0107 | 0.9908 |
399
+ | 0.4167 | 125 | 0.0207 | - | - |
400
+ | 0.5 | 150 | 0.0178 | - | - |
401
+ | 0.5833 | 175 | 0.0170 | - | - |
402
+ | 0.6667 | 200 | 0.0172 | 0.0058 | 0.9919 |
403
+ | 0.75 | 225 | 0.0193 | - | - |
404
+ | 0.8333 | 250 | 0.0160 | - | - |
405
+ | 0.9167 | 275 | 0.0149 | - | - |
406
+ | 1.0 | 300 | 0.0191 | 0.0048 | 0.9924 |
407
+ | 1.0833 | 325 | 0.0067 | - | - |
408
+ | 1.1667 | 350 | 0.0069 | - | - |
409
+ | 1.25 | 375 | 0.0056 | - | - |
410
+ | 1.3333 | 400 | 0.0062 | 0.0081 | 0.9929 |
411
+ | 1.4167 | 425 | 0.0125 | - | - |
412
+ | 1.5 | 450 | 0.0040 | - | - |
413
+ | 1.5833 | 475 | 0.0060 | - | - |
414
+ | 1.6667 | 500 | 0.0085 | 0.0056 | 0.9924 |
415
+ | 1.75 | 525 | 0.0074 | - | - |
416
+ | 1.8333 | 550 | 0.0062 | - | - |
417
+ | 1.9167 | 575 | 0.0069 | - | - |
418
+ | 2.0 | 600 | 0.0071 | 0.0051 | 0.9944 |
419
+ | 2.0833 | 625 | 0.0044 | - | - |
420
+ | 2.1667 | 650 | 0.0021 | - | - |
421
+ | 2.25 | 675 | 0.0059 | - | - |
422
+ | 2.3333 | 700 | 0.0017 | 0.0058 | 0.9939 |
423
+ | 2.4167 | 725 | 0.0029 | - | - |
424
+ | 2.5 | 750 | 0.0022 | - | - |
425
+ | 2.5833 | 775 | 0.0044 | - | - |
426
+ | 2.6667 | 800 | 0.0036 | 0.0056 | 0.9939 |
427
+ | 2.75 | 825 | 0.0017 | - | - |
428
+ | 2.8333 | 850 | 0.0028 | - | - |
429
+ | 2.9167 | 875 | 0.0023 | - | - |
430
+ | 3.0 | 900 | 0.0043 | 0.0054 | 0.9949 |
431
+ | -1 | -1 | - | - | 0.9949 |
432
+
433
+
434
+ ### Training Time
435
+ - **Training**: 2.2 hours
436
+
437
+ ### Framework Versions
438
+ - Python: 3.13.15
439
+ - Sentence Transformers: 5.7.0
440
+ - Transformers: 5.16.1
441
+ - PyTorch: 2.11.0+cu128
442
+ - Accelerate: 1.14.0
443
+ - Datasets: 4.8.5
444
+ - Tokenizers: 0.23.1
445
+
446
+ ## Additional Resources
447
+
448
+ - [Training and Finetuning Embedding Models with Sentence Transformers](https://huggingface.co/blog/train-sentence-transformers): the end-to-end guide for training or finetuning Sentence Transformer models.
449
+ - [Introduction to Matryoshka Embedding Models](https://huggingface.co/blog/matryoshka): variable-size embeddings that can be truncated with minimal quality loss.
450
+ - [Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval](https://huggingface.co/blog/embedding-quantization): post-training compression of embedding vectors.
451
+ - [Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/multimodal-sentence-transformers): use text, image, audio, and video models through the same API.
452
+ - [Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/train-multimodal-sentence-transformers): train multimodal embedding models, with a Visual Document Retrieval walkthrough.
453
+
454
+ ## Citation
455
+
456
+ ### BibTeX
457
+
458
+ #### Sentence Transformers
459
+ ```bibtex
460
+ @inproceedings{reimers-2019-sentence-bert,
461
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
462
+ author = "Reimers, Nils and Gurevych, Iryna",
463
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
464
+ month = "11",
465
+ year = "2019",
466
+ publisher = "Association for Computational Linguistics",
467
+ url = "https://arxiv.org/abs/1908.10084",
468
+ }
469
+ ```
470
+
471
+ #### CachedMultipleNegativesRankingLoss
472
+ ```bibtex
473
+ @misc{gao2021scaling,
474
+ title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
475
+ author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
476
+ year={2021},
477
+ eprint={2101.06983},
478
+ archivePrefix={arXiv},
479
+ primaryClass={cs.LG}
480
+ }
481
+ ```
482
+
483
+ #### MultipleNegativesRankingLoss
484
+ ```bibtex
485
+ @misc{günther2024jinaembeddings28192token,
486
+ title={Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documents},
487
+ author={Michael Günther and Jackmin Ong and Isabelle Mohr and Alaeddine Abdessalem and Tanguy Abel and Mohammad Kalim Akram and Susana Guzman and Georgios Mastrapas and Saba Sturua and Bo Wang and Maximilian Werk and Nan Wang and Han Xiao},
488
+ year={2024},
489
+ eprint={2310.19923},
490
+ archivePrefix={arXiv},
491
+ primaryClass={cs.CL},
492
+ url={https://arxiv.org/abs/2310.19923},
493
+ }
494
+ ```
495
+
496
+ <!--
497
+ ## Glossary
498
+
499
+ *Clearly define terms in order to be accessible across audiences.*
500
+ -->
501
+
502
+ <!--
503
+ ## Model Card Authors
504
+
505
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
506
+ -->
507
+
508
+ <!--
509
+ ## Model Card Contact
510
+
511
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
512
+ -->
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 1024,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 4096,
16
+ "is_decoder": false,
17
+ "layer_norm_eps": 1e-05,
18
+ "max_position_embeddings": 514,
19
+ "model_type": "xlm-roberta",
20
+ "num_attention_heads": 16,
21
+ "num_hidden_layers": 24,
22
+ "output_past": true,
23
+ "pad_token_id": 1,
24
+ "position_embedding_type": "absolute",
25
+ "tie_word_embeddings": true,
26
+ "transformers_version": "5.16.1",
27
+ "type_vocab_size": 1,
28
+ "use_cache": false,
29
+ "vocab_size": 250002
30
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "pytorch": "2.11.0+cu128",
4
+ "sentence_transformers": "5.7.0",
5
+ "transformers": "5.16.1"
6
+ },
7
+ "default_prompt_name": null,
8
+ "model_type": "SentenceTransformer",
9
+ "prompts": {
10
+ "document": "",
11
+ "query": ""
12
+ },
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f47bb918365f35d50e2fa2c9c2de6da6aa5df0674187881d43911338739a2d2
3
+ size 2239607176
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.base.modules.transformer.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.sentence_transformer.modules.normalize.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "transformer_task": "feature-extraction",
3
+ "modality_config": {
4
+ "text": {
5
+ "method": "forward",
6
+ "method_output_name": "last_hidden_state"
7
+ }
8
+ },
9
+ "module_output_name": "token_embeddings"
10
+ }
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,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "clean_up_tokenization_spaces": true,
6
+ "cls_token": "<s>",
7
+ "eos_token": "</s>",
8
+ "is_local": false,
9
+ "local_files_only": false,
10
+ "mask_token": "<mask>",
11
+ "model_max_length": 128,
12
+ "pad_token": "<pad>",
13
+ "sep_token": "</s>",
14
+ "tokenizer_class": "XLMRobertaTokenizer",
15
+ "unk_token": "<unk>"
16
+ }