borsimnet mrshu commited on
Commit
7d86055
·
0 Parent(s):

Duplicate from slovak-nlp/e5-sk-large

Browse files

Co-authored-by: Marek Suppa <mrshu@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:137745
9
+ - loss:CosineSimilarityLoss
10
+ - loss:MultipleNegativesRankingLoss
11
+ base_model:
12
+ - intfloat/multilingual-e5-large
13
+ widget:
14
+ - source_sentence: Mor a epidémia sa očividne vymkli spod kontroly .
15
+ sentences:
16
+ - Choroba bola nekontrolovateľná a ohrozovala všetok život .
17
+ - Tieto vylúčenia sú určené na iné cieľové skupiny ako obchodné štvrte .
18
+ - >-
19
+ Autobus National Trust Tour odchádza každý deň o 9:00 z National Trust
20
+ Information Centre .
21
+ - source_sentence: Bombové útoky v Iraku zabili najmenej 26 ľudí
22
+ sentences:
23
+ - Nová sláva pre Čínu v snahe o obnovu
24
+ - Samovražedný útočník v Iraku zabil najmenej 12 ľudí
25
+ - Muž lúpe banán.
26
+ - source_sentence: Chlapec a dievča tancujú v daždi.
27
+ sentences:
28
+ - Turecko sa snaží premiestniť časť sýrskych utečencov
29
+ - Záber zblízka na bielu ovcu s čiernou hlavou.
30
+ - Muž a žena tancujú v daždi.
31
+ - source_sentence: Niekedy fantazírujem o tom, že mám moc.
32
+ sentences:
33
+ - Egyptského Mursího čaká súd za útek z väzenia
34
+ - >-
35
+ Aj ja niekedy fantazírujem o tom, ako ohýbam ľudí pred svojou dementnou
36
+ vôľou.
37
+ - Niekto lúpe banán.
38
+ - source_sentence: >-
39
+ Vidiecke mydlo „Emmerdale“ vo štvrtok sledovalo 8,3 milióna ľudí, zatiaľ čo
40
+ živá epizóda „The Bill“ mala 7,9 milióna divákov.
41
+ sentences:
42
+ - >-
43
+ Hodinové špeciálne epizódy seriálov ITV „Emmerdale“ a „The Bill“ boli
44
+ najlepšie hodnotené britské televízne programy pri príležitosti 50. výročia
45
+ komerčného kanála.
46
+ - 4. mája 88 bolo unesených niekoľko honorárnych konzulov.
47
+ - >-
48
+ Existujú spoločnosti, ktoré majú rozdelené riadenie procesov výskumu a
49
+ vývoja.
50
+ pipeline_tag: sentence-similarity
51
+ library_name: sentence-transformers
52
+ metrics:
53
+ - pearson_cosine
54
+ - spearman_cosine
55
+ - cosine_accuracy
56
+ - cosine_accuracy_threshold
57
+ - cosine_f1
58
+ - cosine_f1_threshold
59
+ - cosine_precision
60
+ - cosine_recall
61
+ - cosine_ap
62
+ - cosine_mcc
63
+ - validation_sts_pearson_cosine
64
+ - validation_sts_spearman_cosine
65
+ - validation_nli_cosine_accuracy
66
+ - validation_nli_cosine_accuracy_threshold
67
+ - validation_nli_cosine_f1
68
+ - validation_nli_cosine_f1_threshold
69
+ - validation_nli_cosine_precision
70
+ - validation_nli_cosine_recall
71
+ - validation_nli_cosine_ap
72
+ - validation_nli_cosine_mcc
73
+ - validation_rte_cosine_accuracy
74
+ - validation_rte_cosine_accuracy_threshold
75
+ - validation_rte_cosine_f1
76
+ - validation_rte_cosine_f1_threshold
77
+ - validation_rte_cosine_precision
78
+ - validation_rte_cosine_recall
79
+ - validation_rte_cosine_ap
80
+ - validation_rte_cosine_mcc
81
+ - validation_dev_overall
82
+ model-index:
83
+ - name: E5-sk-large
84
+ results:
85
+ - task:
86
+ type: semantic-similarity
87
+ name: Semantic Similarity
88
+ dataset:
89
+ name: validation sts
90
+ type: validation_sts
91
+ metrics:
92
+ - type: pearson_cosine
93
+ value: 0.8404018187290129
94
+ name: Pearson Cosine
95
+ - type: spearman_cosine
96
+ value: 0.8424145819561701
97
+ name: Spearman Cosine
98
+ - task:
99
+ type: binary-classification
100
+ name: Binary Classification
101
+ dataset:
102
+ name: validation nli
103
+ type: validation_nli
104
+ metrics:
105
+ - type: cosine_accuracy
106
+ value: 0.6662650602409639
107
+ name: Cosine Accuracy
108
+ - type: cosine_accuracy_threshold
109
+ value: 0.9897347688674927
110
+ name: Cosine Accuracy Threshold
111
+ - type: cosine_f1
112
+ value: 0.49969824984912486
113
+ name: Cosine F1
114
+ - type: cosine_f1_threshold
115
+ value: 0.7573917508125305
116
+ name: Cosine F1 Threshold
117
+ - type: cosine_precision
118
+ value: 0.3333333333333333
119
+ name: Cosine Precision
120
+ - type: cosine_recall
121
+ value: 0.9975903614457832
122
+ name: Cosine Recall
123
+ - type: cosine_ap
124
+ value: 0.2791130922755554
125
+ name: Cosine Ap
126
+ - type: cosine_mcc
127
+ value: 0
128
+ name: Cosine Mcc
129
+ - task:
130
+ type: binary-classification
131
+ name: Binary Classification
132
+ dataset:
133
+ name: validation rte
134
+ type: validation_rte
135
+ metrics:
136
+ - type: cosine_accuracy
137
+ value: 0.5234657039711191
138
+ name: Cosine Accuracy
139
+ - type: cosine_accuracy_threshold
140
+ value: 0.9790897369384766
141
+ name: Cosine Accuracy Threshold
142
+ - type: cosine_f1
143
+ value: 0.645320197044335
144
+ name: Cosine F1
145
+ - type: cosine_f1_threshold
146
+ value: 0.7796555757522583
147
+ name: Cosine F1 Threshold
148
+ - type: cosine_precision
149
+ value: 0.4763636363636364
150
+ name: Cosine Precision
151
+ - type: cosine_recall
152
+ value: 1
153
+ name: Cosine Recall
154
+ - type: cosine_ap
155
+ value: 0.37950776315755064
156
+ name: Cosine Ap
157
+ - type: cosine_mcc
158
+ value: 0.08078074811027249
159
+ name: Cosine Mcc
160
+ - task:
161
+ type: multi-task-dev
162
+ name: Multi Task Dev
163
+ dataset:
164
+ name: Unknown
165
+ type: unknown
166
+ metrics:
167
+ - type: validation_sts_pearson_cosine
168
+ value: 0.8404018187290129
169
+ name: Validation Sts Pearson Cosine
170
+ - type: validation_sts_spearman_cosine
171
+ value: 0.8424145819561701
172
+ name: Validation Sts Spearman Cosine
173
+ - type: validation_nli_cosine_accuracy
174
+ value: 0.6662650602409639
175
+ name: Validation Nli Cosine Accuracy
176
+ - type: validation_nli_cosine_accuracy_threshold
177
+ value: 0.9897347688674927
178
+ name: Validation Nli Cosine Accuracy Threshold
179
+ - type: validation_nli_cosine_f1
180
+ value: 0.49969824984912486
181
+ name: Validation Nli Cosine F1
182
+ - type: validation_nli_cosine_f1_threshold
183
+ value: 0.7573917508125305
184
+ name: Validation Nli Cosine F1 Threshold
185
+ - type: validation_nli_cosine_precision
186
+ value: 0.3333333333333333
187
+ name: Validation Nli Cosine Precision
188
+ - type: validation_nli_cosine_recall
189
+ value: 0.9975903614457832
190
+ name: Validation Nli Cosine Recall
191
+ - type: validation_nli_cosine_ap
192
+ value: 0.2791130922755554
193
+ name: Validation Nli Cosine Ap
194
+ - type: validation_nli_cosine_mcc
195
+ value: 0
196
+ name: Validation Nli Cosine Mcc
197
+ - type: validation_rte_cosine_accuracy
198
+ value: 0.5234657039711191
199
+ name: Validation Rte Cosine Accuracy
200
+ - type: validation_rte_cosine_accuracy_threshold
201
+ value: 0.9790897369384766
202
+ name: Validation Rte Cosine Accuracy Threshold
203
+ - type: validation_rte_cosine_f1
204
+ value: 0.645320197044335
205
+ name: Validation Rte Cosine F1
206
+ - type: validation_rte_cosine_f1_threshold
207
+ value: 0.7796555757522583
208
+ name: Validation Rte Cosine F1 Threshold
209
+ - type: validation_rte_cosine_precision
210
+ value: 0.4763636363636364
211
+ name: Validation Rte Cosine Precision
212
+ - type: validation_rte_cosine_recall
213
+ value: 1
214
+ name: Validation Rte Cosine Recall
215
+ - type: validation_rte_cosine_ap
216
+ value: 0.37950776315755064
217
+ name: Validation Rte Cosine Ap
218
+ - type: validation_rte_cosine_mcc
219
+ value: 0.08078074811027249
220
+ name: Validation Rte Cosine Mcc
221
+ - type: validation_dev_overall
222
+ value: 0.5003451457964254
223
+ name: Validation Dev Overall
224
+ license: mit
225
+ datasets:
226
+ - slovak-nlp/sklep
227
+ language:
228
+ - sk
229
+ ---
230
+
231
+ # e5-sk-large
232
+
233
+ **e5-sk-large** is a Slovak text embedding model (365M parameters, 1024-dimensional embeddings) built by applying vocabulary trimming and fine-tuning to [multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large). It achieves competitive performance with proprietary embedding APIs on [SkMTEB](https://huggingface.co/collections/slovak-nlp/skmteb) — the first comprehensive Slovak text embedding benchmark — while being 35% smaller than the original model and fully locally deployable.
234
+
235
+ Released as part of the **SkMTEB** project ([paper](https://arxiv.org/abs/2606.13647) · [GitHub](https://github.com/slovak-nlp/skmteb) · [collection](https://huggingface.co/collections/slovak-nlp/skmteb)).
236
+
237
+ For a smaller, faster variant, see [e5-sk-small](https://huggingface.co/slovak-nlp/e5-sk-small) (45M parameters).
238
+
239
+ ---
240
+
241
+ ## Model Details
242
+
243
+ | | |
244
+ |---|---|
245
+ | **Base model** | [intfloat/multilingual-e5-large](https://huggingface.co/intfloat/multilingual-e5-large) |
246
+ | **Parameters** | 365M (vs. 560M original — 35% reduction) |
247
+ | **Embedding dimension** | 1024 |
248
+ | **Max sequence length** | 256 tokens |
249
+ | **Pooling** | Mean pooling |
250
+ | **Languages** | Slovak (primary); Slovak–English and Slovak–Czech cross-lingual tasks preserved |
251
+
252
+ ## Usage
253
+
254
+ This model follows the standard E5 prefix convention: prepend `query:` to queries and `passage:` to documents during retrieval. For symmetric tasks (STS, clustering, classification), no prefix is needed.
255
+
256
+ ### With `sentence-transformers`
257
+
258
+ First install the Sentence Transformers library:
259
+
260
+ ```bash
261
+ pip install -U sentence-transformers
262
+ ```
263
+
264
+ Then you can load this model and run inference.
265
+ ```python
266
+ from sentence_transformers import SentenceTransformer
267
+
268
+ model = SentenceTransformer("slovak-nlp/e5-sk-large")
269
+
270
+ # Retrieval
271
+ query_embedding = model.encode("query: Čo je hlavné mesto Slovenska?")
272
+ passage_embedding = model.encode("passage: Bratislava je hlavné a najväčšie mesto Slovenska.")
273
+ similarity = model.similarity(query_embedding, passage_embedding)
274
+ print(similarity) # tensor([[0.9269]])
275
+
276
+ # Batch encoding
277
+ sentences = [
278
+ "query: Aké je počasie v Bratislave?",
279
+ "passage: V Bratislave je dnes slnečno a teplo.",
280
+ "passage: Bratislava leží na brehu Dunaja.",
281
+ ]
282
+ embeddings = model.encode(sentences)
283
+ print(embeddings.shape) # (3, 1024)
284
+ ```
285
+
286
+ ### With `transformers` directly
287
+
288
+ ```python
289
+ import torch
290
+ import torch.nn.functional as F
291
+ from transformers import AutoTokenizer, AutoModel
292
+
293
+ def average_pool(last_hidden_states, attention_mask):
294
+ last_hidden = last_hidden_states.masked_fill(~attention_mask[..., None].bool(), 0.0)
295
+ return last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
296
+
297
+ tokenizer = AutoTokenizer.from_pretrained("slovak-nlp/e5-sk-large")
298
+ model = AutoModel.from_pretrained("slovak-nlp/e5-sk-large")
299
+
300
+ texts = [
301
+ "query: Čo je hlavné mesto Slovenska?",
302
+ "passage: Bratislava je hlavné a najväčšie mesto Slovenska.",
303
+ ]
304
+
305
+ batch_dict = tokenizer(texts, max_length=512, padding=True, truncation=True, return_tensors="pt")
306
+ with torch.no_grad():
307
+ outputs = model(**batch_dict)
308
+
309
+ embeddings = average_pool(outputs.last_hidden_state, batch_dict["attention_mask"])
310
+ embeddings = F.normalize(embeddings, p=2, dim=1)
311
+ print((embeddings[0] @ embeddings[1]).item())
312
+ ```
313
+
314
+ ### Prefix guide
315
+
316
+ | Task | Input prefix |
317
+ |---|---|
318
+ | Search / retrieval query | `query: ` |
319
+ | Document / passage to index | `passage: ` |
320
+ | STS, clustering, classification | *(no prefix)* |
321
+
322
+ ---
323
+
324
+ ## Training
325
+
326
+ ### How it was built
327
+
328
+ **Step 1 — Vocabulary Trimming.** Before fine-tuning, [Vocabulary Trimming](https://aclanthology.org/2023.findings-emnlp.1029/) (Ushio et al., 2023) was applied to `multilingual-e5-large` to remove tokens irrelevant to Slovak.
329
+ Token frequencies were computed on [FineWeb2-Slovak](https://huggingface.co/datasets/ivykopal/fineweb2-slovak), a quality-filtered Slovak web corpus, and the top 60K tokens (out of 250K) were retained. This reduced the model from 560M to **365M parameters** (35% reduction) without meaningful performance loss.
330
+
331
+ **Step 2 — Fine-tuning.** The trimmed model was fine-tuned on curated Slovak datasets from the [skLEP benchmark](https://huggingface.co/slovak-nlp/sklep):
332
+
333
+ | Dataset | Task | Pairs |
334
+ |---|---|---|
335
+ | SK-SQuAD | Question–context retrieval | ~72K |
336
+ | Slovak NLI (from XNLI) | Entailment | ~393K |
337
+ | Slovak STS (from GLUE STSb) | Similarity scoring | ~6K |
338
+ | Slovak RTE (from GLUE) | Textual entailment | ~2.5K |
339
+
340
+ ### Training configuration
341
+
342
+ | Hyperparameter | Value |
343
+ |---|---|
344
+ | Pooling | Mean pooling |
345
+ | Max sequence length | 256 tokens |
346
+ | Batch size | 32 |
347
+ | Learning rate | 2 × 10⁻⁵ |
348
+ | LR scheduler | Linear with 10% warmup |
349
+ | Epochs | 3 |
350
+ | Loss (STS) | Cosine Similarity Loss |
351
+ | Loss (other) | Multiple Negatives Ranking Loss |
352
+ | Hardware | 1× NVIDIA H100 (~50 min) |
353
+ | Seed | 42 |
354
+
355
+ ---
356
+
357
+ ## Evaluation: SkMTEB Results
358
+
359
+ Evaluated on [SkMTEB](https://huggingface.co/collections/slovak-nlp/skmteb) — 31 datasets across 7 task types. Scores are percentages (higher is better).
360
+
361
+ | Model | Params | **All** | Bitext | Classif. | Clustering | Pair Clf. | Reranking | Retrieval | STS |
362
+ |---|---|---|---|---|---|---|---|---|---|
363
+ | **e5-sk-large** | **365M** | **74.70** | 96.39 | 66.34 | 41.43 | 67.32 | 87.81 | 85.60 | 86.25 |
364
+ | multilingual-e5-large | 560M | 74.25 | 96.29 | 65.34 | 40.35 | 66.78 | 87.96 | 85.80 | 85.90 |
365
+ | text-embedding-3-large (API) | — | 75.07 | 96.79 | 66.91 | 44.22 | 66.58 | 86.96 | 85.55 | 84.21 |
366
+ | multilingual-e5-large-instruct | 560M | 77.49 | 97.09 | 70.28 | 49.69 | 70.55 | 86.49 | 86.08 | 88.86 |
367
+ | e5-sk-small (ours) | 45M | 70.56 | 91.34 | 60.84 | 40.95 | 66.05 | 84.94 | 78.64 | 81.32 |
368
+
369
+ **e5-sk-large is practically equivalent to `text-embedding-3-large`** (TOST equivalence test: 90% CI within ±2 points), while being open-weight, locally deployable, and free to run. Cross-lingual Slovak–English and Slovak–Czech bitext mining performance is preserved within 1 F1 point compared to the original `multilingual-e5-large`.
370
+
371
+ <!---
372
+ ### Running the full SkMTEB evaluation
373
+
374
+ ```bash
375
+ pip install mteb
376
+ mteb run -m slovak-nlp/e5-sk-large -b "MTEB(slk, v1)"
377
+ ```
378
+ -->
379
+ ---
380
+
381
+ ## Intended Uses
382
+
383
+ - Semantic search and retrieval-augmented generation (RAG) over Slovak text
384
+ - Semantic textual similarity (STS)
385
+ - Text clustering and classification via embedding features
386
+ - Cross-lingual retrieval (Slovak–English, Slovak–Czech)
387
+ - Local deployment where API latency or cost is a concern
388
+
389
+ ## Limitations
390
+
391
+ - Optimised for Slovak; cross-lingual transfer to non-Slavic languages is not evaluated.
392
+ - Vocabulary trimming removes non-Slovak tokens; performance on heavily code-mixed text may be reduced.
393
+ - Training data skews toward news, parliamentary, and encyclopedic domains.
394
+ - Max sequence length during fine-tuning is 256 tokens (underlying architecture supports up to 512).
395
+ ---
396
+
397
+ ## Citation
398
+
399
+ ```bibtex
400
+ @inproceedings{suppa2025skmteb,
401
+ title = {{SkMTEB}: {Slovak} Massive Text Embedding Benchmark and Model Adaptation},
402
+ author = {{\v{S}}uppa, Marek and Ridzik, Andrej and Hl{\'a}dek, Daniel and
403
+ Kna{\v{z}}ekov{\'a}, Nat{\'a}lia and Ondrejov{\'a}, Vikt{\'o}ria},
404
+ year = {2025},
405
+ eprint = {2606.13647},
406
+ archivePrefix = {arXiv},
407
+ url = {https://arxiv.org/abs/2606.13647}
408
+ }
409
+
410
+ @inproceedings{reimers-2019-sentence-bert,
411
+ title = {Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks},
412
+ author = {Reimers, Nils and Gurevych, Iryna},
413
+ booktitle = {Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing},
414
+ year = {2019},
415
+ publisher = {Association for Computational Linguistics},
416
+ url = {https://arxiv.org/abs/1908.10084}
417
+ }
418
+ ```
419
+
420
+ ---
421
+
422
+ ## License
423
+
424
+ MIT
config.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "XLMRobertaModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "classifier_dropout": null,
8
+ "dtype": "float32",
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": 514,
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
+ "transformers_version": "4.57.3",
24
+ "type_vocab_size": 1,
25
+ "use_cache": true,
26
+ "vocab_size": 60002,
27
+ "vocabtrimmer": {
28
+ "mining_config": {
29
+ "dataset": "ivykopal/fineweb2-slovak",
30
+ "dataset_column": "text",
31
+ "dataset_name": null,
32
+ "dataset_split": "test",
33
+ "language": "sk",
34
+ "min_frequency": 1,
35
+ "target_vocab_size": 60000
36
+ },
37
+ "stats": {
38
+ "compression_rate_embedding": 24.00060799513604,
39
+ "compression_rate_full": 65.25034383870307,
40
+ "parameter_size_embedding/raw": 256002048,
41
+ "parameter_size_embedding/trimmed": 61442048,
42
+ "parameter_size_full/raw": 559890432,
43
+ "parameter_size_full/trimmed": 365330432,
44
+ "vocab_size/raw": 250002,
45
+ "vocab_size/trimmed": 60002
46
+ }
47
+ }
48
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SentenceTransformer",
3
+ "__version__": {
4
+ "sentence_transformers": "5.2.0",
5
+ "transformers": "4.57.3",
6
+ "pytorch": "2.9.1+cu128"
7
+ },
8
+ "prompts": {
9
+ "query": "query: ",
10
+ "document": "passage: ",
11
+ "passage": "passage: "
12
+ },
13
+ "default_prompt_name": null,
14
+ "similarity_fn_name": "cosine",
15
+ "model_metadata": {
16
+ "num_parameters": 365330432,
17
+ "sentence_embedding_dimension": 1024
18
+ }
19
+ }
eval/binary_classification_evaluation_validation_nli_results.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ epoch,steps,cosine_accuracy,cosine_accuracy_threshold,cosine_f1,cosine_precision,cosine_recall,cosine_f1_threshold,cosine_ap,cosine_mcc
2
+ 1.0,60,0.6662650602409639,0.4996986136226642,0.33319935691318325,0.9987951807228915,0.27417349840077787,-0.010024086747057818
3
+ 2.0,120,0.6662650602409639,0.4995480566435673,0.33306548814785053,0.9987951807228915,0.2742709130439137,-0.028346702743853168
4
+ 3.0,180,0.6662650602409639,0.4995480566435673,0.33306548814785053,0.9987951807228915,0.2727233647368423,-0.028346702743853168
eval/binary_classification_evaluation_validation_rte_results.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ epoch,steps,cosine_accuracy,cosine_accuracy_threshold,cosine_f1,cosine_precision,cosine_recall,cosine_f1_threshold,cosine_ap,cosine_mcc
2
+ 1.0,60,0.5234657039711191,0.6437346437346437,0.4746376811594203,1.0,0.36661099711724937,0.05701704150199188
3
+ 2.0,120,0.5234657039711191,0.6403940886699507,0.4727272727272727,0.9923664122137404,0.3703334021795854,-0.004624851991046135
4
+ 3.0,180,0.5234657039711191,0.6388206388206388,0.47101449275362317,0.9923664122137404,0.37631002414169196,-0.06354571037626576
eval/similarity_evaluation_validation_sts_results.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ epoch,steps,cosine_pearson,cosine_spearman
2
+ 1.0,60,0.849383323789822,0.8493512123940523
3
+ 2.0,120,0.8426812159736894,0.8380053359945728
4
+ 3.0,180,0.8557750533894876,0.8517004518675895
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a4ac2985f1fba10fb9cfc64e7cba04f046fb7834546cb247010bd6b051dde46
3
+ size 1461366688
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": 256,
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
The diff for this file is too large to render. See raw diff
 
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
+ "60001": {
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
+ "extra_special_tokens": {},
49
+ "mask_token": "<mask>",
50
+ "model_max_length": 256,
51
+ "pad_token": "<pad>",
52
+ "sep_token": "</s>",
53
+ "tokenizer_class": "XLMRobertaTokenizer",
54
+ "unk_token": "<unk>"
55
+ }