adriansanz commited on
Commit
c98c0eb
1 Parent(s): b21319b

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": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,780 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base
3
+ datasets: []
4
+ language:
5
+ - ca
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:4173
31
+ - loss:MatryoshkaLoss
32
+ - loss:MultipleNegativesRankingLoss
33
+ widget:
34
+ - source_sentence: 'Queixa: Deixar constància de la vostra disconformitat per un mal
35
+ servei (un tracte inapropiat, un temps d''espera excessiu, etc.), sense demanar
36
+ cap indemnització.'
37
+ sentences:
38
+ - Quin és el format de sortida del tràmit de baixa de la llicència de gual?
39
+ - Quin és el tipus de venda que es realitza en els mercats setmanals?
40
+ - Quin és el paper de la queixa en la resolució de conflictes?
41
+ - source_sentence: L'empleat que en l'exercici de les seves tasques tingui assignada
42
+ la funció de conducció de vehicles municipals, pot sol·licitar un ajut per les
43
+ despeses ocasionades per a la renovació del carnet de conduir (certificat mèdic
44
+ i administratiu).
45
+ sentences:
46
+ - Quin és el resultat esperat de les escoles que reben les subvencions?
47
+ - Quin és el requisit per obtenir una autorització d'estacionament?
48
+ - Quin és el requisit per a sol·licitar l'ajut social?
49
+ - source_sentence: Aportació de documentació. Subvencions per finançar despeses d'hipoteca,
50
+ subministrament i altres serveis i la manca d'ingressos de lloguer de les entitats
51
+ culturals
52
+ sentences:
53
+ - Quin és el propòsit de la documentació?
54
+ - Quin és el paper del públic assistent en el Ple Municipal?
55
+ - Quin és el paper de l'ajuntament en la renovació del carnet de persona cuidadora?
56
+ - source_sentence: la Fira de la Vila del Llibre de Sitges consistent en un conjunt
57
+ de parades instal·lades al Passeig Marítim
58
+ sentences:
59
+ - Quin és el paper de la llicència de parcel·lació en la construcció d'edificacions?
60
+ - Quin és l'objectiu del tràmit de participació en processos de selecció de personal
61
+ de l'Ajuntament?
62
+ - Quin és el lloc on es desenvolupa la Fira de la Vila del Llibre de Sitges?
63
+ - source_sentence: Mitjançant aquest tràmit la persona interessada posa en coneixement
64
+ de l'Ajuntament de Sitges l'inici d'un espectacle públic o activitat recreativa
65
+ de caràcter extraordinari...
66
+ sentences:
67
+ - Quin és el paper de la persona interessada en la llicència per a espectacles públics
68
+ o activitats recreatives de caràcter extraordinari?
69
+ - Quin és el paper del Registre de Sol·licitants d'Habitatge amb Protecció Oficial
70
+ en la gestió d'habitatges?
71
+ - Quin és el tipus de familiars que es tenen en compte per l'ajut especial?
72
+ model-index:
73
+ - name: BGE SITGES CAT
74
+ results:
75
+ - task:
76
+ type: information-retrieval
77
+ name: Information Retrieval
78
+ dataset:
79
+ name: dim 768
80
+ type: dim_768
81
+ metrics:
82
+ - type: cosine_accuracy@1
83
+ value: 0.07327586206896551
84
+ name: Cosine Accuracy@1
85
+ - type: cosine_accuracy@3
86
+ value: 0.15732758620689655
87
+ name: Cosine Accuracy@3
88
+ - type: cosine_accuracy@5
89
+ value: 0.21767241379310345
90
+ name: Cosine Accuracy@5
91
+ - type: cosine_accuracy@10
92
+ value: 0.39439655172413796
93
+ name: Cosine Accuracy@10
94
+ - type: cosine_precision@1
95
+ value: 0.07327586206896551
96
+ name: Cosine Precision@1
97
+ - type: cosine_precision@3
98
+ value: 0.05244252873563218
99
+ name: Cosine Precision@3
100
+ - type: cosine_precision@5
101
+ value: 0.043534482758620686
102
+ name: Cosine Precision@5
103
+ - type: cosine_precision@10
104
+ value: 0.03943965517241379
105
+ name: Cosine Precision@10
106
+ - type: cosine_recall@1
107
+ value: 0.07327586206896551
108
+ name: Cosine Recall@1
109
+ - type: cosine_recall@3
110
+ value: 0.15732758620689655
111
+ name: Cosine Recall@3
112
+ - type: cosine_recall@5
113
+ value: 0.21767241379310345
114
+ name: Cosine Recall@5
115
+ - type: cosine_recall@10
116
+ value: 0.39439655172413796
117
+ name: Cosine Recall@10
118
+ - type: cosine_ndcg@10
119
+ value: 0.20125893142070614
120
+ name: Cosine Ndcg@10
121
+ - type: cosine_mrr@10
122
+ value: 0.14385604816639316
123
+ name: Cosine Mrr@10
124
+ - type: cosine_map@100
125
+ value: 0.17098930660026063
126
+ name: Cosine Map@100
127
+ - task:
128
+ type: information-retrieval
129
+ name: Information Retrieval
130
+ dataset:
131
+ name: dim 512
132
+ type: dim_512
133
+ metrics:
134
+ - type: cosine_accuracy@1
135
+ value: 0.07327586206896551
136
+ name: Cosine Accuracy@1
137
+ - type: cosine_accuracy@3
138
+ value: 0.15086206896551724
139
+ name: Cosine Accuracy@3
140
+ - type: cosine_accuracy@5
141
+ value: 0.21767241379310345
142
+ name: Cosine Accuracy@5
143
+ - type: cosine_accuracy@10
144
+ value: 0.39439655172413796
145
+ name: Cosine Accuracy@10
146
+ - type: cosine_precision@1
147
+ value: 0.07327586206896551
148
+ name: Cosine Precision@1
149
+ - type: cosine_precision@3
150
+ value: 0.050287356321839075
151
+ name: Cosine Precision@3
152
+ - type: cosine_precision@5
153
+ value: 0.04353448275862069
154
+ name: Cosine Precision@5
155
+ - type: cosine_precision@10
156
+ value: 0.03943965517241379
157
+ name: Cosine Precision@10
158
+ - type: cosine_recall@1
159
+ value: 0.07327586206896551
160
+ name: Cosine Recall@1
161
+ - type: cosine_recall@3
162
+ value: 0.15086206896551724
163
+ name: Cosine Recall@3
164
+ - type: cosine_recall@5
165
+ value: 0.21767241379310345
166
+ name: Cosine Recall@5
167
+ - type: cosine_recall@10
168
+ value: 0.39439655172413796
169
+ name: Cosine Recall@10
170
+ - type: cosine_ndcg@10
171
+ value: 0.2016207682773376
172
+ name: Cosine Ndcg@10
173
+ - type: cosine_mrr@10
174
+ value: 0.14438799945265474
175
+ name: Cosine Mrr@10
176
+ - type: cosine_map@100
177
+ value: 0.1715919733142084
178
+ name: Cosine Map@100
179
+ - task:
180
+ type: information-retrieval
181
+ name: Information Retrieval
182
+ dataset:
183
+ name: dim 256
184
+ type: dim_256
185
+ metrics:
186
+ - type: cosine_accuracy@1
187
+ value: 0.07327586206896551
188
+ name: Cosine Accuracy@1
189
+ - type: cosine_accuracy@3
190
+ value: 0.14870689655172414
191
+ name: Cosine Accuracy@3
192
+ - type: cosine_accuracy@5
193
+ value: 0.21120689655172414
194
+ name: Cosine Accuracy@5
195
+ - type: cosine_accuracy@10
196
+ value: 0.40086206896551724
197
+ name: Cosine Accuracy@10
198
+ - type: cosine_precision@1
199
+ value: 0.07327586206896551
200
+ name: Cosine Precision@1
201
+ - type: cosine_precision@3
202
+ value: 0.04956896551724138
203
+ name: Cosine Precision@3
204
+ - type: cosine_precision@5
205
+ value: 0.04224137931034483
206
+ name: Cosine Precision@5
207
+ - type: cosine_precision@10
208
+ value: 0.04008620689655173
209
+ name: Cosine Precision@10
210
+ - type: cosine_recall@1
211
+ value: 0.07327586206896551
212
+ name: Cosine Recall@1
213
+ - type: cosine_recall@3
214
+ value: 0.14870689655172414
215
+ name: Cosine Recall@3
216
+ - type: cosine_recall@5
217
+ value: 0.21120689655172414
218
+ name: Cosine Recall@5
219
+ - type: cosine_recall@10
220
+ value: 0.40086206896551724
221
+ name: Cosine Recall@10
222
+ - type: cosine_ndcg@10
223
+ value: 0.2021149795452301
224
+ name: Cosine Ndcg@10
225
+ - type: cosine_mrr@10
226
+ value: 0.1433856732348113
227
+ name: Cosine Mrr@10
228
+ - type: cosine_map@100
229
+ value: 0.16973847535400444
230
+ name: Cosine Map@100
231
+ - task:
232
+ type: information-retrieval
233
+ name: Information Retrieval
234
+ dataset:
235
+ name: dim 128
236
+ type: dim_128
237
+ metrics:
238
+ - type: cosine_accuracy@1
239
+ value: 0.06896551724137931
240
+ name: Cosine Accuracy@1
241
+ - type: cosine_accuracy@3
242
+ value: 0.14655172413793102
243
+ name: Cosine Accuracy@3
244
+ - type: cosine_accuracy@5
245
+ value: 0.21767241379310345
246
+ name: Cosine Accuracy@5
247
+ - type: cosine_accuracy@10
248
+ value: 0.38146551724137934
249
+ name: Cosine Accuracy@10
250
+ - type: cosine_precision@1
251
+ value: 0.06896551724137931
252
+ name: Cosine Precision@1
253
+ - type: cosine_precision@3
254
+ value: 0.048850574712643674
255
+ name: Cosine Precision@3
256
+ - type: cosine_precision@5
257
+ value: 0.04353448275862069
258
+ name: Cosine Precision@5
259
+ - type: cosine_precision@10
260
+ value: 0.03814655172413793
261
+ name: Cosine Precision@10
262
+ - type: cosine_recall@1
263
+ value: 0.06896551724137931
264
+ name: Cosine Recall@1
265
+ - type: cosine_recall@3
266
+ value: 0.14655172413793102
267
+ name: Cosine Recall@3
268
+ - type: cosine_recall@5
269
+ value: 0.21767241379310345
270
+ name: Cosine Recall@5
271
+ - type: cosine_recall@10
272
+ value: 0.38146551724137934
273
+ name: Cosine Recall@10
274
+ - type: cosine_ndcg@10
275
+ value: 0.19535554125135882
276
+ name: Cosine Ndcg@10
277
+ - type: cosine_mrr@10
278
+ value: 0.1398416119321293
279
+ name: Cosine Mrr@10
280
+ - type: cosine_map@100
281
+ value: 0.16597320243564267
282
+ name: Cosine Map@100
283
+ - task:
284
+ type: information-retrieval
285
+ name: Information Retrieval
286
+ dataset:
287
+ name: dim 64
288
+ type: dim_64
289
+ metrics:
290
+ - type: cosine_accuracy@1
291
+ value: 0.05603448275862069
292
+ name: Cosine Accuracy@1
293
+ - type: cosine_accuracy@3
294
+ value: 0.13793103448275862
295
+ name: Cosine Accuracy@3
296
+ - type: cosine_accuracy@5
297
+ value: 0.1939655172413793
298
+ name: Cosine Accuracy@5
299
+ - type: cosine_accuracy@10
300
+ value: 0.36853448275862066
301
+ name: Cosine Accuracy@10
302
+ - type: cosine_precision@1
303
+ value: 0.05603448275862069
304
+ name: Cosine Precision@1
305
+ - type: cosine_precision@3
306
+ value: 0.04597701149425287
307
+ name: Cosine Precision@3
308
+ - type: cosine_precision@5
309
+ value: 0.03879310344827586
310
+ name: Cosine Precision@5
311
+ - type: cosine_precision@10
312
+ value: 0.03685344827586207
313
+ name: Cosine Precision@10
314
+ - type: cosine_recall@1
315
+ value: 0.05603448275862069
316
+ name: Cosine Recall@1
317
+ - type: cosine_recall@3
318
+ value: 0.13793103448275862
319
+ name: Cosine Recall@3
320
+ - type: cosine_recall@5
321
+ value: 0.1939655172413793
322
+ name: Cosine Recall@5
323
+ - type: cosine_recall@10
324
+ value: 0.36853448275862066
325
+ name: Cosine Recall@10
326
+ - type: cosine_ndcg@10
327
+ value: 0.18225870966588442
328
+ name: Cosine Ndcg@10
329
+ - type: cosine_mrr@10
330
+ value: 0.12688492063492074
331
+ name: Cosine Mrr@10
332
+ - type: cosine_map@100
333
+ value: 0.15425908300208627
334
+ name: Cosine Map@100
335
+ ---
336
+
337
+ # BGE SITGES CAT
338
+
339
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base](https://huggingface.co/projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base). 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.
340
+
341
+ ## Model Details
342
+
343
+ ### Model Description
344
+ - **Model Type:** Sentence Transformer
345
+ - **Base model:** [projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base](https://huggingface.co/projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base) <!-- at revision 3354aea2cb9d91091495e9f1e1241b488f32e47c -->
346
+ - **Maximum Sequence Length:** 128 tokens
347
+ - **Output Dimensionality:** 768 tokens
348
+ - **Similarity Function:** Cosine Similarity
349
+ <!-- - **Training Dataset:** Unknown -->
350
+ - **Language:** ca
351
+ - **License:** apache-2.0
352
+
353
+ ### Model Sources
354
+
355
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
356
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
357
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
358
+
359
+ ### Full Model Architecture
360
+
361
+ ```
362
+ SentenceTransformer(
363
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
364
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
365
+ )
366
+ ```
367
+
368
+ ## Usage
369
+
370
+ ### Direct Usage (Sentence Transformers)
371
+
372
+ First install the Sentence Transformers library:
373
+
374
+ ```bash
375
+ pip install -U sentence-transformers
376
+ ```
377
+
378
+ Then you can load this model and run inference.
379
+ ```python
380
+ from sentence_transformers import SentenceTransformer
381
+
382
+ # Download from the 🤗 Hub
383
+ model = SentenceTransformer("adriansanz/SITGES-aina4_moreseq")
384
+ # Run inference
385
+ sentences = [
386
+ "Mitjançant aquest tràmit la persona interessada posa en coneixement de l'Ajuntament de Sitges l'inici d'un espectacle públic o activitat recreativa de caràcter extraordinari...",
387
+ 'Quin és el paper de la persona interessada en la llicència per a espectacles públics o activitats recreatives de caràcter extraordinari?',
388
+ "Quin és el paper del Registre de Sol·licitants d'Habitatge amb Protecció Oficial en la gestió d'habitatges?",
389
+ ]
390
+ embeddings = model.encode(sentences)
391
+ print(embeddings.shape)
392
+ # [3, 768]
393
+
394
+ # Get the similarity scores for the embeddings
395
+ similarities = model.similarity(embeddings, embeddings)
396
+ print(similarities.shape)
397
+ # [3, 3]
398
+ ```
399
+
400
+ <!--
401
+ ### Direct Usage (Transformers)
402
+
403
+ <details><summary>Click to see the direct usage in Transformers</summary>
404
+
405
+ </details>
406
+ -->
407
+
408
+ <!--
409
+ ### Downstream Usage (Sentence Transformers)
410
+
411
+ You can finetune this model on your own dataset.
412
+
413
+ <details><summary>Click to expand</summary>
414
+
415
+ </details>
416
+ -->
417
+
418
+ <!--
419
+ ### Out-of-Scope Use
420
+
421
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
422
+ -->
423
+
424
+ ## Evaluation
425
+
426
+ ### Metrics
427
+
428
+ #### Information Retrieval
429
+ * Dataset: `dim_768`
430
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
431
+
432
+ | Metric | Value |
433
+ |:--------------------|:----------|
434
+ | cosine_accuracy@1 | 0.0733 |
435
+ | cosine_accuracy@3 | 0.1573 |
436
+ | cosine_accuracy@5 | 0.2177 |
437
+ | cosine_accuracy@10 | 0.3944 |
438
+ | cosine_precision@1 | 0.0733 |
439
+ | cosine_precision@3 | 0.0524 |
440
+ | cosine_precision@5 | 0.0435 |
441
+ | cosine_precision@10 | 0.0394 |
442
+ | cosine_recall@1 | 0.0733 |
443
+ | cosine_recall@3 | 0.1573 |
444
+ | cosine_recall@5 | 0.2177 |
445
+ | cosine_recall@10 | 0.3944 |
446
+ | cosine_ndcg@10 | 0.2013 |
447
+ | cosine_mrr@10 | 0.1439 |
448
+ | **cosine_map@100** | **0.171** |
449
+
450
+ #### Information Retrieval
451
+ * Dataset: `dim_512`
452
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
453
+
454
+ | Metric | Value |
455
+ |:--------------------|:-----------|
456
+ | cosine_accuracy@1 | 0.0733 |
457
+ | cosine_accuracy@3 | 0.1509 |
458
+ | cosine_accuracy@5 | 0.2177 |
459
+ | cosine_accuracy@10 | 0.3944 |
460
+ | cosine_precision@1 | 0.0733 |
461
+ | cosine_precision@3 | 0.0503 |
462
+ | cosine_precision@5 | 0.0435 |
463
+ | cosine_precision@10 | 0.0394 |
464
+ | cosine_recall@1 | 0.0733 |
465
+ | cosine_recall@3 | 0.1509 |
466
+ | cosine_recall@5 | 0.2177 |
467
+ | cosine_recall@10 | 0.3944 |
468
+ | cosine_ndcg@10 | 0.2016 |
469
+ | cosine_mrr@10 | 0.1444 |
470
+ | **cosine_map@100** | **0.1716** |
471
+
472
+ #### Information Retrieval
473
+ * Dataset: `dim_256`
474
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
475
+
476
+ | Metric | Value |
477
+ |:--------------------|:-----------|
478
+ | cosine_accuracy@1 | 0.0733 |
479
+ | cosine_accuracy@3 | 0.1487 |
480
+ | cosine_accuracy@5 | 0.2112 |
481
+ | cosine_accuracy@10 | 0.4009 |
482
+ | cosine_precision@1 | 0.0733 |
483
+ | cosine_precision@3 | 0.0496 |
484
+ | cosine_precision@5 | 0.0422 |
485
+ | cosine_precision@10 | 0.0401 |
486
+ | cosine_recall@1 | 0.0733 |
487
+ | cosine_recall@3 | 0.1487 |
488
+ | cosine_recall@5 | 0.2112 |
489
+ | cosine_recall@10 | 0.4009 |
490
+ | cosine_ndcg@10 | 0.2021 |
491
+ | cosine_mrr@10 | 0.1434 |
492
+ | **cosine_map@100** | **0.1697** |
493
+
494
+ #### Information Retrieval
495
+ * Dataset: `dim_128`
496
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
497
+
498
+ | Metric | Value |
499
+ |:--------------------|:----------|
500
+ | cosine_accuracy@1 | 0.069 |
501
+ | cosine_accuracy@3 | 0.1466 |
502
+ | cosine_accuracy@5 | 0.2177 |
503
+ | cosine_accuracy@10 | 0.3815 |
504
+ | cosine_precision@1 | 0.069 |
505
+ | cosine_precision@3 | 0.0489 |
506
+ | cosine_precision@5 | 0.0435 |
507
+ | cosine_precision@10 | 0.0381 |
508
+ | cosine_recall@1 | 0.069 |
509
+ | cosine_recall@3 | 0.1466 |
510
+ | cosine_recall@5 | 0.2177 |
511
+ | cosine_recall@10 | 0.3815 |
512
+ | cosine_ndcg@10 | 0.1954 |
513
+ | cosine_mrr@10 | 0.1398 |
514
+ | **cosine_map@100** | **0.166** |
515
+
516
+ #### Information Retrieval
517
+ * Dataset: `dim_64`
518
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
519
+
520
+ | Metric | Value |
521
+ |:--------------------|:-----------|
522
+ | cosine_accuracy@1 | 0.056 |
523
+ | cosine_accuracy@3 | 0.1379 |
524
+ | cosine_accuracy@5 | 0.194 |
525
+ | cosine_accuracy@10 | 0.3685 |
526
+ | cosine_precision@1 | 0.056 |
527
+ | cosine_precision@3 | 0.046 |
528
+ | cosine_precision@5 | 0.0388 |
529
+ | cosine_precision@10 | 0.0369 |
530
+ | cosine_recall@1 | 0.056 |
531
+ | cosine_recall@3 | 0.1379 |
532
+ | cosine_recall@5 | 0.194 |
533
+ | cosine_recall@10 | 0.3685 |
534
+ | cosine_ndcg@10 | 0.1823 |
535
+ | cosine_mrr@10 | 0.1269 |
536
+ | **cosine_map@100** | **0.1543** |
537
+
538
+ <!--
539
+ ## Bias, Risks and Limitations
540
+
541
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
542
+ -->
543
+
544
+ <!--
545
+ ### Recommendations
546
+
547
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
548
+ -->
549
+
550
+ ## Training Details
551
+
552
+ ### Training Hyperparameters
553
+ #### Non-Default Hyperparameters
554
+
555
+ - `eval_strategy`: epoch
556
+ - `per_device_train_batch_size`: 16
557
+ - `per_device_eval_batch_size`: 16
558
+ - `gradient_accumulation_steps`: 16
559
+ - `learning_rate`: 2e-05
560
+ - `num_train_epochs`: 6
561
+ - `lr_scheduler_type`: cosine
562
+ - `warmup_ratio`: 0.1
563
+ - `bf16`: True
564
+ - `tf32`: False
565
+ - `load_best_model_at_end`: True
566
+ - `optim`: adamw_torch_fused
567
+ - `batch_sampler`: no_duplicates
568
+
569
+ #### All Hyperparameters
570
+ <details><summary>Click to expand</summary>
571
+
572
+ - `overwrite_output_dir`: False
573
+ - `do_predict`: False
574
+ - `eval_strategy`: epoch
575
+ - `prediction_loss_only`: True
576
+ - `per_device_train_batch_size`: 16
577
+ - `per_device_eval_batch_size`: 16
578
+ - `per_gpu_train_batch_size`: None
579
+ - `per_gpu_eval_batch_size`: None
580
+ - `gradient_accumulation_steps`: 16
581
+ - `eval_accumulation_steps`: None
582
+ - `learning_rate`: 2e-05
583
+ - `weight_decay`: 0.0
584
+ - `adam_beta1`: 0.9
585
+ - `adam_beta2`: 0.999
586
+ - `adam_epsilon`: 1e-08
587
+ - `max_grad_norm`: 1.0
588
+ - `num_train_epochs`: 6
589
+ - `max_steps`: -1
590
+ - `lr_scheduler_type`: cosine
591
+ - `lr_scheduler_kwargs`: {}
592
+ - `warmup_ratio`: 0.1
593
+ - `warmup_steps`: 0
594
+ - `log_level`: passive
595
+ - `log_level_replica`: warning
596
+ - `log_on_each_node`: True
597
+ - `logging_nan_inf_filter`: True
598
+ - `save_safetensors`: True
599
+ - `save_on_each_node`: False
600
+ - `save_only_model`: False
601
+ - `restore_callback_states_from_checkpoint`: False
602
+ - `no_cuda`: False
603
+ - `use_cpu`: False
604
+ - `use_mps_device`: False
605
+ - `seed`: 42
606
+ - `data_seed`: None
607
+ - `jit_mode_eval`: False
608
+ - `use_ipex`: False
609
+ - `bf16`: True
610
+ - `fp16`: False
611
+ - `fp16_opt_level`: O1
612
+ - `half_precision_backend`: auto
613
+ - `bf16_full_eval`: False
614
+ - `fp16_full_eval`: False
615
+ - `tf32`: False
616
+ - `local_rank`: 0
617
+ - `ddp_backend`: None
618
+ - `tpu_num_cores`: None
619
+ - `tpu_metrics_debug`: False
620
+ - `debug`: []
621
+ - `dataloader_drop_last`: False
622
+ - `dataloader_num_workers`: 0
623
+ - `dataloader_prefetch_factor`: None
624
+ - `past_index`: -1
625
+ - `disable_tqdm`: False
626
+ - `remove_unused_columns`: True
627
+ - `label_names`: None
628
+ - `load_best_model_at_end`: True
629
+ - `ignore_data_skip`: False
630
+ - `fsdp`: []
631
+ - `fsdp_min_num_params`: 0
632
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
633
+ - `fsdp_transformer_layer_cls_to_wrap`: None
634
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
635
+ - `deepspeed`: None
636
+ - `label_smoothing_factor`: 0.0
637
+ - `optim`: adamw_torch_fused
638
+ - `optim_args`: None
639
+ - `adafactor`: False
640
+ - `group_by_length`: False
641
+ - `length_column_name`: length
642
+ - `ddp_find_unused_parameters`: None
643
+ - `ddp_bucket_cap_mb`: None
644
+ - `ddp_broadcast_buffers`: False
645
+ - `dataloader_pin_memory`: True
646
+ - `dataloader_persistent_workers`: False
647
+ - `skip_memory_metrics`: True
648
+ - `use_legacy_prediction_loop`: False
649
+ - `push_to_hub`: False
650
+ - `resume_from_checkpoint`: None
651
+ - `hub_model_id`: None
652
+ - `hub_strategy`: every_save
653
+ - `hub_private_repo`: False
654
+ - `hub_always_push`: False
655
+ - `gradient_checkpointing`: False
656
+ - `gradient_checkpointing_kwargs`: None
657
+ - `include_inputs_for_metrics`: False
658
+ - `eval_do_concat_batches`: True
659
+ - `fp16_backend`: auto
660
+ - `push_to_hub_model_id`: None
661
+ - `push_to_hub_organization`: None
662
+ - `mp_parameters`:
663
+ - `auto_find_batch_size`: False
664
+ - `full_determinism`: False
665
+ - `torchdynamo`: None
666
+ - `ray_scope`: last
667
+ - `ddp_timeout`: 1800
668
+ - `torch_compile`: False
669
+ - `torch_compile_backend`: None
670
+ - `torch_compile_mode`: None
671
+ - `dispatch_batches`: None
672
+ - `split_batches`: None
673
+ - `include_tokens_per_second`: False
674
+ - `include_num_input_tokens_seen`: False
675
+ - `neftune_noise_alpha`: None
676
+ - `optim_target_modules`: None
677
+ - `batch_eval_metrics`: False
678
+ - `eval_on_start`: False
679
+ - `batch_sampler`: no_duplicates
680
+ - `multi_dataset_batch_sampler`: proportional
681
+
682
+ </details>
683
+
684
+ ### Training Logs
685
+ | Epoch | Step | Training Loss | loss | 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 |
686
+ |:----------:|:------:|:-------------:|:----------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
687
+ | 0.3065 | 5 | 3.3947 | - | - | - | - | - | - |
688
+ | 0.6130 | 10 | 2.6401 | - | - | - | - | - | - |
689
+ | 0.9195 | 15 | 2.0152 | - | - | - | - | - | - |
690
+ | 0.9808 | 16 | - | 1.3404 | 0.1639 | 0.1577 | 0.1694 | 0.1503 | 0.1638 |
691
+ | 1.2261 | 20 | 1.4542 | - | - | - | - | - | - |
692
+ | 1.5326 | 25 | 1.0135 | - | - | - | - | - | - |
693
+ | 1.8391 | 30 | 0.8437 | - | - | - | - | - | - |
694
+ | 1.9617 | 32 | - | 0.9436 | 0.1556 | 0.1596 | 0.1600 | 0.1467 | 0.1701 |
695
+ | 2.1456 | 35 | 0.7676 | - | - | - | - | - | - |
696
+ | 2.4521 | 40 | 0.5126 | - | - | - | - | - | - |
697
+ | 2.7586 | 45 | 0.4358 | - | - | - | - | - | - |
698
+ | 2.9425 | 48 | - | 0.7852 | 0.1650 | 0.1693 | 0.1720 | 0.1511 | 0.1686 |
699
+ | 3.0651 | 50 | 0.4192 | - | - | - | - | - | - |
700
+ | 3.3716 | 55 | 0.3429 | - | - | - | - | - | - |
701
+ | 3.6782 | 60 | 0.3025 | - | - | - | - | - | - |
702
+ | 3.9847 | 65 | 0.2863 | 0.7401 | 0.1646 | 0.1706 | 0.1759 | 0.1480 | 0.1694 |
703
+ | 4.2912 | 70 | 0.2474 | - | - | - | - | - | - |
704
+ | 4.5977 | 75 | 0.2324 | - | - | - | - | - | - |
705
+ | 4.9042 | 80 | 0.2344 | - | - | - | - | - | - |
706
+ | 4.9655 | 81 | - | 0.7217 | 0.1663 | 0.1699 | 0.1767 | 0.1512 | 0.1696 |
707
+ | 5.2107 | 85 | 0.2181 | - | - | - | - | - | - |
708
+ | 5.5172 | 90 | 0.2116 | - | - | - | - | - | - |
709
+ | 5.8238 | 95 | 0.1926 | - | - | - | - | - | - |
710
+ | **5.8851** | **96** | **-** | **0.7154** | **0.166** | **0.1697** | **0.1716** | **0.1543** | **0.171** |
711
+
712
+ * The bold row denotes the saved checkpoint.
713
+
714
+ ### Framework Versions
715
+ - Python: 3.10.12
716
+ - Sentence Transformers: 3.0.1
717
+ - Transformers: 4.42.3
718
+ - PyTorch: 2.3.1+cu121
719
+ - Accelerate: 0.32.1
720
+ - Datasets: 2.20.0
721
+ - Tokenizers: 0.19.1
722
+
723
+ ## Citation
724
+
725
+ ### BibTeX
726
+
727
+ #### Sentence Transformers
728
+ ```bibtex
729
+ @inproceedings{reimers-2019-sentence-bert,
730
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
731
+ author = "Reimers, Nils and Gurevych, Iryna",
732
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
733
+ month = "11",
734
+ year = "2019",
735
+ publisher = "Association for Computational Linguistics",
736
+ url = "https://arxiv.org/abs/1908.10084",
737
+ }
738
+ ```
739
+
740
+ #### MatryoshkaLoss
741
+ ```bibtex
742
+ @misc{kusupati2024matryoshka,
743
+ title={Matryoshka Representation Learning},
744
+ 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},
745
+ year={2024},
746
+ eprint={2205.13147},
747
+ archivePrefix={arXiv},
748
+ primaryClass={cs.LG}
749
+ }
750
+ ```
751
+
752
+ #### MultipleNegativesRankingLoss
753
+ ```bibtex
754
+ @misc{henderson2017efficient,
755
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
756
+ 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},
757
+ year={2017},
758
+ eprint={1705.00652},
759
+ archivePrefix={arXiv},
760
+ primaryClass={cs.CL}
761
+ }
762
+ ```
763
+
764
+ <!--
765
+ ## Glossary
766
+
767
+ *Clearly define terms in order to be accessible across audiences.*
768
+ -->
769
+
770
+ <!--
771
+ ## Model Card Authors
772
+
773
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
774
+ -->
775
+
776
+ <!--
777
+ ## Model Card Contact
778
+
779
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
780
+ -->
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base",
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
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "xlm-roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "output_past": true,
22
+ "pad_token_id": 1,
23
+ "position_embedding_type": "absolute",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.42.3",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 250002
29
+ }
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:d18300c25bcad837b5089ca8624e6ec65272c661e8c7de98354fa506f11547a6
3
+ size 1112197096
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 128,
3
+ "do_lower_case": false
4
+ }
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:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
3
+ size 17082987
tokenizer_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_length": 128,
50
+ "model_max_length": 128,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "<pad>",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "</s>",
56
+ "stride": 0,
57
+ "tokenizer_class": "XLMRobertaTokenizer",
58
+ "truncation_side": "right",
59
+ "truncation_strategy": "longest_first",
60
+ "unk_token": "<unk>"
61
+ }