leafxyz commited on
Commit
8d11ce2
·
verified ·
1 Parent(s): c72bbd4

Upload trained Bi-Encoder model & tokenizer at Step 500

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": "lasttoken",
4
+ "include_prompt": true
5
+ }
README.md ADDED
@@ -0,0 +1,496 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:49500
8
+ - loss:MultipleNegativesRankingLoss
9
+ base_model: prestoai/qwen3-embedding-0.6b-arabic-ecom
10
+ widget:
11
+ - source_sentence: 'Instruct: Given an Arabic e-commerce search query, retrieve the
12
+ product that best matches it
13
+
14
+ Query: عناية بالفم'
15
+ sentences:
16
+ - تن ريقا بزيت الزيتون 160جم
17
+ - Foramen Denture Clean Box
18
+ - صبغة شعر L'Oréal Paris - 5.45 Excellence
19
+ - source_sentence: 'Instruct: Given an Arabic e-commerce search query, retrieve the
20
+ product that best matches it
21
+
22
+ Query: بسكويت شوكولاتة بالحليب'
23
+ sentences:
24
+ - بسكويت - Bahlsen
25
+ - حقيبة هدايا - RA040
26
+ - Cicabio Arnica+ - Bioderma
27
+ - source_sentence: 'Instruct: Given an Arabic e-commerce search query, retrieve the
28
+ product that best matches it
29
+
30
+ Query: بيتر صودا'
31
+ sentences:
32
+ - ميرندا صودا
33
+ - زبدة فول السوداني حدائق كاليفورنيا ناعمه - 510 غ
34
+ - مشروب بيتر صودا - ميرندا
35
+ - source_sentence: 'Instruct: Given an Arabic e-commerce search query, retrieve the
36
+ product that best matches it
37
+
38
+ Query: شيجلام بودرة'
39
+ sentences:
40
+ - بودرة SHEGLAM - High Coverage Linen
41
+ - برايمر فائق الترطيب - SHEGLAM
42
+ - سباتلة حجم صغير تريبولي سنتر
43
+ - source_sentence: 'Instruct: Given an Arabic e-commerce search query, retrieve the
44
+ product that best matches it
45
+
46
+ Query: عطور نسائية'
47
+ sentences:
48
+ - تن الوفاء سكيب جاك بالزيت الزيتون - 160 غ
49
+ - مجموعة عطر نسائي - ابراهيم القرشي سكر
50
+ - قبعة رجالية - 07
51
+ pipeline_tag: sentence-similarity
52
+ library_name: sentence-transformers
53
+ ---
54
+
55
+ # SentenceTransformer based on prestoai/qwen3-embedding-0.6b-arabic-ecom
56
+
57
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [prestoai/qwen3-embedding-0.6b-arabic-ecom](https://huggingface.co/prestoai/qwen3-embedding-0.6b-arabic-ecom) on the pairs_with_negatives and positives datasets. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for retrieval.
58
+
59
+ ## Model Details
60
+
61
+ ### Model Description
62
+ - **Model Type:** Sentence Transformer
63
+ - **Base model:** [prestoai/qwen3-embedding-0.6b-arabic-ecom](https://huggingface.co/prestoai/qwen3-embedding-0.6b-arabic-ecom) <!-- at revision 80f273fd53c6644d65e14a2ac1fbf74b8c924097 -->
64
+ - **Maximum Sequence Length:** 128 tokens
65
+ - **Output Dimensionality:** 1024 dimensions
66
+ - **Similarity Function:** Cosine Similarity
67
+ - **Supported Modality:** Text
68
+ - **Training Datasets:**
69
+ - pairs_with_negatives
70
+ - positives
71
+ <!-- - **Language:** Unknown -->
72
+ <!-- - **License:** Unknown -->
73
+
74
+ ### Model Sources
75
+
76
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
77
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
78
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
79
+
80
+ ### Full Model Architecture
81
+
82
+ ```
83
+ SentenceTransformer(
84
+ (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'Qwen3Model'})
85
+ (1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'lasttoken', 'include_prompt': True})
86
+ (2): Normalize({})
87
+ )
88
+ ```
89
+
90
+ ## Usage
91
+
92
+ ### Direct Usage (Sentence Transformers)
93
+
94
+ First install the Sentence Transformers library:
95
+
96
+ ```bash
97
+ pip install -U sentence-transformers
98
+ ```
99
+ Then you can load this model and run inference.
100
+ ```python
101
+ from sentence_transformers import SentenceTransformer
102
+
103
+ # Download from the 🤗 Hub
104
+ model = SentenceTransformer("leafxyz/main")
105
+ # Run inference
106
+ queries = [
107
+ 'Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it\nQuery: عطور نسائية',
108
+ ]
109
+ documents = [
110
+ 'مجموعة عطر نسائي - ابراهيم القرشي سكر',
111
+ 'قبعة رجالية - 07',
112
+ 'تن الوفاء سكيب جاك بالزيت الزيتون - 160 غ',
113
+ ]
114
+ query_embeddings = model.encode_query(queries)
115
+ document_embeddings = model.encode_document(documents)
116
+ print(query_embeddings.shape, document_embeddings.shape)
117
+ # [1, 1024] [3, 1024]
118
+
119
+ # Get the similarity scores for the embeddings
120
+ similarities = model.similarity(query_embeddings, document_embeddings)
121
+ print(similarities)
122
+ # tensor([[ 0.5593, -0.0069, 0.0400]])
123
+ ```
124
+ <!--
125
+ ### Direct Usage (Transformers)
126
+
127
+ <details><summary>Click to see the direct usage in Transformers</summary>
128
+
129
+ </details>
130
+ -->
131
+
132
+ <!--
133
+ ### Downstream Usage (Sentence Transformers)
134
+
135
+ You can finetune this model on your own dataset.
136
+
137
+ <details><summary>Click to expand</summary>
138
+
139
+ </details>
140
+ -->
141
+
142
+ <!--
143
+ ### Out-of-Scope Use
144
+
145
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
146
+ -->
147
+
148
+ <!--
149
+ ## Bias, Risks and Limitations
150
+
151
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
152
+ -->
153
+
154
+ <!--
155
+ ### Recommendations
156
+
157
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
158
+ -->
159
+
160
+ ## Training Details
161
+
162
+ ### Training Datasets
163
+
164
+ #### pairs_with_negatives
165
+
166
+ * Dataset: pairs_with_negatives
167
+ * Size: 9,900 training samples
168
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
169
+ * Approximate statistics based on the first 1000 samples:
170
+ | | anchor | positive | negative |
171
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
172
+ | type | string | string | string |
173
+ | details | <ul><li>min: 24 tokens</li><li>mean: 29.36 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 15.82 tokens</li><li>max: 38 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 15.12 tokens</li><li>max: 44 tokens</li></ul> |
174
+ * Samples:
175
+ | anchor | positive | negative |
176
+ |:------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------|:---------------------------------------------|
177
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: زيت بابايا WKL</code> | <code>زيت جسم - WKL Papaya</code> | <code>زيت جسم - Vaseline Cocoa</code> |
178
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: منكير</code> | <code>اظافر هيفا - TWINKLE</code> | <code>اظافر هيفا - SPARKLE</code> |
179
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: توب فريش حفاضات</code> | <code>توب فريش حفاضات رقم 1 - 44 قطعة</code> | <code>توب فريش حفاضات رقم 2 - 40 قطعة</code> |
180
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
181
+ ```json
182
+ {
183
+ "scale": 20.0,
184
+ "similarity_fct": "cos_sim",
185
+ "gather_across_devices": false,
186
+ "directions": [
187
+ "query_to_doc"
188
+ ],
189
+ "partition_mode": "joint",
190
+ "hardness_mode": null,
191
+ "hardness_strength": 0.0
192
+ }
193
+ ```
194
+
195
+ #### positives
196
+
197
+ * Dataset: positives
198
+ * Size: 39,600 training samples
199
+ * Columns: <code>anchor</code> and <code>positive</code>
200
+ * Approximate statistics based on the first 1000 samples:
201
+ | | anchor | positive |
202
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
203
+ | type | string | string |
204
+ | details | <ul><li>min: 23 tokens</li><li>mean: 29.52 tokens</li><li>max: 41 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 13.77 tokens</li><li>max: 39 tokens</li></ul> |
205
+ * Samples:
206
+ | anchor | positive |
207
+ |:----------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------|
208
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: نبي فيكسول ارجواني</code> | <code>منظف ​​الحمام الذكي فيكسول ارجواني - 900 مل</code> |
209
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: شربة نجمة اريغي 500</code> | <code>شربة نجمة اريغي - 500 غ</code> |
210
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: Gas relife drops</code> | <code>Gas relife drops</code> |
211
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
212
+ ```json
213
+ {
214
+ "scale": 20.0,
215
+ "similarity_fct": "cos_sim",
216
+ "gather_across_devices": false,
217
+ "directions": [
218
+ "query_to_doc"
219
+ ],
220
+ "partition_mode": "joint",
221
+ "hardness_mode": null,
222
+ "hardness_strength": 0.0
223
+ }
224
+ ```
225
+
226
+ ### Evaluation Datasets
227
+
228
+ #### pairs_with_negatives
229
+
230
+ * Dataset: pairs_with_negatives
231
+ * Size: 100 evaluation samples
232
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
233
+ * Approximate statistics based on the first 100 samples:
234
+ | | anchor | positive | negative |
235
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
236
+ | type | string | string | string |
237
+ | details | <ul><li>min: 24 tokens</li><li>mean: 29.35 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.71 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.2 tokens</li><li>max: 34 tokens</li></ul> |
238
+ * Samples:
239
+ | anchor | positive | negative |
240
+ |:--------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------|:-----------------------------------------------------------|
241
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: عناية بالجسم</code> | <code>معطر جسم وشعر نسائي - Sol de Janeiro Água Mística</code> | <code>قارورة عصير - AS02</code> |
242
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: بخاخ تشيكو 100 مل</code> | <code>بخاخ تشيكو للحماية من البعوض - 100 مل</code> | <code>مناديل الحماية من البعوض تشيكو - 20 قطعة</code> |
243
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: بخاخ مانع التصاق</code> | <code>بخاخ الطبخ بنكهة الفلفل مانع للالتصاق - 200 مل</code> | <code>بخاخ الطبخ بنكهة الثوم مانع للالتصاق - 200 مل</code> |
244
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
245
+ ```json
246
+ {
247
+ "scale": 20.0,
248
+ "similarity_fct": "cos_sim",
249
+ "gather_across_devices": false,
250
+ "directions": [
251
+ "query_to_doc"
252
+ ],
253
+ "partition_mode": "joint",
254
+ "hardness_mode": null,
255
+ "hardness_strength": 0.0
256
+ }
257
+ ```
258
+
259
+ #### positives
260
+
261
+ * Dataset: positives
262
+ * Size: 400 evaluation samples
263
+ * Columns: <code>anchor</code> and <code>positive</code>
264
+ * Approximate statistics based on the first 400 samples:
265
+ | | anchor | positive |
266
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
267
+ | type | string | string |
268
+ | details | <ul><li>min: 24 tokens</li><li>mean: 29.43 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 13.74 tokens</li><li>max: 35 tokens</li></ul> |
269
+ * Samples:
270
+ | anchor | positive |
271
+ |:------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------|
272
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: سوار نسائي ذهبي</code> | <code>سوار نسائي - DX052</code> |
273
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: سناكس</code> | <code>شوكلاتة كندر ترونكي 8*48</code> |
274
+ | <code>Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it<br>Query: مشروب حليب</code> | <code>حليب - Safi</code> |
275
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
276
+ ```json
277
+ {
278
+ "scale": 20.0,
279
+ "similarity_fct": "cos_sim",
280
+ "gather_across_devices": false,
281
+ "directions": [
282
+ "query_to_doc"
283
+ ],
284
+ "partition_mode": "joint",
285
+ "hardness_mode": null,
286
+ "hardness_strength": 0.0
287
+ }
288
+ ```
289
+
290
+ ### Training Hyperparameters
291
+ #### Non-Default Hyperparameters
292
+
293
+ - `gradient_accumulation_steps`: 4
294
+ - `learning_rate`: 3e-05
295
+ - `num_train_epochs`: 1
296
+ - `warmup_steps`: 0.05
297
+ - `fp16`: True
298
+ - `dataloader_num_workers`: 2
299
+ - `gradient_checkpointing`: True
300
+
301
+ #### All Hyperparameters
302
+ <details><summary>Click to expand</summary>
303
+
304
+ - `do_predict`: False
305
+ - `prediction_loss_only`: True
306
+ - `per_device_train_batch_size`: 8
307
+ - `per_device_eval_batch_size`: 8
308
+ - `gradient_accumulation_steps`: 4
309
+ - `eval_accumulation_steps`: None
310
+ - `torch_empty_cache_steps`: None
311
+ - `learning_rate`: 3e-05
312
+ - `weight_decay`: 0.0
313
+ - `adam_beta1`: 0.9
314
+ - `adam_beta2`: 0.999
315
+ - `adam_epsilon`: 1e-08
316
+ - `max_grad_norm`: 1.0
317
+ - `num_train_epochs`: 1
318
+ - `max_steps`: -1
319
+ - `lr_scheduler_type`: linear
320
+ - `lr_scheduler_kwargs`: None
321
+ - `warmup_ratio`: None
322
+ - `warmup_steps`: 0.05
323
+ - `log_level`: passive
324
+ - `log_level_replica`: warning
325
+ - `log_on_each_node`: True
326
+ - `logging_nan_inf_filter`: True
327
+ - `enable_jit_checkpoint`: False
328
+ - `save_on_each_node`: False
329
+ - `save_only_model`: False
330
+ - `restore_callback_states_from_checkpoint`: False
331
+ - `use_cpu`: False
332
+ - `seed`: 42
333
+ - `data_seed`: None
334
+ - `bf16`: False
335
+ - `fp16`: True
336
+ - `bf16_full_eval`: False
337
+ - `fp16_full_eval`: False
338
+ - `tf32`: None
339
+ - `local_rank`: -1
340
+ - `ddp_backend`: None
341
+ - `debug`: []
342
+ - `dataloader_drop_last`: False
343
+ - `dataloader_num_workers`: 2
344
+ - `dataloader_prefetch_factor`: None
345
+ - `disable_tqdm`: False
346
+ - `remove_unused_columns`: True
347
+ - `label_names`: None
348
+ - `load_best_model_at_end`: False
349
+ - `ignore_data_skip`: False
350
+ - `fsdp`: []
351
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
352
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
353
+ - `parallelism_config`: None
354
+ - `deepspeed`: None
355
+ - `label_smoothing_factor`: 0.0
356
+ - `optim`: adamw_torch_fused
357
+ - `optim_args`: None
358
+ - `group_by_length`: False
359
+ - `length_column_name`: length
360
+ - `project`: huggingface
361
+ - `trackio_space_id`: trackio
362
+ - `ddp_find_unused_parameters`: None
363
+ - `ddp_bucket_cap_mb`: None
364
+ - `ddp_broadcast_buffers`: False
365
+ - `dataloader_pin_memory`: True
366
+ - `dataloader_persistent_workers`: False
367
+ - `skip_memory_metrics`: True
368
+ - `push_to_hub`: False
369
+ - `resume_from_checkpoint`: None
370
+ - `hub_model_id`: None
371
+ - `hub_strategy`: every_save
372
+ - `hub_private_repo`: None
373
+ - `hub_always_push`: False
374
+ - `hub_revision`: None
375
+ - `gradient_checkpointing`: True
376
+ - `gradient_checkpointing_kwargs`: None
377
+ - `include_for_metrics`: []
378
+ - `eval_do_concat_batches`: True
379
+ - `auto_find_batch_size`: False
380
+ - `full_determinism`: False
381
+ - `ddp_timeout`: 1800
382
+ - `torch_compile`: False
383
+ - `torch_compile_backend`: None
384
+ - `torch_compile_mode`: None
385
+ - `include_num_input_tokens_seen`: no
386
+ - `neftune_noise_alpha`: None
387
+ - `optim_target_modules`: None
388
+ - `batch_eval_metrics`: False
389
+ - `eval_on_start`: False
390
+ - `use_liger_kernel`: False
391
+ - `liger_kernel_config`: None
392
+ - `eval_use_gather_object`: False
393
+ - `average_tokens_across_devices`: True
394
+ - `use_cache`: False
395
+ - `prompts`: None
396
+ - `batch_sampler`: batch_sampler
397
+ - `multi_dataset_batch_sampler`: proportional
398
+ - `router_mapping`: {}
399
+ - `learning_rate_mapping`: {}
400
+
401
+ </details>
402
+
403
+ ### Training Logs
404
+ | Epoch | Step | Training Loss | pairs with negatives loss | positives loss |
405
+ |:------:|:----:|:-------------:|:-------------------------:|:--------------:|
406
+ | 0.0323 | 50 | 0.2092 | - | - |
407
+ | 0.0646 | 100 | 0.2008 | - | - |
408
+ | 0.0970 | 150 | 0.1948 | - | - |
409
+ | 0.1293 | 200 | 0.1749 | - | - |
410
+ | 0.1616 | 250 | 0.1455 | - | - |
411
+ | 0.1939 | 300 | 0.1924 | - | - |
412
+ | 0.2262 | 350 | 0.1959 | - | - |
413
+ | 0.2586 | 400 | 0.1606 | - | - |
414
+ | 0.2909 | 450 | 0.1679 | - | - |
415
+ | 0.3232 | 500 | 0.1774 | 0.3304 | 0.1113 |
416
+ | 0.3555 | 550 | 0.1924 | - | - |
417
+ | 0.3878 | 600 | 0.1487 | - | - |
418
+ | 0.4202 | 650 | 0.1859 | - | - |
419
+ | 0.4525 | 700 | 0.1807 | - | - |
420
+ | 0.4848 | 750 | 0.1785 | - | - |
421
+ | 0.5171 | 800 | 0.1534 | - | - |
422
+ | 0.5495 | 850 | 0.1468 | - | - |
423
+ | 0.5818 | 900 | 0.1566 | - | - |
424
+ | 0.6141 | 950 | 0.1153 | - | - |
425
+ | 0.6464 | 1000 | 0.1322 | 0.3138 | 0.0943 |
426
+ | 0.6787 | 1050 | 0.1320 | - | - |
427
+ | 0.7111 | 1100 | 0.1533 | - | - |
428
+ | 0.7434 | 1150 | 0.1358 | - | - |
429
+ | 0.7757 | 1200 | 0.1457 | - | - |
430
+ | 0.8080 | 1250 | 0.1320 | - | - |
431
+ | 0.8403 | 1300 | 0.1680 | - | - |
432
+ | 0.8727 | 1350 | 0.1280 | - | - |
433
+ | 0.9050 | 1400 | 0.1632 | - | - |
434
+ | 0.9373 | 1450 | 0.1656 | - | - |
435
+ | 0.9696 | 1500 | 0.1363 | 0.3024 | 0.0914 |
436
+
437
+
438
+ ### Training Time
439
+ - **Training**: 2.0 hours
440
+
441
+ ### Framework Versions
442
+ - Python: 3.12.13
443
+ - Sentence Transformers: 5.4.1
444
+ - Transformers: 5.0.0
445
+ - PyTorch: 2.10.0+cu128
446
+ - Accelerate: 1.13.0
447
+ - Datasets: 5.0.0
448
+ - Tokenizers: 0.22.2
449
+
450
+ ## Citation
451
+
452
+ ### BibTeX
453
+
454
+ #### Sentence Transformers
455
+ ```bibtex
456
+ @inproceedings{reimers-2019-sentence-bert,
457
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
458
+ author = "Reimers, Nils and Gurevych, Iryna",
459
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
460
+ month = "11",
461
+ year = "2019",
462
+ publisher = "Association for Computational Linguistics",
463
+ url = "https://arxiv.org/abs/1908.10084",
464
+ }
465
+ ```
466
+
467
+ #### MultipleNegativesRankingLoss
468
+ ```bibtex
469
+ @misc{oord2019representationlearningcontrastivepredictive,
470
+ title={Representation Learning with Contrastive Predictive Coding},
471
+ author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
472
+ year={2019},
473
+ eprint={1807.03748},
474
+ archivePrefix={arXiv},
475
+ primaryClass={cs.LG},
476
+ url={https://arxiv.org/abs/1807.03748},
477
+ }
478
+ ```
479
+
480
+ <!--
481
+ ## Glossary
482
+
483
+ *Clearly define terms in order to be accessible across audiences.*
484
+ -->
485
+
486
+ <!--
487
+ ## Model Card Authors
488
+
489
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
490
+ -->
491
+
492
+ <!--
493
+ ## Model Card Contact
494
+
495
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
496
+ -->
adapter_config.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "prestoai/qwen3-embedding-0.6b-arabic-ecom",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": false,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 32,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "lora_ga_config": null,
23
+ "megatron_config": null,
24
+ "megatron_core": "megatron.core",
25
+ "modules_to_save": null,
26
+ "peft_type": "LORA",
27
+ "peft_version": "0.19.1",
28
+ "qalora_group_size": 16,
29
+ "r": 16,
30
+ "rank_pattern": {},
31
+ "revision": null,
32
+ "target_modules": [
33
+ "o_proj",
34
+ "up_proj",
35
+ "v_proj",
36
+ "k_proj",
37
+ "q_proj",
38
+ "gate_proj",
39
+ "down_proj"
40
+ ],
41
+ "target_parameters": null,
42
+ "task_type": "FEATURE_EXTRACTION",
43
+ "trainable_token_indices": null,
44
+ "use_bdlora": null,
45
+ "use_dora": false,
46
+ "use_qalora": false,
47
+ "use_rslora": false
48
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:395d5039dafc5027c4f825185c21ecbe03b7148fd77f135719947111e6d39c41
3
+ size 40419816
chat_template.jinja ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
27
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
28
+ {%- elif message.role == "assistant" %}
29
+ {%- set content = message.content %}
30
+ {%- set reasoning_content = '' %}
31
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
32
+ {%- set reasoning_content = message.reasoning_content %}
33
+ {%- else %}
34
+ {%- if '</think>' in message.content %}
35
+ {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}
36
+ {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- endif %}
38
+ {%- endif %}
39
+ {%- if loop.index0 > ns.last_query_index %}
40
+ {%- if loop.last or (not loop.last and reasoning_content) %}
41
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
42
+ {%- else %}
43
+ {{- '<|im_start|>' + message.role + '\n' + content }}
44
+ {%- endif %}
45
+ {%- else %}
46
+ {{- '<|im_start|>' + message.role + '\n' + content }}
47
+ {%- endif %}
48
+ {%- if message.tool_calls %}
49
+ {%- for tool_call in message.tool_calls %}
50
+ {%- if (loop.first and content) or (not loop.first) %}
51
+ {{- '\n' }}
52
+ {%- endif %}
53
+ {%- if tool_call.function %}
54
+ {%- set tool_call = tool_call.function %}
55
+ {%- endif %}
56
+ {{- '<tool_call>\n{"name": "' }}
57
+ {{- tool_call.name }}
58
+ {{- '", "arguments": ' }}
59
+ {%- if tool_call.arguments is string %}
60
+ {{- tool_call.arguments }}
61
+ {%- else %}
62
+ {{- tool_call.arguments | tojson }}
63
+ {%- endif %}
64
+ {{- '}\n</tool_call>' }}
65
+ {%- endfor %}
66
+ {%- endif %}
67
+ {{- '<|im_end|>\n' }}
68
+ {%- elif message.role == "tool" %}
69
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
70
+ {{- '<|im_start|>user' }}
71
+ {%- endif %}
72
+ {{- '\n<tool_response>\n' }}
73
+ {{- message.content }}
74
+ {{- '\n</tool_response>' }}
75
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
76
+ {{- '<|im_end|>\n' }}
77
+ {%- endif %}
78
+ {%- endif %}
79
+ {%- endfor %}
80
+ {%- if add_generation_prompt %}
81
+ {{- '<|im_start|>assistant\n' }}
82
+ {%- if enable_thinking is defined and enable_thinking is false %}
83
+ {{- '<think>\n\n</think>\n\n' }}
84
+ {%- endif %}
85
+ {%- endif %}
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "pytorch": "2.10.0+cu128",
4
+ "sentence_transformers": "5.4.1",
5
+ "transformers": "5.0.0"
6
+ },
7
+ "default_prompt_name": null,
8
+ "model_type": "SentenceTransformer",
9
+ "prompts": {
10
+ "document": "",
11
+ "query": "Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it\nQuery: "
12
+ },
13
+ "similarity_fn_name": "cosine"
14
+ }
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:67b23115c7cace3b6700c333da5038e66e95a9c2c71531b6953563a8c8bb1dee
3
+ size 11423967
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "is_local": false,
9
+ "local_files_only": false,
10
+ "model_max_length": 128,
11
+ "pad_token": "<|endoftext|>",
12
+ "split_special_tokens": false,
13
+ "tokenizer_class": "Qwen2Tokenizer",
14
+ "unk_token": null
15
+ }