Fixed training process
Browse files- 1_Pooling/config.json +4 -1
- README.md +356 -81
- config.json +2 -2
- config_sentence_transformers.json +6 -3
- merges.txt +1 -1
- model.safetensors +3 -0
- sentence_bert_config.json +1 -1
- tokenizer.json +3 -1
- tokenizer_config.json +50 -58
1_Pooling/config.json
CHANGED
@@ -3,5 +3,8 @@
|
|
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 |
}
|
|
|
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
CHANGED
@@ -1,129 +1,404 @@
|
|
1 |
---
|
2 |
-
|
|
|
3 |
tags:
|
4 |
- sentence-transformers
|
5 |
-
- feature-extraction
|
6 |
- sentence-similarity
|
7 |
-
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
---
|
10 |
|
11 |
-
#
|
12 |
|
13 |
-
This is a [sentence-transformers](https://www.SBERT.net) model
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
|
26 |
|
27 |
-
```
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
embeddings = model.encode(sentences)
|
33 |
-
print(embeddings)
|
34 |
```
|
35 |
|
|
|
36 |
|
|
|
37 |
|
38 |
-
|
39 |
-
Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
|
40 |
|
|
|
|
|
|
|
|
|
|
|
41 |
```python
|
42 |
-
from
|
43 |
-
import torch
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
#
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
sentences = ['This is an example sentence', 'Each sentence is converted']
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
model = AutoModel.from_pretrained('{MODEL_NAME}')
|
59 |
|
60 |
-
|
61 |
-
|
62 |
|
63 |
-
|
64 |
-
with torch.no_grad():
|
65 |
-
model_output = model(**encoded_input)
|
66 |
|
67 |
-
|
68 |
-
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
```
|
73 |
|
|
|
|
|
74 |
|
|
|
|
|
75 |
|
76 |
-
|
|
|
77 |
|
78 |
-
|
|
|
79 |
|
80 |
-
|
|
|
81 |
|
|
|
|
|
82 |
|
83 |
-
## Training
|
84 |
-
The model was trained with the parameters:
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
```
|
90 |
-
{'batch_size': 16, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
|
91 |
-
```
|
92 |
|
93 |
-
**Loss**:
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
```
|
99 |
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
```
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
},
|
111 |
-
|
112 |
-
"steps_per_epoch": null,
|
113 |
-
"warmup_steps": 500,
|
114 |
-
"weight_decay": 0.01
|
115 |
}
|
116 |
```
|
117 |
|
|
|
|
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
126 |
|
127 |
-
|
|
|
128 |
|
129 |
-
|
|
|
|
1 |
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
tags:
|
5 |
- sentence-transformers
|
|
|
6 |
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:65699
|
10 |
+
- loss:MultipleNegativesRankingLoss
|
11 |
+
base_model: gerulata/slovakbert
|
12 |
+
datasets: []
|
13 |
+
widget:
|
14 |
+
- source_sentence: Mestom Trenčín prechádzajú 2 železničné trate- Trať 120 Bratislava-
|
15 |
+
Žilina a Trať 143 Trenčín- Chynorany. V súčasnosti sa pracuje na modernizácii
|
16 |
+
železničného prieťahu mestom, v roku 2017 bol odovzdaný do užívania nový železničný
|
17 |
+
most, postavená je nová letná plaváreň, keďže stará ustúpila novému mostu. Pre
|
18 |
+
obyvateľov asanovaných domov vystavalo mesto náhradné domy na novovzniknutých
|
19 |
+
uliciach Slivková a Šafránová. Pripravený je tiež projekt rekonštrukcie železničnej
|
20 |
+
stanice Trenčín, ktorá bude realizovaná spolu s rekonštrukciou autobusovej stanice,
|
21 |
+
čím vznikne moderný autobusový terminál s priamym napojením na ŽST.
|
22 |
+
sentences:
|
23 |
+
- V ktorom roku bola založená organizácia Gidonim ?
|
24 |
+
- Koľko železničných tratí prechádza cez mesto Trenčín ?
|
25 |
+
- Koľko rímskych vojakov bojovalo v Trenčíne proti Kvádom ?
|
26 |
+
- source_sentence: Ikonostas pozostáva zo štyroch radov a tvorí ho 102 ikon. Rám ikonostasu
|
27 |
+
pochádza približne z druhej polovice 18. – začiatku 19. storočia. Ikony sa delia
|
28 |
+
na tri skupiny podľa obdobia ich vzniku a štylistických príznakov. Dve najstaršie
|
29 |
+
ikony (Premenenie Pána a Panna Mária Ochrankyňa) pochádzajú z konca 17. storočia
|
30 |
+
a sú typické pre ikonopisectvo severných oblastí. Veľkú časť spodného radu ikonostasu
|
31 |
+
tvorí druhá skupina ikon, ktoré vznikli v druhej polovici 18. storočia. Ikony
|
32 |
+
umiestnené v troch vrchných radoch predstavujú tretiu skupinu. Datujú sa do prvej
|
33 |
+
tretiny 18. storočia.
|
34 |
+
sentences:
|
35 |
+
- Z akého ostrova pochádzajú dve najstaršie ikony Kiži ?
|
36 |
+
- Z akého storočia pochádzajú dve najstaršie ikony Kiži ?
|
37 |
+
- Aký trest dostal Jan Antonín - Baťa ?
|
38 |
+
- source_sentence: 'Začiatok 19.storočia bol poznačený tzv. gerilskými vojnami (špan.guerilla),
|
39 |
+
v ktorých sa obyvatelia spojili s okolitými mestami cádizskej provincie a odolávali
|
40 |
+
francúzskym okupačným vojskám, ktoré obsadili polostrov. Konfiškácia pôdy sa u
|
41 |
+
ľudí taktiež veľmi neosvedčila. Roľníci sa preto snažili vymaniť spod nepriaznivej
|
42 |
+
ekonomickej situácie a pridávali sa k sociálnym hnutiam, ktoré sa v tom čase začali
|
43 |
+
po provincii šíriť.
|
44 |
+
|
45 |
+
V súčasnosti sa Setenil, po prekonaní emigračných problémov z druhej polovice
|
46 |
+
20. storočia, aj naďalej rozvíja v tradičných hodnotách. Ťaží najmä z poľnohospodárstva
|
47 |
+
a turizmu. Vyznačuje sa výnimočnou architektúrou, impozantným okolím a jedinečnými
|
48 |
+
sviatkami, čo z neho robí jedno z najatraktívnejších miest provincie Cádiz.'
|
49 |
+
sentences:
|
50 |
+
- Čo dokazujú predmety nájdené v jaskyniach neďaleko obce Setenil de las bodegas
|
51 |
+
?
|
52 |
+
- Čím sa vyznačuje španielska obec Setenil de las bodegas ?
|
53 |
+
- Ako odovzdávajú prvé kolo matematickej olympiády žiaci SŠ ?
|
54 |
+
- source_sentence: V rokoch 1926-1928 vzrástol export obuvi a firma Baťa ovládala
|
55 |
+
viac ako polovicu československého vývozu. Vo firme došlo k zavedeniu pásovej
|
56 |
+
výroby, ktorá bola používaná v závodoch Henryho Forda. Produktivita práce vzrástla
|
57 |
+
o 75% a počet zamestnancov o 35%, čistý obrat firmy predstavoval 1,9 miliardy
|
58 |
+
predvojnových korún. Koncom roku 1928 tvorila továreň komplex 30 budov, koncern
|
59 |
+
sa ďalej rozrastal a Baťa podnikal v ďalších sférach hospodárstva (gumárenský,
|
60 |
+
chemický, textilný, drevársky priemysel a mnohé ďalšie). Baťa v roku 1931 vyrábal
|
61 |
+
v Zlíne, Otrokoviciach, Třebíči, Bošanoch a Nových Zámkoch. V roku 1931 sa rodinný
|
62 |
+
podnik zmenil na akciovú spoločnosť so základným imaním 135 mil. korún. Už dlho
|
63 |
+
predtým vznikali dcérske spoločnosti po celom svete, k tomu pribúdali továrne
|
64 |
+
v Nemecku, Anglicku, Holandsku, Poľsku a mnohých ďalších krajinách. Vytvoril celý
|
65 |
+
rad výchovných aj vzdelávacích organizácií (Baťova škola práce), v Zlíne vzniklo
|
66 |
+
vlastné filmové štúdio, ktoré sa zaoberalo natáčaním reklám na obuvnícke výrobky.
|
67 |
+
Neskôr sa zo štúdia stali známe Filmové ateliéry Kudlov.
|
68 |
+
sentences:
|
69 |
+
- V ktorých rokoch zastával slovenský matematik Ladislav Fodor funkciu rektora ?
|
70 |
+
- Kam letel Tomáš Baťa v čase svojej nehody ?
|
71 |
+
- V akom ďalšom priemysle podnikal neskôr Baťa ?
|
72 |
+
- source_sentence: Prvý most cez Zlatý roh nechal vybudovať cisár Justinián I. V roku
|
73 |
+
1502 vypísal sultán Bajazid II. súťaž na stavbu nového mosta, do ktorej sa prihlásili
|
74 |
+
aj Leonardo da Vinci a Michelangelo Buonarroti, ale z realizácie návrhov nakoniec
|
75 |
+
zišlo. V roku 1863 vznikol druhý, drevený most, ktorý v roku 1875 nahradil železný
|
76 |
+
most, postavený francúzskymi staviteľmi. Štvrtý most postavili Nemci v roku 1912
|
77 |
+
a slúžil až do roku 1992, kedy bol zničený požiarom. Bolo rozhodnuté o stavbe
|
78 |
+
mosta súčasného, ktorý vybudovala domáca firma STFA Group.
|
79 |
+
sentences:
|
80 |
+
- V ktorom roku vznikol druhý drevený most cez záliv Zlatý roh ?
|
81 |
+
- Kde sa Alexios spolu s dvomi staršími bratmi zamestnal po abdikácii Izáka I. a
|
82 |
+
smrti svojho otca ?
|
83 |
+
- Aká je priemerná dĺžka života v Eritrei ?
|
84 |
+
pipeline_tag: sentence-similarity
|
85 |
---
|
86 |
|
87 |
+
# SentenceTransformer based on gerulata/slovakbert
|
88 |
|
89 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [gerulata/slovakbert](https://huggingface.co/gerulata/slovakbert). 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.
|
90 |
|
91 |
+
## Model Details
|
92 |
|
93 |
+
### Model Description
|
94 |
+
- **Model Type:** Sentence Transformer
|
95 |
+
- **Base model:** [gerulata/slovakbert](https://huggingface.co/gerulata/slovakbert) <!-- at revision 629d4e16f546fad0054b5143fe13ccbea03259e2 -->
|
96 |
+
- **Maximum Sequence Length:** 300 tokens
|
97 |
+
- **Output Dimensionality:** 768 tokens
|
98 |
+
- **Similarity Function:** Cosine Similarity
|
99 |
+
<!-- - **Training Dataset:** Unknown -->
|
100 |
+
<!-- - **Language:** Unknown -->
|
101 |
+
<!-- - **License:** Unknown -->
|
102 |
|
103 |
+
### Model Sources
|
104 |
|
105 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
106 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
107 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
108 |
|
109 |
+
### Full Model Architecture
|
110 |
|
111 |
+
```
|
112 |
+
SentenceTransformer(
|
113 |
+
(0): Transformer({'max_seq_length': 300, 'do_lower_case': False}) with Transformer model: RobertaModel
|
114 |
+
(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})
|
115 |
+
)
|
|
|
|
|
116 |
```
|
117 |
|
118 |
+
## Usage
|
119 |
|
120 |
+
### Direct Usage (Sentence Transformers)
|
121 |
|
122 |
+
First install the Sentence Transformers library:
|
|
|
123 |
|
124 |
+
```bash
|
125 |
+
pip install -U sentence-transformers
|
126 |
+
```
|
127 |
+
|
128 |
+
Then you can load this model and run inference.
|
129 |
```python
|
130 |
+
from sentence_transformers import SentenceTransformer
|
|
|
131 |
|
132 |
+
# Download from the 🤗 Hub
|
133 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
134 |
+
# Run inference
|
135 |
+
sentences = [
|
136 |
+
'Prvý most cez Zlatý roh nechal vybudovať cisár Justinián I. V roku 1502 vypísal sultán Bajazid II. súťaž na stavbu nového mosta, do ktorej sa prihlásili aj Leonardo da Vinci a Michelangelo Buonarroti, ale z realizácie návrhov nakoniec zišlo. V roku 1863 vznikol druhý, drevený most, ktorý v roku 1875 nahradil železný most, postavený francúzskymi staviteľmi. Štvrtý most postavili Nemci v roku 1912 a slúžil až do roku 1992, kedy bol zničený požiarom. Bolo rozhodnuté o stavbe mosta súčasného, ktorý vybudovala domáca firma STFA Group.',
|
137 |
+
'V ktorom roku vznikol druhý drevený most cez záliv Zlatý roh ?',
|
138 |
+
'Aká je priemerná dĺžka života v Eritrei ?',
|
139 |
+
]
|
140 |
+
embeddings = model.encode(sentences)
|
141 |
+
print(embeddings.shape)
|
142 |
+
# [3, 768]
|
143 |
|
144 |
+
# Get the similarity scores for the embeddings
|
145 |
+
similarities = model.similarity(embeddings, embeddings)
|
146 |
+
print(similarities.shape)
|
147 |
+
# [3, 3]
|
148 |
+
```
|
149 |
|
150 |
+
<!--
|
151 |
+
### Direct Usage (Transformers)
|
152 |
|
153 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
|
|
154 |
|
155 |
+
</details>
|
156 |
+
-->
|
|
|
157 |
|
158 |
+
<!--
|
159 |
+
### Downstream Usage (Sentence Transformers)
|
160 |
|
161 |
+
You can finetune this model on your own dataset.
|
|
|
|
|
162 |
|
163 |
+
<details><summary>Click to expand</summary>
|
|
|
164 |
|
165 |
+
</details>
|
166 |
+
-->
|
|
|
167 |
|
168 |
+
<!--
|
169 |
+
### Out-of-Scope Use
|
170 |
|
171 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
172 |
+
-->
|
173 |
|
174 |
+
<!--
|
175 |
+
## Bias, Risks and Limitations
|
176 |
|
177 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
178 |
+
-->
|
179 |
|
180 |
+
<!--
|
181 |
+
### Recommendations
|
182 |
|
183 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
184 |
+
-->
|
185 |
|
186 |
+
## Training Details
|
|
|
187 |
|
188 |
+
### Training Dataset
|
189 |
|
190 |
+
#### Unnamed Dataset
|
|
|
|
|
|
|
191 |
|
|
|
192 |
|
193 |
+
* Size: 65,699 training samples
|
194 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
|
195 |
+
* Approximate statistics based on the first 1000 samples:
|
196 |
+
| | sentence_0 | sentence_1 | sentence_2 |
|
197 |
+
|:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
198 |
+
| type | string | string | string |
|
199 |
+
| details | <ul><li>min: 99 tokens</li><li>mean: 185.5 tokens</li><li>max: 300 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 14.74 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 15.05 tokens</li><li>max: 34 tokens</li></ul> |
|
200 |
+
* Samples:
|
201 |
+
| sentence_0 | sentence_1 | sentence_2 |
|
202 |
+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------|
|
203 |
+
| <code>Gymnázium a neskôr filozofiu študoval v Nitre. V roku 1951 ilegálne emigroval cez Rakúsko do Nemecka, kde v St. Augustine skončil teologické štúdiá. V roku 1952 bol vysvätený za kňaza a následný rok odchádza ako misionár do mesta Bello Horizonte v Brazílii. Páter Jozef Filus pôsobil v tejto krajine celých 46 rokov. Tu sa učil po portugalsky, dejiny a kultúru krajiny. Neskôr pôsobil v mestách Tres Rios a Rio de Janeiro, Santa Casa, Juiz Fora, Vale Jequitiuhonha a Gama. Ešte aj vo svojich 75 rokoch pôsobil vo veľkej nemocnici v Bello Horizonte. V tomto meste je aj pochovaný.</code> | <code>V ktorom roku bol rímskokatolícky misionár Jozef Filus vysvätený za kňaza ?</code> | <code>V ktorom roku nebol rímskokatolícky misionár Jozef Filus vysvätený za kňaza ?</code> |
|
204 |
+
| <code>Gymnázium a neskôr filozofiu študoval v Nitre. V roku 1951 ilegálne emigroval cez Rakúsko do Nemecka, kde v St. Augustine skončil teologické štúdiá. V roku 1952 bol vysvätený za kňaza a následný rok odchádza ako misionár do mesta Bello Horizonte v Brazílii. Páter Jozef Filus pôsobil v tejto krajine celých 46 rokov. Tu sa učil po portugalsky, dejiny a kultúru krajiny. Neskôr pôsobil v mestách Tres Rios a Rio de Janeiro, Santa Casa, Juiz Fora, Vale Jequitiuhonha a Gama. Ešte aj vo svojich 75 rokoch pôsobil vo veľkej nemocnici v Bello Horizonte. V tomto meste je aj pochovaný.</code> | <code>Kam emigroval rímskokatolícky misionár Jozef Filus v roku 1951 ?</code> | <code>Kam emigroval rímskokatolícky misionár Jozef Filus v roku 2001 ?</code> |
|
205 |
+
| <code>Gymnázium a neskôr filozofiu študoval v Nitre. V roku 1951 ilegálne emigroval cez Rakúsko do Nemecka, kde v St. Augustine skončil teologické štúdiá. V roku 1952 bol vysvätený za kňaza a následný rok odchádza ako misionár do mesta Bello Horizonte v Brazílii. Páter Jozef Filus pôsobil v tejto krajine celých 46 rokov. Tu sa učil po portugalsky, dejiny a kultúru krajiny. Neskôr pôsobil v mestách Tres Rios a Rio de Janeiro, Santa Casa, Juiz Fora, Vale Jequitiuhonha a Gama. Ešte aj vo svojich 75 rokoch pôsobil vo veľkej nemocnici v Bello Horizonte. V tomto meste je aj pochovaný.</code> | <code>Kde študoval rímskokatolícky misionár Jozef Filus filozofiu ?</code> | <code>Kde študoval rímskokatolícky misionár Jozef Filus medicínu ?</code> |
|
206 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
207 |
+
```json
|
208 |
+
{
|
209 |
+
"scale": 20.0,
|
210 |
+
"similarity_fct": "cos_sim"
|
211 |
+
}
|
212 |
```
|
213 |
|
214 |
+
### Training Hyperparameters
|
215 |
+
#### Non-Default Hyperparameters
|
216 |
+
|
217 |
+
- `per_device_train_batch_size`: 16
|
218 |
+
- `per_device_eval_batch_size`: 16
|
219 |
+
- `num_train_epochs`: 1
|
220 |
+
- `fp16`: True
|
221 |
+
- `multi_dataset_batch_sampler`: round_robin
|
222 |
+
|
223 |
+
#### All Hyperparameters
|
224 |
+
<details><summary>Click to expand</summary>
|
225 |
+
|
226 |
+
- `overwrite_output_dir`: False
|
227 |
+
- `do_predict`: False
|
228 |
+
- `eval_strategy`: no
|
229 |
+
- `prediction_loss_only`: True
|
230 |
+
- `per_device_train_batch_size`: 16
|
231 |
+
- `per_device_eval_batch_size`: 16
|
232 |
+
- `per_gpu_train_batch_size`: None
|
233 |
+
- `per_gpu_eval_batch_size`: None
|
234 |
+
- `gradient_accumulation_steps`: 1
|
235 |
+
- `eval_accumulation_steps`: None
|
236 |
+
- `learning_rate`: 5e-05
|
237 |
+
- `weight_decay`: 0.0
|
238 |
+
- `adam_beta1`: 0.9
|
239 |
+
- `adam_beta2`: 0.999
|
240 |
+
- `adam_epsilon`: 1e-08
|
241 |
+
- `max_grad_norm`: 1
|
242 |
+
- `num_train_epochs`: 1
|
243 |
+
- `max_steps`: -1
|
244 |
+
- `lr_scheduler_type`: linear
|
245 |
+
- `lr_scheduler_kwargs`: {}
|
246 |
+
- `warmup_ratio`: 0.0
|
247 |
+
- `warmup_steps`: 0
|
248 |
+
- `log_level`: passive
|
249 |
+
- `log_level_replica`: warning
|
250 |
+
- `log_on_each_node`: True
|
251 |
+
- `logging_nan_inf_filter`: True
|
252 |
+
- `save_safetensors`: True
|
253 |
+
- `save_on_each_node`: False
|
254 |
+
- `save_only_model`: False
|
255 |
+
- `restore_callback_states_from_checkpoint`: False
|
256 |
+
- `no_cuda`: False
|
257 |
+
- `use_cpu`: False
|
258 |
+
- `use_mps_device`: False
|
259 |
+
- `seed`: 42
|
260 |
+
- `data_seed`: None
|
261 |
+
- `jit_mode_eval`: False
|
262 |
+
- `use_ipex`: False
|
263 |
+
- `bf16`: False
|
264 |
+
- `fp16`: True
|
265 |
+
- `fp16_opt_level`: O1
|
266 |
+
- `half_precision_backend`: auto
|
267 |
+
- `bf16_full_eval`: False
|
268 |
+
- `fp16_full_eval`: False
|
269 |
+
- `tf32`: None
|
270 |
+
- `local_rank`: 0
|
271 |
+
- `ddp_backend`: None
|
272 |
+
- `tpu_num_cores`: None
|
273 |
+
- `tpu_metrics_debug`: False
|
274 |
+
- `debug`: []
|
275 |
+
- `dataloader_drop_last`: False
|
276 |
+
- `dataloader_num_workers`: 0
|
277 |
+
- `dataloader_prefetch_factor`: 2
|
278 |
+
- `past_index`: -1
|
279 |
+
- `disable_tqdm`: False
|
280 |
+
- `remove_unused_columns`: True
|
281 |
+
- `label_names`: None
|
282 |
+
- `load_best_model_at_end`: False
|
283 |
+
- `ignore_data_skip`: False
|
284 |
+
- `fsdp`: []
|
285 |
+
- `fsdp_min_num_params`: 0
|
286 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
287 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
288 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
289 |
+
- `deepspeed`: None
|
290 |
+
- `label_smoothing_factor`: 0.0
|
291 |
+
- `optim`: adamw_torch
|
292 |
+
- `optim_args`: None
|
293 |
+
- `adafactor`: False
|
294 |
+
- `group_by_length`: False
|
295 |
+
- `length_column_name`: length
|
296 |
+
- `ddp_find_unused_parameters`: None
|
297 |
+
- `ddp_bucket_cap_mb`: None
|
298 |
+
- `ddp_broadcast_buffers`: False
|
299 |
+
- `dataloader_pin_memory`: True
|
300 |
+
- `dataloader_persistent_workers`: False
|
301 |
+
- `skip_memory_metrics`: True
|
302 |
+
- `use_legacy_prediction_loop`: False
|
303 |
+
- `push_to_hub`: False
|
304 |
+
- `resume_from_checkpoint`: None
|
305 |
+
- `hub_model_id`: None
|
306 |
+
- `hub_strategy`: every_save
|
307 |
+
- `hub_private_repo`: False
|
308 |
+
- `hub_always_push`: False
|
309 |
+
- `gradient_checkpointing`: False
|
310 |
+
- `gradient_checkpointing_kwargs`: None
|
311 |
+
- `include_inputs_for_metrics`: False
|
312 |
+
- `eval_do_concat_batches`: True
|
313 |
+
- `fp16_backend`: auto
|
314 |
+
- `push_to_hub_model_id`: None
|
315 |
+
- `push_to_hub_organization`: None
|
316 |
+
- `mp_parameters`:
|
317 |
+
- `auto_find_batch_size`: False
|
318 |
+
- `full_determinism`: False
|
319 |
+
- `torchdynamo`: None
|
320 |
+
- `ray_scope`: last
|
321 |
+
- `ddp_timeout`: 1800
|
322 |
+
- `torch_compile`: False
|
323 |
+
- `torch_compile_backend`: None
|
324 |
+
- `torch_compile_mode`: None
|
325 |
+
- `dispatch_batches`: None
|
326 |
+
- `split_batches`: None
|
327 |
+
- `include_tokens_per_second`: False
|
328 |
+
- `include_num_input_tokens_seen`: False
|
329 |
+
- `neftune_noise_alpha`: None
|
330 |
+
- `optim_target_modules`: None
|
331 |
+
- `batch_eval_metrics`: False
|
332 |
+
- `batch_sampler`: batch_sampler
|
333 |
+
- `multi_dataset_batch_sampler`: round_robin
|
334 |
+
|
335 |
+
</details>
|
336 |
+
|
337 |
+
### Training Logs
|
338 |
+
| Epoch | Step | Training Loss |
|
339 |
+
|:------:|:----:|:-------------:|
|
340 |
+
| 0.1217 | 500 | 0.7764 |
|
341 |
+
| 0.2435 | 1000 | 0.4429 |
|
342 |
+
| 0.3652 | 1500 | 0.3971 |
|
343 |
+
| 0.4870 | 2000 | 0.375 |
|
344 |
+
| 0.6087 | 2500 | 0.3427 |
|
345 |
+
| 0.7305 | 3000 | 0.3246 |
|
346 |
+
| 0.8522 | 3500 | 0.3173 |
|
347 |
+
| 0.9739 | 4000 | 0.3101 |
|
348 |
+
|
349 |
+
|
350 |
+
### Framework Versions
|
351 |
+
- Python: 3.10.8
|
352 |
+
- Sentence Transformers: 3.0.1
|
353 |
+
- Transformers: 4.41.2
|
354 |
+
- PyTorch: 1.13.1
|
355 |
+
- Accelerate: 0.31.0
|
356 |
+
- Datasets: 2.19.1
|
357 |
+
- Tokenizers: 0.19.1
|
358 |
+
|
359 |
+
## Citation
|
360 |
+
|
361 |
+
### BibTeX
|
362 |
+
|
363 |
+
#### Sentence Transformers
|
364 |
+
```bibtex
|
365 |
+
@inproceedings{reimers-2019-sentence-bert,
|
366 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
367 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
368 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
369 |
+
month = "11",
|
370 |
+
year = "2019",
|
371 |
+
publisher = "Association for Computational Linguistics",
|
372 |
+
url = "https://arxiv.org/abs/1908.10084",
|
373 |
+
}
|
374 |
```
|
375 |
+
|
376 |
+
#### MultipleNegativesRankingLoss
|
377 |
+
```bibtex
|
378 |
+
@misc{henderson2017efficient,
|
379 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
380 |
+
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},
|
381 |
+
year={2017},
|
382 |
+
eprint={1705.00652},
|
383 |
+
archivePrefix={arXiv},
|
384 |
+
primaryClass={cs.CL}
|
|
|
|
|
|
|
385 |
}
|
386 |
```
|
387 |
|
388 |
+
<!--
|
389 |
+
## Glossary
|
390 |
|
391 |
+
*Clearly define terms in order to be accessible across audiences.*
|
392 |
+
-->
|
393 |
+
|
394 |
+
<!--
|
395 |
+
## Model Card Authors
|
396 |
+
|
397 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
398 |
+
-->
|
399 |
|
400 |
+
<!--
|
401 |
+
## Model Card Contact
|
402 |
|
403 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
404 |
+
-->
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/
|
3 |
"architectures": [
|
4 |
"RobertaModel"
|
5 |
],
|
@@ -21,7 +21,7 @@
|
|
21 |
"pad_token_id": 1,
|
22 |
"position_embedding_type": "absolute",
|
23 |
"torch_dtype": "float32",
|
24 |
-
"transformers_version": "4.
|
25 |
"type_vocab_size": 1,
|
26 |
"use_cache": true,
|
27 |
"vocab_size": 50264
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "gerulata/slovakbert",
|
3 |
"architectures": [
|
4 |
"RobertaModel"
|
5 |
],
|
|
|
21 |
"pad_token_id": 1,
|
22 |
"position_embedding_type": "absolute",
|
23 |
"torch_dtype": "float32",
|
24 |
+
"transformers_version": "4.41.2",
|
25 |
"type_vocab_size": 1,
|
26 |
"use_cache": true,
|
27 |
"vocab_size": 50264
|
config_sentence_transformers.json
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
-
"sentence_transformers": "
|
4 |
-
"transformers": "4.
|
5 |
"pytorch": "1.13.1"
|
6 |
-
}
|
|
|
|
|
|
|
7 |
}
|
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.41.2",
|
5 |
"pytorch": "1.13.1"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
}
|
merges.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
#version: 0.2
|
2 |
Ġ s
|
3 |
Ġ p
|
4 |
à ¡
|
|
|
1 |
+
#version: 0.2
|
2 |
Ġ s
|
3 |
Ġ p
|
4 |
à ¡
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ddd6fc8cfa591888a7135534148e7de0c69861507be8f06673b243e7ff2eb06b
|
3 |
+
size 498601832
|
sentence_bert_config.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
-
"max_seq_length":
|
3 |
"do_lower_case": false
|
4 |
}
|
|
|
1 |
{
|
2 |
+
"max_seq_length": 300,
|
3 |
"do_lower_case": false
|
4 |
}
|
tokenizer.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"version": "1.0",
|
3 |
"truncation": {
|
4 |
"direction": "Right",
|
5 |
-
"max_length":
|
6 |
"strategy": "LongestFirst",
|
7 |
"stride": 0
|
8 |
},
|
@@ -94,6 +94,8 @@
|
|
94 |
"continuing_subword_prefix": "",
|
95 |
"end_of_word_suffix": "",
|
96 |
"fuse_unk": false,
|
|
|
|
|
97 |
"vocab": {
|
98 |
"<s>": 0,
|
99 |
"<pad>": 1,
|
|
|
2 |
"version": "1.0",
|
3 |
"truncation": {
|
4 |
"direction": "Right",
|
5 |
+
"max_length": 300,
|
6 |
"strategy": "LongestFirst",
|
7 |
"stride": 0
|
8 |
},
|
|
|
94 |
"continuing_subword_prefix": "",
|
95 |
"end_of_word_suffix": "",
|
96 |
"fuse_unk": false,
|
97 |
+
"byte_fallback": false,
|
98 |
+
"ignore_merges": false,
|
99 |
"vocab": {
|
100 |
"<s>": 0,
|
101 |
"<pad>": 1,
|
tokenizer_config.json
CHANGED
@@ -1,65 +1,57 @@
|
|
1 |
{
|
2 |
"add_prefix_space": false,
|
3 |
-
"
|
4 |
-
"
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
"
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
"
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
},
|
|
|
|
|
|
|
|
|
27 |
"errors": "replace",
|
28 |
-
"mask_token":
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
"normalized": true,
|
33 |
-
"rstrip": false,
|
34 |
-
"single_word": false
|
35 |
-
},
|
36 |
-
"model_max_length": 512,
|
37 |
-
"name_or_path": "/home/hladek/.cache/torch/sentence_transformers/gerulata_slovakbert",
|
38 |
-
"pad_token": {
|
39 |
-
"__type": "AddedToken",
|
40 |
-
"content": "<pad>",
|
41 |
-
"lstrip": false,
|
42 |
-
"normalized": true,
|
43 |
-
"rstrip": false,
|
44 |
-
"single_word": false
|
45 |
-
},
|
46 |
-
"sep_token": {
|
47 |
-
"__type": "AddedToken",
|
48 |
-
"content": "</s>",
|
49 |
-
"lstrip": false,
|
50 |
-
"normalized": true,
|
51 |
-
"rstrip": false,
|
52 |
-
"single_word": false
|
53 |
-
},
|
54 |
-
"special_tokens_map_file": null,
|
55 |
"tokenizer_class": "RobertaTokenizer",
|
56 |
"trim_offsets": true,
|
57 |
-
"unk_token":
|
58 |
-
"__type": "AddedToken",
|
59 |
-
"content": "<unk>",
|
60 |
-
"lstrip": false,
|
61 |
-
"normalized": true,
|
62 |
-
"rstrip": false,
|
63 |
-
"single_word": false
|
64 |
-
}
|
65 |
}
|
|
|
1 |
{
|
2 |
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50263": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": true,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
},
|
45 |
+
"bos_token": "<s>",
|
46 |
+
"clean_up_tokenization_spaces": true,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
"errors": "replace",
|
50 |
+
"mask_token": "<mask>",
|
51 |
+
"model_max_length": 300,
|
52 |
+
"pad_token": "<pad>",
|
53 |
+
"sep_token": "</s>",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
"tokenizer_class": "RobertaTokenizer",
|
55 |
"trim_offsets": true,
|
56 |
+
"unk_token": "<unk>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|