Add new SentenceTransformer model.
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +10 -0
- README.md +506 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +64 -0
- unigram.json +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ 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
|
37 |
+
unigram.json filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
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,506 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
3 |
+
language:
|
4 |
+
- hu
|
5 |
+
library_name: sentence-transformers
|
6 |
+
license: apache-2.0
|
7 |
+
metrics:
|
8 |
+
- cosine_accuracy
|
9 |
+
- dot_accuracy
|
10 |
+
- manhattan_accuracy
|
11 |
+
- euclidean_accuracy
|
12 |
+
- max_accuracy
|
13 |
+
pipeline_tag: sentence-similarity
|
14 |
+
tags:
|
15 |
+
- sentence-transformers
|
16 |
+
- sentence-similarity
|
17 |
+
- feature-extraction
|
18 |
+
- generated_from_trainer
|
19 |
+
- dataset_size:457856
|
20 |
+
- loss:MultipleNegativesRankingLoss
|
21 |
+
widget:
|
22 |
+
- source_sentence: Emberek várnak a lámpánál kerékpárral.
|
23 |
+
sentences:
|
24 |
+
- Az emberek piros lámpánál haladnak.
|
25 |
+
- Az emberek a kerékpárjukon vannak.
|
26 |
+
- Egy fekete kutya úszik a vízben egy teniszlabdával a szájában
|
27 |
+
- source_sentence: A kutya a vízben van.
|
28 |
+
sentences:
|
29 |
+
- Két férfi takarítja a havat a tetőről, az egyik egy emelőben ül, a másik pedig
|
30 |
+
a tetőn.
|
31 |
+
- A macska a vízben van, és dühös.
|
32 |
+
- Egy kutya van a vízben, a szájában egy faág.
|
33 |
+
- source_sentence: A nő feketét visel.
|
34 |
+
sentences:
|
35 |
+
- Egy barna kutya fröcsköl, ahogy úszik a vízben.
|
36 |
+
- Egy tetoválással rendelkező nő, aki fekete tank tetején néz a földre.
|
37 |
+
- 'Egy kékbe öltözött nő intenzív arckifejezéssel üti a teniszlabdát. A képen:'
|
38 |
+
- source_sentence: Az emberek alszanak.
|
39 |
+
sentences:
|
40 |
+
- Három ember beszélget egy városi utcán.
|
41 |
+
- A nő fehéret visel.
|
42 |
+
- Egy apa és a fia ölelgeti alvás közben.
|
43 |
+
- source_sentence: Az emberek alszanak.
|
44 |
+
sentences:
|
45 |
+
- Egy feketébe öltözött nő cigarettát és bevásárlótáskát tart a kezében, miközben
|
46 |
+
egy idősebb nő átmegy az utcán.
|
47 |
+
- Egy csoport ember ül egy nyitott, térszerű területen, mögötte nagy bokrok és egy
|
48 |
+
sor viktoriánus stílusú épület, melyek közül sokat a kép jobb oldalán lévő erős
|
49 |
+
elmosódás tesz kivehetetlenné.
|
50 |
+
- Egy apa és a fia ölelgeti alvás közben.
|
51 |
+
model-index:
|
52 |
+
- name: e5-base_hun
|
53 |
+
results:
|
54 |
+
- task:
|
55 |
+
type: triplet
|
56 |
+
name: Triplet
|
57 |
+
dataset:
|
58 |
+
name: all nli dev
|
59 |
+
type: all-nli-dev
|
60 |
+
metrics:
|
61 |
+
- type: cosine_accuracy
|
62 |
+
value: 0.9746
|
63 |
+
name: Cosine Accuracy
|
64 |
+
- type: dot_accuracy
|
65 |
+
value: 0.0284
|
66 |
+
name: Dot Accuracy
|
67 |
+
- type: manhattan_accuracy
|
68 |
+
value: 0.9676
|
69 |
+
name: Manhattan Accuracy
|
70 |
+
- type: euclidean_accuracy
|
71 |
+
value: 0.9658
|
72 |
+
name: Euclidean Accuracy
|
73 |
+
- type: max_accuracy
|
74 |
+
value: 0.9746
|
75 |
+
name: Max Accuracy
|
76 |
+
- task:
|
77 |
+
type: triplet
|
78 |
+
name: Triplet
|
79 |
+
dataset:
|
80 |
+
name: all nli test
|
81 |
+
type: all-nli-test
|
82 |
+
metrics:
|
83 |
+
- type: cosine_accuracy
|
84 |
+
value: 0.9921212121212121
|
85 |
+
name: Cosine Accuracy
|
86 |
+
- type: dot_accuracy
|
87 |
+
value: 0.008636363636363636
|
88 |
+
name: Dot Accuracy
|
89 |
+
- type: manhattan_accuracy
|
90 |
+
value: 0.9896969696969697
|
91 |
+
name: Manhattan Accuracy
|
92 |
+
- type: euclidean_accuracy
|
93 |
+
value: 0.9895454545454545
|
94 |
+
name: Euclidean Accuracy
|
95 |
+
- type: max_accuracy
|
96 |
+
value: 0.9921212121212121
|
97 |
+
name: Max Accuracy
|
98 |
+
---
|
99 |
+
|
100 |
+
# e5-base_hun
|
101 |
+
|
102 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) on the train dataset. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
103 |
+
|
104 |
+
## Model Details
|
105 |
+
|
106 |
+
### Model Description
|
107 |
+
- **Model Type:** Sentence Transformer
|
108 |
+
- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision ae06c001a2546bef168b9bf8f570ccb1a16aaa27 -->
|
109 |
+
- **Maximum Sequence Length:** 128 tokens
|
110 |
+
- **Output Dimensionality:** 384 tokens
|
111 |
+
- **Similarity Function:** Cosine Similarity
|
112 |
+
- **Training Dataset:**
|
113 |
+
- train
|
114 |
+
- **Language:** hu
|
115 |
+
- **License:** apache-2.0
|
116 |
+
|
117 |
+
### Model Sources
|
118 |
+
|
119 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
120 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
121 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
122 |
+
|
123 |
+
### Full Model Architecture
|
124 |
+
|
125 |
+
```
|
126 |
+
SentenceTransformer(
|
127 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
128 |
+
(1): Pooling({'word_embedding_dimension': 384, '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})
|
129 |
+
)
|
130 |
+
```
|
131 |
+
|
132 |
+
## Usage
|
133 |
+
|
134 |
+
### Direct Usage (Sentence Transformers)
|
135 |
+
|
136 |
+
First install the Sentence Transformers library:
|
137 |
+
|
138 |
+
```bash
|
139 |
+
pip install -U sentence-transformers
|
140 |
+
```
|
141 |
+
|
142 |
+
Then you can load this model and run inference.
|
143 |
+
```python
|
144 |
+
from sentence_transformers import SentenceTransformer
|
145 |
+
|
146 |
+
# Download from the 🤗 Hub
|
147 |
+
model = SentenceTransformer("karsar/paraphrase-multilingual-MiniLM-L12-hu")
|
148 |
+
# Run inference
|
149 |
+
sentences = [
|
150 |
+
'Az emberek alszanak.',
|
151 |
+
'Egy apa és a fia ölelgeti alvás közben.',
|
152 |
+
'Egy csoport ember ül egy nyitott, térszerű területen, mögötte nagy bokrok és egy sor viktoriánus stílusú épület, melyek közül sokat a kép jobb oldalán lévő erős elmosódás tesz kivehetetlenné.',
|
153 |
+
]
|
154 |
+
embeddings = model.encode(sentences)
|
155 |
+
print(embeddings.shape)
|
156 |
+
# [3, 384]
|
157 |
+
|
158 |
+
# Get the similarity scores for the embeddings
|
159 |
+
similarities = model.similarity(embeddings, embeddings)
|
160 |
+
print(similarities.shape)
|
161 |
+
# [3, 3]
|
162 |
+
```
|
163 |
+
|
164 |
+
<!--
|
165 |
+
### Direct Usage (Transformers)
|
166 |
+
|
167 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
168 |
+
|
169 |
+
</details>
|
170 |
+
-->
|
171 |
+
|
172 |
+
<!--
|
173 |
+
### Downstream Usage (Sentence Transformers)
|
174 |
+
|
175 |
+
You can finetune this model on your own dataset.
|
176 |
+
|
177 |
+
<details><summary>Click to expand</summary>
|
178 |
+
|
179 |
+
</details>
|
180 |
+
-->
|
181 |
+
|
182 |
+
<!--
|
183 |
+
### Out-of-Scope Use
|
184 |
+
|
185 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
186 |
+
-->
|
187 |
+
|
188 |
+
## Evaluation
|
189 |
+
|
190 |
+
### Metrics
|
191 |
+
|
192 |
+
#### Triplet
|
193 |
+
* Dataset: `all-nli-dev`
|
194 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
195 |
+
|
196 |
+
| Metric | Value |
|
197 |
+
|:-------------------|:-----------|
|
198 |
+
| cosine_accuracy | 0.9746 |
|
199 |
+
| dot_accuracy | 0.0284 |
|
200 |
+
| manhattan_accuracy | 0.9676 |
|
201 |
+
| euclidean_accuracy | 0.9658 |
|
202 |
+
| **max_accuracy** | **0.9746** |
|
203 |
+
|
204 |
+
#### Triplet
|
205 |
+
* Dataset: `all-nli-test`
|
206 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
207 |
+
|
208 |
+
| Metric | Value |
|
209 |
+
|:-------------------|:-----------|
|
210 |
+
| cosine_accuracy | 0.9921 |
|
211 |
+
| dot_accuracy | 0.0086 |
|
212 |
+
| manhattan_accuracy | 0.9897 |
|
213 |
+
| euclidean_accuracy | 0.9895 |
|
214 |
+
| **max_accuracy** | **0.9921** |
|
215 |
+
|
216 |
+
<!--
|
217 |
+
## Bias, Risks and Limitations
|
218 |
+
|
219 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
220 |
+
-->
|
221 |
+
|
222 |
+
<!--
|
223 |
+
### Recommendations
|
224 |
+
|
225 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
226 |
+
-->
|
227 |
+
|
228 |
+
## Training Details
|
229 |
+
|
230 |
+
### Training Dataset
|
231 |
+
|
232 |
+
#### train
|
233 |
+
|
234 |
+
* Dataset: train
|
235 |
+
* Size: 457,856 training samples
|
236 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
237 |
+
* Approximate statistics based on the first 1000 samples:
|
238 |
+
| | anchor | positive | negative |
|
239 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
240 |
+
| type | string | string | string |
|
241 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 11.73 tokens</li><li>max: 56 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.24 tokens</li><li>max: 47 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 16.07 tokens</li><li>max: 53 tokens</li></ul> |
|
242 |
+
* Samples:
|
243 |
+
| anchor | positive | negative |
|
244 |
+
|:---------------------------------------------------------------------------|:----------------------------------------------|:---------------------------------------------------------------|
|
245 |
+
| <code>Egy lóháton ülő ember átugrik egy lerombolt repülőgép felett.</code> | <code>Egy ember a szabadban, lóháton.</code> | <code>Egy ember egy étteremben van, és omlettet rendel.</code> |
|
246 |
+
| <code>Gyerekek mosolyogva és integetett a kamera</code> | <code>Gyermekek vannak jelen</code> | <code>A gyerekek homlokot rántanak</code> |
|
247 |
+
| <code>Egy fiú ugrál a gördeszkát a közepén egy piros híd.</code> | <code>A fiú gördeszkás trükköt csinál.</code> | <code>A fiú korcsolyázik a járdán.</code> |
|
248 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
249 |
+
```json
|
250 |
+
{
|
251 |
+
"scale": 20.0,
|
252 |
+
"similarity_fct": "cos_sim"
|
253 |
+
}
|
254 |
+
```
|
255 |
+
|
256 |
+
### Evaluation Dataset
|
257 |
+
|
258 |
+
#### train
|
259 |
+
|
260 |
+
* Dataset: train
|
261 |
+
* Size: 5,000 evaluation samples
|
262 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
263 |
+
* Approximate statistics based on the first 1000 samples:
|
264 |
+
| | anchor | positive | negative |
|
265 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
266 |
+
| type | string | string | string |
|
267 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 11.73 tokens</li><li>max: 56 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.24 tokens</li><li>max: 47 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 16.07 tokens</li><li>max: 53 tokens</li></ul> |
|
268 |
+
* Samples:
|
269 |
+
| anchor | positive | negative |
|
270 |
+
|:---------------------------------------------------------------------------|:----------------------------------------------|:---------------------------------------------------------------|
|
271 |
+
| <code>Egy lóháton ülő ember átugrik egy lerombolt repülőgép felett.</code> | <code>Egy ember a szabadban, lóháton.</code> | <code>Egy ember egy étteremben van, és omlettet rendel.</code> |
|
272 |
+
| <code>Gyerekek mosolyogva és integetett a kamera</code> | <code>Gyermekek vannak jelen</code> | <code>A gyerekek homlokot rántanak</code> |
|
273 |
+
| <code>Egy fiú ugrál a gördeszkát a közepén egy piros híd.</code> | <code>A fiú gördeszkás trükköt csinál.</code> | <code>A fiú korcsolyázik a járdán.</code> |
|
274 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
275 |
+
```json
|
276 |
+
{
|
277 |
+
"scale": 20.0,
|
278 |
+
"similarity_fct": "cos_sim"
|
279 |
+
}
|
280 |
+
```
|
281 |
+
|
282 |
+
### Training Hyperparameters
|
283 |
+
#### Non-Default Hyperparameters
|
284 |
+
|
285 |
+
- `eval_strategy`: steps
|
286 |
+
- `per_device_train_batch_size`: 128
|
287 |
+
- `per_device_eval_batch_size`: 128
|
288 |
+
- `num_train_epochs`: 1
|
289 |
+
- `warmup_ratio`: 0.1
|
290 |
+
- `bf16`: True
|
291 |
+
- `batch_sampler`: no_duplicates
|
292 |
+
|
293 |
+
#### All Hyperparameters
|
294 |
+
<details><summary>Click to expand</summary>
|
295 |
+
|
296 |
+
- `overwrite_output_dir`: False
|
297 |
+
- `do_predict`: False
|
298 |
+
- `eval_strategy`: steps
|
299 |
+
- `prediction_loss_only`: True
|
300 |
+
- `per_device_train_batch_size`: 128
|
301 |
+
- `per_device_eval_batch_size`: 128
|
302 |
+
- `per_gpu_train_batch_size`: None
|
303 |
+
- `per_gpu_eval_batch_size`: None
|
304 |
+
- `gradient_accumulation_steps`: 1
|
305 |
+
- `eval_accumulation_steps`: None
|
306 |
+
- `torch_empty_cache_steps`: None
|
307 |
+
- `learning_rate`: 5e-05
|
308 |
+
- `weight_decay`: 0.0
|
309 |
+
- `adam_beta1`: 0.9
|
310 |
+
- `adam_beta2`: 0.999
|
311 |
+
- `adam_epsilon`: 1e-08
|
312 |
+
- `max_grad_norm`: 1.0
|
313 |
+
- `num_train_epochs`: 1
|
314 |
+
- `max_steps`: -1
|
315 |
+
- `lr_scheduler_type`: linear
|
316 |
+
- `lr_scheduler_kwargs`: {}
|
317 |
+
- `warmup_ratio`: 0.1
|
318 |
+
- `warmup_steps`: 0
|
319 |
+
- `log_level`: passive
|
320 |
+
- `log_level_replica`: warning
|
321 |
+
- `log_on_each_node`: True
|
322 |
+
- `logging_nan_inf_filter`: True
|
323 |
+
- `save_safetensors`: True
|
324 |
+
- `save_on_each_node`: False
|
325 |
+
- `save_only_model`: False
|
326 |
+
- `restore_callback_states_from_checkpoint`: False
|
327 |
+
- `no_cuda`: False
|
328 |
+
- `use_cpu`: False
|
329 |
+
- `use_mps_device`: False
|
330 |
+
- `seed`: 42
|
331 |
+
- `data_seed`: None
|
332 |
+
- `jit_mode_eval`: False
|
333 |
+
- `use_ipex`: False
|
334 |
+
- `bf16`: True
|
335 |
+
- `fp16`: False
|
336 |
+
- `fp16_opt_level`: O1
|
337 |
+
- `half_precision_backend`: auto
|
338 |
+
- `bf16_full_eval`: False
|
339 |
+
- `fp16_full_eval`: False
|
340 |
+
- `tf32`: None
|
341 |
+
- `local_rank`: 0
|
342 |
+
- `ddp_backend`: None
|
343 |
+
- `tpu_num_cores`: None
|
344 |
+
- `tpu_metrics_debug`: False
|
345 |
+
- `debug`: []
|
346 |
+
- `dataloader_drop_last`: False
|
347 |
+
- `dataloader_num_workers`: 0
|
348 |
+
- `dataloader_prefetch_factor`: None
|
349 |
+
- `past_index`: -1
|
350 |
+
- `disable_tqdm`: False
|
351 |
+
- `remove_unused_columns`: True
|
352 |
+
- `label_names`: None
|
353 |
+
- `load_best_model_at_end`: False
|
354 |
+
- `ignore_data_skip`: False
|
355 |
+
- `fsdp`: []
|
356 |
+
- `fsdp_min_num_params`: 0
|
357 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
358 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
359 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
360 |
+
- `deepspeed`: None
|
361 |
+
- `label_smoothing_factor`: 0.0
|
362 |
+
- `optim`: adamw_torch
|
363 |
+
- `optim_args`: None
|
364 |
+
- `adafactor`: False
|
365 |
+
- `group_by_length`: False
|
366 |
+
- `length_column_name`: length
|
367 |
+
- `ddp_find_unused_parameters`: None
|
368 |
+
- `ddp_bucket_cap_mb`: None
|
369 |
+
- `ddp_broadcast_buffers`: False
|
370 |
+
- `dataloader_pin_memory`: True
|
371 |
+
- `dataloader_persistent_workers`: False
|
372 |
+
- `skip_memory_metrics`: True
|
373 |
+
- `use_legacy_prediction_loop`: False
|
374 |
+
- `push_to_hub`: False
|
375 |
+
- `resume_from_checkpoint`: None
|
376 |
+
- `hub_model_id`: None
|
377 |
+
- `hub_strategy`: every_save
|
378 |
+
- `hub_private_repo`: False
|
379 |
+
- `hub_always_push`: False
|
380 |
+
- `gradient_checkpointing`: False
|
381 |
+
- `gradient_checkpointing_kwargs`: None
|
382 |
+
- `include_inputs_for_metrics`: False
|
383 |
+
- `eval_do_concat_batches`: True
|
384 |
+
- `fp16_backend`: auto
|
385 |
+
- `push_to_hub_model_id`: None
|
386 |
+
- `push_to_hub_organization`: None
|
387 |
+
- `mp_parameters`:
|
388 |
+
- `auto_find_batch_size`: False
|
389 |
+
- `full_determinism`: False
|
390 |
+
- `torchdynamo`: None
|
391 |
+
- `ray_scope`: last
|
392 |
+
- `ddp_timeout`: 1800
|
393 |
+
- `torch_compile`: False
|
394 |
+
- `torch_compile_backend`: None
|
395 |
+
- `torch_compile_mode`: None
|
396 |
+
- `dispatch_batches`: None
|
397 |
+
- `split_batches`: None
|
398 |
+
- `include_tokens_per_second`: False
|
399 |
+
- `include_num_input_tokens_seen`: False
|
400 |
+
- `neftune_noise_alpha`: None
|
401 |
+
- `optim_target_modules`: None
|
402 |
+
- `batch_eval_metrics`: False
|
403 |
+
- `eval_on_start`: False
|
404 |
+
- `eval_use_gather_object`: False
|
405 |
+
- `batch_sampler`: no_duplicates
|
406 |
+
- `multi_dataset_batch_sampler`: proportional
|
407 |
+
|
408 |
+
</details>
|
409 |
+
|
410 |
+
### Training Logs
|
411 |
+
| Epoch | Step | Training Loss | train loss | all-nli-dev_max_accuracy | all-nli-test_max_accuracy |
|
412 |
+
|:------:|:----:|:-------------:|:----------:|:------------------------:|:-------------------------:|
|
413 |
+
| 0 | 0 | - | - | 0.7574 | - |
|
414 |
+
| 0.0280 | 100 | 2.3495 | - | - | - |
|
415 |
+
| 0.0559 | 200 | 1.8588 | - | - | - |
|
416 |
+
| 0.0839 | 300 | 1.7156 | - | - | - |
|
417 |
+
| 0.1118 | 400 | 1.609 | - | - | - |
|
418 |
+
| 0.1398 | 500 | 1.5286 | - | - | - |
|
419 |
+
| 0.1677 | 600 | 1.4425 | - | - | - |
|
420 |
+
| 0.1957 | 700 | 1.6016 | - | - | - |
|
421 |
+
| 0.2237 | 800 | 1.5278 | - | - | - |
|
422 |
+
| 0.2516 | 900 | 1.4255 | - | - | - |
|
423 |
+
| 0.2796 | 1000 | 1.2084 | - | - | - |
|
424 |
+
| 0.3075 | 1100 | 1.1248 | - | - | - |
|
425 |
+
| 0.3355 | 1200 | 1.0773 | - | - | - |
|
426 |
+
| 0.3634 | 1300 | 1.1373 | - | - | - |
|
427 |
+
| 0.3914 | 1400 | 1.222 | - | - | - |
|
428 |
+
| 0.4193 | 1500 | 1.048 | - | - | - |
|
429 |
+
| 0.4473 | 1600 | 0.9319 | - | - | - |
|
430 |
+
| 0.4753 | 1700 | 0.8837 | - | - | - |
|
431 |
+
| 0.5032 | 1800 | 0.8402 | - | - | - |
|
432 |
+
| 0.5312 | 1900 | 0.7515 | - | - | - |
|
433 |
+
| 0.5591 | 2000 | 0.9405 | 0.1310 | 0.9746 | - |
|
434 |
+
| 0.5871 | 2100 | 0.8526 | - | - | - |
|
435 |
+
| 0.6150 | 2200 | 0.7886 | - | - | - |
|
436 |
+
| 0.6430 | 2300 | 0.6704 | - | - | - |
|
437 |
+
| 0.6710 | 2400 | 0.6488 | - | - | - |
|
438 |
+
| 0.6989 | 2500 | 0.635 | - | - | - |
|
439 |
+
| 0.7269 | 2600 | 0.7242 | - | - | - |
|
440 |
+
| 0.7548 | 2700 | 0.7593 | - | - | - |
|
441 |
+
| 0.7828 | 2800 | 0.62 | - | - | - |
|
442 |
+
| 0.8107 | 2900 | 0.4302 | - | - | - |
|
443 |
+
| 0.8387 | 3000 | 0.2952 | - | - | - |
|
444 |
+
| 0.8666 | 3100 | 0.3354 | - | - | - |
|
445 |
+
| 0.8946 | 3200 | 0.3221 | - | - | - |
|
446 |
+
| 0.9226 | 3300 | 0.4317 | - | - | - |
|
447 |
+
| 0.9505 | 3400 | 0.3185 | - | - | - |
|
448 |
+
| 0.9785 | 3500 | 0.433 | - | - | - |
|
449 |
+
| 1.0 | 3577 | - | - | - | 0.9921 |
|
450 |
+
|
451 |
+
|
452 |
+
### Framework Versions
|
453 |
+
- Python: 3.11.8
|
454 |
+
- Sentence Transformers: 3.1.1
|
455 |
+
- Transformers: 4.44.0
|
456 |
+
- PyTorch: 2.3.0.post101
|
457 |
+
- Accelerate: 0.33.0
|
458 |
+
- Datasets: 2.18.0
|
459 |
+
- Tokenizers: 0.19.0
|
460 |
+
|
461 |
+
## Citation
|
462 |
+
|
463 |
+
### BibTeX
|
464 |
+
|
465 |
+
#### Sentence Transformers
|
466 |
+
```bibtex
|
467 |
+
@inproceedings{reimers-2019-sentence-bert,
|
468 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
469 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
470 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
471 |
+
month = "11",
|
472 |
+
year = "2019",
|
473 |
+
publisher = "Association for Computational Linguistics",
|
474 |
+
url = "https://arxiv.org/abs/1908.10084",
|
475 |
+
}
|
476 |
+
```
|
477 |
+
|
478 |
+
#### MultipleNegativesRankingLoss
|
479 |
+
```bibtex
|
480 |
+
@misc{henderson2017efficient,
|
481 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
482 |
+
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},
|
483 |
+
year={2017},
|
484 |
+
eprint={1705.00652},
|
485 |
+
archivePrefix={arXiv},
|
486 |
+
primaryClass={cs.CL}
|
487 |
+
}
|
488 |
+
```
|
489 |
+
|
490 |
+
<!--
|
491 |
+
## Glossary
|
492 |
+
|
493 |
+
*Clearly define terms in order to be accessible across audiences.*
|
494 |
+
-->
|
495 |
+
|
496 |
+
<!--
|
497 |
+
## Model Card Authors
|
498 |
+
|
499 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
500 |
+
-->
|
501 |
+
|
502 |
+
<!--
|
503 |
+
## Model Card Contact
|
504 |
+
|
505 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
506 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.44.0",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 250037
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.1.1",
|
4 |
+
"transformers": "4.44.0",
|
5 |
+
"pytorch": "2.3.0.post101"
|
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:45f788cd812df4ca644c5847acdab499d50ddea4f5b60a7767b9aee3797f625a
|
3 |
+
size 470637416
|
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 |
+
}
|
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,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"do_lower_case": true,
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"mask_token": "<mask>",
|
50 |
+
"max_length": 128,
|
51 |
+
"model_max_length": 128,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "</s>",
|
57 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "<unk>"
|
64 |
+
}
|
unigram.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
|
3 |
+
size 14763260
|