Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +522 -0
- config.json +25 -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 +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +93 -0
- vocab.txt +0 -0
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,522 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: silma-ai/silma-embeddding-matryoshka-0.1
|
3 |
+
library_name: sentence-transformers
|
4 |
+
metrics:
|
5 |
+
- pearson_cosine
|
6 |
+
- spearman_cosine
|
7 |
+
- pearson_manhattan
|
8 |
+
- spearman_manhattan
|
9 |
+
- pearson_euclidean
|
10 |
+
- spearman_euclidean
|
11 |
+
- pearson_dot
|
12 |
+
- spearman_dot
|
13 |
+
- pearson_max
|
14 |
+
- spearman_max
|
15 |
+
pipeline_tag: sentence-similarity
|
16 |
+
tags:
|
17 |
+
- sentence-transformers
|
18 |
+
- sentence-similarity
|
19 |
+
- feature-extraction
|
20 |
+
- generated_from_trainer
|
21 |
+
- dataset_size:34436
|
22 |
+
- loss:CosineSimilarityLoss
|
23 |
+
widget:
|
24 |
+
- source_sentence: Three men are playing chess.
|
25 |
+
sentences:
|
26 |
+
- Two men are fighting.
|
27 |
+
- امرأة تحمل و تحمل طفل كنغر
|
28 |
+
- Two men are playing chess.
|
29 |
+
- source_sentence: Two men are playing chess.
|
30 |
+
sentences:
|
31 |
+
- رجل يعزف على الغيتار و يغني
|
32 |
+
- Three men are playing chess.
|
33 |
+
- طائرة طيران تقلع
|
34 |
+
- source_sentence: Two men are playing chess.
|
35 |
+
sentences:
|
36 |
+
- A man is playing a large flute. رجل يعزف على ناي كبير
|
37 |
+
- The man is playing the piano. الرجل يعزف على البيانو
|
38 |
+
- Three men are playing chess.
|
39 |
+
- source_sentence: الرجل يعزف على البيانو The man is playing the piano.
|
40 |
+
sentences:
|
41 |
+
- رجل يجلس ويلعب الكمان A man seated is playing the cello.
|
42 |
+
- ثلاثة رجال يلعبون الشطرنج.
|
43 |
+
- الرجل يعزف على الغيتار The man is playing the guitar.
|
44 |
+
- source_sentence: الرجل ضرب الرجل الآخر بعصا The man hit the other man with a stick.
|
45 |
+
sentences:
|
46 |
+
- الرجل صفع الرجل الآخر بعصا The man spanked the other man with a stick.
|
47 |
+
- A plane is taking off.
|
48 |
+
- A man is smoking. رجل يدخن
|
49 |
+
model-index:
|
50 |
+
- name: SentenceTransformer based on silma-ai/silma-embeddding-matryoshka-0.1
|
51 |
+
results:
|
52 |
+
- task:
|
53 |
+
type: semantic-similarity
|
54 |
+
name: Semantic Similarity
|
55 |
+
dataset:
|
56 |
+
name: sts dev 512
|
57 |
+
type: sts-dev-512
|
58 |
+
metrics:
|
59 |
+
- type: pearson_cosine
|
60 |
+
value: 0.8509127994264242
|
61 |
+
name: Pearson Cosine
|
62 |
+
- type: spearman_cosine
|
63 |
+
value: 0.8548500966032416
|
64 |
+
name: Spearman Cosine
|
65 |
+
- type: pearson_manhattan
|
66 |
+
value: 0.821303728669975
|
67 |
+
name: Pearson Manhattan
|
68 |
+
- type: spearman_manhattan
|
69 |
+
value: 0.8364598068079891
|
70 |
+
name: Spearman Manhattan
|
71 |
+
- type: pearson_euclidean
|
72 |
+
value: 0.8210450198328316
|
73 |
+
name: Pearson Euclidean
|
74 |
+
- type: spearman_euclidean
|
75 |
+
value: 0.8382181658285147
|
76 |
+
name: Spearman Euclidean
|
77 |
+
- type: pearson_dot
|
78 |
+
value: 0.8491261828772604
|
79 |
+
name: Pearson Dot
|
80 |
+
- type: spearman_dot
|
81 |
+
value: 0.8559811107036664
|
82 |
+
name: Spearman Dot
|
83 |
+
- type: pearson_max
|
84 |
+
value: 0.8509127994264242
|
85 |
+
name: Pearson Max
|
86 |
+
- type: spearman_max
|
87 |
+
value: 0.8559811107036664
|
88 |
+
name: Spearman Max
|
89 |
+
- task:
|
90 |
+
type: semantic-similarity
|
91 |
+
name: Semantic Similarity
|
92 |
+
dataset:
|
93 |
+
name: sts dev 256
|
94 |
+
type: sts-dev-256
|
95 |
+
metrics:
|
96 |
+
- type: pearson_cosine
|
97 |
+
value: 0.8498025312190702
|
98 |
+
name: Pearson Cosine
|
99 |
+
- type: spearman_cosine
|
100 |
+
value: 0.8530609768738506
|
101 |
+
name: Spearman Cosine
|
102 |
+
- type: pearson_manhattan
|
103 |
+
value: 0.8181745876468085
|
104 |
+
name: Pearson Manhattan
|
105 |
+
- type: spearman_manhattan
|
106 |
+
value: 0.8328727236454085
|
107 |
+
name: Spearman Manhattan
|
108 |
+
- type: pearson_euclidean
|
109 |
+
value: 0.8193792688284338
|
110 |
+
name: Pearson Euclidean
|
111 |
+
- type: spearman_euclidean
|
112 |
+
value: 0.8338632184708783
|
113 |
+
name: Spearman Euclidean
|
114 |
+
- type: pearson_dot
|
115 |
+
value: 0.8396368156921546
|
116 |
+
name: Pearson Dot
|
117 |
+
- type: spearman_dot
|
118 |
+
value: 0.8484397673758116
|
119 |
+
name: Spearman Dot
|
120 |
+
- type: pearson_max
|
121 |
+
value: 0.8498025312190702
|
122 |
+
name: Pearson Max
|
123 |
+
- type: spearman_max
|
124 |
+
value: 0.8530609768738506
|
125 |
+
name: Spearman Max
|
126 |
+
---
|
127 |
+
|
128 |
+
# SentenceTransformer based on silma-ai/silma-embeddding-matryoshka-0.1
|
129 |
+
|
130 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [silma-ai/silma-embeddding-matryoshka-0.1](https://huggingface.co/silma-ai/silma-embeddding-matryoshka-0.1). 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.
|
131 |
+
|
132 |
+
## Model Details
|
133 |
+
|
134 |
+
### Model Description
|
135 |
+
- **Model Type:** Sentence Transformer
|
136 |
+
- **Base model:** [silma-ai/silma-embeddding-matryoshka-0.1](https://huggingface.co/silma-ai/silma-embeddding-matryoshka-0.1) <!-- at revision 9eb50734f432656a01e1f88d28fa9a6fe8b9e148 -->
|
137 |
+
- **Maximum Sequence Length:** 512 tokens
|
138 |
+
- **Output Dimensionality:** 768 tokens
|
139 |
+
- **Similarity Function:** Cosine Similarity
|
140 |
+
<!-- - **Training Dataset:** Unknown -->
|
141 |
+
<!-- - **Language:** Unknown -->
|
142 |
+
<!-- - **License:** Unknown -->
|
143 |
+
|
144 |
+
### Model Sources
|
145 |
+
|
146 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
147 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
148 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
149 |
+
|
150 |
+
### Full Model Architecture
|
151 |
+
|
152 |
+
```
|
153 |
+
SentenceTransformer(
|
154 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
155 |
+
(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})
|
156 |
+
)
|
157 |
+
```
|
158 |
+
|
159 |
+
## Usage
|
160 |
+
|
161 |
+
### Direct Usage (Sentence Transformers)
|
162 |
+
|
163 |
+
First install the Sentence Transformers library:
|
164 |
+
|
165 |
+
```bash
|
166 |
+
pip install -U sentence-transformers
|
167 |
+
```
|
168 |
+
|
169 |
+
Then you can load this model and run inference.
|
170 |
+
```python
|
171 |
+
from sentence_transformers import SentenceTransformer
|
172 |
+
|
173 |
+
# Download from the 🤗 Hub
|
174 |
+
model = SentenceTransformer("silma-ai/silma-embeddding-sts-0.1")
|
175 |
+
# Run inference
|
176 |
+
sentences = [
|
177 |
+
'الرجل ضرب الرجل الآخر بعصا The man hit the other man with a stick.',
|
178 |
+
'الرجل صفع الرجل الآخر بعصا The man spanked the other man with a stick.',
|
179 |
+
'A man is smoking. رجل يدخن',
|
180 |
+
]
|
181 |
+
embeddings = model.encode(sentences)
|
182 |
+
print(embeddings.shape)
|
183 |
+
# [3, 768]
|
184 |
+
|
185 |
+
# Get the similarity scores for the embeddings
|
186 |
+
similarities = model.similarity(embeddings, embeddings)
|
187 |
+
print(similarities.shape)
|
188 |
+
# [3, 3]
|
189 |
+
```
|
190 |
+
|
191 |
+
<!--
|
192 |
+
### Direct Usage (Transformers)
|
193 |
+
|
194 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
195 |
+
|
196 |
+
</details>
|
197 |
+
-->
|
198 |
+
|
199 |
+
<!--
|
200 |
+
### Downstream Usage (Sentence Transformers)
|
201 |
+
|
202 |
+
You can finetune this model on your own dataset.
|
203 |
+
|
204 |
+
<details><summary>Click to expand</summary>
|
205 |
+
|
206 |
+
</details>
|
207 |
+
-->
|
208 |
+
|
209 |
+
<!--
|
210 |
+
### Out-of-Scope Use
|
211 |
+
|
212 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
213 |
+
-->
|
214 |
+
|
215 |
+
## Evaluation
|
216 |
+
|
217 |
+
### Metrics
|
218 |
+
|
219 |
+
#### Semantic Similarity
|
220 |
+
* Dataset: `sts-dev-512`
|
221 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
222 |
+
|
223 |
+
| Metric | Value |
|
224 |
+
|:--------------------|:-----------|
|
225 |
+
| pearson_cosine | 0.8509 |
|
226 |
+
| **spearman_cosine** | **0.8549** |
|
227 |
+
| pearson_manhattan | 0.8213 |
|
228 |
+
| spearman_manhattan | 0.8365 |
|
229 |
+
| pearson_euclidean | 0.821 |
|
230 |
+
| spearman_euclidean | 0.8382 |
|
231 |
+
| pearson_dot | 0.8491 |
|
232 |
+
| spearman_dot | 0.856 |
|
233 |
+
| pearson_max | 0.8509 |
|
234 |
+
| spearman_max | 0.856 |
|
235 |
+
|
236 |
+
#### Semantic Similarity
|
237 |
+
* Dataset: `sts-dev-256`
|
238 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
239 |
+
|
240 |
+
| Metric | Value |
|
241 |
+
|:--------------------|:-----------|
|
242 |
+
| pearson_cosine | 0.8498 |
|
243 |
+
| **spearman_cosine** | **0.8531** |
|
244 |
+
| pearson_manhattan | 0.8182 |
|
245 |
+
| spearman_manhattan | 0.8329 |
|
246 |
+
| pearson_euclidean | 0.8194 |
|
247 |
+
| spearman_euclidean | 0.8339 |
|
248 |
+
| pearson_dot | 0.8396 |
|
249 |
+
| spearman_dot | 0.8484 |
|
250 |
+
| pearson_max | 0.8498 |
|
251 |
+
| spearman_max | 0.8531 |
|
252 |
+
|
253 |
+
<!--
|
254 |
+
## Bias, Risks and Limitations
|
255 |
+
|
256 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
257 |
+
-->
|
258 |
+
|
259 |
+
<!--
|
260 |
+
### Recommendations
|
261 |
+
|
262 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
263 |
+
-->
|
264 |
+
|
265 |
+
## Training Details
|
266 |
+
|
267 |
+
### Training Dataset
|
268 |
+
|
269 |
+
#### Unnamed Dataset
|
270 |
+
|
271 |
+
|
272 |
+
* Size: 34,436 training samples
|
273 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
274 |
+
* Approximate statistics based on the first 1000 samples:
|
275 |
+
| | sentence1 | sentence2 | score |
|
276 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
277 |
+
| type | string | string | float |
|
278 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 15.18 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.18 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
279 |
+
* Samples:
|
280 |
+
| sentence1 | sentence2 | score |
|
281 |
+
|:---------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------|:------------------|
|
282 |
+
| <code>A woman picks up and holds a baby kangaroo in her arms. امرأة تحمل في ذراعها طفل كنغر</code> | <code>A woman picks up and holds a baby kangaroo. امرأة تحمل و تحمل طفل كنغر</code> | <code>0.92</code> |
|
283 |
+
| <code>امرأة تحمل و تحمل طفل كنغر A woman picks up and holds a baby kangaroo.</code> | <code>امرأة تحمل في ذراعها طفل كنغر A woman picks up and holds a baby kangaroo in her arms.</code> | <code>0.92</code> |
|
284 |
+
| <code>رجل يعزف على الناي</code> | <code>رجل يعزف على فرقة الخيزران</code> | <code>0.77</code> |
|
285 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
286 |
+
```json
|
287 |
+
{
|
288 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
289 |
+
}
|
290 |
+
```
|
291 |
+
|
292 |
+
### Evaluation Dataset
|
293 |
+
|
294 |
+
#### Unnamed Dataset
|
295 |
+
|
296 |
+
|
297 |
+
* Size: 100 evaluation samples
|
298 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
299 |
+
* Approximate statistics based on the first 100 samples:
|
300 |
+
| | sentence1 | sentence2 | score |
|
301 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
302 |
+
| type | string | string | float |
|
303 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 15.96 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.96 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 0.1</li><li>mean: 0.72</li><li>max: 1.0</li></ul> |
|
304 |
+
* Samples:
|
305 |
+
| sentence1 | sentence2 | score |
|
306 |
+
|:------------------------------------|:-----------------------------------------|:-----------------|
|
307 |
+
| <code>طائرة ستقلع</code> | <code>طائرة طيران تقلع</code> | <code>1.0</code> |
|
308 |
+
| <code>طائرة طيران تقلع</code> | <code>طائرة ستقلع</code> | <code>1.0</code> |
|
309 |
+
| <code>A plane is taking off.</code> | <code>An air plane is taking off.</code> | <code>1.0</code> |
|
310 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
311 |
+
```json
|
312 |
+
{
|
313 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
314 |
+
}
|
315 |
+
```
|
316 |
+
|
317 |
+
### Training Hyperparameters
|
318 |
+
#### Non-Default Hyperparameters
|
319 |
+
|
320 |
+
- `eval_strategy`: steps
|
321 |
+
- `per_device_train_batch_size`: 250
|
322 |
+
- `per_device_eval_batch_size`: 10
|
323 |
+
- `learning_rate`: 1e-06
|
324 |
+
- `num_train_epochs`: 10
|
325 |
+
- `bf16`: True
|
326 |
+
- `dataloader_drop_last`: True
|
327 |
+
- `optim`: adamw_torch_fused
|
328 |
+
- `batch_sampler`: no_duplicates
|
329 |
+
|
330 |
+
#### All Hyperparameters
|
331 |
+
<details><summary>Click to expand</summary>
|
332 |
+
|
333 |
+
- `overwrite_output_dir`: False
|
334 |
+
- `do_predict`: False
|
335 |
+
- `eval_strategy`: steps
|
336 |
+
- `prediction_loss_only`: True
|
337 |
+
- `per_device_train_batch_size`: 250
|
338 |
+
- `per_device_eval_batch_size`: 10
|
339 |
+
- `per_gpu_train_batch_size`: None
|
340 |
+
- `per_gpu_eval_batch_size`: None
|
341 |
+
- `gradient_accumulation_steps`: 1
|
342 |
+
- `eval_accumulation_steps`: None
|
343 |
+
- `torch_empty_cache_steps`: None
|
344 |
+
- `learning_rate`: 1e-06
|
345 |
+
- `weight_decay`: 0.0
|
346 |
+
- `adam_beta1`: 0.9
|
347 |
+
- `adam_beta2`: 0.999
|
348 |
+
- `adam_epsilon`: 1e-08
|
349 |
+
- `max_grad_norm`: 1.0
|
350 |
+
- `num_train_epochs`: 10
|
351 |
+
- `max_steps`: -1
|
352 |
+
- `lr_scheduler_type`: linear
|
353 |
+
- `lr_scheduler_kwargs`: {}
|
354 |
+
- `warmup_ratio`: 0.0
|
355 |
+
- `warmup_steps`: 0
|
356 |
+
- `log_level`: passive
|
357 |
+
- `log_level_replica`: warning
|
358 |
+
- `log_on_each_node`: True
|
359 |
+
- `logging_nan_inf_filter`: True
|
360 |
+
- `save_safetensors`: True
|
361 |
+
- `save_on_each_node`: False
|
362 |
+
- `save_only_model`: False
|
363 |
+
- `restore_callback_states_from_checkpoint`: False
|
364 |
+
- `no_cuda`: False
|
365 |
+
- `use_cpu`: False
|
366 |
+
- `use_mps_device`: False
|
367 |
+
- `seed`: 42
|
368 |
+
- `data_seed`: None
|
369 |
+
- `jit_mode_eval`: False
|
370 |
+
- `use_ipex`: False
|
371 |
+
- `bf16`: True
|
372 |
+
- `fp16`: False
|
373 |
+
- `fp16_opt_level`: O1
|
374 |
+
- `half_precision_backend`: auto
|
375 |
+
- `bf16_full_eval`: False
|
376 |
+
- `fp16_full_eval`: False
|
377 |
+
- `tf32`: None
|
378 |
+
- `local_rank`: 0
|
379 |
+
- `ddp_backend`: None
|
380 |
+
- `tpu_num_cores`: None
|
381 |
+
- `tpu_metrics_debug`: False
|
382 |
+
- `debug`: []
|
383 |
+
- `dataloader_drop_last`: True
|
384 |
+
- `dataloader_num_workers`: 0
|
385 |
+
- `dataloader_prefetch_factor`: None
|
386 |
+
- `past_index`: -1
|
387 |
+
- `disable_tqdm`: False
|
388 |
+
- `remove_unused_columns`: True
|
389 |
+
- `label_names`: None
|
390 |
+
- `load_best_model_at_end`: False
|
391 |
+
- `ignore_data_skip`: False
|
392 |
+
- `fsdp`: []
|
393 |
+
- `fsdp_min_num_params`: 0
|
394 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
395 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
396 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
397 |
+
- `deepspeed`: None
|
398 |
+
- `label_smoothing_factor`: 0.0
|
399 |
+
- `optim`: adamw_torch_fused
|
400 |
+
- `optim_args`: None
|
401 |
+
- `adafactor`: False
|
402 |
+
- `group_by_length`: False
|
403 |
+
- `length_column_name`: length
|
404 |
+
- `ddp_find_unused_parameters`: None
|
405 |
+
- `ddp_bucket_cap_mb`: None
|
406 |
+
- `ddp_broadcast_buffers`: False
|
407 |
+
- `dataloader_pin_memory`: True
|
408 |
+
- `dataloader_persistent_workers`: False
|
409 |
+
- `skip_memory_metrics`: True
|
410 |
+
- `use_legacy_prediction_loop`: False
|
411 |
+
- `push_to_hub`: False
|
412 |
+
- `resume_from_checkpoint`: None
|
413 |
+
- `hub_model_id`: None
|
414 |
+
- `hub_strategy`: every_save
|
415 |
+
- `hub_private_repo`: False
|
416 |
+
- `hub_always_push`: False
|
417 |
+
- `gradient_checkpointing`: False
|
418 |
+
- `gradient_checkpointing_kwargs`: None
|
419 |
+
- `include_inputs_for_metrics`: False
|
420 |
+
- `eval_do_concat_batches`: True
|
421 |
+
- `fp16_backend`: auto
|
422 |
+
- `push_to_hub_model_id`: None
|
423 |
+
- `push_to_hub_organization`: None
|
424 |
+
- `mp_parameters`:
|
425 |
+
- `auto_find_batch_size`: False
|
426 |
+
- `full_determinism`: False
|
427 |
+
- `torchdynamo`: None
|
428 |
+
- `ray_scope`: last
|
429 |
+
- `ddp_timeout`: 1800
|
430 |
+
- `torch_compile`: False
|
431 |
+
- `torch_compile_backend`: None
|
432 |
+
- `torch_compile_mode`: None
|
433 |
+
- `dispatch_batches`: None
|
434 |
+
- `split_batches`: None
|
435 |
+
- `include_tokens_per_second`: False
|
436 |
+
- `include_num_input_tokens_seen`: False
|
437 |
+
- `neftune_noise_alpha`: None
|
438 |
+
- `optim_target_modules`: None
|
439 |
+
- `batch_eval_metrics`: False
|
440 |
+
- `eval_on_start`: False
|
441 |
+
- `use_liger_kernel`: False
|
442 |
+
- `eval_use_gather_object`: False
|
443 |
+
- `batch_sampler`: no_duplicates
|
444 |
+
- `multi_dataset_batch_sampler`: proportional
|
445 |
+
|
446 |
+
</details>
|
447 |
+
|
448 |
+
### Training Logs
|
449 |
+
| Epoch | Step | Training Loss | Validation Loss | sts-dev-512_spearman_cosine | sts-dev-256_spearman_cosine |
|
450 |
+
|:------:|:----:|:-------------:|:---------------:|:---------------------------:|:---------------------------:|
|
451 |
+
| 0.3650 | 50 | 0.0395 | 0.0424 | 0.8486 | 0.8487 |
|
452 |
+
| 0.7299 | 100 | 0.031 | 0.0427 | 0.8493 | 0.8495 |
|
453 |
+
| 1.0949 | 150 | 0.0344 | 0.0430 | 0.8496 | 0.8496 |
|
454 |
+
| 1.4599 | 200 | 0.0313 | 0.0427 | 0.8506 | 0.8504 |
|
455 |
+
| 1.8248 | 250 | 0.0267 | 0.0428 | 0.8504 | 0.8506 |
|
456 |
+
| 2.1898 | 300 | 0.0309 | 0.0429 | 0.8516 | 0.8515 |
|
457 |
+
| 2.5547 | 350 | 0.0276 | 0.0425 | 0.8531 | 0.8521 |
|
458 |
+
| 2.9197 | 400 | 0.028 | 0.0426 | 0.8530 | 0.8515 |
|
459 |
+
| 3.2847 | 450 | 0.0281 | 0.0425 | 0.8539 | 0.8521 |
|
460 |
+
| 3.6496 | 500 | 0.0248 | 0.0425 | 0.8542 | 0.8523 |
|
461 |
+
| 4.0146 | 550 | 0.0302 | 0.0424 | 0.8541 | 0.8520 |
|
462 |
+
| 4.3796 | 600 | 0.0261 | 0.0421 | 0.8545 | 0.8523 |
|
463 |
+
| 4.7445 | 650 | 0.0233 | 0.0420 | 0.8544 | 0.8522 |
|
464 |
+
| 5.1095 | 700 | 0.0281 | 0.0419 | 0.8547 | 0.8528 |
|
465 |
+
| 5.4745 | 750 | 0.0257 | 0.0419 | 0.8546 | 0.8531 |
|
466 |
+
| 5.8394 | 800 | 0.0235 | 0.0418 | 0.8546 | 0.8527 |
|
467 |
+
| 6.2044 | 850 | 0.0268 | 0.0418 | 0.8551 | 0.8529 |
|
468 |
+
| 6.5693 | 900 | 0.0238 | 0.0416 | 0.8552 | 0.8526 |
|
469 |
+
| 6.9343 | 950 | 0.0255 | 0.0416 | 0.8549 | 0.8526 |
|
470 |
+
| 7.2993 | 1000 | 0.0253 | 0.0416 | 0.8548 | 0.8528 |
|
471 |
+
| 7.6642 | 1050 | 0.0225 | 0.0415 | 0.8550 | 0.8525 |
|
472 |
+
| 8.0292 | 1100 | 0.0276 | 0.0414 | 0.8550 | 0.8528 |
|
473 |
+
| 8.3942 | 1150 | 0.0244 | 0.0415 | 0.8550 | 0.8533 |
|
474 |
+
| 8.7591 | 1200 | 0.0218 | 0.0414 | 0.8551 | 0.8529 |
|
475 |
+
| 9.1241 | 1250 | 0.0263 | 0.0414 | 0.8550 | 0.8531 |
|
476 |
+
| 9.4891 | 1300 | 0.0241 | 0.0414 | 0.8552 | 0.8533 |
|
477 |
+
| 9.8540 | 1350 | 0.0227 | 0.0415 | 0.8549 | 0.8531 |
|
478 |
+
|
479 |
+
|
480 |
+
### Framework Versions
|
481 |
+
- Python: 3.10.14
|
482 |
+
- Sentence Transformers: 3.2.0
|
483 |
+
- Transformers: 4.45.2
|
484 |
+
- PyTorch: 2.3.1
|
485 |
+
- Accelerate: 1.0.1
|
486 |
+
- Datasets: 3.0.1
|
487 |
+
- Tokenizers: 0.20.1
|
488 |
+
|
489 |
+
## Citation
|
490 |
+
|
491 |
+
### BibTeX
|
492 |
+
|
493 |
+
#### Sentence Transformers
|
494 |
+
```bibtex
|
495 |
+
@inproceedings{reimers-2019-sentence-bert,
|
496 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
497 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
498 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
499 |
+
month = "11",
|
500 |
+
year = "2019",
|
501 |
+
publisher = "Association for Computational Linguistics",
|
502 |
+
url = "https://arxiv.org/abs/1908.10084",
|
503 |
+
}
|
504 |
+
```
|
505 |
+
|
506 |
+
<!--
|
507 |
+
## Glossary
|
508 |
+
|
509 |
+
*Clearly define terms in order to be accessible across audiences.*
|
510 |
+
-->
|
511 |
+
|
512 |
+
<!--
|
513 |
+
## Model Card Authors
|
514 |
+
|
515 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
516 |
+
-->
|
517 |
+
|
518 |
+
<!--
|
519 |
+
## Model Card Contact
|
520 |
+
|
521 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
522 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/workspace/v3-nli_silma-ai-silma-embeddding-matryoshka-0.1-2024-10-13_16-54-06/final",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 3072,
|
13 |
+
"layer_norm_eps": 1e-12,
|
14 |
+
"max_position_embeddings": 512,
|
15 |
+
"model_type": "bert",
|
16 |
+
"num_attention_heads": 12,
|
17 |
+
"num_hidden_layers": 12,
|
18 |
+
"pad_token_id": 0,
|
19 |
+
"position_embedding_type": "absolute",
|
20 |
+
"torch_dtype": "float32",
|
21 |
+
"transformers_version": "4.45.2",
|
22 |
+
"type_vocab_size": 2,
|
23 |
+
"use_cache": true,
|
24 |
+
"vocab_size": 64000
|
25 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.2.0",
|
4 |
+
"transformers": "4.45.2",
|
5 |
+
"pytorch": "2.3.1"
|
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:d76b2a8eb38cc2c0710bcfb46b9b6a732480f6db36e7b858b8f466e5b615f539
|
3 |
+
size 540795752
|
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": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
}
|
37 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"4": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"5": {
|
44 |
+
"content": "[رابط]",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": true,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": true,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"6": {
|
52 |
+
"content": "[بريد]",
|
53 |
+
"lstrip": false,
|
54 |
+
"normalized": true,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": true,
|
57 |
+
"special": true
|
58 |
+
},
|
59 |
+
"7": {
|
60 |
+
"content": "[مستخدم]",
|
61 |
+
"lstrip": false,
|
62 |
+
"normalized": true,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": true,
|
65 |
+
"special": true
|
66 |
+
}
|
67 |
+
},
|
68 |
+
"clean_up_tokenization_spaces": false,
|
69 |
+
"cls_token": "[CLS]",
|
70 |
+
"do_basic_tokenize": true,
|
71 |
+
"do_lower_case": false,
|
72 |
+
"mask_token": "[MASK]",
|
73 |
+
"max_len": 512,
|
74 |
+
"max_length": 512,
|
75 |
+
"model_max_length": 512,
|
76 |
+
"never_split": [
|
77 |
+
"[بريد]",
|
78 |
+
"[مستخدم]",
|
79 |
+
"[رابط]"
|
80 |
+
],
|
81 |
+
"pad_to_multiple_of": null,
|
82 |
+
"pad_token": "[PAD]",
|
83 |
+
"pad_token_type_id": 0,
|
84 |
+
"padding_side": "right",
|
85 |
+
"sep_token": "[SEP]",
|
86 |
+
"stride": 0,
|
87 |
+
"strip_accents": null,
|
88 |
+
"tokenize_chinese_chars": true,
|
89 |
+
"tokenizer_class": "BertTokenizer",
|
90 |
+
"truncation_side": "right",
|
91 |
+
"truncation_strategy": "longest_first",
|
92 |
+
"unk_token": "[UNK]"
|
93 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|