dariolopez commited on
Commit
90b9497
1 Parent(s): 07583f8

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": 1024,
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
+ }
README.md ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: BAAI/bge-m3
3
+ datasets: []
4
+ language:
5
+ - es
6
+ library_name: sentence-transformers
7
+ license: apache-2.0
8
+ metrics:
9
+ - cosine_accuracy@1
10
+ - cosine_accuracy@3
11
+ - cosine_accuracy@5
12
+ - cosine_accuracy@10
13
+ - cosine_precision@1
14
+ - cosine_precision@3
15
+ - cosine_precision@5
16
+ - cosine_precision@10
17
+ - cosine_recall@1
18
+ - cosine_recall@3
19
+ - cosine_recall@5
20
+ - cosine_recall@10
21
+ - cosine_ndcg@10
22
+ - cosine_mrr@10
23
+ - cosine_map@100
24
+ pipeline_tag: sentence-similarity
25
+ tags:
26
+ - sentence-transformers
27
+ - sentence-similarity
28
+ - feature-extraction
29
+ - generated_from_trainer
30
+ - dataset_size:2947
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: Es uso privativo el que determina la ocupación de una porción del
35
+ dominio público, de modo que se limita o excluye la utilización del mismo por
36
+ otros interesados.
37
+ sentences:
38
+ - ¿Qué es el uso privativo de los bienes de dominio público?
39
+ - ¿Qué es la sanidad ambiental?
40
+ - ¿Qué información básica debe contener la información que se facilita al afectado
41
+ cuando se obtienen datos personales de él?
42
+ - source_sentence: 'Las retribuciones básicas, que se fijan en la Ley de Presupuestos
43
+ Generales del Estado, estarán integradas única y exclusivamente por: a) El sueldo
44
+ asignado a cada Subgrupo o Grupo de clasificación profesional, en el supuesto
45
+ de que éste no tenga Subgrupo. b) Los trienios, que consisten en una cantidad,
46
+ que será igual para cada Subgrupo o Grupo de clasificación profesional, en el
47
+ supuesto de que éste no tenga Subgrupo, por cada tres años de servicio.'
48
+ sentences:
49
+ - ¿Qué se entiende por retribuciones básicas?
50
+ - ¿Cuál es el título competencial de esta ley orgánica?
51
+ - ¿Qué se aprueba a propuesta del Ministro de Hacienda?
52
+ - source_sentence: Se reconoce el valor social de las niñas, niños y adolescentes
53
+ como personas que realizan un aporte afectivo, cultural y ético al caudal social,
54
+ y cuyo protagonismo, creatividad y posicionamiento activo enriquecen la vida colectiva.
55
+ sentences:
56
+ - ¿Qué sucede si se produce un incumplimiento de las actuaciones establecidas en
57
+ el Plan de inclusión sociolaboral?
58
+ - ¿Qué se reconoce en cuanto al valor social de la infancia?
59
+ - ¿Cuál es el plazo de prescripción de las infracciones?
60
+ - source_sentence: Las empresas y las universidades podrán promover y participar en
61
+ programas de voluntariado que cumplan los requisitos establecidos en esta Ley.
62
+ sentences:
63
+ - ¿Cuál es la consideración de las infracciones muy graves?
64
+ - ¿Qué tipo de empresas pueden promover y participar en programas de voluntariado?
65
+ - ¿Qué tipo de entidades están obligadas a cumplir con las obligaciones de publicidad
66
+ activa?
67
+ - source_sentence: Artículo 6. Definiciones. 1. Discriminación directa e indirecta.
68
+ b) La discriminación indirecta se produce cuando una disposición, criterio o práctica
69
+ aparentemente neutros ocasiona o puede ocasionar a una o varias personas una desventaja
70
+ particular con respecto a otras por razón de las causas previstas en el apartado
71
+ 1 del artículo 2.
72
+ sentences:
73
+ - ¿Cuál es el papel del Consejo de Salud de Área?
74
+ - ¿Qué se considera discriminación indirecta?
75
+ - ¿Qué tipo de información se considera veraz?
76
+ model-index:
77
+ - name: BGE large Legal Spanish
78
+ results:
79
+ - task:
80
+ type: information-retrieval
81
+ name: Information Retrieval
82
+ dataset:
83
+ name: dim 1024
84
+ type: dim_1024
85
+ metrics:
86
+ - type: cosine_accuracy@1
87
+ value: 0.5335365853658537
88
+ name: Cosine Accuracy@1
89
+ - type: cosine_accuracy@3
90
+ value: 0.7926829268292683
91
+ name: Cosine Accuracy@3
92
+ - type: cosine_accuracy@5
93
+ value: 0.8475609756097561
94
+ name: Cosine Accuracy@5
95
+ - type: cosine_accuracy@10
96
+ value: 0.8810975609756098
97
+ name: Cosine Accuracy@10
98
+ - type: cosine_precision@1
99
+ value: 0.5335365853658537
100
+ name: Cosine Precision@1
101
+ - type: cosine_precision@3
102
+ value: 0.26422764227642276
103
+ name: Cosine Precision@3
104
+ - type: cosine_precision@5
105
+ value: 0.1695121951219512
106
+ name: Cosine Precision@5
107
+ - type: cosine_precision@10
108
+ value: 0.08810975609756097
109
+ name: Cosine Precision@10
110
+ - type: cosine_recall@1
111
+ value: 0.5335365853658537
112
+ name: Cosine Recall@1
113
+ - type: cosine_recall@3
114
+ value: 0.7926829268292683
115
+ name: Cosine Recall@3
116
+ - type: cosine_recall@5
117
+ value: 0.8475609756097561
118
+ name: Cosine Recall@5
119
+ - type: cosine_recall@10
120
+ value: 0.8810975609756098
121
+ name: Cosine Recall@10
122
+ - type: cosine_ndcg@10
123
+ value: 0.7186522230387037
124
+ name: Cosine Ndcg@10
125
+ - type: cosine_mrr@10
126
+ value: 0.6652003484320559
127
+ name: Cosine Mrr@10
128
+ - type: cosine_map@100
129
+ value: 0.6705758430588792
130
+ name: Cosine Map@100
131
+ - task:
132
+ type: information-retrieval
133
+ name: Information Retrieval
134
+ dataset:
135
+ name: dim 768
136
+ type: dim_768
137
+ metrics:
138
+ - type: cosine_accuracy@1
139
+ value: 0.5365853658536586
140
+ name: Cosine Accuracy@1
141
+ - type: cosine_accuracy@3
142
+ value: 0.7987804878048781
143
+ name: Cosine Accuracy@3
144
+ - type: cosine_accuracy@5
145
+ value: 0.8445121951219512
146
+ name: Cosine Accuracy@5
147
+ - type: cosine_accuracy@10
148
+ value: 0.8871951219512195
149
+ name: Cosine Accuracy@10
150
+ - type: cosine_precision@1
151
+ value: 0.5365853658536586
152
+ name: Cosine Precision@1
153
+ - type: cosine_precision@3
154
+ value: 0.266260162601626
155
+ name: Cosine Precision@3
156
+ - type: cosine_precision@5
157
+ value: 0.16890243902439023
158
+ name: Cosine Precision@5
159
+ - type: cosine_precision@10
160
+ value: 0.08871951219512193
161
+ name: Cosine Precision@10
162
+ - type: cosine_recall@1
163
+ value: 0.5365853658536586
164
+ name: Cosine Recall@1
165
+ - type: cosine_recall@3
166
+ value: 0.7987804878048781
167
+ name: Cosine Recall@3
168
+ - type: cosine_recall@5
169
+ value: 0.8445121951219512
170
+ name: Cosine Recall@5
171
+ - type: cosine_recall@10
172
+ value: 0.8871951219512195
173
+ name: Cosine Recall@10
174
+ - type: cosine_ndcg@10
175
+ value: 0.7219693426433157
176
+ name: Cosine Ndcg@10
177
+ - type: cosine_mrr@10
178
+ value: 0.6678172183507551
179
+ name: Cosine Mrr@10
180
+ - type: cosine_map@100
181
+ value: 0.6724989076281951
182
+ name: Cosine Map@100
183
+ - task:
184
+ type: information-retrieval
185
+ name: Information Retrieval
186
+ dataset:
187
+ name: dim 512
188
+ type: dim_512
189
+ metrics:
190
+ - type: cosine_accuracy@1
191
+ value: 0.5396341463414634
192
+ name: Cosine Accuracy@1
193
+ - type: cosine_accuracy@3
194
+ value: 0.7987804878048781
195
+ name: Cosine Accuracy@3
196
+ - type: cosine_accuracy@5
197
+ value: 0.8414634146341463
198
+ name: Cosine Accuracy@5
199
+ - type: cosine_accuracy@10
200
+ value: 0.8841463414634146
201
+ name: Cosine Accuracy@10
202
+ - type: cosine_precision@1
203
+ value: 0.5396341463414634
204
+ name: Cosine Precision@1
205
+ - type: cosine_precision@3
206
+ value: 0.266260162601626
207
+ name: Cosine Precision@3
208
+ - type: cosine_precision@5
209
+ value: 0.16829268292682925
210
+ name: Cosine Precision@5
211
+ - type: cosine_precision@10
212
+ value: 0.08841463414634146
213
+ name: Cosine Precision@10
214
+ - type: cosine_recall@1
215
+ value: 0.5396341463414634
216
+ name: Cosine Recall@1
217
+ - type: cosine_recall@3
218
+ value: 0.7987804878048781
219
+ name: Cosine Recall@3
220
+ - type: cosine_recall@5
221
+ value: 0.8414634146341463
222
+ name: Cosine Recall@5
223
+ - type: cosine_recall@10
224
+ value: 0.8841463414634146
225
+ name: Cosine Recall@10
226
+ - type: cosine_ndcg@10
227
+ value: 0.7234708981888988
228
+ name: Cosine Ndcg@10
229
+ - type: cosine_mrr@10
230
+ value: 0.6705732191250486
231
+ name: Cosine Mrr@10
232
+ - type: cosine_map@100
233
+ value: 0.675333785038191
234
+ name: Cosine Map@100
235
+ - task:
236
+ type: information-retrieval
237
+ name: Information Retrieval
238
+ dataset:
239
+ name: dim 256
240
+ type: dim_256
241
+ metrics:
242
+ - type: cosine_accuracy@1
243
+ value: 0.5487804878048781
244
+ name: Cosine Accuracy@1
245
+ - type: cosine_accuracy@3
246
+ value: 0.7865853658536586
247
+ name: Cosine Accuracy@3
248
+ - type: cosine_accuracy@5
249
+ value: 0.8201219512195121
250
+ name: Cosine Accuracy@5
251
+ - type: cosine_accuracy@10
252
+ value: 0.8780487804878049
253
+ name: Cosine Accuracy@10
254
+ - type: cosine_precision@1
255
+ value: 0.5487804878048781
256
+ name: Cosine Precision@1
257
+ - type: cosine_precision@3
258
+ value: 0.2621951219512195
259
+ name: Cosine Precision@3
260
+ - type: cosine_precision@5
261
+ value: 0.16402439024390242
262
+ name: Cosine Precision@5
263
+ - type: cosine_precision@10
264
+ value: 0.08780487804878048
265
+ name: Cosine Precision@10
266
+ - type: cosine_recall@1
267
+ value: 0.5487804878048781
268
+ name: Cosine Recall@1
269
+ - type: cosine_recall@3
270
+ value: 0.7865853658536586
271
+ name: Cosine Recall@3
272
+ - type: cosine_recall@5
273
+ value: 0.8201219512195121
274
+ name: Cosine Recall@5
275
+ - type: cosine_recall@10
276
+ value: 0.8780487804878049
277
+ name: Cosine Recall@10
278
+ - type: cosine_ndcg@10
279
+ value: 0.72218275626782
280
+ name: Cosine Ndcg@10
281
+ - type: cosine_mrr@10
282
+ value: 0.6713293650793652
283
+ name: Cosine Mrr@10
284
+ - type: cosine_map@100
285
+ value: 0.6765227617116516
286
+ name: Cosine Map@100
287
+ - task:
288
+ type: information-retrieval
289
+ name: Information Retrieval
290
+ dataset:
291
+ name: dim 128
292
+ type: dim_128
293
+ metrics:
294
+ - type: cosine_accuracy@1
295
+ value: 0.5274390243902439
296
+ name: Cosine Accuracy@1
297
+ - type: cosine_accuracy@3
298
+ value: 0.7713414634146342
299
+ name: Cosine Accuracy@3
300
+ - type: cosine_accuracy@5
301
+ value: 0.8201219512195121
302
+ name: Cosine Accuracy@5
303
+ - type: cosine_accuracy@10
304
+ value: 0.8628048780487805
305
+ name: Cosine Accuracy@10
306
+ - type: cosine_precision@1
307
+ value: 0.5274390243902439
308
+ name: Cosine Precision@1
309
+ - type: cosine_precision@3
310
+ value: 0.25711382113821135
311
+ name: Cosine Precision@3
312
+ - type: cosine_precision@5
313
+ value: 0.16402439024390242
314
+ name: Cosine Precision@5
315
+ - type: cosine_precision@10
316
+ value: 0.08628048780487804
317
+ name: Cosine Precision@10
318
+ - type: cosine_recall@1
319
+ value: 0.5274390243902439
320
+ name: Cosine Recall@1
321
+ - type: cosine_recall@3
322
+ value: 0.7713414634146342
323
+ name: Cosine Recall@3
324
+ - type: cosine_recall@5
325
+ value: 0.8201219512195121
326
+ name: Cosine Recall@5
327
+ - type: cosine_recall@10
328
+ value: 0.8628048780487805
329
+ name: Cosine Recall@10
330
+ - type: cosine_ndcg@10
331
+ value: 0.7052427974875376
332
+ name: Cosine Ndcg@10
333
+ - type: cosine_mrr@10
334
+ value: 0.6535327138985677
335
+ name: Cosine Mrr@10
336
+ - type: cosine_map@100
337
+ value: 0.6594048434747166
338
+ name: Cosine Map@100
339
+ - task:
340
+ type: information-retrieval
341
+ name: Information Retrieval
342
+ dataset:
343
+ name: dim 64
344
+ type: dim_64
345
+ metrics:
346
+ - type: cosine_accuracy@1
347
+ value: 0.5060975609756098
348
+ name: Cosine Accuracy@1
349
+ - type: cosine_accuracy@3
350
+ value: 0.7378048780487805
351
+ name: Cosine Accuracy@3
352
+ - type: cosine_accuracy@5
353
+ value: 0.801829268292683
354
+ name: Cosine Accuracy@5
355
+ - type: cosine_accuracy@10
356
+ value: 0.8597560975609756
357
+ name: Cosine Accuracy@10
358
+ - type: cosine_precision@1
359
+ value: 0.5060975609756098
360
+ name: Cosine Precision@1
361
+ - type: cosine_precision@3
362
+ value: 0.2459349593495935
363
+ name: Cosine Precision@3
364
+ - type: cosine_precision@5
365
+ value: 0.16036585365853656
366
+ name: Cosine Precision@5
367
+ - type: cosine_precision@10
368
+ value: 0.08597560975609755
369
+ name: Cosine Precision@10
370
+ - type: cosine_recall@1
371
+ value: 0.5060975609756098
372
+ name: Cosine Recall@1
373
+ - type: cosine_recall@3
374
+ value: 0.7378048780487805
375
+ name: Cosine Recall@3
376
+ - type: cosine_recall@5
377
+ value: 0.801829268292683
378
+ name: Cosine Recall@5
379
+ - type: cosine_recall@10
380
+ value: 0.8597560975609756
381
+ name: Cosine Recall@10
382
+ - type: cosine_ndcg@10
383
+ value: 0.6884036058438198
384
+ name: Cosine Ndcg@10
385
+ - type: cosine_mrr@10
386
+ value: 0.6329074719318624
387
+ name: Cosine Mrr@10
388
+ - type: cosine_map@100
389
+ value: 0.6380929161741958
390
+ name: Cosine Map@100
391
+ ---
392
+
393
+ # BGE large Legal Spanish
394
+
395
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
396
+
397
+ ## Model Details
398
+
399
+ ### Model Description
400
+ - **Model Type:** Sentence Transformer
401
+ - **Base model:** [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) <!-- at revision 5617a9f61b028005a4858fdac845db406aefb181 -->
402
+ - **Maximum Sequence Length:** 8192 tokens
403
+ - **Output Dimensionality:** 1024 tokens
404
+ - **Similarity Function:** Cosine Similarity
405
+ <!-- - **Training Dataset:** Unknown -->
406
+ - **Language:** es
407
+ - **License:** apache-2.0
408
+
409
+ ### Model Sources
410
+
411
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
412
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
413
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
414
+
415
+ ### Full Model Architecture
416
+
417
+ ```
418
+ SentenceTransformer(
419
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
420
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
421
+ (2): Normalize()
422
+ )
423
+ ```
424
+
425
+ ## Usage
426
+
427
+ ### Direct Usage (Sentence Transformers)
428
+
429
+ First install the Sentence Transformers library:
430
+
431
+ ```bash
432
+ pip install -U sentence-transformers
433
+ ```
434
+
435
+ Then you can load this model and run inference.
436
+ ```python
437
+ from sentence_transformers import SentenceTransformer
438
+
439
+ # Download from the 🤗 Hub
440
+ model = SentenceTransformer("dariolopez/bge-m3-es-legal-tmp-3")
441
+ # Run inference
442
+ sentences = [
443
+ 'Artículo 6. Definiciones. 1. Discriminación directa e indirecta. b) La discriminación indirecta se produce cuando una disposición, criterio o práctica aparentemente neutros ocasiona o puede ocasionar a una o varias personas una desventaja particular con respecto a otras por razón de las causas previstas en el apartado 1 del artículo 2.',
444
+ '¿Qué se considera discriminación indirecta?',
445
+ '¿Qué tipo de información se considera veraz?',
446
+ ]
447
+ embeddings = model.encode(sentences)
448
+ print(embeddings.shape)
449
+ # [3, 1024]
450
+
451
+ # Get the similarity scores for the embeddings
452
+ similarities = model.similarity(embeddings, embeddings)
453
+ print(similarities.shape)
454
+ # [3, 3]
455
+ ```
456
+
457
+ <!--
458
+ ### Direct Usage (Transformers)
459
+
460
+ <details><summary>Click to see the direct usage in Transformers</summary>
461
+
462
+ </details>
463
+ -->
464
+
465
+ <!--
466
+ ### Downstream Usage (Sentence Transformers)
467
+
468
+ You can finetune this model on your own dataset.
469
+
470
+ <details><summary>Click to expand</summary>
471
+
472
+ </details>
473
+ -->
474
+
475
+ <!--
476
+ ### Out-of-Scope Use
477
+
478
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
479
+ -->
480
+
481
+ ## Evaluation
482
+
483
+ ### Metrics
484
+
485
+ #### Information Retrieval
486
+ * Dataset: `dim_1024`
487
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
488
+
489
+ | Metric | Value |
490
+ |:--------------------|:-----------|
491
+ | cosine_accuracy@1 | 0.5335 |
492
+ | cosine_accuracy@3 | 0.7927 |
493
+ | cosine_accuracy@5 | 0.8476 |
494
+ | cosine_accuracy@10 | 0.8811 |
495
+ | cosine_precision@1 | 0.5335 |
496
+ | cosine_precision@3 | 0.2642 |
497
+ | cosine_precision@5 | 0.1695 |
498
+ | cosine_precision@10 | 0.0881 |
499
+ | cosine_recall@1 | 0.5335 |
500
+ | cosine_recall@3 | 0.7927 |
501
+ | cosine_recall@5 | 0.8476 |
502
+ | cosine_recall@10 | 0.8811 |
503
+ | cosine_ndcg@10 | 0.7187 |
504
+ | cosine_mrr@10 | 0.6652 |
505
+ | **cosine_map@100** | **0.6706** |
506
+
507
+ #### Information Retrieval
508
+ * Dataset: `dim_768`
509
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
510
+
511
+ | Metric | Value |
512
+ |:--------------------|:-----------|
513
+ | cosine_accuracy@1 | 0.5366 |
514
+ | cosine_accuracy@3 | 0.7988 |
515
+ | cosine_accuracy@5 | 0.8445 |
516
+ | cosine_accuracy@10 | 0.8872 |
517
+ | cosine_precision@1 | 0.5366 |
518
+ | cosine_precision@3 | 0.2663 |
519
+ | cosine_precision@5 | 0.1689 |
520
+ | cosine_precision@10 | 0.0887 |
521
+ | cosine_recall@1 | 0.5366 |
522
+ | cosine_recall@3 | 0.7988 |
523
+ | cosine_recall@5 | 0.8445 |
524
+ | cosine_recall@10 | 0.8872 |
525
+ | cosine_ndcg@10 | 0.722 |
526
+ | cosine_mrr@10 | 0.6678 |
527
+ | **cosine_map@100** | **0.6725** |
528
+
529
+ #### Information Retrieval
530
+ * Dataset: `dim_512`
531
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
532
+
533
+ | Metric | Value |
534
+ |:--------------------|:-----------|
535
+ | cosine_accuracy@1 | 0.5396 |
536
+ | cosine_accuracy@3 | 0.7988 |
537
+ | cosine_accuracy@5 | 0.8415 |
538
+ | cosine_accuracy@10 | 0.8841 |
539
+ | cosine_precision@1 | 0.5396 |
540
+ | cosine_precision@3 | 0.2663 |
541
+ | cosine_precision@5 | 0.1683 |
542
+ | cosine_precision@10 | 0.0884 |
543
+ | cosine_recall@1 | 0.5396 |
544
+ | cosine_recall@3 | 0.7988 |
545
+ | cosine_recall@5 | 0.8415 |
546
+ | cosine_recall@10 | 0.8841 |
547
+ | cosine_ndcg@10 | 0.7235 |
548
+ | cosine_mrr@10 | 0.6706 |
549
+ | **cosine_map@100** | **0.6753** |
550
+
551
+ #### Information Retrieval
552
+ * Dataset: `dim_256`
553
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
554
+
555
+ | Metric | Value |
556
+ |:--------------------|:-----------|
557
+ | cosine_accuracy@1 | 0.5488 |
558
+ | cosine_accuracy@3 | 0.7866 |
559
+ | cosine_accuracy@5 | 0.8201 |
560
+ | cosine_accuracy@10 | 0.878 |
561
+ | cosine_precision@1 | 0.5488 |
562
+ | cosine_precision@3 | 0.2622 |
563
+ | cosine_precision@5 | 0.164 |
564
+ | cosine_precision@10 | 0.0878 |
565
+ | cosine_recall@1 | 0.5488 |
566
+ | cosine_recall@3 | 0.7866 |
567
+ | cosine_recall@5 | 0.8201 |
568
+ | cosine_recall@10 | 0.878 |
569
+ | cosine_ndcg@10 | 0.7222 |
570
+ | cosine_mrr@10 | 0.6713 |
571
+ | **cosine_map@100** | **0.6765** |
572
+
573
+ #### Information Retrieval
574
+ * Dataset: `dim_128`
575
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
576
+
577
+ | Metric | Value |
578
+ |:--------------------|:-----------|
579
+ | cosine_accuracy@1 | 0.5274 |
580
+ | cosine_accuracy@3 | 0.7713 |
581
+ | cosine_accuracy@5 | 0.8201 |
582
+ | cosine_accuracy@10 | 0.8628 |
583
+ | cosine_precision@1 | 0.5274 |
584
+ | cosine_precision@3 | 0.2571 |
585
+ | cosine_precision@5 | 0.164 |
586
+ | cosine_precision@10 | 0.0863 |
587
+ | cosine_recall@1 | 0.5274 |
588
+ | cosine_recall@3 | 0.7713 |
589
+ | cosine_recall@5 | 0.8201 |
590
+ | cosine_recall@10 | 0.8628 |
591
+ | cosine_ndcg@10 | 0.7052 |
592
+ | cosine_mrr@10 | 0.6535 |
593
+ | **cosine_map@100** | **0.6594** |
594
+
595
+ #### Information Retrieval
596
+ * Dataset: `dim_64`
597
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
598
+
599
+ | Metric | Value |
600
+ |:--------------------|:-----------|
601
+ | cosine_accuracy@1 | 0.5061 |
602
+ | cosine_accuracy@3 | 0.7378 |
603
+ | cosine_accuracy@5 | 0.8018 |
604
+ | cosine_accuracy@10 | 0.8598 |
605
+ | cosine_precision@1 | 0.5061 |
606
+ | cosine_precision@3 | 0.2459 |
607
+ | cosine_precision@5 | 0.1604 |
608
+ | cosine_precision@10 | 0.086 |
609
+ | cosine_recall@1 | 0.5061 |
610
+ | cosine_recall@3 | 0.7378 |
611
+ | cosine_recall@5 | 0.8018 |
612
+ | cosine_recall@10 | 0.8598 |
613
+ | cosine_ndcg@10 | 0.6884 |
614
+ | cosine_mrr@10 | 0.6329 |
615
+ | **cosine_map@100** | **0.6381** |
616
+
617
+ <!--
618
+ ## Bias, Risks and Limitations
619
+
620
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
621
+ -->
622
+
623
+ <!--
624
+ ### Recommendations
625
+
626
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
627
+ -->
628
+
629
+ ## Training Details
630
+
631
+ ### Training Hyperparameters
632
+ #### Non-Default Hyperparameters
633
+
634
+ - `eval_strategy`: epoch
635
+ - `per_device_train_batch_size`: 16
636
+ - `per_device_eval_batch_size`: 16
637
+ - `gradient_accumulation_steps`: 16
638
+ - `learning_rate`: 2e-05
639
+ - `num_train_epochs`: 32
640
+ - `lr_scheduler_type`: cosine
641
+ - `warmup_ratio`: 0.1
642
+ - `bf16`: True
643
+ - `tf32`: True
644
+ - `load_best_model_at_end`: True
645
+ - `optim`: adamw_torch_fused
646
+ - `batch_sampler`: no_duplicates
647
+
648
+ #### All Hyperparameters
649
+ <details><summary>Click to expand</summary>
650
+
651
+ - `overwrite_output_dir`: False
652
+ - `do_predict`: False
653
+ - `eval_strategy`: epoch
654
+ - `prediction_loss_only`: True
655
+ - `per_device_train_batch_size`: 16
656
+ - `per_device_eval_batch_size`: 16
657
+ - `per_gpu_train_batch_size`: None
658
+ - `per_gpu_eval_batch_size`: None
659
+ - `gradient_accumulation_steps`: 16
660
+ - `eval_accumulation_steps`: None
661
+ - `learning_rate`: 2e-05
662
+ - `weight_decay`: 0.0
663
+ - `adam_beta1`: 0.9
664
+ - `adam_beta2`: 0.999
665
+ - `adam_epsilon`: 1e-08
666
+ - `max_grad_norm`: 1.0
667
+ - `num_train_epochs`: 32
668
+ - `max_steps`: -1
669
+ - `lr_scheduler_type`: cosine
670
+ - `lr_scheduler_kwargs`: {}
671
+ - `warmup_ratio`: 0.1
672
+ - `warmup_steps`: 0
673
+ - `log_level`: passive
674
+ - `log_level_replica`: warning
675
+ - `log_on_each_node`: True
676
+ - `logging_nan_inf_filter`: True
677
+ - `save_safetensors`: True
678
+ - `save_on_each_node`: False
679
+ - `save_only_model`: False
680
+ - `restore_callback_states_from_checkpoint`: False
681
+ - `no_cuda`: False
682
+ - `use_cpu`: False
683
+ - `use_mps_device`: False
684
+ - `seed`: 42
685
+ - `data_seed`: None
686
+ - `jit_mode_eval`: False
687
+ - `use_ipex`: False
688
+ - `bf16`: True
689
+ - `fp16`: False
690
+ - `fp16_opt_level`: O1
691
+ - `half_precision_backend`: auto
692
+ - `bf16_full_eval`: False
693
+ - `fp16_full_eval`: False
694
+ - `tf32`: True
695
+ - `local_rank`: 0
696
+ - `ddp_backend`: None
697
+ - `tpu_num_cores`: None
698
+ - `tpu_metrics_debug`: False
699
+ - `debug`: []
700
+ - `dataloader_drop_last`: False
701
+ - `dataloader_num_workers`: 0
702
+ - `dataloader_prefetch_factor`: None
703
+ - `past_index`: -1
704
+ - `disable_tqdm`: False
705
+ - `remove_unused_columns`: True
706
+ - `label_names`: None
707
+ - `load_best_model_at_end`: True
708
+ - `ignore_data_skip`: False
709
+ - `fsdp`: []
710
+ - `fsdp_min_num_params`: 0
711
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
712
+ - `fsdp_transformer_layer_cls_to_wrap`: None
713
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
714
+ - `deepspeed`: None
715
+ - `label_smoothing_factor`: 0.0
716
+ - `optim`: adamw_torch_fused
717
+ - `optim_args`: None
718
+ - `adafactor`: False
719
+ - `group_by_length`: False
720
+ - `length_column_name`: length
721
+ - `ddp_find_unused_parameters`: None
722
+ - `ddp_bucket_cap_mb`: None
723
+ - `ddp_broadcast_buffers`: False
724
+ - `dataloader_pin_memory`: True
725
+ - `dataloader_persistent_workers`: False
726
+ - `skip_memory_metrics`: True
727
+ - `use_legacy_prediction_loop`: False
728
+ - `push_to_hub`: False
729
+ - `resume_from_checkpoint`: None
730
+ - `hub_model_id`: None
731
+ - `hub_strategy`: every_save
732
+ - `hub_private_repo`: False
733
+ - `hub_always_push`: False
734
+ - `gradient_checkpointing`: False
735
+ - `gradient_checkpointing_kwargs`: None
736
+ - `include_inputs_for_metrics`: False
737
+ - `eval_do_concat_batches`: True
738
+ - `fp16_backend`: auto
739
+ - `push_to_hub_model_id`: None
740
+ - `push_to_hub_organization`: None
741
+ - `mp_parameters`:
742
+ - `auto_find_batch_size`: False
743
+ - `full_determinism`: False
744
+ - `torchdynamo`: None
745
+ - `ray_scope`: last
746
+ - `ddp_timeout`: 1800
747
+ - `torch_compile`: False
748
+ - `torch_compile_backend`: None
749
+ - `torch_compile_mode`: None
750
+ - `dispatch_batches`: None
751
+ - `split_batches`: None
752
+ - `include_tokens_per_second`: False
753
+ - `include_num_input_tokens_seen`: False
754
+ - `neftune_noise_alpha`: None
755
+ - `optim_target_modules`: None
756
+ - `batch_eval_metrics`: False
757
+ - `eval_on_start`: False
758
+ - `batch_sampler`: no_duplicates
759
+ - `multi_dataset_batch_sampler`: proportional
760
+
761
+ </details>
762
+
763
+ ### Training Logs
764
+ | Epoch | Step | Training Loss | loss | dim_1024_cosine_map@100 | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 |
765
+ |:----------:|:------:|:-------------:|:----------:|:-----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
766
+ | 0.8649 | 10 | 1.5054 | - | - | - | - | - | - | - |
767
+ | 0.9514 | 11 | - | 0.8399 | 0.6684 | 0.6148 | 0.6574 | 0.6770 | 0.5281 | 0.6691 |
768
+ | 1.7297 | 20 | 1.0127 | - | - | - | - | - | - | - |
769
+ | 1.9892 | 23 | - | 0.5057 | 0.6757 | 0.6596 | 0.6715 | 0.6738 | 0.6017 | 0.6719 |
770
+ | 2.5946 | 30 | 0.5708 | - | - | - | - | - | - | - |
771
+ | 2.9405 | 34 | - | 0.4593 | 0.6781 | 0.6551 | 0.6795 | 0.6806 | 0.6165 | 0.6697 |
772
+ | 3.4595 | 40 | 0.2618 | - | - | - | - | - | - | - |
773
+ | 3.9784 | 46 | - | 0.4122 | 0.6787 | 0.6607 | 0.6842 | 0.6795 | 0.6227 | 0.6793 |
774
+ | 4.3243 | 50 | 0.1079 | - | - | - | - | - | - | - |
775
+ | 4.9297 | 57 | - | 0.3717 | 0.6827 | 0.6609 | 0.6810 | 0.6868 | 0.6277 | 0.6769 |
776
+ | 5.1892 | 60 | 0.0574 | - | - | - | - | - | - | - |
777
+ | 5.9676 | 69 | - | 0.3394 | 0.6824 | 0.6493 | 0.6777 | 0.6784 | 0.6344 | 0.6685 |
778
+ | 6.0541 | 70 | 0.0342 | - | - | - | - | - | - | - |
779
+ | **6.9189** | **80** | **0.0211** | **0.3379** | **0.6771** | **0.6627** | **0.6764** | **0.6766** | **0.6395** | **0.6723** |
780
+ | 7.7838 | 90 | 0.0136 | - | - | - | - | - | - | - |
781
+ | 7.9568 | 92 | - | 0.3128 | 0.6790 | 0.6536 | 0.6789 | 0.6782 | 0.6279 | 0.6730 |
782
+ | 8.6486 | 100 | 0.0087 | - | - | - | - | - | - | - |
783
+ | 8.9946 | 104 | - | 0.3163 | 0.6811 | 0.6542 | 0.6716 | 0.6744 | 0.6413 | 0.6758 |
784
+ | 9.5135 | 110 | 0.0073 | - | - | - | - | - | - | - |
785
+ | 9.9459 | 115 | - | 0.2937 | 0.6730 | 0.6569 | 0.6735 | 0.6747 | 0.6380 | 0.6710 |
786
+ | 10.3784 | 120 | 0.0049 | - | - | - | - | - | - | - |
787
+ | 10.9838 | 127 | - | 0.2927 | 0.6701 | 0.6578 | 0.6772 | 0.6724 | 0.6355 | 0.6738 |
788
+ | 11.2432 | 130 | 0.0044 | - | - | - | - | - | - | - |
789
+ | 11.9351 | 138 | - | 0.2837 | 0.6720 | 0.6558 | 0.6791 | 0.6752 | 0.6376 | 0.6783 |
790
+ | 12.1081 | 140 | 0.0035 | - | - | - | - | - | - | - |
791
+ | 12.9730 | 150 | 0.0031 | 0.2897 | 0.6746 | 0.6610 | 0.6708 | 0.6739 | 0.6375 | 0.6769 |
792
+ | 13.8378 | 160 | 0.0027 | - | - | - | - | - | - | - |
793
+ | 13.9243 | 161 | - | 0.2961 | 0.6733 | 0.6562 | 0.6692 | 0.6704 | 0.6402 | 0.6740 |
794
+ | 14.7027 | 170 | 0.0026 | - | - | - | - | - | - | - |
795
+ | 14.9622 | 173 | - | 0.2934 | 0.6734 | 0.6557 | 0.6720 | 0.6720 | 0.6368 | 0.6726 |
796
+ | 15.5676 | 180 | 0.0025 | - | - | - | - | - | - | - |
797
+ | 16.0 | 185 | - | 0.2932 | 0.6735 | 0.6561 | 0.6718 | 0.6744 | 0.6414 | 0.6773 |
798
+ | 16.4324 | 190 | 0.0023 | - | - | - | - | - | - | - |
799
+ | 16.9514 | 196 | - | 0.2912 | 0.6708 | 0.6582 | 0.6761 | 0.6794 | 0.6367 | 0.6753 |
800
+ | 17.2973 | 200 | 0.0021 | - | - | - | - | - | - | - |
801
+ | 17.9892 | 208 | - | 0.2925 | 0.6726 | 0.6582 | 0.6747 | 0.6773 | 0.6357 | 0.6737 |
802
+ | 18.1622 | 210 | 0.0022 | - | - | - | - | - | - | - |
803
+ | 18.9405 | 219 | - | 0.2965 | 0.6688 | 0.6563 | 0.6758 | 0.6769 | 0.6372 | 0.6765 |
804
+ | 19.0270 | 220 | 0.002 | - | - | - | - | - | - | - |
805
+ | 19.8919 | 230 | 0.0019 | - | - | - | - | - | - | - |
806
+ | 19.9784 | 231 | - | 0.3010 | 0.6697 | 0.6563 | 0.6768 | 0.6775 | 0.6380 | 0.6730 |
807
+ | 20.7568 | 240 | 0.0018 | - | - | - | - | - | - | - |
808
+ | 20.9297 | 242 | - | 0.3025 | 0.6728 | 0.6564 | 0.6764 | 0.6757 | 0.6367 | 0.6728 |
809
+ | 21.6216 | 250 | 0.0019 | - | - | - | - | - | - | - |
810
+ | 21.9676 | 254 | - | 0.3043 | 0.6707 | 0.6533 | 0.6733 | 0.6750 | 0.6352 | 0.6729 |
811
+ | 22.4865 | 260 | 0.0018 | - | - | - | - | - | - | - |
812
+ | 22.9189 | 265 | - | 0.3029 | 0.6706 | 0.6554 | 0.6734 | 0.6757 | 0.6355 | 0.6715 |
813
+ | 23.3514 | 270 | 0.0018 | - | - | - | - | - | - | - |
814
+ | 23.9568 | 277 | - | 0.3046 | 0.6706 | 0.6586 | 0.6733 | 0.6740 | 0.6383 | 0.6731 |
815
+ | 24.2162 | 280 | 0.0018 | - | - | - | - | - | - | - |
816
+ | 24.9946 | 289 | - | 0.3045 | 0.6722 | 0.6553 | 0.6740 | 0.6752 | 0.6364 | 0.6735 |
817
+ | 25.0811 | 290 | 0.0016 | - | - | - | - | - | - | - |
818
+ | 25.9459 | 300 | 0.0017 | 0.3061 | 0.6703 | 0.6564 | 0.6770 | 0.6736 | 0.6371 | 0.6724 |
819
+ | 26.8108 | 310 | 0.0016 | - | - | - | - | - | - | - |
820
+ | 26.9838 | 312 | - | 0.3023 | 0.6694 | 0.6581 | 0.6790 | 0.6771 | 0.6375 | 0.6731 |
821
+ | 27.6757 | 320 | 0.0015 | - | - | - | - | - | - | - |
822
+ | 27.9351 | 323 | - | 0.3035 | 0.6701 | 0.6585 | 0.6748 | 0.6787 | 0.6366 | 0.6729 |
823
+ | 28.5405 | 330 | 0.0016 | - | - | - | - | - | - | - |
824
+ | 28.9730 | 335 | - | 0.3017 | 0.6686 | 0.6568 | 0.6748 | 0.6710 | 0.6357 | 0.6713 |
825
+ | 29.4054 | 340 | 0.0016 | - | - | - | - | - | - | - |
826
+ | 29.9243 | 346 | - | 0.3043 | 0.6683 | 0.6549 | 0.6722 | 0.6762 | 0.6367 | 0.6712 |
827
+ | 30.2703 | 350 | 0.0017 | - | - | - | - | - | - | - |
828
+ | 30.4432 | 352 | - | 0.3056 | 0.6706 | 0.6594 | 0.6765 | 0.6753 | 0.6381 | 0.6725 |
829
+
830
+ * The bold row denotes the saved checkpoint.
831
+
832
+ ### Framework Versions
833
+ - Python: 3.10.12
834
+ - Sentence Transformers: 3.0.1
835
+ - Transformers: 4.42.3
836
+ - PyTorch: 2.2.0+cu121
837
+ - Accelerate: 0.32.1
838
+ - Datasets: 2.20.0
839
+ - Tokenizers: 0.19.1
840
+
841
+ ## Citation
842
+
843
+ ### BibTeX
844
+
845
+ #### Sentence Transformers
846
+ ```bibtex
847
+ @inproceedings{reimers-2019-sentence-bert,
848
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
849
+ author = "Reimers, Nils and Gurevych, Iryna",
850
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
851
+ month = "11",
852
+ year = "2019",
853
+ publisher = "Association for Computational Linguistics",
854
+ url = "https://arxiv.org/abs/1908.10084",
855
+ }
856
+ ```
857
+
858
+ #### MatryoshkaLoss
859
+ ```bibtex
860
+ @misc{kusupati2024matryoshka,
861
+ title={Matryoshka Representation Learning},
862
+ 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},
863
+ year={2024},
864
+ eprint={2205.13147},
865
+ archivePrefix={arXiv},
866
+ primaryClass={cs.LG}
867
+ }
868
+ ```
869
+
870
+ #### MultipleNegativesRankingLoss
871
+ ```bibtex
872
+ @misc{henderson2017efficient,
873
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
874
+ 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},
875
+ year={2017},
876
+ eprint={1705.00652},
877
+ archivePrefix={arXiv},
878
+ primaryClass={cs.CL}
879
+ }
880
+ ```
881
+
882
+ <!--
883
+ ## Glossary
884
+
885
+ *Clearly define terms in order to be accessible across audiences.*
886
+ -->
887
+
888
+ <!--
889
+ ## Model Card Authors
890
+
891
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
892
+ -->
893
+
894
+ <!--
895
+ ## Model Card Contact
896
+
897
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
898
+ -->
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-m3",
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 8194,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.42.3",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 250002
28
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.42.3",
5
+ "pytorch": "2.2.0+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:e7cbb5486e526ae52c4068fb51bb513b61d7bab182608b279e85e27c0651f2f9
3
+ size 2271064456
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
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:e4f7e21bec3fb0044ca0bb2d50eb5d4d8c596273c422baef84466d2c73748b9c
3
+ size 17083053
tokenizer_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 8192,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "sp_model_kwargs": {},
53
+ "tokenizer_class": "XLMRobertaTokenizer",
54
+ "unk_token": "<unk>"
55
+ }