Omartificial-Intelligence-Space commited on
Commit
d2aae43
1 Parent(s): 8947d7c

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
2_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f94720e51837559e5e5cc28c5dd8e842889db79c38c1340ee782e75f0d766252
3
+ size 2362528
README.md ADDED
@@ -0,0 +1,991 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/LaBSE
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/LaBSE
58
+ results:
59
+ - task:
60
+ type: semantic-similarity
61
+ name: Semantic Similarity
62
+ dataset:
63
+ name: sts test 768
64
+ type: sts-test-768
65
+ metrics:
66
+ - type: pearson_cosine
67
+ value: 0.7269177710249681
68
+ name: Pearson Cosine
69
+ - type: spearman_cosine
70
+ value: 0.7225258779395222
71
+ name: Spearman Cosine
72
+ - type: pearson_manhattan
73
+ value: 0.7259261785622463
74
+ name: Pearson Manhattan
75
+ - type: spearman_manhattan
76
+ value: 0.7210463582530393
77
+ name: Spearman Manhattan
78
+ - type: pearson_euclidean
79
+ value: 0.7259567884235211
80
+ name: Pearson Euclidean
81
+ - type: spearman_euclidean
82
+ value: 0.722525823788783
83
+ name: Spearman Euclidean
84
+ - type: pearson_dot
85
+ value: 0.7269177712136122
86
+ name: Pearson Dot
87
+ - type: spearman_dot
88
+ value: 0.7225258771129475
89
+ name: Spearman Dot
90
+ - type: pearson_max
91
+ value: 0.7269177712136122
92
+ name: Pearson Max
93
+ - type: spearman_max
94
+ value: 0.7225258779395222
95
+ name: Spearman Max
96
+ - type: pearson_cosine
97
+ value: 0.8143867576376295
98
+ name: Pearson Cosine
99
+ - type: spearman_cosine
100
+ value: 0.8205044914629483
101
+ name: Spearman Cosine
102
+ - type: pearson_manhattan
103
+ value: 0.8203365887013151
104
+ name: Pearson Manhattan
105
+ - type: spearman_manhattan
106
+ value: 0.8203816698535976
107
+ name: Spearman Manhattan
108
+ - type: pearson_euclidean
109
+ value: 0.8201809453496319
110
+ name: Pearson Euclidean
111
+ - type: spearman_euclidean
112
+ value: 0.8205044914629483
113
+ name: Spearman Euclidean
114
+ - type: pearson_dot
115
+ value: 0.8143867541070537
116
+ name: Pearson Dot
117
+ - type: spearman_dot
118
+ value: 0.8205044914629483
119
+ name: Spearman Dot
120
+ - type: pearson_max
121
+ value: 0.8203365887013151
122
+ name: Pearson Max
123
+ - type: spearman_max
124
+ value: 0.8205044914629483
125
+ name: Spearman Max
126
+ - task:
127
+ type: semantic-similarity
128
+ name: Semantic Similarity
129
+ dataset:
130
+ name: sts test 512
131
+ type: sts-test-512
132
+ metrics:
133
+ - type: pearson_cosine
134
+ value: 0.7268389724271859
135
+ name: Pearson Cosine
136
+ - type: spearman_cosine
137
+ value: 0.7224359411000278
138
+ name: Spearman Cosine
139
+ - type: pearson_manhattan
140
+ value: 0.7241418669615103
141
+ name: Pearson Manhattan
142
+ - type: spearman_manhattan
143
+ value: 0.7195408311833029
144
+ name: Spearman Manhattan
145
+ - type: pearson_euclidean
146
+ value: 0.7248184919191593
147
+ name: Pearson Euclidean
148
+ - type: spearman_euclidean
149
+ value: 0.7212936866178097
150
+ name: Spearman Euclidean
151
+ - type: pearson_dot
152
+ value: 0.7252522928016701
153
+ name: Pearson Dot
154
+ - type: spearman_dot
155
+ value: 0.7205040482865328
156
+ name: Spearman Dot
157
+ - type: pearson_max
158
+ value: 0.7268389724271859
159
+ name: Pearson Max
160
+ - type: spearman_max
161
+ value: 0.7224359411000278
162
+ name: Spearman Max
163
+ - type: pearson_cosine
164
+ value: 0.8143448965624136
165
+ name: Pearson Cosine
166
+ - type: spearman_cosine
167
+ value: 0.8211700903453509
168
+ name: Spearman Cosine
169
+ - type: pearson_manhattan
170
+ value: 0.8217448619823571
171
+ name: Pearson Manhattan
172
+ - type: spearman_manhattan
173
+ value: 0.8216016599665544
174
+ name: Spearman Manhattan
175
+ - type: pearson_euclidean
176
+ value: 0.8216413349390971
177
+ name: Pearson Euclidean
178
+ - type: spearman_euclidean
179
+ value: 0.82188122418776
180
+ name: Spearman Euclidean
181
+ - type: pearson_dot
182
+ value: 0.8097020064483653
183
+ name: Pearson Dot
184
+ - type: spearman_dot
185
+ value: 0.8147306090545295
186
+ name: Spearman Dot
187
+ - type: pearson_max
188
+ value: 0.8217448619823571
189
+ name: Pearson Max
190
+ - type: spearman_max
191
+ value: 0.82188122418776
192
+ name: Spearman Max
193
+ - task:
194
+ type: semantic-similarity
195
+ name: Semantic Similarity
196
+ dataset:
197
+ name: sts test 256
198
+ type: sts-test-256
199
+ metrics:
200
+ - type: pearson_cosine
201
+ value: 0.7283468617741852
202
+ name: Pearson Cosine
203
+ - type: spearman_cosine
204
+ value: 0.7264294106954872
205
+ name: Spearman Cosine
206
+ - type: pearson_manhattan
207
+ value: 0.7227711798003426
208
+ name: Pearson Manhattan
209
+ - type: spearman_manhattan
210
+ value: 0.718067982079232
211
+ name: Spearman Manhattan
212
+ - type: pearson_euclidean
213
+ value: 0.7251492361775083
214
+ name: Pearson Euclidean
215
+ - type: spearman_euclidean
216
+ value: 0.7215068115809131
217
+ name: Spearman Euclidean
218
+ - type: pearson_dot
219
+ value: 0.7243396991648858
220
+ name: Pearson Dot
221
+ - type: spearman_dot
222
+ value: 0.7221390873398206
223
+ name: Spearman Dot
224
+ - type: pearson_max
225
+ value: 0.7283468617741852
226
+ name: Pearson Max
227
+ - type: spearman_max
228
+ value: 0.7264294106954872
229
+ name: Spearman Max
230
+ - type: pearson_cosine
231
+ value: 0.8075613785257986
232
+ name: Pearson Cosine
233
+ - type: spearman_cosine
234
+ value: 0.8159258089804861
235
+ name: Spearman Cosine
236
+ - type: pearson_manhattan
237
+ value: 0.8208711370091426
238
+ name: Pearson Manhattan
239
+ - type: spearman_manhattan
240
+ value: 0.8196747601014518
241
+ name: Spearman Manhattan
242
+ - type: pearson_euclidean
243
+ value: 0.8210210137439432
244
+ name: Pearson Euclidean
245
+ - type: spearman_euclidean
246
+ value: 0.8203004500356083
247
+ name: Spearman Euclidean
248
+ - type: pearson_dot
249
+ value: 0.7870611647231145
250
+ name: Pearson Dot
251
+ - type: spearman_dot
252
+ value: 0.7874848213991118
253
+ name: Spearman Dot
254
+ - type: pearson_max
255
+ value: 0.8210210137439432
256
+ name: Pearson Max
257
+ - type: spearman_max
258
+ value: 0.8203004500356083
259
+ name: Spearman Max
260
+ - task:
261
+ type: semantic-similarity
262
+ name: Semantic Similarity
263
+ dataset:
264
+ name: sts test 128
265
+ type: sts-test-128
266
+ metrics:
267
+ - type: pearson_cosine
268
+ value: 0.7102082520621849
269
+ name: Pearson Cosine
270
+ - type: spearman_cosine
271
+ value: 0.7103917869311991
272
+ name: Spearman Cosine
273
+ - type: pearson_manhattan
274
+ value: 0.7134729607181519
275
+ name: Pearson Manhattan
276
+ - type: spearman_manhattan
277
+ value: 0.708895102058259
278
+ name: Spearman Manhattan
279
+ - type: pearson_euclidean
280
+ value: 0.7171545288118942
281
+ name: Pearson Euclidean
282
+ - type: spearman_euclidean
283
+ value: 0.7130380237150746
284
+ name: Spearman Euclidean
285
+ - type: pearson_dot
286
+ value: 0.6777774738547628
287
+ name: Pearson Dot
288
+ - type: spearman_dot
289
+ value: 0.6746474823963989
290
+ name: Spearman Dot
291
+ - type: pearson_max
292
+ value: 0.7171545288118942
293
+ name: Pearson Max
294
+ - type: spearman_max
295
+ value: 0.7130380237150746
296
+ name: Spearman Max
297
+ - type: pearson_cosine
298
+ value: 0.8024378358145556
299
+ name: Pearson Cosine
300
+ - type: spearman_cosine
301
+ value: 0.8117561815472325
302
+ name: Spearman Cosine
303
+ - type: pearson_manhattan
304
+ value: 0.818920309459774
305
+ name: Pearson Manhattan
306
+ - type: spearman_manhattan
307
+ value: 0.8180515365910205
308
+ name: Spearman Manhattan
309
+ - type: pearson_euclidean
310
+ value: 0.8198346073356603
311
+ name: Pearson Euclidean
312
+ - type: spearman_euclidean
313
+ value: 0.8185162896024369
314
+ name: Spearman Euclidean
315
+ - type: pearson_dot
316
+ value: 0.7513270537478935
317
+ name: Pearson Dot
318
+ - type: spearman_dot
319
+ value: 0.7427542871546953
320
+ name: Spearman Dot
321
+ - type: pearson_max
322
+ value: 0.8198346073356603
323
+ name: Pearson Max
324
+ - type: spearman_max
325
+ value: 0.8185162896024369
326
+ name: Spearman Max
327
+ - task:
328
+ type: semantic-similarity
329
+ name: Semantic Similarity
330
+ dataset:
331
+ name: sts test 64
332
+ type: sts-test-64
333
+ metrics:
334
+ - type: pearson_cosine
335
+ value: 0.6930745722517785
336
+ name: Pearson Cosine
337
+ - type: spearman_cosine
338
+ value: 0.6982194042238953
339
+ name: Spearman Cosine
340
+ - type: pearson_manhattan
341
+ value: 0.6971382079778946
342
+ name: Pearson Manhattan
343
+ - type: spearman_manhattan
344
+ value: 0.6942362764367931
345
+ name: Spearman Manhattan
346
+ - type: pearson_euclidean
347
+ value: 0.7012627015062325
348
+ name: Pearson Euclidean
349
+ - type: spearman_euclidean
350
+ value: 0.6986972295835788
351
+ name: Spearman Euclidean
352
+ - type: pearson_dot
353
+ value: 0.6376735798940838
354
+ name: Pearson Dot
355
+ - type: spearman_dot
356
+ value: 0.6344835722310429
357
+ name: Spearman Dot
358
+ - type: pearson_max
359
+ value: 0.7012627015062325
360
+ name: Pearson Max
361
+ - type: spearman_max
362
+ value: 0.6986972295835788
363
+ name: Spearman Max
364
+ - type: pearson_cosine
365
+ value: 0.7855080652087961
366
+ name: Pearson Cosine
367
+ - type: spearman_cosine
368
+ value: 0.7948979371698327
369
+ name: Spearman Cosine
370
+ - type: pearson_manhattan
371
+ value: 0.8060407473462375
372
+ name: Pearson Manhattan
373
+ - type: spearman_manhattan
374
+ value: 0.8041199691999044
375
+ name: Spearman Manhattan
376
+ - type: pearson_euclidean
377
+ value: 0.8088262858195556
378
+ name: Pearson Euclidean
379
+ - type: spearman_euclidean
380
+ value: 0.8060483394849104
381
+ name: Spearman Euclidean
382
+ - type: pearson_dot
383
+ value: 0.677754045289596
384
+ name: Pearson Dot
385
+ - type: spearman_dot
386
+ value: 0.6616232873061395
387
+ name: Spearman Dot
388
+ - type: pearson_max
389
+ value: 0.8088262858195556
390
+ name: Pearson Max
391
+ - type: spearman_max
392
+ value: 0.8060483394849104
393
+ name: Spearman Max
394
+ ---
395
+
396
+ # SentenceTransformer based on sentence-transformers/LaBSE
397
+
398
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/LaBSE](https://huggingface.co/sentence-transformers/LaBSE) on the Omartificial-Intelligence-Space/arabic-n_li-triplet dataset. 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.
399
+
400
+ ## Model Details
401
+
402
+ ### Model Description
403
+ - **Model Type:** Sentence Transformer
404
+ - **Base model:** [sentence-transformers/LaBSE](https://huggingface.co/sentence-transformers/LaBSE) <!-- at revision e34fab64a3011d2176c99545a93d5cbddc9a91b7 -->
405
+ - **Maximum Sequence Length:** 256 tokens
406
+ - **Output Dimensionality:** 768 tokens
407
+ - **Similarity Function:** Cosine Similarity
408
+ - **Training Dataset:**
409
+ - Omartificial-Intelligence-Space/arabic-n_li-triplet
410
+ <!-- - **Language:** Unknown -->
411
+ <!-- - **License:** Unknown -->
412
+
413
+ ### Model Sources
414
+
415
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
416
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
417
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
418
+
419
+ ### Full Model Architecture
420
+
421
+ ```
422
+ SentenceTransformer(
423
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
424
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
425
+ (2): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
426
+ (3): Normalize()
427
+ )
428
+ ```
429
+
430
+ ## Usage
431
+
432
+ ### Direct Usage (Sentence Transformers)
433
+
434
+ First install the Sentence Transformers library:
435
+
436
+ ```bash
437
+ pip install -U sentence-transformers
438
+ ```
439
+
440
+ Then you can load this model and run inference.
441
+ ```python
442
+ from sentence_transformers import SentenceTransformer
443
+
444
+ # Download from the 🤗 Hub
445
+ model = SentenceTransformer("Omartificial-Intelligence-Space/Arabic-labse")
446
+ # Run inference
447
+ sentences = [
448
+ 'يجلس شاب ذو شعر أشقر على الحائط يقرأ جريدة بينما تمر امرأة وفتاة شابة.',
449
+ 'ذكر شاب ينظر إلى جريدة بينما تمر إمرأتان بجانبه',
450
+ 'الشاب نائم بينما الأم تقود ابنتها إلى الحديقة',
451
+ ]
452
+ embeddings = model.encode(sentences)
453
+ print(embeddings.shape)
454
+ # [3, 768]
455
+
456
+ # Get the similarity scores for the embeddings
457
+ similarities = model.similarity(embeddings, embeddings)
458
+ print(similarities.shape)
459
+ # [3, 3]
460
+ ```
461
+
462
+ <!--
463
+ ### Direct Usage (Transformers)
464
+
465
+ <details><summary>Click to see the direct usage in Transformers</summary>
466
+
467
+ </details>
468
+ -->
469
+
470
+ <!--
471
+ ### Downstream Usage (Sentence Transformers)
472
+
473
+ You can finetune this model on your own dataset.
474
+
475
+ <details><summary>Click to expand</summary>
476
+
477
+ </details>
478
+ -->
479
+
480
+ <!--
481
+ ### Out-of-Scope Use
482
+
483
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
484
+ -->
485
+
486
+ ## Evaluation
487
+
488
+ ### Metrics
489
+
490
+ #### Semantic Similarity
491
+ * Dataset: `sts-test-768`
492
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
493
+
494
+ | Metric | Value |
495
+ |:--------------------|:-----------|
496
+ | pearson_cosine | 0.7269 |
497
+ | **spearman_cosine** | **0.7225** |
498
+ | pearson_manhattan | 0.7259 |
499
+ | spearman_manhattan | 0.721 |
500
+ | pearson_euclidean | 0.726 |
501
+ | spearman_euclidean | 0.7225 |
502
+ | pearson_dot | 0.7269 |
503
+ | spearman_dot | 0.7225 |
504
+ | pearson_max | 0.7269 |
505
+ | spearman_max | 0.7225 |
506
+
507
+ #### Semantic Similarity
508
+ * Dataset: `sts-test-512`
509
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
510
+
511
+ | Metric | Value |
512
+ |:--------------------|:-----------|
513
+ | pearson_cosine | 0.7268 |
514
+ | **spearman_cosine** | **0.7224** |
515
+ | pearson_manhattan | 0.7241 |
516
+ | spearman_manhattan | 0.7195 |
517
+ | pearson_euclidean | 0.7248 |
518
+ | spearman_euclidean | 0.7213 |
519
+ | pearson_dot | 0.7253 |
520
+ | spearman_dot | 0.7205 |
521
+ | pearson_max | 0.7268 |
522
+ | spearman_max | 0.7224 |
523
+
524
+ #### Semantic Similarity
525
+ * Dataset: `sts-test-256`
526
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
527
+
528
+ | Metric | Value |
529
+ |:--------------------|:-----------|
530
+ | pearson_cosine | 0.7283 |
531
+ | **spearman_cosine** | **0.7264** |
532
+ | pearson_manhattan | 0.7228 |
533
+ | spearman_manhattan | 0.7181 |
534
+ | pearson_euclidean | 0.7251 |
535
+ | spearman_euclidean | 0.7215 |
536
+ | pearson_dot | 0.7243 |
537
+ | spearman_dot | 0.7221 |
538
+ | pearson_max | 0.7283 |
539
+ | spearman_max | 0.7264 |
540
+
541
+ #### Semantic Similarity
542
+ * Dataset: `sts-test-128`
543
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
544
+
545
+ | Metric | Value |
546
+ |:--------------------|:-----------|
547
+ | pearson_cosine | 0.7102 |
548
+ | **spearman_cosine** | **0.7104** |
549
+ | pearson_manhattan | 0.7135 |
550
+ | spearman_manhattan | 0.7089 |
551
+ | pearson_euclidean | 0.7172 |
552
+ | spearman_euclidean | 0.713 |
553
+ | pearson_dot | 0.6778 |
554
+ | spearman_dot | 0.6746 |
555
+ | pearson_max | 0.7172 |
556
+ | spearman_max | 0.713 |
557
+
558
+ #### Semantic Similarity
559
+ * Dataset: `sts-test-64`
560
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
561
+
562
+ | Metric | Value |
563
+ |:--------------------|:-----------|
564
+ | pearson_cosine | 0.6931 |
565
+ | **spearman_cosine** | **0.6982** |
566
+ | pearson_manhattan | 0.6971 |
567
+ | spearman_manhattan | 0.6942 |
568
+ | pearson_euclidean | 0.7013 |
569
+ | spearman_euclidean | 0.6987 |
570
+ | pearson_dot | 0.6377 |
571
+ | spearman_dot | 0.6345 |
572
+ | pearson_max | 0.7013 |
573
+ | spearman_max | 0.6987 |
574
+
575
+ #### Semantic Similarity
576
+ * Dataset: `sts-test-768`
577
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
578
+
579
+ | Metric | Value |
580
+ |:--------------------|:-----------|
581
+ | pearson_cosine | 0.8144 |
582
+ | **spearman_cosine** | **0.8205** |
583
+ | pearson_manhattan | 0.8203 |
584
+ | spearman_manhattan | 0.8204 |
585
+ | pearson_euclidean | 0.8202 |
586
+ | spearman_euclidean | 0.8205 |
587
+ | pearson_dot | 0.8144 |
588
+ | spearman_dot | 0.8205 |
589
+ | pearson_max | 0.8203 |
590
+ | spearman_max | 0.8205 |
591
+
592
+ #### Semantic Similarity
593
+ * Dataset: `sts-test-512`
594
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
595
+
596
+ | Metric | Value |
597
+ |:--------------------|:-----------|
598
+ | pearson_cosine | 0.8143 |
599
+ | **spearman_cosine** | **0.8212** |
600
+ | pearson_manhattan | 0.8217 |
601
+ | spearman_manhattan | 0.8216 |
602
+ | pearson_euclidean | 0.8216 |
603
+ | spearman_euclidean | 0.8219 |
604
+ | pearson_dot | 0.8097 |
605
+ | spearman_dot | 0.8147 |
606
+ | pearson_max | 0.8217 |
607
+ | spearman_max | 0.8219 |
608
+
609
+ #### Semantic Similarity
610
+ * Dataset: `sts-test-256`
611
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
612
+
613
+ | Metric | Value |
614
+ |:--------------------|:-----------|
615
+ | pearson_cosine | 0.8076 |
616
+ | **spearman_cosine** | **0.8159** |
617
+ | pearson_manhattan | 0.8209 |
618
+ | spearman_manhattan | 0.8197 |
619
+ | pearson_euclidean | 0.821 |
620
+ | spearman_euclidean | 0.8203 |
621
+ | pearson_dot | 0.7871 |
622
+ | spearman_dot | 0.7875 |
623
+ | pearson_max | 0.821 |
624
+ | spearman_max | 0.8203 |
625
+
626
+ #### Semantic Similarity
627
+ * Dataset: `sts-test-128`
628
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
629
+
630
+ | Metric | Value |
631
+ |:--------------------|:-----------|
632
+ | pearson_cosine | 0.8024 |
633
+ | **spearman_cosine** | **0.8118** |
634
+ | pearson_manhattan | 0.8189 |
635
+ | spearman_manhattan | 0.8181 |
636
+ | pearson_euclidean | 0.8198 |
637
+ | spearman_euclidean | 0.8185 |
638
+ | pearson_dot | 0.7513 |
639
+ | spearman_dot | 0.7428 |
640
+ | pearson_max | 0.8198 |
641
+ | spearman_max | 0.8185 |
642
+
643
+ #### Semantic Similarity
644
+ * Dataset: `sts-test-64`
645
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
646
+
647
+ | Metric | Value |
648
+ |:--------------------|:-----------|
649
+ | pearson_cosine | 0.7855 |
650
+ | **spearman_cosine** | **0.7949** |
651
+ | pearson_manhattan | 0.806 |
652
+ | spearman_manhattan | 0.8041 |
653
+ | pearson_euclidean | 0.8088 |
654
+ | spearman_euclidean | 0.806 |
655
+ | pearson_dot | 0.6778 |
656
+ | spearman_dot | 0.6616 |
657
+ | pearson_max | 0.8088 |
658
+ | spearman_max | 0.806 |
659
+
660
+ <!--
661
+ ## Bias, Risks and Limitations
662
+
663
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
664
+ -->
665
+
666
+ <!--
667
+ ### Recommendations
668
+
669
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
670
+ -->
671
+
672
+ ## Training Details
673
+
674
+ ### Training Dataset
675
+
676
+ #### Omartificial-Intelligence-Space/arabic-n_li-triplet
677
+
678
+ * Dataset: Omartificial-Intelligence-Space/arabic-n_li-triplet
679
+ * Size: 557,850 training samples
680
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
681
+ * Approximate statistics based on the first 1000 samples:
682
+ | | anchor | positive | negative |
683
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
684
+ | type | string | string | string |
685
+ | details | <ul><li>min: 4 tokens</li><li>mean: 9.99 tokens</li><li>max: 51 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 12.44 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.82 tokens</li><li>max: 49 tokens</li></ul> |
686
+ * Samples:
687
+ | anchor | positive | negative |
688
+ |:------------------------------------------------------------|:--------------------------------------------|:------------------------------------|
689
+ | <code>شخص على حصان يقفز فوق طائرة معطلة</code> | <code>شخص في الهواء الطلق، على حصان.</code> | <code>شخص في مطعم، يطلب عجة.</code> |
690
+ | <code>أطفال يبتسمون و يلوحون للكاميرا</code> | <code>هناك أطفال حاضرون</code> | <code>الاطفال يتجهمون</code> |
691
+ | <code>صبي يقفز على لوح التزلج في منتصف الجسر الأحمر.</code> | <code>الفتى يقوم بخدعة التزلج</code> | <code>الصبي يتزلج على الرصيف</code> |
692
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
693
+ ```json
694
+ {
695
+ "loss": "MultipleNegativesRankingLoss",
696
+ "matryoshka_dims": [
697
+ 768,
698
+ 512,
699
+ 256,
700
+ 128,
701
+ 64
702
+ ],
703
+ "matryoshka_weights": [
704
+ 1,
705
+ 1,
706
+ 1,
707
+ 1,
708
+ 1
709
+ ],
710
+ "n_dims_per_step": -1
711
+ }
712
+ ```
713
+
714
+ ### Evaluation Dataset
715
+
716
+ #### Omartificial-Intelligence-Space/arabic-n_li-triplet
717
+
718
+ * Dataset: Omartificial-Intelligence-Space/arabic-n_li-triplet
719
+ * Size: 6,584 evaluation samples
720
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
721
+ * Approximate statistics based on the first 1000 samples:
722
+ | | anchor | positive | negative |
723
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
724
+ | type | string | string | string |
725
+ | details | <ul><li>min: 4 tokens</li><li>mean: 19.71 tokens</li><li>max: 100 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.37 tokens</li><li>max: 38 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.49 tokens</li><li>max: 34 tokens</li></ul> |
726
+ * Samples:
727
+ | anchor | positive | negative |
728
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------|:---------------------------------------------------|
729
+ | <code>امرأتان يتعانقان بينما يحملان حزمة</code> | <code>إمرأتان يحملان حزمة</code> | <code>الرجال يتشاجرون خارج مطعم</code> |
730
+ | <code>طفلين صغيرين يرتديان قميصاً أزرق، أحدهما يرتدي الرقم 9 والآخر يرتدي الرقم 2 يقفان على خطوات خشبية في الحمام ويغسلان أيديهما في المغسلة.</code> | <code>طفلين يرتديان قميصاً مرقماً يغسلون أيديهم</code> | <code>طفلين يرتديان سترة يذهبان إلى المدرسة</code> |
731
+ | <code>رجل يبيع الدونات لعميل خلال معرض عالمي أقيم في مدينة أنجليس</code> | <code>رجل يبيع الدونات لعميل</code> | <code>امرأة تشرب قهوتها في مقهى صغير</code> |
732
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
733
+ ```json
734
+ {
735
+ "loss": "MultipleNegativesRankingLoss",
736
+ "matryoshka_dims": [
737
+ 768,
738
+ 512,
739
+ 256,
740
+ 128,
741
+ 64
742
+ ],
743
+ "matryoshka_weights": [
744
+ 1,
745
+ 1,
746
+ 1,
747
+ 1,
748
+ 1
749
+ ],
750
+ "n_dims_per_step": -1
751
+ }
752
+ ```
753
+
754
+ ### Training Hyperparameters
755
+ #### Non-Default Hyperparameters
756
+
757
+ - `per_device_train_batch_size`: 64
758
+ - `per_device_eval_batch_size`: 64
759
+ - `num_train_epochs`: 1
760
+ - `warmup_ratio`: 0.1
761
+ - `fp16`: True
762
+ - `batch_sampler`: no_duplicates
763
+
764
+ #### All Hyperparameters
765
+ <details><summary>Click to expand</summary>
766
+
767
+ - `overwrite_output_dir`: False
768
+ - `do_predict`: False
769
+ - `prediction_loss_only`: True
770
+ - `per_device_train_batch_size`: 64
771
+ - `per_device_eval_batch_size`: 64
772
+ - `per_gpu_train_batch_size`: None
773
+ - `per_gpu_eval_batch_size`: None
774
+ - `gradient_accumulation_steps`: 1
775
+ - `eval_accumulation_steps`: None
776
+ - `learning_rate`: 5e-05
777
+ - `weight_decay`: 0.0
778
+ - `adam_beta1`: 0.9
779
+ - `adam_beta2`: 0.999
780
+ - `adam_epsilon`: 1e-08
781
+ - `max_grad_norm`: 1.0
782
+ - `num_train_epochs`: 1
783
+ - `max_steps`: -1
784
+ - `lr_scheduler_type`: linear
785
+ - `lr_scheduler_kwargs`: {}
786
+ - `warmup_ratio`: 0.1
787
+ - `warmup_steps`: 0
788
+ - `log_level`: passive
789
+ - `log_level_replica`: warning
790
+ - `log_on_each_node`: True
791
+ - `logging_nan_inf_filter`: True
792
+ - `save_safetensors`: True
793
+ - `save_on_each_node`: False
794
+ - `save_only_model`: False
795
+ - `no_cuda`: False
796
+ - `use_cpu`: False
797
+ - `use_mps_device`: False
798
+ - `seed`: 42
799
+ - `data_seed`: None
800
+ - `jit_mode_eval`: False
801
+ - `use_ipex`: False
802
+ - `bf16`: False
803
+ - `fp16`: True
804
+ - `fp16_opt_level`: O1
805
+ - `half_precision_backend`: auto
806
+ - `bf16_full_eval`: False
807
+ - `fp16_full_eval`: False
808
+ - `tf32`: None
809
+ - `local_rank`: 0
810
+ - `ddp_backend`: None
811
+ - `tpu_num_cores`: None
812
+ - `tpu_metrics_debug`: False
813
+ - `debug`: []
814
+ - `dataloader_drop_last`: False
815
+ - `dataloader_num_workers`: 0
816
+ - `dataloader_prefetch_factor`: None
817
+ - `past_index`: -1
818
+ - `disable_tqdm`: False
819
+ - `remove_unused_columns`: True
820
+ - `label_names`: None
821
+ - `load_best_model_at_end`: False
822
+ - `ignore_data_skip`: False
823
+ - `fsdp`: []
824
+ - `fsdp_min_num_params`: 0
825
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
826
+ - `fsdp_transformer_layer_cls_to_wrap`: None
827
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'gradient_accumulation_kwargs': None}
828
+ - `deepspeed`: None
829
+ - `label_smoothing_factor`: 0.0
830
+ - `optim`: adamw_torch
831
+ - `optim_args`: None
832
+ - `adafactor`: False
833
+ - `group_by_length`: False
834
+ - `length_column_name`: length
835
+ - `ddp_find_unused_parameters`: None
836
+ - `ddp_bucket_cap_mb`: None
837
+ - `ddp_broadcast_buffers`: False
838
+ - `dataloader_pin_memory`: True
839
+ - `dataloader_persistent_workers`: False
840
+ - `skip_memory_metrics`: True
841
+ - `use_legacy_prediction_loop`: False
842
+ - `push_to_hub`: False
843
+ - `resume_from_checkpoint`: None
844
+ - `hub_model_id`: None
845
+ - `hub_strategy`: every_save
846
+ - `hub_private_repo`: False
847
+ - `hub_always_push`: False
848
+ - `gradient_checkpointing`: False
849
+ - `gradient_checkpointing_kwargs`: None
850
+ - `include_inputs_for_metrics`: False
851
+ - `eval_do_concat_batches`: True
852
+ - `fp16_backend`: auto
853
+ - `push_to_hub_model_id`: None
854
+ - `push_to_hub_organization`: None
855
+ - `mp_parameters`:
856
+ - `auto_find_batch_size`: False
857
+ - `full_determinism`: False
858
+ - `torchdynamo`: None
859
+ - `ray_scope`: last
860
+ - `ddp_timeout`: 1800
861
+ - `torch_compile`: False
862
+ - `torch_compile_backend`: None
863
+ - `torch_compile_mode`: None
864
+ - `dispatch_batches`: None
865
+ - `split_batches`: None
866
+ - `include_tokens_per_second`: False
867
+ - `include_num_input_tokens_seen`: False
868
+ - `neftune_noise_alpha`: None
869
+ - `optim_target_modules`: None
870
+ - `batch_sampler`: no_duplicates
871
+ - `multi_dataset_batch_sampler`: proportional
872
+
873
+ </details>
874
+
875
+ ### Training Logs
876
+ | Epoch | Step | Training Loss | sts-test-128_spearman_cosine | sts-test-256_spearman_cosine | sts-test-512_spearman_cosine | sts-test-64_spearman_cosine | sts-test-768_spearman_cosine |
877
+ |:------:|:----:|:-------------:|:----------------------------:|:----------------------------:|:----------------------------:|:---------------------------:|:----------------------------:|
878
+ | None | 0 | - | 0.7104 | 0.7264 | 0.7224 | 0.6982 | 0.7225 |
879
+ | 0.0229 | 200 | 13.1738 | - | - | - | - | - |
880
+ | 0.0459 | 400 | 8.8127 | - | - | - | - | - |
881
+ | 0.0688 | 600 | 8.0984 | - | - | - | - | - |
882
+ | 0.0918 | 800 | 7.2984 | - | - | - | - | - |
883
+ | 0.1147 | 1000 | 7.5749 | - | - | - | - | - |
884
+ | 0.1377 | 1200 | 7.1292 | - | - | - | - | - |
885
+ | 0.1606 | 1400 | 6.6146 | - | - | - | - | - |
886
+ | 0.1835 | 1600 | 6.6523 | - | - | - | - | - |
887
+ | 0.2065 | 1800 | 6.1095 | - | - | - | - | - |
888
+ | 0.2294 | 2000 | 6.0841 | - | - | - | - | - |
889
+ | 0.2524 | 2200 | 6.3024 | - | - | - | - | - |
890
+ | 0.2753 | 2400 | 6.1941 | - | - | - | - | - |
891
+ | 0.2983 | 2600 | 6.1686 | - | - | - | - | - |
892
+ | 0.3212 | 2800 | 5.8317 | - | - | - | - | - |
893
+ | 0.3442 | 3000 | 6.0597 | - | - | - | - | - |
894
+ | 0.3671 | 3200 | 5.7832 | - | - | - | - | - |
895
+ | 0.3900 | 3400 | 5.7088 | - | - | - | - | - |
896
+ | 0.4130 | 3600 | 5.6988 | - | - | - | - | - |
897
+ | 0.4359 | 3800 | 5.5268 | - | - | - | - | - |
898
+ | 0.4589 | 4000 | 5.5543 | - | - | - | - | - |
899
+ | 0.4818 | 4200 | 5.3152 | - | - | - | - | - |
900
+ | 0.5048 | 4400 | 5.2894 | - | - | - | - | - |
901
+ | 0.5277 | 4600 | 5.1805 | - | - | - | - | - |
902
+ | 0.5506 | 4800 | 5.4559 | - | - | - | - | - |
903
+ | 0.5736 | 5000 | 5.3836 | - | - | - | - | - |
904
+ | 0.5965 | 5200 | 5.2626 | - | - | - | - | - |
905
+ | 0.6195 | 5400 | 5.2511 | - | - | - | - | - |
906
+ | 0.6424 | 5600 | 5.3308 | - | - | - | - | - |
907
+ | 0.6654 | 5800 | 5.2264 | - | - | - | - | - |
908
+ | 0.6883 | 6000 | 5.2881 | - | - | - | - | - |
909
+ | 0.7113 | 6200 | 5.1349 | - | - | - | - | - |
910
+ | 0.7342 | 6400 | 5.0872 | - | - | - | - | - |
911
+ | 0.7571 | 6600 | 4.5515 | - | - | - | - | - |
912
+ | 0.7801 | 6800 | 3.4312 | - | - | - | - | - |
913
+ | 0.8030 | 7000 | 3.1008 | - | - | - | - | - |
914
+ | 0.8260 | 7200 | 2.9582 | - | - | - | - | - |
915
+ | 0.8489 | 7400 | 2.8153 | - | - | - | - | - |
916
+ | 0.8719 | 7600 | 2.7214 | - | - | - | - | - |
917
+ | 0.8948 | 7800 | 2.5392 | - | - | - | - | - |
918
+ | 0.9177 | 8000 | 2.584 | - | - | - | - | - |
919
+ | 0.9407 | 8200 | 2.5384 | - | - | - | - | - |
920
+ | 0.9636 | 8400 | 2.4937 | - | - | - | - | - |
921
+ | 0.9866 | 8600 | 2.4155 | - | - | - | - | - |
922
+ | 1.0 | 8717 | - | 0.8118 | 0.8159 | 0.8212 | 0.7949 | 0.8205 |
923
+
924
+
925
+ ### Framework Versions
926
+ - Python: 3.9.18
927
+ - Sentence Transformers: 3.0.1
928
+ - Transformers: 4.40.0
929
+ - PyTorch: 2.2.2+cu121
930
+ - Accelerate: 0.26.1
931
+ - Datasets: 2.19.0
932
+ - Tokenizers: 0.19.1
933
+
934
+ ## Citation
935
+
936
+ ### BibTeX
937
+
938
+ #### Sentence Transformers
939
+ ```bibtex
940
+ @inproceedings{reimers-2019-sentence-bert,
941
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
942
+ author = "Reimers, Nils and Gurevych, Iryna",
943
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
944
+ month = "11",
945
+ year = "2019",
946
+ publisher = "Association for Computational Linguistics",
947
+ url = "https://arxiv.org/abs/1908.10084",
948
+ }
949
+ ```
950
+
951
+ #### MatryoshkaLoss
952
+ ```bibtex
953
+ @misc{kusupati2024matryoshka,
954
+ title={Matryoshka Representation Learning},
955
+ 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},
956
+ year={2024},
957
+ eprint={2205.13147},
958
+ archivePrefix={arXiv},
959
+ primaryClass={cs.LG}
960
+ }
961
+ ```
962
+
963
+ #### MultipleNegativesRankingLoss
964
+ ```bibtex
965
+ @misc{henderson2017efficient,
966
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
967
+ 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},
968
+ year={2017},
969
+ eprint={1705.00652},
970
+ archivePrefix={arXiv},
971
+ primaryClass={cs.CL}
972
+ }
973
+ ```
974
+
975
+ <!--
976
+ ## Glossary
977
+
978
+ *Clearly define terms in order to be accessible across audiences.*
979
+ -->
980
+
981
+ <!--
982
+ ## Model Card Authors
983
+
984
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
985
+ -->
986
+
987
+ <!--
988
+ ## Model Card Contact
989
+
990
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
991
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/LaBSE",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "directionality": "bidi",
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-12,
16
+ "max_position_embeddings": 512,
17
+ "model_type": "bert",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "pad_token_id": 0,
21
+ "pooler_fc_size": 768,
22
+ "pooler_num_attention_heads": 12,
23
+ "pooler_num_fc_layers": 3,
24
+ "pooler_size_per_head": 128,
25
+ "pooler_type": "first_token_transform",
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.40.0",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 501153
32
+ }
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": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a36d65fc211576343309486c8678a77fbac5434c2d5866075623156ce8c58ad
3
+ size 1883730160
modules.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Dense",
18
+ "type": "sentence_transformers.models.Dense"
19
+ },
20
+ {
21
+ "idx": 3,
22
+ "name": "3",
23
+ "path": "3_Normalize",
24
+ "type": "sentence_transformers.models.Normalize"
25
+ }
26
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 256,
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
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92262b29204f8fdc169a63f9005a0e311a16262cef4d96ecfe2a7ed638662ed3
3
+ size 13632172
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": false,
48
+ "full_tokenizer_file": null,
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 256,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff