adriansanz commited on
Commit
923e0bd
1 Parent(s): 6fa402f

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,816 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:81
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: Disposeu del servei OAC360º d'assistència en la tramitació electrònica
35
+ amb el que podeu contactar de dilluns a divendres de 08:00 a 20:00 a través del
36
+ tel. 935 955 094, del correu oac360@sitges.cat, o del servei Truca'm, omplint
37
+ el formulari perquè us truquin.
38
+ sentences:
39
+ - Com es pot demanar la comunicació prèvia d'obres per instal·lacions de plaques
40
+ solars en sol urbà?
41
+ - Quin és el correu electrònic per contactar amb el servei OAC360º?
42
+ - Quin és l'efecte del silenci administratiu?
43
+ - source_sentence: Positiu, llevat els casos en els quals manquin informes preceptius
44
+ i vinculants d’altres administracions o d’aquells en els què es transfereixin
45
+ al sol·licitant facultats contràries al planejament i la legislació urbanística.
46
+ sentences:
47
+ - Quin és el document que cal aportar per a aquest tràmit?
48
+ - Quin és el lloc on es pot tramitar la presentació de justificants de pagament
49
+ per als ajuts del lloguer just dels habitatges?
50
+ - Quin és el sentit del silenci administratiu per a la comunicació prèvia d'obres
51
+ per instal·lacions de plaques solars en sol urbà?
52
+ model-index:
53
+ - name: BGE large Legal Spanish
54
+ results:
55
+ - task:
56
+ type: information-retrieval
57
+ name: Information Retrieval
58
+ dataset:
59
+ name: dim 1024
60
+ type: dim_1024
61
+ metrics:
62
+ - type: cosine_accuracy@1
63
+ value: 0.1111111111111111
64
+ name: Cosine Accuracy@1
65
+ - type: cosine_accuracy@3
66
+ value: 0.3333333333333333
67
+ name: Cosine Accuracy@3
68
+ - type: cosine_accuracy@5
69
+ value: 0.4444444444444444
70
+ name: Cosine Accuracy@5
71
+ - type: cosine_accuracy@10
72
+ value: 0.7777777777777778
73
+ name: Cosine Accuracy@10
74
+ - type: cosine_precision@1
75
+ value: 0.1111111111111111
76
+ name: Cosine Precision@1
77
+ - type: cosine_precision@3
78
+ value: 0.1111111111111111
79
+ name: Cosine Precision@3
80
+ - type: cosine_precision@5
81
+ value: 0.08888888888888889
82
+ name: Cosine Precision@5
83
+ - type: cosine_precision@10
84
+ value: 0.07777777777777778
85
+ name: Cosine Precision@10
86
+ - type: cosine_recall@1
87
+ value: 0.1111111111111111
88
+ name: Cosine Recall@1
89
+ - type: cosine_recall@3
90
+ value: 0.3333333333333333
91
+ name: Cosine Recall@3
92
+ - type: cosine_recall@5
93
+ value: 0.4444444444444444
94
+ name: Cosine Recall@5
95
+ - type: cosine_recall@10
96
+ value: 0.7777777777777778
97
+ name: Cosine Recall@10
98
+ - type: cosine_ndcg@10
99
+ value: 0.37561164042849293
100
+ name: Cosine Ndcg@10
101
+ - type: cosine_mrr@10
102
+ value: 0.2550705467372134
103
+ name: Cosine Mrr@10
104
+ - type: cosine_map@100
105
+ value: 0.26453109424123916
106
+ name: Cosine Map@100
107
+ - task:
108
+ type: information-retrieval
109
+ name: Information Retrieval
110
+ dataset:
111
+ name: dim 768
112
+ type: dim_768
113
+ metrics:
114
+ - type: cosine_accuracy@1
115
+ value: 0.1111111111111111
116
+ name: Cosine Accuracy@1
117
+ - type: cosine_accuracy@3
118
+ value: 0.3333333333333333
119
+ name: Cosine Accuracy@3
120
+ - type: cosine_accuracy@5
121
+ value: 0.4444444444444444
122
+ name: Cosine Accuracy@5
123
+ - type: cosine_accuracy@10
124
+ value: 0.7777777777777778
125
+ name: Cosine Accuracy@10
126
+ - type: cosine_precision@1
127
+ value: 0.1111111111111111
128
+ name: Cosine Precision@1
129
+ - type: cosine_precision@3
130
+ value: 0.1111111111111111
131
+ name: Cosine Precision@3
132
+ - type: cosine_precision@5
133
+ value: 0.08888888888888889
134
+ name: Cosine Precision@5
135
+ - type: cosine_precision@10
136
+ value: 0.07777777777777778
137
+ name: Cosine Precision@10
138
+ - type: cosine_recall@1
139
+ value: 0.1111111111111111
140
+ name: Cosine Recall@1
141
+ - type: cosine_recall@3
142
+ value: 0.3333333333333333
143
+ name: Cosine Recall@3
144
+ - type: cosine_recall@5
145
+ value: 0.4444444444444444
146
+ name: Cosine Recall@5
147
+ - type: cosine_recall@10
148
+ value: 0.7777777777777778
149
+ name: Cosine Recall@10
150
+ - type: cosine_ndcg@10
151
+ value: 0.37561164042849293
152
+ name: Cosine Ndcg@10
153
+ - type: cosine_mrr@10
154
+ value: 0.2550705467372134
155
+ name: Cosine Mrr@10
156
+ - type: cosine_map@100
157
+ value: 0.26591710758377424
158
+ name: Cosine Map@100
159
+ - task:
160
+ type: information-retrieval
161
+ name: Information Retrieval
162
+ dataset:
163
+ name: dim 512
164
+ type: dim_512
165
+ metrics:
166
+ - type: cosine_accuracy@1
167
+ value: 0.1111111111111111
168
+ name: Cosine Accuracy@1
169
+ - type: cosine_accuracy@3
170
+ value: 0.3333333333333333
171
+ name: Cosine Accuracy@3
172
+ - type: cosine_accuracy@5
173
+ value: 0.4444444444444444
174
+ name: Cosine Accuracy@5
175
+ - type: cosine_accuracy@10
176
+ value: 0.7777777777777778
177
+ name: Cosine Accuracy@10
178
+ - type: cosine_precision@1
179
+ value: 0.1111111111111111
180
+ name: Cosine Precision@1
181
+ - type: cosine_precision@3
182
+ value: 0.1111111111111111
183
+ name: Cosine Precision@3
184
+ - type: cosine_precision@5
185
+ value: 0.08888888888888889
186
+ name: Cosine Precision@5
187
+ - type: cosine_precision@10
188
+ value: 0.07777777777777778
189
+ name: Cosine Precision@10
190
+ - type: cosine_recall@1
191
+ value: 0.1111111111111111
192
+ name: Cosine Recall@1
193
+ - type: cosine_recall@3
194
+ value: 0.3333333333333333
195
+ name: Cosine Recall@3
196
+ - type: cosine_recall@5
197
+ value: 0.4444444444444444
198
+ name: Cosine Recall@5
199
+ - type: cosine_recall@10
200
+ value: 0.7777777777777778
201
+ name: Cosine Recall@10
202
+ - type: cosine_ndcg@10
203
+ value: 0.36941287151905455
204
+ name: Cosine Ndcg@10
205
+ - type: cosine_mrr@10
206
+ value: 0.24828042328042324
207
+ name: Cosine Mrr@10
208
+ - type: cosine_map@100
209
+ value: 0.25912698412698415
210
+ name: Cosine Map@100
211
+ - task:
212
+ type: information-retrieval
213
+ name: Information Retrieval
214
+ dataset:
215
+ name: dim 256
216
+ type: dim_256
217
+ metrics:
218
+ - type: cosine_accuracy@1
219
+ value: 0.1111111111111111
220
+ name: Cosine Accuracy@1
221
+ - type: cosine_accuracy@3
222
+ value: 0.3333333333333333
223
+ name: Cosine Accuracy@3
224
+ - type: cosine_accuracy@5
225
+ value: 0.4444444444444444
226
+ name: Cosine Accuracy@5
227
+ - type: cosine_accuracy@10
228
+ value: 0.6666666666666666
229
+ name: Cosine Accuracy@10
230
+ - type: cosine_precision@1
231
+ value: 0.1111111111111111
232
+ name: Cosine Precision@1
233
+ - type: cosine_precision@3
234
+ value: 0.1111111111111111
235
+ name: Cosine Precision@3
236
+ - type: cosine_precision@5
237
+ value: 0.08888888888888889
238
+ name: Cosine Precision@5
239
+ - type: cosine_precision@10
240
+ value: 0.06666666666666668
241
+ name: Cosine Precision@10
242
+ - type: cosine_recall@1
243
+ value: 0.1111111111111111
244
+ name: Cosine Recall@1
245
+ - type: cosine_recall@3
246
+ value: 0.3333333333333333
247
+ name: Cosine Recall@3
248
+ - type: cosine_recall@5
249
+ value: 0.4444444444444444
250
+ name: Cosine Recall@5
251
+ - type: cosine_recall@10
252
+ value: 0.6666666666666666
253
+ name: Cosine Recall@10
254
+ - type: cosine_ndcg@10
255
+ value: 0.33724514013077883
256
+ name: Cosine Ndcg@10
257
+ - type: cosine_mrr@10
258
+ value: 0.23796296296296296
259
+ name: Cosine Mrr@10
260
+ - type: cosine_map@100
261
+ value: 0.2553057025279247
262
+ name: Cosine Map@100
263
+ - task:
264
+ type: information-retrieval
265
+ name: Information Retrieval
266
+ dataset:
267
+ name: dim 128
268
+ type: dim_128
269
+ metrics:
270
+ - type: cosine_accuracy@1
271
+ value: 0.1111111111111111
272
+ name: Cosine Accuracy@1
273
+ - type: cosine_accuracy@3
274
+ value: 0.3333333333333333
275
+ name: Cosine Accuracy@3
276
+ - type: cosine_accuracy@5
277
+ value: 0.5555555555555556
278
+ name: Cosine Accuracy@5
279
+ - type: cosine_accuracy@10
280
+ value: 0.7777777777777778
281
+ name: Cosine Accuracy@10
282
+ - type: cosine_precision@1
283
+ value: 0.1111111111111111
284
+ name: Cosine Precision@1
285
+ - type: cosine_precision@3
286
+ value: 0.1111111111111111
287
+ name: Cosine Precision@3
288
+ - type: cosine_precision@5
289
+ value: 0.1111111111111111
290
+ name: Cosine Precision@5
291
+ - type: cosine_precision@10
292
+ value: 0.07777777777777778
293
+ name: Cosine Precision@10
294
+ - type: cosine_recall@1
295
+ value: 0.1111111111111111
296
+ name: Cosine Recall@1
297
+ - type: cosine_recall@3
298
+ value: 0.3333333333333333
299
+ name: Cosine Recall@3
300
+ - type: cosine_recall@5
301
+ value: 0.5555555555555556
302
+ name: Cosine Recall@5
303
+ - type: cosine_recall@10
304
+ value: 0.7777777777777778
305
+ name: Cosine Recall@10
306
+ - type: cosine_ndcg@10
307
+ value: 0.3920021980903836
308
+ name: Cosine Ndcg@10
309
+ - type: cosine_mrr@10
310
+ value: 0.27248677248677244
311
+ name: Cosine Mrr@10
312
+ - type: cosine_map@100
313
+ value: 0.2795432240996757
314
+ name: Cosine Map@100
315
+ - task:
316
+ type: information-retrieval
317
+ name: Information Retrieval
318
+ dataset:
319
+ name: dim 64
320
+ type: dim_64
321
+ metrics:
322
+ - type: cosine_accuracy@1
323
+ value: 0.2222222222222222
324
+ name: Cosine Accuracy@1
325
+ - type: cosine_accuracy@3
326
+ value: 0.3333333333333333
327
+ name: Cosine Accuracy@3
328
+ - type: cosine_accuracy@5
329
+ value: 0.4444444444444444
330
+ name: Cosine Accuracy@5
331
+ - type: cosine_accuracy@10
332
+ value: 0.5555555555555556
333
+ name: Cosine Accuracy@10
334
+ - type: cosine_precision@1
335
+ value: 0.2222222222222222
336
+ name: Cosine Precision@1
337
+ - type: cosine_precision@3
338
+ value: 0.1111111111111111
339
+ name: Cosine Precision@3
340
+ - type: cosine_precision@5
341
+ value: 0.08888888888888889
342
+ name: Cosine Precision@5
343
+ - type: cosine_precision@10
344
+ value: 0.05555555555555555
345
+ name: Cosine Precision@10
346
+ - type: cosine_recall@1
347
+ value: 0.2222222222222222
348
+ name: Cosine Recall@1
349
+ - type: cosine_recall@3
350
+ value: 0.3333333333333333
351
+ name: Cosine Recall@3
352
+ - type: cosine_recall@5
353
+ value: 0.4444444444444444
354
+ name: Cosine Recall@5
355
+ - type: cosine_recall@10
356
+ value: 0.5555555555555556
357
+ name: Cosine Recall@10
358
+ - type: cosine_ndcg@10
359
+ value: 0.3626677657118585
360
+ name: Cosine Ndcg@10
361
+ - type: cosine_mrr@10
362
+ value: 0.3029100529100529
363
+ name: Cosine Mrr@10
364
+ - type: cosine_map@100
365
+ value: 0.32598958775429365
366
+ name: Cosine Map@100
367
+ ---
368
+
369
+ # BGE large Legal Spanish
370
+
371
+ 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.
372
+
373
+ ## Model Details
374
+
375
+ ### Model Description
376
+ - **Model Type:** Sentence Transformer
377
+ - **Base model:** [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) <!-- at revision 5617a9f61b028005a4858fdac845db406aefb181 -->
378
+ - **Maximum Sequence Length:** 8192 tokens
379
+ - **Output Dimensionality:** 1024 tokens
380
+ - **Similarity Function:** Cosine Similarity
381
+ <!-- - **Training Dataset:** Unknown -->
382
+ - **Language:** es
383
+ - **License:** apache-2.0
384
+
385
+ ### Model Sources
386
+
387
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
388
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
389
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
390
+
391
+ ### Full Model Architecture
392
+
393
+ ```
394
+ SentenceTransformer(
395
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
396
+ (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})
397
+ (2): Normalize()
398
+ )
399
+ ```
400
+
401
+ ## Usage
402
+
403
+ ### Direct Usage (Sentence Transformers)
404
+
405
+ First install the Sentence Transformers library:
406
+
407
+ ```bash
408
+ pip install -U sentence-transformers
409
+ ```
410
+
411
+ Then you can load this model and run inference.
412
+ ```python
413
+ from sentence_transformers import SentenceTransformer
414
+
415
+ # Download from the 🤗 Hub
416
+ model = SentenceTransformer("adriansanz/bge-m3-es-legal-tmp-6")
417
+ # Run inference
418
+ sentences = [
419
+ 'Positiu, llevat els casos en els quals manquin informes preceptius i vinculants d’altres administracions o d’aquells en els què es transfereixin al sol·licitant facultats contràries al planejament i la legislació urbanística.',
420
+ "Quin és el sentit del silenci administratiu per a la comunicació prèvia d'obres per instal·lacions de plaques solars en sol urbà?",
421
+ 'Quin és el lloc on es pot tramitar la presentació de justificants de pagament per als ajuts del lloguer just dels habitatges?',
422
+ ]
423
+ embeddings = model.encode(sentences)
424
+ print(embeddings.shape)
425
+ # [3, 1024]
426
+
427
+ # Get the similarity scores for the embeddings
428
+ similarities = model.similarity(embeddings, embeddings)
429
+ print(similarities.shape)
430
+ # [3, 3]
431
+ ```
432
+
433
+ <!--
434
+ ### Direct Usage (Transformers)
435
+
436
+ <details><summary>Click to see the direct usage in Transformers</summary>
437
+
438
+ </details>
439
+ -->
440
+
441
+ <!--
442
+ ### Downstream Usage (Sentence Transformers)
443
+
444
+ You can finetune this model on your own dataset.
445
+
446
+ <details><summary>Click to expand</summary>
447
+
448
+ </details>
449
+ -->
450
+
451
+ <!--
452
+ ### Out-of-Scope Use
453
+
454
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
455
+ -->
456
+
457
+ ## Evaluation
458
+
459
+ ### Metrics
460
+
461
+ #### Information Retrieval
462
+ * Dataset: `dim_1024`
463
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
464
+
465
+ | Metric | Value |
466
+ |:--------------------|:-----------|
467
+ | cosine_accuracy@1 | 0.1111 |
468
+ | cosine_accuracy@3 | 0.3333 |
469
+ | cosine_accuracy@5 | 0.4444 |
470
+ | cosine_accuracy@10 | 0.7778 |
471
+ | cosine_precision@1 | 0.1111 |
472
+ | cosine_precision@3 | 0.1111 |
473
+ | cosine_precision@5 | 0.0889 |
474
+ | cosine_precision@10 | 0.0778 |
475
+ | cosine_recall@1 | 0.1111 |
476
+ | cosine_recall@3 | 0.3333 |
477
+ | cosine_recall@5 | 0.4444 |
478
+ | cosine_recall@10 | 0.7778 |
479
+ | cosine_ndcg@10 | 0.3756 |
480
+ | cosine_mrr@10 | 0.2551 |
481
+ | **cosine_map@100** | **0.2645** |
482
+
483
+ #### Information Retrieval
484
+ * Dataset: `dim_768`
485
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
486
+
487
+ | Metric | Value |
488
+ |:--------------------|:-----------|
489
+ | cosine_accuracy@1 | 0.1111 |
490
+ | cosine_accuracy@3 | 0.3333 |
491
+ | cosine_accuracy@5 | 0.4444 |
492
+ | cosine_accuracy@10 | 0.7778 |
493
+ | cosine_precision@1 | 0.1111 |
494
+ | cosine_precision@3 | 0.1111 |
495
+ | cosine_precision@5 | 0.0889 |
496
+ | cosine_precision@10 | 0.0778 |
497
+ | cosine_recall@1 | 0.1111 |
498
+ | cosine_recall@3 | 0.3333 |
499
+ | cosine_recall@5 | 0.4444 |
500
+ | cosine_recall@10 | 0.7778 |
501
+ | cosine_ndcg@10 | 0.3756 |
502
+ | cosine_mrr@10 | 0.2551 |
503
+ | **cosine_map@100** | **0.2659** |
504
+
505
+ #### Information Retrieval
506
+ * Dataset: `dim_512`
507
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
508
+
509
+ | Metric | Value |
510
+ |:--------------------|:-----------|
511
+ | cosine_accuracy@1 | 0.1111 |
512
+ | cosine_accuracy@3 | 0.3333 |
513
+ | cosine_accuracy@5 | 0.4444 |
514
+ | cosine_accuracy@10 | 0.7778 |
515
+ | cosine_precision@1 | 0.1111 |
516
+ | cosine_precision@3 | 0.1111 |
517
+ | cosine_precision@5 | 0.0889 |
518
+ | cosine_precision@10 | 0.0778 |
519
+ | cosine_recall@1 | 0.1111 |
520
+ | cosine_recall@3 | 0.3333 |
521
+ | cosine_recall@5 | 0.4444 |
522
+ | cosine_recall@10 | 0.7778 |
523
+ | cosine_ndcg@10 | 0.3694 |
524
+ | cosine_mrr@10 | 0.2483 |
525
+ | **cosine_map@100** | **0.2591** |
526
+
527
+ #### Information Retrieval
528
+ * Dataset: `dim_256`
529
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
530
+
531
+ | Metric | Value |
532
+ |:--------------------|:-----------|
533
+ | cosine_accuracy@1 | 0.1111 |
534
+ | cosine_accuracy@3 | 0.3333 |
535
+ | cosine_accuracy@5 | 0.4444 |
536
+ | cosine_accuracy@10 | 0.6667 |
537
+ | cosine_precision@1 | 0.1111 |
538
+ | cosine_precision@3 | 0.1111 |
539
+ | cosine_precision@5 | 0.0889 |
540
+ | cosine_precision@10 | 0.0667 |
541
+ | cosine_recall@1 | 0.1111 |
542
+ | cosine_recall@3 | 0.3333 |
543
+ | cosine_recall@5 | 0.4444 |
544
+ | cosine_recall@10 | 0.6667 |
545
+ | cosine_ndcg@10 | 0.3372 |
546
+ | cosine_mrr@10 | 0.238 |
547
+ | **cosine_map@100** | **0.2553** |
548
+
549
+ #### Information Retrieval
550
+ * Dataset: `dim_128`
551
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
552
+
553
+ | Metric | Value |
554
+ |:--------------------|:-----------|
555
+ | cosine_accuracy@1 | 0.1111 |
556
+ | cosine_accuracy@3 | 0.3333 |
557
+ | cosine_accuracy@5 | 0.5556 |
558
+ | cosine_accuracy@10 | 0.7778 |
559
+ | cosine_precision@1 | 0.1111 |
560
+ | cosine_precision@3 | 0.1111 |
561
+ | cosine_precision@5 | 0.1111 |
562
+ | cosine_precision@10 | 0.0778 |
563
+ | cosine_recall@1 | 0.1111 |
564
+ | cosine_recall@3 | 0.3333 |
565
+ | cosine_recall@5 | 0.5556 |
566
+ | cosine_recall@10 | 0.7778 |
567
+ | cosine_ndcg@10 | 0.392 |
568
+ | cosine_mrr@10 | 0.2725 |
569
+ | **cosine_map@100** | **0.2795** |
570
+
571
+ #### Information Retrieval
572
+ * Dataset: `dim_64`
573
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
574
+
575
+ | Metric | Value |
576
+ |:--------------------|:----------|
577
+ | cosine_accuracy@1 | 0.2222 |
578
+ | cosine_accuracy@3 | 0.3333 |
579
+ | cosine_accuracy@5 | 0.4444 |
580
+ | cosine_accuracy@10 | 0.5556 |
581
+ | cosine_precision@1 | 0.2222 |
582
+ | cosine_precision@3 | 0.1111 |
583
+ | cosine_precision@5 | 0.0889 |
584
+ | cosine_precision@10 | 0.0556 |
585
+ | cosine_recall@1 | 0.2222 |
586
+ | cosine_recall@3 | 0.3333 |
587
+ | cosine_recall@5 | 0.4444 |
588
+ | cosine_recall@10 | 0.5556 |
589
+ | cosine_ndcg@10 | 0.3627 |
590
+ | cosine_mrr@10 | 0.3029 |
591
+ | **cosine_map@100** | **0.326** |
592
+
593
+ <!--
594
+ ## Bias, Risks and Limitations
595
+
596
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
597
+ -->
598
+
599
+ <!--
600
+ ### Recommendations
601
+
602
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
603
+ -->
604
+
605
+ ## Training Details
606
+
607
+ ### Training Hyperparameters
608
+ #### Non-Default Hyperparameters
609
+
610
+ - `eval_strategy`: epoch
611
+ - `per_device_train_batch_size`: 16
612
+ - `per_device_eval_batch_size`: 16
613
+ - `gradient_accumulation_steps`: 16
614
+ - `learning_rate`: 2e-05
615
+ - `num_train_epochs`: 6
616
+ - `lr_scheduler_type`: cosine
617
+ - `warmup_ratio`: 0.1
618
+ - `bf16`: True
619
+ - `tf32`: False
620
+ - `load_best_model_at_end`: True
621
+ - `optim`: adamw_torch_fused
622
+ - `batch_sampler`: no_duplicates
623
+
624
+ #### All Hyperparameters
625
+ <details><summary>Click to expand</summary>
626
+
627
+ - `overwrite_output_dir`: False
628
+ - `do_predict`: False
629
+ - `eval_strategy`: epoch
630
+ - `prediction_loss_only`: True
631
+ - `per_device_train_batch_size`: 16
632
+ - `per_device_eval_batch_size`: 16
633
+ - `per_gpu_train_batch_size`: None
634
+ - `per_gpu_eval_batch_size`: None
635
+ - `gradient_accumulation_steps`: 16
636
+ - `eval_accumulation_steps`: None
637
+ - `learning_rate`: 2e-05
638
+ - `weight_decay`: 0.0
639
+ - `adam_beta1`: 0.9
640
+ - `adam_beta2`: 0.999
641
+ - `adam_epsilon`: 1e-08
642
+ - `max_grad_norm`: 1.0
643
+ - `num_train_epochs`: 6
644
+ - `max_steps`: -1
645
+ - `lr_scheduler_type`: cosine
646
+ - `lr_scheduler_kwargs`: {}
647
+ - `warmup_ratio`: 0.1
648
+ - `warmup_steps`: 0
649
+ - `log_level`: passive
650
+ - `log_level_replica`: warning
651
+ - `log_on_each_node`: True
652
+ - `logging_nan_inf_filter`: True
653
+ - `save_safetensors`: True
654
+ - `save_on_each_node`: False
655
+ - `save_only_model`: False
656
+ - `restore_callback_states_from_checkpoint`: False
657
+ - `no_cuda`: False
658
+ - `use_cpu`: False
659
+ - `use_mps_device`: False
660
+ - `seed`: 42
661
+ - `data_seed`: None
662
+ - `jit_mode_eval`: False
663
+ - `use_ipex`: False
664
+ - `bf16`: True
665
+ - `fp16`: False
666
+ - `fp16_opt_level`: O1
667
+ - `half_precision_backend`: auto
668
+ - `bf16_full_eval`: False
669
+ - `fp16_full_eval`: False
670
+ - `tf32`: False
671
+ - `local_rank`: 0
672
+ - `ddp_backend`: None
673
+ - `tpu_num_cores`: None
674
+ - `tpu_metrics_debug`: False
675
+ - `debug`: []
676
+ - `dataloader_drop_last`: False
677
+ - `dataloader_num_workers`: 0
678
+ - `dataloader_prefetch_factor`: None
679
+ - `past_index`: -1
680
+ - `disable_tqdm`: False
681
+ - `remove_unused_columns`: True
682
+ - `label_names`: None
683
+ - `load_best_model_at_end`: True
684
+ - `ignore_data_skip`: False
685
+ - `fsdp`: []
686
+ - `fsdp_min_num_params`: 0
687
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
688
+ - `fsdp_transformer_layer_cls_to_wrap`: None
689
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
690
+ - `deepspeed`: None
691
+ - `label_smoothing_factor`: 0.0
692
+ - `optim`: adamw_torch_fused
693
+ - `optim_args`: None
694
+ - `adafactor`: False
695
+ - `group_by_length`: False
696
+ - `length_column_name`: length
697
+ - `ddp_find_unused_parameters`: None
698
+ - `ddp_bucket_cap_mb`: None
699
+ - `ddp_broadcast_buffers`: False
700
+ - `dataloader_pin_memory`: True
701
+ - `dataloader_persistent_workers`: False
702
+ - `skip_memory_metrics`: True
703
+ - `use_legacy_prediction_loop`: False
704
+ - `push_to_hub`: False
705
+ - `resume_from_checkpoint`: None
706
+ - `hub_model_id`: None
707
+ - `hub_strategy`: every_save
708
+ - `hub_private_repo`: False
709
+ - `hub_always_push`: False
710
+ - `gradient_checkpointing`: False
711
+ - `gradient_checkpointing_kwargs`: None
712
+ - `include_inputs_for_metrics`: False
713
+ - `eval_do_concat_batches`: True
714
+ - `fp16_backend`: auto
715
+ - `push_to_hub_model_id`: None
716
+ - `push_to_hub_organization`: None
717
+ - `mp_parameters`:
718
+ - `auto_find_batch_size`: False
719
+ - `full_determinism`: False
720
+ - `torchdynamo`: None
721
+ - `ray_scope`: last
722
+ - `ddp_timeout`: 1800
723
+ - `torch_compile`: False
724
+ - `torch_compile_backend`: None
725
+ - `torch_compile_mode`: None
726
+ - `dispatch_batches`: None
727
+ - `split_batches`: None
728
+ - `include_tokens_per_second`: False
729
+ - `include_num_input_tokens_seen`: False
730
+ - `neftune_noise_alpha`: None
731
+ - `optim_target_modules`: None
732
+ - `batch_eval_metrics`: False
733
+ - `eval_on_start`: False
734
+ - `batch_sampler`: no_duplicates
735
+ - `multi_dataset_batch_sampler`: proportional
736
+
737
+ </details>
738
+
739
+ ### Training Logs
740
+ | 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 |
741
+ |:-------:|:-----:|:-------------:|:----------:|:-----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
742
+ | 1.0 | 1 | - | 3.7675 | 0.2475 | 0.2919 | 0.2372 | 0.2511 | 0.2510 | 0.2468 |
743
+ | **2.0** | **2** | **-** | **3.9701** | **0.2533** | **0.3028** | **0.2473** | **0.2601** | **0.3449** | **0.2716** |
744
+ | 3.0 | 4 | - | 4.1211 | 0.2645 | 0.2704 | 0.2548 | 0.2614 | 0.3283 | 0.2654 |
745
+ | 4.0 | 5 | 1.8359 | 4.0228 | 0.2645 | 0.2789 | 0.2553 | 0.2619 | 0.3260 | 0.2659 |
746
+ | 5.0 | 6 | - | 3.9758 | 0.2645 | 0.2795 | 0.2553 | 0.2591 | 0.3260 | 0.2659 |
747
+
748
+ * The bold row denotes the saved checkpoint.
749
+
750
+ ### Framework Versions
751
+ - Python: 3.10.12
752
+ - Sentence Transformers: 3.0.1
753
+ - Transformers: 4.42.3
754
+ - PyTorch: 2.3.1+cu121
755
+ - Accelerate: 0.32.1
756
+ - Datasets: 2.20.0
757
+ - Tokenizers: 0.19.1
758
+
759
+ ## Citation
760
+
761
+ ### BibTeX
762
+
763
+ #### Sentence Transformers
764
+ ```bibtex
765
+ @inproceedings{reimers-2019-sentence-bert,
766
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
767
+ author = "Reimers, Nils and Gurevych, Iryna",
768
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
769
+ month = "11",
770
+ year = "2019",
771
+ publisher = "Association for Computational Linguistics",
772
+ url = "https://arxiv.org/abs/1908.10084",
773
+ }
774
+ ```
775
+
776
+ #### MatryoshkaLoss
777
+ ```bibtex
778
+ @misc{kusupati2024matryoshka,
779
+ title={Matryoshka Representation Learning},
780
+ 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},
781
+ year={2024},
782
+ eprint={2205.13147},
783
+ archivePrefix={arXiv},
784
+ primaryClass={cs.LG}
785
+ }
786
+ ```
787
+
788
+ #### MultipleNegativesRankingLoss
789
+ ```bibtex
790
+ @misc{henderson2017efficient,
791
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
792
+ 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},
793
+ year={2017},
794
+ eprint={1705.00652},
795
+ archivePrefix={arXiv},
796
+ primaryClass={cs.CL}
797
+ }
798
+ ```
799
+
800
+ <!--
801
+ ## Glossary
802
+
803
+ *Clearly define terms in order to be accessible across audiences.*
804
+ -->
805
+
806
+ <!--
807
+ ## Model Card Authors
808
+
809
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
810
+ -->
811
+
812
+ <!--
813
+ ## Model Card Contact
814
+
815
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
816
+ -->
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.3.1+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:d53071ba29d280f36832c2cc53e7742b4f8564bd48f1b00d02c0d80d63d13bec
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
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
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
+ }