Commit
5944975
1 Parent(s): 3fa6f9b

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ unigram.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,637 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: []
3
+ library_name: sentence-transformers
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:557850
10
+ - loss:MatryoshkaLoss
11
+ - loss:MultipleNegativesRankingLoss
12
+ base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
13
+ datasets: []
14
+ metrics:
15
+ - pearson_cosine
16
+ - spearman_cosine
17
+ - pearson_manhattan
18
+ - spearman_manhattan
19
+ - pearson_euclidean
20
+ - spearman_euclidean
21
+ - pearson_dot
22
+ - spearman_dot
23
+ - pearson_max
24
+ - spearman_max
25
+ widget:
26
+ - source_sentence: ذكر متوازن بعناية يقف على قدم واحدة بالقرب من منطقة شاطئ المحيط
27
+ النظيفة
28
+ sentences:
29
+ - رجل يقدم عرضاً
30
+ - هناك رجل بالخارج قرب الشاطئ
31
+ - رجل يجلس على أريكه
32
+ - source_sentence: رجل يقفز إلى سريره القذر
33
+ sentences:
34
+ - السرير قذر.
35
+ - رجل يضحك أثناء غسيل الملابس
36
+ - الرجل على القمر
37
+ - source_sentence: الفتيات بالخارج
38
+ sentences:
39
+ - امرأة تلف الخيط إلى كرات بجانب كومة من الكرات
40
+ - فتيان يركبان في جولة متعة
41
+ - ثلاث فتيات يقفون سوية في غرفة واحدة تستمع وواحدة تكتب على الحائط والثالثة تتحدث
42
+ إليهن
43
+ - source_sentence: الرجل يرتدي قميصاً أزرق.
44
+ sentences:
45
+ - رجل يرتدي قميصاً أزرق يميل إلى الجدار بجانب الطريق مع شاحنة زرقاء وسيارة حمراء
46
+ مع الماء في الخلفية.
47
+ - كتاب القصص مفتوح
48
+ - رجل يرتدي قميص أسود يعزف على الجيتار.
49
+ - source_sentence: يجلس شاب ذو شعر أشقر على الحائط يقرأ جريدة بينما تمر امرأة وفتاة
50
+ شابة.
51
+ sentences:
52
+ - ذكر شاب ينظر إلى جريدة بينما تمر إمرأتان بجانبه
53
+ - رجل يستلقي على وجهه على مقعد في الحديقة.
54
+ - الشاب نائم بينما الأم تقود ابنتها إلى الحديقة
55
+ pipeline_tag: sentence-similarity
56
+ model-index:
57
+ - name: SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
58
+ results:
59
+ - task:
60
+ type: semantic-similarity
61
+ name: Semantic Similarity
62
+ dataset:
63
+ name: sts test 256
64
+ type: sts-test-256
65
+ metrics:
66
+ - type: pearson_cosine
67
+ value: 0.8264447022356382
68
+ name: Pearson Cosine
69
+ - type: spearman_cosine
70
+ value: 0.8386403752382455
71
+ name: Spearman Cosine
72
+ - type: pearson_manhattan
73
+ value: 0.8219134931449013
74
+ name: Pearson Manhattan
75
+ - type: spearman_manhattan
76
+ value: 0.825509659109493
77
+ name: Spearman Manhattan
78
+ - type: pearson_euclidean
79
+ value: 0.8223094468630248
80
+ name: Pearson Euclidean
81
+ - type: spearman_euclidean
82
+ value: 0.8260503151751462
83
+ name: Spearman Euclidean
84
+ - type: pearson_dot
85
+ value: 0.6375226884845725
86
+ name: Pearson Dot
87
+ - type: spearman_dot
88
+ value: 0.6287228614640888
89
+ name: Spearman Dot
90
+ - type: pearson_max
91
+ value: 0.8264447022356382
92
+ name: Pearson Max
93
+ - type: spearman_max
94
+ value: 0.8386403752382455
95
+ name: Spearman Max
96
+ - task:
97
+ type: semantic-similarity
98
+ name: Semantic Similarity
99
+ dataset:
100
+ name: sts test 128
101
+ type: sts-test-128
102
+ metrics:
103
+ - type: pearson_cosine
104
+ value: 0.8209661910768973
105
+ name: Pearson Cosine
106
+ - type: spearman_cosine
107
+ value: 0.8347149482673766
108
+ name: Spearman Cosine
109
+ - type: pearson_manhattan
110
+ value: 0.8082811559854036
111
+ name: Pearson Manhattan
112
+ - type: spearman_manhattan
113
+ value: 0.8148314269262763
114
+ name: Spearman Manhattan
115
+ - type: pearson_euclidean
116
+ value: 0.8093138512113149
117
+ name: Pearson Euclidean
118
+ - type: spearman_euclidean
119
+ value: 0.8156468458613929
120
+ name: Spearman Euclidean
121
+ - type: pearson_dot
122
+ value: 0.5795109620454884
123
+ name: Pearson Dot
124
+ - type: spearman_dot
125
+ value: 0.5760223026552876
126
+ name: Spearman Dot
127
+ - type: pearson_max
128
+ value: 0.8209661910768973
129
+ name: Pearson Max
130
+ - type: spearman_max
131
+ value: 0.8347149482673766
132
+ name: Spearman Max
133
+ - task:
134
+ type: semantic-similarity
135
+ name: Semantic Similarity
136
+ dataset:
137
+ name: sts test 64
138
+ type: sts-test-64
139
+ metrics:
140
+ - type: pearson_cosine
141
+ value: 0.808708530451336
142
+ name: Pearson Cosine
143
+ - type: spearman_cosine
144
+ value: 0.8217532539767914
145
+ name: Spearman Cosine
146
+ - type: pearson_manhattan
147
+ value: 0.7876121380998453
148
+ name: Pearson Manhattan
149
+ - type: spearman_manhattan
150
+ value: 0.7969092304137347
151
+ name: Spearman Manhattan
152
+ - type: pearson_euclidean
153
+ value: 0.7902997966909958
154
+ name: Pearson Euclidean
155
+ - type: spearman_euclidean
156
+ value: 0.7987635968785215
157
+ name: Spearman Euclidean
158
+ - type: pearson_dot
159
+ value: 0.495047136234386
160
+ name: Pearson Dot
161
+ - type: spearman_dot
162
+ value: 0.49287000679901516
163
+ name: Spearman Dot
164
+ - type: pearson_max
165
+ value: 0.808708530451336
166
+ name: Pearson Max
167
+ - type: spearman_max
168
+ value: 0.8217532539767914
169
+ name: Spearman Max
170
+ ---
171
+
172
+ # SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
173
+
174
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) on the Omartificial-Intelligence-Space/arabic-n_li-triplet dataset. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
175
+
176
+ ## Model Details
177
+
178
+ ### Model Description
179
+ - **Model Type:** Sentence Transformer
180
+ - **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision bf3bf13ab40c3157080a7ab344c831b9ad18b5eb -->
181
+ - **Maximum Sequence Length:** 128 tokens
182
+ - **Output Dimensionality:** 384 tokens
183
+ - **Similarity Function:** Cosine Similarity
184
+ - **Training Dataset:**
185
+ - Omartificial-Intelligence-Space/arabic-n_li-triplet
186
+ <!-- - **Language:** Unknown -->
187
+ <!-- - **License:** Unknown -->
188
+
189
+ ### Model Sources
190
+
191
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
192
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
193
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
194
+
195
+ ### Full Model Architecture
196
+
197
+ ```
198
+ SentenceTransformer(
199
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
200
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
201
+ )
202
+ ```
203
+
204
+ ## Usage
205
+
206
+ ### Direct Usage (Sentence Transformers)
207
+
208
+ First install the Sentence Transformers library:
209
+
210
+ ```bash
211
+ pip install -U sentence-transformers
212
+ ```
213
+
214
+ Then you can load this model and run inference.
215
+ ```python
216
+ from sentence_transformers import SentenceTransformer
217
+
218
+ # Download from the 🤗 Hub
219
+ model = SentenceTransformer("Omartificial-Intelligence-Space/MiniLM-L12-v2-all-nli-triplet")
220
+ # Run inference
221
+ sentences = [
222
+ 'يجلس شاب ذو شعر أشقر على الحائط يقرأ جريدة بينما تمر امرأة وفتاة شابة.',
223
+ 'ذكر شاب ينظر إلى جريدة بينما تمر إمرأتان بجانبه',
224
+ 'الشاب نائم بينما الأم تقود ابنتها إلى الحديقة',
225
+ ]
226
+ embeddings = model.encode(sentences)
227
+ print(embeddings.shape)
228
+ # [3, 384]
229
+
230
+ # Get the similarity scores for the embeddings
231
+ similarities = model.similarity(embeddings, embeddings)
232
+ print(similarities.shape)
233
+ # [3, 3]
234
+ ```
235
+
236
+ <!--
237
+ ### Direct Usage (Transformers)
238
+
239
+ <details><summary>Click to see the direct usage in Transformers</summary>
240
+
241
+ </details>
242
+ -->
243
+
244
+ <!--
245
+ ### Downstream Usage (Sentence Transformers)
246
+
247
+ You can finetune this model on your own dataset.
248
+
249
+ <details><summary>Click to expand</summary>
250
+
251
+ </details>
252
+ -->
253
+
254
+ <!--
255
+ ### Out-of-Scope Use
256
+
257
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
258
+ -->
259
+
260
+ ## Evaluation
261
+
262
+ ### Metrics
263
+
264
+ #### Semantic Similarity
265
+ * Dataset: `sts-test-256`
266
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
267
+
268
+ | Metric | Value |
269
+ |:--------------------|:-----------|
270
+ | pearson_cosine | 0.8264 |
271
+ | **spearman_cosine** | **0.8386** |
272
+ | pearson_manhattan | 0.8219 |
273
+ | spearman_manhattan | 0.8255 |
274
+ | pearson_euclidean | 0.8223 |
275
+ | spearman_euclidean | 0.8261 |
276
+ | pearson_dot | 0.6375 |
277
+ | spearman_dot | 0.6287 |
278
+ | pearson_max | 0.8264 |
279
+ | spearman_max | 0.8386 |
280
+
281
+ #### Semantic Similarity
282
+ * Dataset: `sts-test-128`
283
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
284
+
285
+ | Metric | Value |
286
+ |:--------------------|:-----------|
287
+ | pearson_cosine | 0.821 |
288
+ | **spearman_cosine** | **0.8347** |
289
+ | pearson_manhattan | 0.8083 |
290
+ | spearman_manhattan | 0.8148 |
291
+ | pearson_euclidean | 0.8093 |
292
+ | spearman_euclidean | 0.8156 |
293
+ | pearson_dot | 0.5795 |
294
+ | spearman_dot | 0.576 |
295
+ | pearson_max | 0.821 |
296
+ | spearman_max | 0.8347 |
297
+
298
+ #### Semantic Similarity
299
+ * Dataset: `sts-test-64`
300
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
301
+
302
+ | Metric | Value |
303
+ |:--------------------|:-----------|
304
+ | pearson_cosine | 0.8087 |
305
+ | **spearman_cosine** | **0.8218** |
306
+ | pearson_manhattan | 0.7876 |
307
+ | spearman_manhattan | 0.7969 |
308
+ | pearson_euclidean | 0.7903 |
309
+ | spearman_euclidean | 0.7988 |
310
+ | pearson_dot | 0.495 |
311
+ | spearman_dot | 0.4929 |
312
+ | pearson_max | 0.8087 |
313
+ | spearman_max | 0.8218 |
314
+
315
+ <!--
316
+ ## Bias, Risks and Limitations
317
+
318
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
319
+ -->
320
+
321
+ <!--
322
+ ### Recommendations
323
+
324
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
325
+ -->
326
+
327
+ ## Training Details
328
+
329
+ ### Training Dataset
330
+
331
+ #### Omartificial-Intelligence-Space/arabic-n_li-triplet
332
+
333
+ * Dataset: Omartificial-Intelligence-Space/arabic-n_li-triplet
334
+ * Size: 557,850 training samples
335
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
336
+ * Approximate statistics based on the first 1000 samples:
337
+ | | anchor | positive | negative |
338
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
339
+ | type | string | string | string |
340
+ | details | <ul><li>min: 5 tokens</li><li>mean: 10.33 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.21 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.32 tokens</li><li>max: 53 tokens</li></ul> |
341
+ * Samples:
342
+ | anchor | positive | negative |
343
+ |:------------------------------------------------------------|:--------------------------------------------|:------------------------------------|
344
+ | <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> | <code>شخص في مطعم، يطلب عجة.</code> |
345
+ | <code>أطفال يبتسمون و يلوحون للكاميرا</code> | <code>هناك أطفال حاضرون</code> | <code>الاطفال يتجهمون</code> |
346
+ | <code>صبي يقفز على لوح التزلج في منتصف الجسر الأحمر.</code> | <code>الفتى يقوم بخدعة التزلج</code> | <code>الصبي يتزلج على الرصيف</code> |
347
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
348
+ ```json
349
+ {
350
+ "loss": "MultipleNegativesRankingLoss",
351
+ "matryoshka_dims": [
352
+ 256,
353
+ 128,
354
+ 64
355
+ ],
356
+ "matryoshka_weights": [
357
+ 1,
358
+ 1,
359
+ 1
360
+ ],
361
+ "n_dims_per_step": -1
362
+ }
363
+ ```
364
+
365
+ ### Evaluation Dataset
366
+
367
+ #### Omartificial-Intelligence-Space/arabic-n_li-triplet
368
+
369
+ * Dataset: Omartificial-Intelligence-Space/arabic-n_li-triplet
370
+ * Size: 6,584 evaluation samples
371
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
372
+ * Approximate statistics based on the first 1000 samples:
373
+ | | anchor | positive | negative |
374
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
375
+ | type | string | string | string |
376
+ | details | <ul><li>min: 5 tokens</li><li>mean: 21.86 tokens</li><li>max: 105 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.22 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 11.2 tokens</li><li>max: 33 tokens</li></ul> |
377
+ * Samples:
378
+ | anchor | positive | negative |
379
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------|:---------------------------------------------------|
380
+ | <code>امرأتان يتعانقان بينما يحملان حزمة</code> | <code>إمرأتان يحملان حزمة</code> | <code>الرجال يتشاجرون خارج مطعم</code> |
381
+ | <code>طفلين صغيرين يرتديان قميصاً أزرق، أحدهما يرتدي الرقم 9 والآخر يرتدي الرقم 2 يقفان على خطوات خشبية في الحمام ويغسلان أيديهما في المغسلة.</code> | <code>طفلين يرتديان قميصاً مرقماً يغسلون أيديهم</code> | <code>طفلين يرتديان سترة يذهبان إلى المدرسة</code> |
382
+ | <code>رجل يبيع الدونات لعميل خلال معرض عالمي أقيم في مدينة أنجليس</code> | <code>رجل يبيع الدونات لعميل</code> | <code>امرأة تشرب قهوتها في مقهى صغير</code> |
383
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
384
+ ```json
385
+ {
386
+ "loss": "MultipleNegativesRankingLoss",
387
+ "matryoshka_dims": [
388
+ 256,
389
+ 128,
390
+ 64
391
+ ],
392
+ "matryoshka_weights": [
393
+ 1,
394
+ 1,
395
+ 1
396
+ ],
397
+ "n_dims_per_step": -1
398
+ }
399
+ ```
400
+
401
+ ### Training Hyperparameters
402
+ #### Non-Default Hyperparameters
403
+
404
+ - `per_device_train_batch_size`: 64
405
+ - `per_device_eval_batch_size`: 64
406
+ - `num_train_epochs`: 1
407
+ - `warmup_ratio`: 0.1
408
+ - `fp16`: True
409
+ - `batch_sampler`: no_duplicates
410
+
411
+ #### All Hyperparameters
412
+ <details><summary>Click to expand</summary>
413
+
414
+ - `overwrite_output_dir`: False
415
+ - `do_predict`: False
416
+ - `prediction_loss_only`: True
417
+ - `per_device_train_batch_size`: 64
418
+ - `per_device_eval_batch_size`: 64
419
+ - `per_gpu_train_batch_size`: None
420
+ - `per_gpu_eval_batch_size`: None
421
+ - `gradient_accumulation_steps`: 1
422
+ - `eval_accumulation_steps`: None
423
+ - `learning_rate`: 5e-05
424
+ - `weight_decay`: 0.0
425
+ - `adam_beta1`: 0.9
426
+ - `adam_beta2`: 0.999
427
+ - `adam_epsilon`: 1e-08
428
+ - `max_grad_norm`: 1.0
429
+ - `num_train_epochs`: 1
430
+ - `max_steps`: -1
431
+ - `lr_scheduler_type`: linear
432
+ - `lr_scheduler_kwargs`: {}
433
+ - `warmup_ratio`: 0.1
434
+ - `warmup_steps`: 0
435
+ - `log_level`: passive
436
+ - `log_level_replica`: warning
437
+ - `log_on_each_node`: True
438
+ - `logging_nan_inf_filter`: True
439
+ - `save_safetensors`: True
440
+ - `save_on_each_node`: False
441
+ - `save_only_model`: False
442
+ - `no_cuda`: False
443
+ - `use_cpu`: False
444
+ - `use_mps_device`: False
445
+ - `seed`: 42
446
+ - `data_seed`: None
447
+ - `jit_mode_eval`: False
448
+ - `use_ipex`: False
449
+ - `bf16`: False
450
+ - `fp16`: True
451
+ - `fp16_opt_level`: O1
452
+ - `half_precision_backend`: auto
453
+ - `bf16_full_eval`: False
454
+ - `fp16_full_eval`: False
455
+ - `tf32`: None
456
+ - `local_rank`: 0
457
+ - `ddp_backend`: None
458
+ - `tpu_num_cores`: None
459
+ - `tpu_metrics_debug`: False
460
+ - `debug`: []
461
+ - `dataloader_drop_last`: False
462
+ - `dataloader_num_workers`: 0
463
+ - `dataloader_prefetch_factor`: None
464
+ - `past_index`: -1
465
+ - `disable_tqdm`: False
466
+ - `remove_unused_columns`: True
467
+ - `label_names`: None
468
+ - `load_best_model_at_end`: False
469
+ - `ignore_data_skip`: False
470
+ - `fsdp`: []
471
+ - `fsdp_min_num_params`: 0
472
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
473
+ - `fsdp_transformer_layer_cls_to_wrap`: None
474
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
475
+ - `deepspeed`: None
476
+ - `label_smoothing_factor`: 0.0
477
+ - `optim`: adamw_torch
478
+ - `optim_args`: None
479
+ - `adafactor`: False
480
+ - `group_by_length`: False
481
+ - `length_column_name`: length
482
+ - `ddp_find_unused_parameters`: None
483
+ - `ddp_bucket_cap_mb`: None
484
+ - `ddp_broadcast_buffers`: False
485
+ - `dataloader_pin_memory`: True
486
+ - `dataloader_persistent_workers`: False
487
+ - `skip_memory_metrics`: True
488
+ - `use_legacy_prediction_loop`: False
489
+ - `push_to_hub`: False
490
+ - `resume_from_checkpoint`: None
491
+ - `hub_model_id`: None
492
+ - `hub_strategy`: every_save
493
+ - `hub_private_repo`: False
494
+ - `hub_always_push`: False
495
+ - `gradient_checkpointing`: False
496
+ - `gradient_checkpointing_kwargs`: None
497
+ - `include_inputs_for_metrics`: False
498
+ - `eval_do_concat_batches`: True
499
+ - `fp16_backend`: auto
500
+ - `push_to_hub_model_id`: None
501
+ - `push_to_hub_organization`: None
502
+ - `mp_parameters`:
503
+ - `auto_find_batch_size`: False
504
+ - `full_determinism`: False
505
+ - `torchdynamo`: None
506
+ - `ray_scope`: last
507
+ - `ddp_timeout`: 1800
508
+ - `torch_compile`: False
509
+ - `torch_compile_backend`: None
510
+ - `torch_compile_mode`: None
511
+ - `dispatch_batches`: None
512
+ - `split_batches`: None
513
+ - `include_tokens_per_second`: False
514
+ - `include_num_input_tokens_seen`: False
515
+ - `neftune_noise_alpha`: None
516
+ - `optim_target_modules`: None
517
+ - `batch_sampler`: no_duplicates
518
+ - `multi_dataset_batch_sampler`: proportional
519
+
520
+ </details>
521
+
522
+ ### Training Logs
523
+ | Epoch | Step | Training Loss | sts-test-128_spearman_cosine | sts-test-256_spearman_cosine | sts-test-64_spearman_cosine |
524
+ |:------:|:----:|:-------------:|:----------------------------:|:----------------------------:|:---------------------------:|
525
+ | 0.0229 | 200 | 6.2204 | - | - | - |
526
+ | 0.0459 | 400 | 4.9559 | - | - | - |
527
+ | 0.0688 | 600 | 4.7835 | - | - | - |
528
+ | 0.0918 | 800 | 4.2725 | - | - | - |
529
+ | 0.1147 | 1000 | 4.291 | - | - | - |
530
+ | 0.1377 | 1200 | 4.0704 | - | - | - |
531
+ | 0.1606 | 1400 | 3.7962 | - | - | - |
532
+ | 0.1835 | 1600 | 3.7447 | - | - | - |
533
+ | 0.2065 | 1800 | 3.569 | - | - | - |
534
+ | 0.2294 | 2000 | 3.5373 | - | - | - |
535
+ | 0.2524 | 2200 | 3.608 | - | - | - |
536
+ | 0.2753 | 2400 | 3.5609 | - | - | - |
537
+ | 0.2983 | 2600 | 3.5231 | - | - | - |
538
+ | 0.3212 | 2800 | 3.3312 | - | - | - |
539
+ | 0.3442 | 3000 | 3.4803 | - | - | - |
540
+ | 0.3671 | 3200 | 3.3552 | - | - | - |
541
+ | 0.3900 | 3400 | 3.3024 | - | - | - |
542
+ | 0.4130 | 3600 | 3.2559 | - | - | - |
543
+ | 0.4359 | 3800 | 3.1882 | - | - | - |
544
+ | 0.4589 | 4000 | 3.227 | - | - | - |
545
+ | 0.4818 | 4200 | 3.0889 | - | - | - |
546
+ | 0.5048 | 4400 | 3.0861 | - | - | - |
547
+ | 0.5277 | 4600 | 3.0178 | - | - | - |
548
+ | 0.5506 | 4800 | 3.231 | - | - | - |
549
+ | 0.5736 | 5000 | 3.1593 | - | - | - |
550
+ | 0.5965 | 5200 | 3.1101 | - | - | - |
551
+ | 0.6195 | 5400 | 3.1307 | - | - | - |
552
+ | 0.6424 | 5600 | 3.1265 | - | - | - |
553
+ | 0.6654 | 5800 | 3.1116 | - | - | - |
554
+ | 0.6883 | 6000 | 3.1417 | - | - | - |
555
+ | 0.7113 | 6200 | 3.0862 | - | - | - |
556
+ | 0.7342 | 6400 | 2.9652 | - | - | - |
557
+ | 0.7571 | 6600 | 2.8466 | - | - | - |
558
+ | 0.7801 | 6800 | 2.271 | - | - | - |
559
+ | 0.8030 | 7000 | 2.046 | - | - | - |
560
+ | 0.8260 | 7200 | 1.9634 | - | - | - |
561
+ | 0.8489 | 7400 | 1.8875 | - | - | - |
562
+ | 0.8719 | 7600 | 1.7655 | - | - | - |
563
+ | 0.8948 | 7800 | 1.6874 | - | - | - |
564
+ | 0.9177 | 8000 | 1.7315 | - | - | - |
565
+ | 0.9407 | 8200 | 1.6674 | - | - | - |
566
+ | 0.9636 | 8400 | 1.6574 | - | - | - |
567
+ | 0.9866 | 8600 | 1.6142 | - | - | - |
568
+ | 1.0 | 8717 | - | 0.8347 | 0.8386 | 0.8218 |
569
+
570
+
571
+ ### Framework Versions
572
+ - Python: 3.9.18
573
+ - Sentence Transformers: 3.0.1
574
+ - Transformers: 4.40.0
575
+ - PyTorch: 2.2.2+cu121
576
+ - Accelerate: 0.26.1
577
+ - Datasets: 2.19.0
578
+ - Tokenizers: 0.19.1
579
+
580
+ ## Citation
581
+
582
+ ### BibTeX
583
+
584
+ #### Sentence Transformers
585
+ ```bibtex
586
+ @inproceedings{reimers-2019-sentence-bert,
587
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
588
+ author = "Reimers, Nils and Gurevych, Iryna",
589
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
590
+ month = "11",
591
+ year = "2019",
592
+ publisher = "Association for Computational Linguistics",
593
+ url = "https://arxiv.org/abs/1908.10084",
594
+ }
595
+ ```
596
+
597
+ #### MatryoshkaLoss
598
+ ```bibtex
599
+ @misc{kusupati2024matryoshka,
600
+ title={Matryoshka Representation Learning},
601
+ 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},
602
+ year={2024},
603
+ eprint={2205.13147},
604
+ archivePrefix={arXiv},
605
+ primaryClass={cs.LG}
606
+ }
607
+ ```
608
+
609
+ #### MultipleNegativesRankingLoss
610
+ ```bibtex
611
+ @misc{henderson2017efficient,
612
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
613
+ 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},
614
+ year={2017},
615
+ eprint={1705.00652},
616
+ archivePrefix={arXiv},
617
+ primaryClass={cs.CL}
618
+ }
619
+ ```
620
+
621
+ <!--
622
+ ## Glossary
623
+
624
+ *Clearly define terms in order to be accessible across audiences.*
625
+ -->
626
+
627
+ <!--
628
+ ## Model Card Authors
629
+
630
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
631
+ -->
632
+
633
+ <!--
634
+ ## Model Card Contact
635
+
636
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
637
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.40.0",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 250037
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.40.0",
5
+ "pytorch": "2.2.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c090a115c8104c91dbb786f9b26bdd877a9d293daae34d5e9df0da95c39dacb
3
+ size 470637416
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 128,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
3
+ size 17082987
tokenizer_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "do_lower_case": true,
48
+ "eos_token": "</s>",
49
+ "mask_token": "<mask>",
50
+ "max_length": 128,
51
+ "model_max_length": 128,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "<pad>",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "</s>",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "<unk>"
64
+ }
unigram.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
3
+ size 14763260