Commit
919f7cc
1 Parent(s): 8b229c9

Add new SentenceTransformer model.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
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,543 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka
3
+ datasets:
4
+ - Omartificial-Intelligence-Space/Arabic-stsb
5
+ language:
6
+ - ar
7
+ library_name: sentence-transformers
8
+ metrics:
9
+ - pearson_cosine
10
+ - spearman_cosine
11
+ - pearson_manhattan
12
+ - spearman_manhattan
13
+ - pearson_euclidean
14
+ - spearman_euclidean
15
+ - pearson_dot
16
+ - spearman_dot
17
+ - pearson_max
18
+ - spearman_max
19
+ pipeline_tag: sentence-similarity
20
+ tags:
21
+ - sentence-transformers
22
+ - sentence-similarity
23
+ - feature-extraction
24
+ - generated_from_trainer
25
+ - dataset_size:947818
26
+ - loss:SoftmaxLoss
27
+ - loss:CosineSimilarityLoss
28
+ widget:
29
+ - source_sentence: امرأة تكتب شيئاً
30
+ sentences:
31
+ - مراهق يتحدث إلى فتاة عبر كاميرا الإنترنت
32
+ - امرأة تقطع البصل الأخضر.
33
+ - مجموعة من كبار السن يتظاهرون حول طاولة الطعام.
34
+ - source_sentence: تتشكل النجوم في مناطق تكوين النجوم، والتي تنشأ نفسها من السحب الجزيئية.
35
+ sentences:
36
+ - لاعب كرة السلة على وشك تسجيل نقاط لفريقه.
37
+ - المقال التالي مأخوذ من نسختي من "أطلس البطريق الجديد للتاريخ الوسطى"
38
+ - قد يكون من الممكن أن يوجد نظام شمسي مثل نظامنا خارج المجرة
39
+ - source_sentence: تحت السماء الزرقاء مع الغيوم البيضاء، يصل طفل لمس مروحة طائرة واقفة
40
+ على حقل من العشب.
41
+ sentences:
42
+ - امرأة تحمل كأساً
43
+ - طفل يحاول لمس مروحة طائرة
44
+ - اثنان من عازبين عن الشرب يستعدون للعشاء
45
+ - source_sentence: رجل في منتصف العمر يحلق لحيته في غرفة ذات جدران بيضاء والتي لا
46
+ تبدو كحمام
47
+ sentences:
48
+ - فتى يخطط اسمه على مكتبه
49
+ - رجل ينام
50
+ - المرأة وحدها وهي نائمة في غرفة نومها
51
+ - source_sentence: الكلب البني مستلقي على جانبه على سجادة بيج، مع جسم أخضر في المقدمة.
52
+ sentences:
53
+ - شخص طويل القامة
54
+ - المرأة تنظر من النافذة.
55
+ - لقد مات الكلب
56
+ model-index:
57
+ - name: SentenceTransformer based on Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka
58
+ results:
59
+ - task:
60
+ type: semantic-similarity
61
+ name: Semantic Similarity
62
+ dataset:
63
+ name: sts dev
64
+ type: sts-dev
65
+ metrics:
66
+ - type: pearson_cosine
67
+ value: 0.8383581637565862
68
+ name: Pearson Cosine
69
+ - type: spearman_cosine
70
+ value: 0.8389373148442993
71
+ name: Spearman Cosine
72
+ - type: pearson_manhattan
73
+ value: 0.8247947413553784
74
+ name: Pearson Manhattan
75
+ - type: spearman_manhattan
76
+ value: 0.8329104956151686
77
+ name: Spearman Manhattan
78
+ - type: pearson_euclidean
79
+ value: 0.8249963167509389
80
+ name: Pearson Euclidean
81
+ - type: spearman_euclidean
82
+ value: 0.8336591462431132
83
+ name: Spearman Euclidean
84
+ - type: pearson_dot
85
+ value: 0.8071855574990106
86
+ name: Pearson Dot
87
+ - type: spearman_dot
88
+ value: 0.8097706351791779
89
+ name: Spearman Dot
90
+ - type: pearson_max
91
+ value: 0.8383581637565862
92
+ name: Pearson Max
93
+ - type: spearman_max
94
+ value: 0.8389373148442993
95
+ name: Spearman Max
96
+ - task:
97
+ type: semantic-similarity
98
+ name: Semantic Similarity
99
+ dataset:
100
+ name: sts test
101
+ type: sts-test
102
+ metrics:
103
+ - type: pearson_cosine
104
+ value: 0.7907507025363603
105
+ name: Pearson Cosine
106
+ - type: spearman_cosine
107
+ value: 0.7893080660475024
108
+ name: Spearman Cosine
109
+ - type: pearson_manhattan
110
+ value: 0.7923222026451455
111
+ name: Pearson Manhattan
112
+ - type: spearman_manhattan
113
+ value: 0.7946838339078852
114
+ name: Spearman Manhattan
115
+ - type: pearson_euclidean
116
+ value: 0.7903690631114766
117
+ name: Pearson Euclidean
118
+ - type: spearman_euclidean
119
+ value: 0.793426368251902
120
+ name: Spearman Euclidean
121
+ - type: pearson_dot
122
+ value: 0.7404285389360442
123
+ name: Pearson Dot
124
+ - type: spearman_dot
125
+ value: 0.7353599094850335
126
+ name: Spearman Dot
127
+ - type: pearson_max
128
+ value: 0.7923222026451455
129
+ name: Pearson Max
130
+ - type: spearman_max
131
+ value: 0.7946838339078852
132
+ name: Spearman Max
133
+ ---
134
+
135
+ # SentenceTransformer based on Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka
136
+
137
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka](https://huggingface.co/Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka) on the all-nli and [sts](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb) datasets. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
138
+
139
+ ## Model Details
140
+
141
+ ### Model Description
142
+ - **Model Type:** Sentence Transformer
143
+ - **Base model:** [Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka](https://huggingface.co/Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka) <!-- at revision d0361a36f6fe69febfc8550d0918abab174f6f30 -->
144
+ - **Maximum Sequence Length:** 512 tokens
145
+ - **Output Dimensionality:** 768 tokens
146
+ - **Similarity Function:** Cosine Similarity
147
+ - **Training Datasets:**
148
+ - all-nli
149
+ - [sts](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb)
150
+ - **Language:** ar
151
+ <!-- - **License:** Unknown -->
152
+
153
+ ### Model Sources
154
+
155
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
156
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
157
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
158
+
159
+ ### Full Model Architecture
160
+
161
+ ```
162
+ SentenceTransformer(
163
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
164
+ (1): Pooling({'word_embedding_dimension': 768, '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})
165
+ )
166
+ ```
167
+
168
+ ## Usage
169
+
170
+ ### Direct Usage (Sentence Transformers)
171
+
172
+ First install the Sentence Transformers library:
173
+
174
+ ```bash
175
+ pip install -U sentence-transformers
176
+ ```
177
+
178
+ Then you can load this model and run inference.
179
+ ```python
180
+ from sentence_transformers import SentenceTransformer
181
+
182
+ # Download from the 🤗 Hub
183
+ model = SentenceTransformer("Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka-multi-task")
184
+ # Run inference
185
+ sentences = [
186
+ 'الكلب البني مستلقي على جانبه على سجادة بيج، مع جسم أخضر في المقدمة.',
187
+ 'لقد مات الكلب',
188
+ 'شخص طويل القامة',
189
+ ]
190
+ embeddings = model.encode(sentences)
191
+ print(embeddings.shape)
192
+ # [3, 768]
193
+
194
+ # Get the similarity scores for the embeddings
195
+ similarities = model.similarity(embeddings, embeddings)
196
+ print(similarities.shape)
197
+ # [3, 3]
198
+ ```
199
+
200
+ <!--
201
+ ### Direct Usage (Transformers)
202
+
203
+ <details><summary>Click to see the direct usage in Transformers</summary>
204
+
205
+ </details>
206
+ -->
207
+
208
+ <!--
209
+ ### Downstream Usage (Sentence Transformers)
210
+
211
+ You can finetune this model on your own dataset.
212
+
213
+ <details><summary>Click to expand</summary>
214
+
215
+ </details>
216
+ -->
217
+
218
+ <!--
219
+ ### Out-of-Scope Use
220
+
221
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
222
+ -->
223
+
224
+ ## Evaluation
225
+
226
+ ### Metrics
227
+
228
+ #### Semantic Similarity
229
+ * Dataset: `sts-dev`
230
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
231
+
232
+ | Metric | Value |
233
+ |:--------------------|:-----------|
234
+ | pearson_cosine | 0.8384 |
235
+ | **spearman_cosine** | **0.8389** |
236
+ | pearson_manhattan | 0.8248 |
237
+ | spearman_manhattan | 0.8329 |
238
+ | pearson_euclidean | 0.825 |
239
+ | spearman_euclidean | 0.8337 |
240
+ | pearson_dot | 0.8072 |
241
+ | spearman_dot | 0.8098 |
242
+ | pearson_max | 0.8384 |
243
+ | spearman_max | 0.8389 |
244
+
245
+ #### Semantic Similarity
246
+ * Dataset: `sts-test`
247
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
248
+
249
+ | Metric | Value |
250
+ |:--------------------|:-----------|
251
+ | pearson_cosine | 0.7908 |
252
+ | **spearman_cosine** | **0.7893** |
253
+ | pearson_manhattan | 0.7923 |
254
+ | spearman_manhattan | 0.7947 |
255
+ | pearson_euclidean | 0.7904 |
256
+ | spearman_euclidean | 0.7934 |
257
+ | pearson_dot | 0.7404 |
258
+ | spearman_dot | 0.7354 |
259
+ | pearson_max | 0.7923 |
260
+ | spearman_max | 0.7947 |
261
+
262
+ <!--
263
+ ## Bias, Risks and Limitations
264
+
265
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
266
+ -->
267
+
268
+ <!--
269
+ ### Recommendations
270
+
271
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
272
+ -->
273
+
274
+ ## Training Details
275
+
276
+ ### Training Datasets
277
+
278
+ #### all-nli
279
+
280
+ * Dataset: all-nli
281
+ * Size: 942,069 training samples
282
+ * Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
283
+ * Approximate statistics based on the first 1000 samples:
284
+ | | premise | hypothesis | label |
285
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-------------------------------------------------------------------|
286
+ | type | string | string | int |
287
+ | details | <ul><li>min: 5 tokens</li><li>mean: 14.09 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 8.28 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>0: ~33.40%</li><li>1: ~33.30%</li><li>2: ~33.30%</li></ul> |
288
+ * Samples:
289
+ | premise | hypothesis | label |
290
+ |:-----------------------------------------------|:--------------------------------------------|:---------------|
291
+ | <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص يقوم بتدريب حصانه للمنافسة</code> | <code>1</code> |
292
+ | <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في مطعم، يطلب عجة.</code> | <code>2</code> |
293
+ | <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> | <code>0</code> |
294
+ * Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss)
295
+
296
+ #### sts
297
+
298
+ * Dataset: [sts](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb) at [f5a6f89](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb/tree/f5a6f89da460d307eff3acbbfcb62d0705cdbbb5)
299
+ * Size: 5,749 training samples
300
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
301
+ * Approximate statistics based on the first 1000 samples:
302
+ | | sentence1 | sentence2 | score |
303
+ |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
304
+ | type | string | string | float |
305
+ | details | <ul><li>min: 4 tokens</li><li>mean: 7.46 tokens</li><li>max: 22 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 7.36 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
306
+ * Samples:
307
+ | sentence1 | sentence2 | score |
308
+ |:-----------------------------------------------|:--------------------------------------------------------|:------------------|
309
+ | <code>طائرة ستقلع</code> | <code>طائرة جوية ستقلع</code> | <code>1.0</code> |
310
+ | <code>رجل يعزف على ناي كبير</code> | <code>رجل يعزف على الناي.</code> | <code>0.76</code> |
311
+ | <code>رجل ينشر الجبن الممزق على البيتزا</code> | <code>رجل ينشر الجبن الممزق على بيتزا غير مطبوخة</code> | <code>0.76</code> |
312
+ * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
313
+ ```json
314
+ {
315
+ "loss_fct": "torch.nn.modules.loss.MSELoss"
316
+ }
317
+ ```
318
+
319
+ ### Evaluation Datasets
320
+
321
+ #### all-nli
322
+
323
+ * Dataset: all-nli
324
+ * Size: 1,000 evaluation samples
325
+ * Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
326
+ * Approximate statistics based on the first 1000 samples:
327
+ | | premise | hypothesis | label |
328
+ |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-------------------------------------------------------------------|
329
+ | type | string | string | int |
330
+ | details | <ul><li>min: 5 tokens</li><li>mean: 15.1 tokens</li><li>max: 48 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 8.11 tokens</li><li>max: 21 tokens</li></ul> | <ul><li>0: ~33.10%</li><li>1: ~33.30%</li><li>2: ~33.60%</li></ul> |
331
+ * Samples:
332
+ | premise | hypothesis | label |
333
+ |:------------------------------------------------|:------------------------------------------------------------------------------|:---------------|
334
+ | <code>امرأتان يتعانقان بينما يحملان طرود</code> | <code>الأخوات يعانقون بعضهم لوداعاً بينما يحملون حزمة بعد تناول الغداء</code> | <code>1</code> |
335
+ | <code>امرأتان يتعانقان بينما يحملان حزمة</code> | <code>إمرأتان يحملان حزمة</code> | <code>0</code> |
336
+ | <code>امرأتان يتعانقان بينما يحملان حزمة</code> | <code>الرجال يتشاجرون خارج مطعم</code> | <code>2</code> |
337
+ * Loss: [<code>SoftmaxLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss)
338
+
339
+ #### sts
340
+
341
+ * Dataset: [sts](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb) at [f5a6f89](https://huggingface.co/datasets/Omartificial-Intelligence-Space/arabic-stsb/tree/f5a6f89da460d307eff3acbbfcb62d0705cdbbb5)
342
+ * Size: 1,500 evaluation samples
343
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
344
+ * Approximate statistics based on the first 1000 samples:
345
+ | | sentence1 | sentence2 | score |
346
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
347
+ | type | string | string | float |
348
+ | details | <ul><li>min: 4 tokens</li><li>mean: 12.55 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 12.49 tokens</li><li>max: 54 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
349
+ * Samples:
350
+ | sentence1 | sentence2 | score |
351
+ |:--------------------------------------|:---------------------------------------|:------------------|
352
+ | <code>رجل يرتدي قبعة صلبة يرقص</code> | <code>رجل يرتدي قبعة صلبة يرقص.</code> | <code>1.0</code> |
353
+ | <code>طفل صغير يركب حصاناً.</code> | <code>طفل يركب حصاناً.</code> | <code>0.95</code> |
354
+ | <code>رجل يطعم فأراً لأفعى</code> | <code>الرجل يطعم الفأر للثعبان.</code> | <code>1.0</code> |
355
+ * Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
356
+ ```json
357
+ {
358
+ "loss_fct": "torch.nn.modules.loss.MSELoss"
359
+ }
360
+ ```
361
+
362
+ ### Training Hyperparameters
363
+ #### Non-Default Hyperparameters
364
+
365
+ - `eval_strategy`: steps
366
+ - `per_device_train_batch_size`: 16
367
+ - `per_device_eval_batch_size`: 16
368
+ - `num_train_epochs`: 1
369
+ - `warmup_ratio`: 0.1
370
+ - `fp16`: True
371
+ - `multi_dataset_batch_sampler`: round_robin
372
+
373
+ #### All Hyperparameters
374
+ <details><summary>Click to expand</summary>
375
+
376
+ - `overwrite_output_dir`: False
377
+ - `do_predict`: False
378
+ - `eval_strategy`: steps
379
+ - `prediction_loss_only`: True
380
+ - `per_device_train_batch_size`: 16
381
+ - `per_device_eval_batch_size`: 16
382
+ - `per_gpu_train_batch_size`: None
383
+ - `per_gpu_eval_batch_size`: None
384
+ - `gradient_accumulation_steps`: 1
385
+ - `eval_accumulation_steps`: None
386
+ - `learning_rate`: 5e-05
387
+ - `weight_decay`: 0.0
388
+ - `adam_beta1`: 0.9
389
+ - `adam_beta2`: 0.999
390
+ - `adam_epsilon`: 1e-08
391
+ - `max_grad_norm`: 1.0
392
+ - `num_train_epochs`: 1
393
+ - `max_steps`: -1
394
+ - `lr_scheduler_type`: linear
395
+ - `lr_scheduler_kwargs`: {}
396
+ - `warmup_ratio`: 0.1
397
+ - `warmup_steps`: 0
398
+ - `log_level`: passive
399
+ - `log_level_replica`: warning
400
+ - `log_on_each_node`: True
401
+ - `logging_nan_inf_filter`: True
402
+ - `save_safetensors`: True
403
+ - `save_on_each_node`: False
404
+ - `save_only_model`: False
405
+ - `restore_callback_states_from_checkpoint`: False
406
+ - `no_cuda`: False
407
+ - `use_cpu`: False
408
+ - `use_mps_device`: False
409
+ - `seed`: 42
410
+ - `data_seed`: None
411
+ - `jit_mode_eval`: False
412
+ - `use_ipex`: False
413
+ - `bf16`: False
414
+ - `fp16`: True
415
+ - `fp16_opt_level`: O1
416
+ - `half_precision_backend`: auto
417
+ - `bf16_full_eval`: False
418
+ - `fp16_full_eval`: False
419
+ - `tf32`: None
420
+ - `local_rank`: 0
421
+ - `ddp_backend`: None
422
+ - `tpu_num_cores`: None
423
+ - `tpu_metrics_debug`: False
424
+ - `debug`: []
425
+ - `dataloader_drop_last`: False
426
+ - `dataloader_num_workers`: 0
427
+ - `dataloader_prefetch_factor`: None
428
+ - `past_index`: -1
429
+ - `disable_tqdm`: False
430
+ - `remove_unused_columns`: True
431
+ - `label_names`: None
432
+ - `load_best_model_at_end`: False
433
+ - `ignore_data_skip`: False
434
+ - `fsdp`: []
435
+ - `fsdp_min_num_params`: 0
436
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
437
+ - `fsdp_transformer_layer_cls_to_wrap`: None
438
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
439
+ - `deepspeed`: None
440
+ - `label_smoothing_factor`: 0.0
441
+ - `optim`: adamw_torch
442
+ - `optim_args`: None
443
+ - `adafactor`: False
444
+ - `group_by_length`: False
445
+ - `length_column_name`: length
446
+ - `ddp_find_unused_parameters`: None
447
+ - `ddp_bucket_cap_mb`: None
448
+ - `ddp_broadcast_buffers`: False
449
+ - `dataloader_pin_memory`: True
450
+ - `dataloader_persistent_workers`: False
451
+ - `skip_memory_metrics`: True
452
+ - `use_legacy_prediction_loop`: False
453
+ - `push_to_hub`: False
454
+ - `resume_from_checkpoint`: None
455
+ - `hub_model_id`: None
456
+ - `hub_strategy`: every_save
457
+ - `hub_private_repo`: False
458
+ - `hub_always_push`: False
459
+ - `gradient_checkpointing`: False
460
+ - `gradient_checkpointing_kwargs`: None
461
+ - `include_inputs_for_metrics`: False
462
+ - `eval_do_concat_batches`: True
463
+ - `fp16_backend`: auto
464
+ - `push_to_hub_model_id`: None
465
+ - `push_to_hub_organization`: None
466
+ - `mp_parameters`:
467
+ - `auto_find_batch_size`: False
468
+ - `full_determinism`: False
469
+ - `torchdynamo`: None
470
+ - `ray_scope`: last
471
+ - `ddp_timeout`: 1800
472
+ - `torch_compile`: False
473
+ - `torch_compile_backend`: None
474
+ - `torch_compile_mode`: None
475
+ - `dispatch_batches`: None
476
+ - `split_batches`: None
477
+ - `include_tokens_per_second`: False
478
+ - `include_num_input_tokens_seen`: False
479
+ - `neftune_noise_alpha`: None
480
+ - `optim_target_modules`: None
481
+ - `batch_eval_metrics`: False
482
+ - `eval_on_start`: False
483
+ - `batch_sampler`: batch_sampler
484
+ - `multi_dataset_batch_sampler`: round_robin
485
+
486
+ </details>
487
+
488
+ ### Training Logs
489
+ | Epoch | Step | Training Loss | all-nli loss | sts loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
490
+ |:------:|:----:|:-------------:|:------------:|:--------:|:-----------------------:|:------------------------:|
491
+ | 0.1389 | 100 | 0.5848 | 1.0957 | 0.0324 | 0.8309 | - |
492
+ | 0.2778 | 200 | 0.5243 | 0.9695 | 0.0294 | 0.8386 | - |
493
+ | 0.4167 | 300 | 0.5135 | 0.9486 | 0.0295 | 0.8398 | - |
494
+ | 0.5556 | 400 | 0.4896 | 0.9366 | 0.0305 | 0.8317 | - |
495
+ | 0.6944 | 500 | 0.5048 | 0.9201 | 0.0298 | 0.8395 | - |
496
+ | 0.8333 | 600 | 0.4862 | 0.8885 | 0.0291 | 0.8370 | - |
497
+ | 0.9722 | 700 | 0.4628 | 0.8893 | 0.0289 | 0.8389 | - |
498
+ | 1.0 | 720 | - | - | - | - | 0.7893 |
499
+
500
+
501
+ ### Framework Versions
502
+ - Python: 3.9.18
503
+ - Sentence Transformers: 3.0.1
504
+ - Transformers: 4.42.4
505
+ - PyTorch: 2.2.2+cu121
506
+ - Accelerate: 0.26.1
507
+ - Datasets: 2.19.0
508
+ - Tokenizers: 0.19.1
509
+
510
+ ## Citation
511
+
512
+ ### BibTeX
513
+
514
+ #### Sentence Transformers and SoftmaxLoss
515
+ ```bibtex
516
+ @inproceedings{reimers-2019-sentence-bert,
517
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
518
+ author = "Reimers, Nils and Gurevych, Iryna",
519
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
520
+ month = "11",
521
+ year = "2019",
522
+ publisher = "Association for Computational Linguistics",
523
+ url = "https://arxiv.org/abs/1908.10084",
524
+ }
525
+ ```
526
+
527
+ <!--
528
+ ## Glossary
529
+
530
+ *Clearly define terms in order to be accessible across audiences.*
531
+ -->
532
+
533
+ <!--
534
+ ## Model Card Authors
535
+
536
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
537
+ -->
538
+
539
+ <!--
540
+ ## Model Card Contact
541
+
542
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
543
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Omartificial-Intelligence-Space/Arabert-all-nli-triplet-Matryoshka",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.42.4",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 64000
25
+ }
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.2.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45e4861609698e53cb6f7aaf5aa60a15fb32443d200af2741675ea26fe99a6c3
3
+ size 540795752
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": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "[رابط]",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": true,
49
+ "special": true
50
+ },
51
+ "6": {
52
+ "content": "[بريد]",
53
+ "lstrip": false,
54
+ "normalized": true,
55
+ "rstrip": false,
56
+ "single_word": true,
57
+ "special": true
58
+ },
59
+ "7": {
60
+ "content": "[مستخدم]",
61
+ "lstrip": false,
62
+ "normalized": true,
63
+ "rstrip": false,
64
+ "single_word": true,
65
+ "special": true
66
+ }
67
+ },
68
+ "clean_up_tokenization_spaces": true,
69
+ "cls_token": "[CLS]",
70
+ "do_basic_tokenize": true,
71
+ "do_lower_case": false,
72
+ "mask_token": "[MASK]",
73
+ "max_len": 512,
74
+ "max_length": 512,
75
+ "model_max_length": 512,
76
+ "never_split": [
77
+ "[بريد]",
78
+ "[مستخدم]",
79
+ "[رابط]"
80
+ ],
81
+ "pad_to_multiple_of": null,
82
+ "pad_token": "[PAD]",
83
+ "pad_token_type_id": 0,
84
+ "padding_side": "right",
85
+ "sep_token": "[SEP]",
86
+ "stride": 0,
87
+ "strip_accents": null,
88
+ "tokenize_chinese_chars": true,
89
+ "tokenizer_class": "BertTokenizer",
90
+ "truncation_side": "right",
91
+ "truncation_strategy": "longest_first",
92
+ "unk_token": "[UNK]"
93
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff