Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +568 -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 +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -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,568 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- dataset_size:1K<n<10K
|
9 |
+
- loss:CosineSimilarityLoss
|
10 |
+
base_model: Rajan/NepaliBERT
|
11 |
+
metrics:
|
12 |
+
- pearson_cosine
|
13 |
+
- spearman_cosine
|
14 |
+
- pearson_manhattan
|
15 |
+
- spearman_manhattan
|
16 |
+
- pearson_euclidean
|
17 |
+
- spearman_euclidean
|
18 |
+
- pearson_dot
|
19 |
+
- spearman_dot
|
20 |
+
- pearson_max
|
21 |
+
- spearman_max
|
22 |
+
widget:
|
23 |
+
- source_sentence: अघिल्लो वर्ष देखि।
|
24 |
+
sentences:
|
25 |
+
- अघिल्लो वर्ष देखि .।
|
26 |
+
- एउटी महिला बन्दुक हान्दै छिन्।
|
27 |
+
- हिउँमा हिंडिरहेको सेतो कुकुर।
|
28 |
+
- source_sentence: यो मोलोच दृश्य हो।
|
29 |
+
sentences:
|
30 |
+
- वास्तवमा, यो केवल डच हो।
|
31 |
+
- एउटा मानिस डोरीमा झुलिरहेको छ।
|
32 |
+
- रातो झोला लिएर सडकमा उभिएकी केटी।
|
33 |
+
- source_sentence: दमास्कसमा रुसीहरू!
|
34 |
+
sentences:
|
35 |
+
- रुसीहरू दमस्कसमा किन छन्?
|
36 |
+
- कसैले मिर्चको बीउ निकाल्दै छ।
|
37 |
+
- एकजना मानिस साइकल चलाउँदै छन्।
|
38 |
+
- source_sentence: रेल ट्र्याकमा रेल।
|
39 |
+
sentences:
|
40 |
+
- लामो रेल रेल ट्र्याकमा छ।
|
41 |
+
- एउटी महिला सिडु चढिरहेकी छिन्।
|
42 |
+
- एक व्यक्ति सडकमा हिर्किरहेको छ।
|
43 |
+
- source_sentence: रातो, डबल डेकर बस।
|
44 |
+
sentences:
|
45 |
+
- रातो डबल डेकर बस।
|
46 |
+
- दुई कालो कुकुर हिउँमा हिंड्दै।
|
47 |
+
- एउटी महिला मासु फ्राइरहेकी छिन्।
|
48 |
+
pipeline_tag: sentence-similarity
|
49 |
+
model-index:
|
50 |
+
- name: SentenceTransformer based on Rajan/NepaliBERT
|
51 |
+
results:
|
52 |
+
- task:
|
53 |
+
type: semantic-similarity
|
54 |
+
name: Semantic Similarity
|
55 |
+
dataset:
|
56 |
+
name: stsb dev nepali
|
57 |
+
type: stsb-dev-nepali
|
58 |
+
metrics:
|
59 |
+
- type: pearson_cosine
|
60 |
+
value: 0.6971387543395983
|
61 |
+
name: Pearson Cosine
|
62 |
+
- type: spearman_cosine
|
63 |
+
value: 0.6623150295431888
|
64 |
+
name: Spearman Cosine
|
65 |
+
- type: pearson_manhattan
|
66 |
+
value: 0.6332077130918778
|
67 |
+
name: Pearson Manhattan
|
68 |
+
- type: spearman_manhattan
|
69 |
+
value: 0.6078651194262178
|
70 |
+
name: Spearman Manhattan
|
71 |
+
- type: pearson_euclidean
|
72 |
+
value: 0.6339817618698202
|
73 |
+
name: Pearson Euclidean
|
74 |
+
- type: spearman_euclidean
|
75 |
+
value: 0.6090065238762821
|
76 |
+
name: Spearman Euclidean
|
77 |
+
- type: pearson_dot
|
78 |
+
value: 0.4848273995348276
|
79 |
+
name: Pearson Dot
|
80 |
+
- type: spearman_dot
|
81 |
+
value: 0.5306425402414711
|
82 |
+
name: Spearman Dot
|
83 |
+
- type: pearson_max
|
84 |
+
value: 0.6971387543395983
|
85 |
+
name: Pearson Max
|
86 |
+
- type: spearman_max
|
87 |
+
value: 0.6623150295431888
|
88 |
+
name: Spearman Max
|
89 |
+
---
|
90 |
+
|
91 |
+
# SentenceTransformer based on Rajan/NepaliBERT
|
92 |
+
|
93 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Rajan/NepaliBERT](https://huggingface.co/Rajan/NepaliBERT). 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.
|
94 |
+
|
95 |
+
## Model Details
|
96 |
+
|
97 |
+
### Model Description
|
98 |
+
- **Model Type:** Sentence Transformer
|
99 |
+
- **Base model:** [Rajan/NepaliBERT](https://huggingface.co/Rajan/NepaliBERT) <!-- at revision 996c3b86b779a63225b473221678447c9d9185d0 -->
|
100 |
+
- **Maximum Sequence Length:** 512 tokens
|
101 |
+
- **Output Dimensionality:** 768 tokens
|
102 |
+
- **Similarity Function:** Cosine Similarity
|
103 |
+
<!-- - **Training Dataset:** Unknown -->
|
104 |
+
<!-- - **Language:** Unknown -->
|
105 |
+
<!-- - **License:** Unknown -->
|
106 |
+
|
107 |
+
### Model Sources
|
108 |
+
|
109 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
110 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
111 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
112 |
+
|
113 |
+
### Full Model Architecture
|
114 |
+
|
115 |
+
```
|
116 |
+
SentenceTransformer(
|
117 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
118 |
+
(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})
|
119 |
+
)
|
120 |
+
```
|
121 |
+
|
122 |
+
## Usage
|
123 |
+
|
124 |
+
### Direct Usage (Sentence Transformers)
|
125 |
+
|
126 |
+
First install the Sentence Transformers library:
|
127 |
+
|
128 |
+
```bash
|
129 |
+
pip install -U sentence-transformers
|
130 |
+
```
|
131 |
+
|
132 |
+
Then you can load this model and run inference.
|
133 |
+
```python
|
134 |
+
from sentence_transformers import SentenceTransformer
|
135 |
+
|
136 |
+
# Download from the 🤗 Hub
|
137 |
+
model = SentenceTransformer("syubraj/sentenceTransformer_nepali_new")
|
138 |
+
# Run inference
|
139 |
+
sentences = [
|
140 |
+
'रातो, डबल डेकर बस।',
|
141 |
+
'रातो डबल डेकर बस।',
|
142 |
+
'दुई कालो कुकुर हिउँमा हिंड्दै।',
|
143 |
+
]
|
144 |
+
embeddings = model.encode(sentences)
|
145 |
+
print(embeddings.shape)
|
146 |
+
# [3, 768]
|
147 |
+
|
148 |
+
# Get the similarity scores for the embeddings
|
149 |
+
similarities = model.similarity(embeddings, embeddings)
|
150 |
+
print(similarities.shape)
|
151 |
+
# [3, 3]
|
152 |
+
```
|
153 |
+
|
154 |
+
<!--
|
155 |
+
### Direct Usage (Transformers)
|
156 |
+
|
157 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
158 |
+
|
159 |
+
</details>
|
160 |
+
-->
|
161 |
+
|
162 |
+
<!--
|
163 |
+
### Downstream Usage (Sentence Transformers)
|
164 |
+
|
165 |
+
You can finetune this model on your own dataset.
|
166 |
+
|
167 |
+
<details><summary>Click to expand</summary>
|
168 |
+
|
169 |
+
</details>
|
170 |
+
-->
|
171 |
+
|
172 |
+
<!--
|
173 |
+
### Out-of-Scope Use
|
174 |
+
|
175 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
176 |
+
-->
|
177 |
+
|
178 |
+
## Evaluation
|
179 |
+
|
180 |
+
### Metrics
|
181 |
+
|
182 |
+
#### Semantic Similarity
|
183 |
+
* Dataset: `stsb-dev-nepali`
|
184 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
185 |
+
|
186 |
+
| Metric | Value |
|
187 |
+
|:-------------------|:-----------|
|
188 |
+
| pearson_cosine | 0.6971 |
|
189 |
+
| spearman_cosine | 0.6623 |
|
190 |
+
| pearson_manhattan | 0.6332 |
|
191 |
+
| spearman_manhattan | 0.6079 |
|
192 |
+
| pearson_euclidean | 0.634 |
|
193 |
+
| spearman_euclidean | 0.609 |
|
194 |
+
| pearson_dot | 0.4848 |
|
195 |
+
| spearman_dot | 0.5306 |
|
196 |
+
| pearson_max | 0.6971 |
|
197 |
+
| **spearman_max** | **0.6623** |
|
198 |
+
|
199 |
+
<!--
|
200 |
+
## Bias, Risks and Limitations
|
201 |
+
|
202 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
203 |
+
-->
|
204 |
+
|
205 |
+
<!--
|
206 |
+
### Recommendations
|
207 |
+
|
208 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
209 |
+
-->
|
210 |
+
|
211 |
+
## Training Details
|
212 |
+
|
213 |
+
### Training Dataset
|
214 |
+
|
215 |
+
#### Unnamed Dataset
|
216 |
+
|
217 |
+
|
218 |
+
* Size: 4,599 training samples
|
219 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
220 |
+
* Approximate statistics based on the first 1000 samples:
|
221 |
+
| | sentence_0 | sentence_1 | label |
|
222 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
223 |
+
| type | string | string | float |
|
224 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 19.5 tokens</li><li>max: 81 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 19.43 tokens</li><li>max: 75 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
225 |
+
* Samples:
|
226 |
+
| sentence_0 | sentence_1 | label |
|
227 |
+
|:-------------------------------------------------------------------------|:---------------------------------------------------------------|:--------------------------------|
|
228 |
+
| <code>एक व्यक्ति प्याज काट्दै छ।</code> | <code>एउटा बिरालो शौचालयमा पपिङ गर्दैछ।</code> | <code>0.0</code> |
|
229 |
+
| <code>क्यानडाको तेल रेल विस्फोटमा थप मृत्यु हुने अपेक्षा गरिएको छ</code> | <code>क्यानडामा रेल दुर्घटनामा पाँच जनाको मृत्यु भएको छ</code> | <code>0.5599999904632569</code> |
|
230 |
+
| <code>एउटी महिला झिंगा माझ्दै छिन्।</code> | <code>एउटी महिला केही झिंगा माझ्दै।</code> | <code>1.0</code> |
|
231 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
232 |
+
```json
|
233 |
+
{
|
234 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
235 |
+
}
|
236 |
+
```
|
237 |
+
|
238 |
+
### Training Hyperparameters
|
239 |
+
#### Non-Default Hyperparameters
|
240 |
+
|
241 |
+
- `eval_strategy`: steps
|
242 |
+
- `per_device_train_batch_size`: 16
|
243 |
+
- `per_device_eval_batch_size`: 16
|
244 |
+
- `num_train_epochs`: 100
|
245 |
+
- `multi_dataset_batch_sampler`: round_robin
|
246 |
+
|
247 |
+
#### All Hyperparameters
|
248 |
+
<details><summary>Click to expand</summary>
|
249 |
+
|
250 |
+
- `overwrite_output_dir`: False
|
251 |
+
- `do_predict`: False
|
252 |
+
- `eval_strategy`: steps
|
253 |
+
- `prediction_loss_only`: True
|
254 |
+
- `per_device_train_batch_size`: 16
|
255 |
+
- `per_device_eval_batch_size`: 16
|
256 |
+
- `per_gpu_train_batch_size`: None
|
257 |
+
- `per_gpu_eval_batch_size`: None
|
258 |
+
- `gradient_accumulation_steps`: 1
|
259 |
+
- `eval_accumulation_steps`: None
|
260 |
+
- `learning_rate`: 5e-05
|
261 |
+
- `weight_decay`: 0.0
|
262 |
+
- `adam_beta1`: 0.9
|
263 |
+
- `adam_beta2`: 0.999
|
264 |
+
- `adam_epsilon`: 1e-08
|
265 |
+
- `max_grad_norm`: 1
|
266 |
+
- `num_train_epochs`: 100
|
267 |
+
- `max_steps`: -1
|
268 |
+
- `lr_scheduler_type`: linear
|
269 |
+
- `lr_scheduler_kwargs`: {}
|
270 |
+
- `warmup_ratio`: 0.0
|
271 |
+
- `warmup_steps`: 0
|
272 |
+
- `log_level`: passive
|
273 |
+
- `log_level_replica`: warning
|
274 |
+
- `log_on_each_node`: True
|
275 |
+
- `logging_nan_inf_filter`: True
|
276 |
+
- `save_safetensors`: True
|
277 |
+
- `save_on_each_node`: False
|
278 |
+
- `save_only_model`: False
|
279 |
+
- `restore_callback_states_from_checkpoint`: False
|
280 |
+
- `no_cuda`: False
|
281 |
+
- `use_cpu`: False
|
282 |
+
- `use_mps_device`: False
|
283 |
+
- `seed`: 42
|
284 |
+
- `data_seed`: None
|
285 |
+
- `jit_mode_eval`: False
|
286 |
+
- `use_ipex`: False
|
287 |
+
- `bf16`: False
|
288 |
+
- `fp16`: False
|
289 |
+
- `fp16_opt_level`: O1
|
290 |
+
- `half_precision_backend`: auto
|
291 |
+
- `bf16_full_eval`: False
|
292 |
+
- `fp16_full_eval`: False
|
293 |
+
- `tf32`: None
|
294 |
+
- `local_rank`: 0
|
295 |
+
- `ddp_backend`: None
|
296 |
+
- `tpu_num_cores`: None
|
297 |
+
- `tpu_metrics_debug`: False
|
298 |
+
- `debug`: []
|
299 |
+
- `dataloader_drop_last`: False
|
300 |
+
- `dataloader_num_workers`: 0
|
301 |
+
- `dataloader_prefetch_factor`: None
|
302 |
+
- `past_index`: -1
|
303 |
+
- `disable_tqdm`: False
|
304 |
+
- `remove_unused_columns`: True
|
305 |
+
- `label_names`: None
|
306 |
+
- `load_best_model_at_end`: False
|
307 |
+
- `ignore_data_skip`: False
|
308 |
+
- `fsdp`: []
|
309 |
+
- `fsdp_min_num_params`: 0
|
310 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
311 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
312 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
313 |
+
- `deepspeed`: None
|
314 |
+
- `label_smoothing_factor`: 0.0
|
315 |
+
- `optim`: adamw_torch
|
316 |
+
- `optim_args`: None
|
317 |
+
- `adafactor`: False
|
318 |
+
- `group_by_length`: False
|
319 |
+
- `length_column_name`: length
|
320 |
+
- `ddp_find_unused_parameters`: None
|
321 |
+
- `ddp_bucket_cap_mb`: None
|
322 |
+
- `ddp_broadcast_buffers`: False
|
323 |
+
- `dataloader_pin_memory`: True
|
324 |
+
- `dataloader_persistent_workers`: False
|
325 |
+
- `skip_memory_metrics`: True
|
326 |
+
- `use_legacy_prediction_loop`: False
|
327 |
+
- `push_to_hub`: False
|
328 |
+
- `resume_from_checkpoint`: None
|
329 |
+
- `hub_model_id`: None
|
330 |
+
- `hub_strategy`: every_save
|
331 |
+
- `hub_private_repo`: False
|
332 |
+
- `hub_always_push`: False
|
333 |
+
- `gradient_checkpointing`: False
|
334 |
+
- `gradient_checkpointing_kwargs`: None
|
335 |
+
- `include_inputs_for_metrics`: False
|
336 |
+
- `eval_do_concat_batches`: True
|
337 |
+
- `fp16_backend`: auto
|
338 |
+
- `push_to_hub_model_id`: None
|
339 |
+
- `push_to_hub_organization`: None
|
340 |
+
- `mp_parameters`:
|
341 |
+
- `auto_find_batch_size`: False
|
342 |
+
- `full_determinism`: False
|
343 |
+
- `torchdynamo`: None
|
344 |
+
- `ray_scope`: last
|
345 |
+
- `ddp_timeout`: 1800
|
346 |
+
- `torch_compile`: False
|
347 |
+
- `torch_compile_backend`: None
|
348 |
+
- `torch_compile_mode`: None
|
349 |
+
- `dispatch_batches`: None
|
350 |
+
- `split_batches`: None
|
351 |
+
- `include_tokens_per_second`: False
|
352 |
+
- `include_num_input_tokens_seen`: False
|
353 |
+
- `neftune_noise_alpha`: None
|
354 |
+
- `optim_target_modules`: None
|
355 |
+
- `batch_eval_metrics`: False
|
356 |
+
- `batch_sampler`: batch_sampler
|
357 |
+
- `multi_dataset_batch_sampler`: round_robin
|
358 |
+
|
359 |
+
</details>
|
360 |
+
|
361 |
+
### Training Logs
|
362 |
+
<details><summary>Click to expand</summary>
|
363 |
+
|
364 |
+
| Epoch | Step | Training Loss | stsb-dev-nepali_spearman_max |
|
365 |
+
|:-------:|:-----:|:-------------:|:----------------------------:|
|
366 |
+
| 1.0 | 288 | - | 0.5355 |
|
367 |
+
| 1.7361 | 500 | 0.0723 | - |
|
368 |
+
| 2.0 | 576 | - | 0.5794 |
|
369 |
+
| 3.0 | 864 | - | 0.6108 |
|
370 |
+
| 3.4722 | 1000 | 0.047 | 0.6147 |
|
371 |
+
| 4.0 | 1152 | - | 0.6259 |
|
372 |
+
| 5.0 | 1440 | - | 0.6356 |
|
373 |
+
| 5.2083 | 1500 | 0.034 | - |
|
374 |
+
| 6.0 | 1728 | - | 0.6329 |
|
375 |
+
| 6.9444 | 2000 | 0.0217 | 0.6375 |
|
376 |
+
| 7.0 | 2016 | - | 0.6382 |
|
377 |
+
| 8.0 | 2304 | - | 0.6468 |
|
378 |
+
| 8.6806 | 2500 | 0.0137 | - |
|
379 |
+
| 9.0 | 2592 | - | 0.6348 |
|
380 |
+
| 10.0 | 2880 | - | 0.6332 |
|
381 |
+
| 10.4167 | 3000 | 0.0102 | 0.6427 |
|
382 |
+
| 11.0 | 3168 | - | 0.6370 |
|
383 |
+
| 12.0 | 3456 | - | 0.6515 |
|
384 |
+
| 12.1528 | 3500 | 0.0084 | - |
|
385 |
+
| 13.0 | 3744 | - | 0.6546 |
|
386 |
+
| 13.8889 | 4000 | 0.0069 | 0.6400 |
|
387 |
+
| 14.0 | 4032 | - | 0.6610 |
|
388 |
+
| 15.0 | 4320 | - | 0.6495 |
|
389 |
+
| 15.625 | 4500 | 0.006 | - |
|
390 |
+
| 16.0 | 4608 | - | 0.6574 |
|
391 |
+
| 17.0 | 4896 | - | 0.6486 |
|
392 |
+
| 17.3611 | 5000 | 0.0053 | 0.6589 |
|
393 |
+
| 18.0 | 5184 | - | 0.6592 |
|
394 |
+
| 19.0 | 5472 | - | 0.6488 |
|
395 |
+
| 19.0972 | 5500 | 0.0047 | - |
|
396 |
+
| 20.0 | 5760 | - | 0.6436 |
|
397 |
+
| 20.8333 | 6000 | 0.0044 | 0.6576 |
|
398 |
+
| 21.0 | 6048 | - | 0.6515 |
|
399 |
+
| 22.0 | 6336 | - | 0.6541 |
|
400 |
+
| 22.5694 | 6500 | 0.0041 | - |
|
401 |
+
| 23.0 | 6624 | - | 0.6549 |
|
402 |
+
| 24.0 | 6912 | - | 0.6571 |
|
403 |
+
| 24.3056 | 7000 | 0.0037 | 0.6603 |
|
404 |
+
| 25.0 | 7200 | - | 0.6699 |
|
405 |
+
| 26.0 | 7488 | - | 0.6653 |
|
406 |
+
| 26.0417 | 7500 | 0.0037 | - |
|
407 |
+
| 27.0 | 7776 | - | 0.6609 |
|
408 |
+
| 27.7778 | 8000 | 0.0033 | 0.6578 |
|
409 |
+
| 28.0 | 8064 | - | 0.6606 |
|
410 |
+
| 29.0 | 8352 | - | 0.6614 |
|
411 |
+
| 29.5139 | 8500 | 0.0031 | - |
|
412 |
+
| 30.0 | 8640 | - | 0.6579 |
|
413 |
+
| 31.0 | 8928 | - | 0.6688 |
|
414 |
+
| 31.25 | 9000 | 0.0028 | 0.6650 |
|
415 |
+
| 32.0 | 9216 | - | 0.6639 |
|
416 |
+
| 32.9861 | 9500 | 0.0027 | - |
|
417 |
+
| 33.0 | 9504 | - | 0.6624 |
|
418 |
+
| 34.0 | 9792 | - | 0.6646 |
|
419 |
+
| 34.7222 | 10000 | 0.0025 | 0.6530 |
|
420 |
+
| 35.0 | 10080 | - | 0.6587 |
|
421 |
+
| 36.0 | 10368 | - | 0.6671 |
|
422 |
+
| 36.4583 | 10500 | 0.0025 | - |
|
423 |
+
| 37.0 | 10656 | - | 0.6614 |
|
424 |
+
| 38.0 | 10944 | - | 0.6602 |
|
425 |
+
| 38.1944 | 11000 | 0.0024 | 0.6576 |
|
426 |
+
| 39.0 | 11232 | - | 0.6665 |
|
427 |
+
| 39.9306 | 11500 | 0.0023 | - |
|
428 |
+
| 40.0 | 11520 | - | 0.6663 |
|
429 |
+
| 41.0 | 11808 | - | 0.6734 |
|
430 |
+
| 41.6667 | 12000 | 0.0021 | 0.6633 |
|
431 |
+
| 42.0 | 12096 | - | 0.6667 |
|
432 |
+
| 43.0 | 12384 | - | 0.6679 |
|
433 |
+
| 43.4028 | 12500 | 0.002 | - |
|
434 |
+
| 44.0 | 12672 | - | 0.6701 |
|
435 |
+
| 45.0 | 12960 | - | 0.6650 |
|
436 |
+
| 45.1389 | 13000 | 0.0019 | 0.6680 |
|
437 |
+
| 46.0 | 13248 | - | 0.6631 |
|
438 |
+
| 46.875 | 13500 | 0.0018 | - |
|
439 |
+
| 47.0 | 13536 | - | 0.6643 |
|
440 |
+
| 48.0 | 13824 | - | 0.6631 |
|
441 |
+
| 48.6111 | 14000 | 0.0017 | 0.6648 |
|
442 |
+
| 49.0 | 14112 | - | 0.6648 |
|
443 |
+
| 50.0 | 14400 | - | 0.6619 |
|
444 |
+
| 50.3472 | 14500 | 0.0017 | - |
|
445 |
+
| 51.0 | 14688 | - | 0.6633 |
|
446 |
+
| 52.0 | 14976 | - | 0.6622 |
|
447 |
+
| 52.0833 | 15000 | 0.0016 | 0.6612 |
|
448 |
+
| 53.0 | 15264 | - | 0.6670 |
|
449 |
+
| 53.8194 | 15500 | 0.0015 | - |
|
450 |
+
| 54.0 | 15552 | - | 0.6618 |
|
451 |
+
| 55.0 | 15840 | - | 0.6641 |
|
452 |
+
| 55.5556 | 16000 | 0.0015 | 0.6617 |
|
453 |
+
| 56.0 | 16128 | - | 0.6669 |
|
454 |
+
| 57.0 | 16416 | - | 0.6645 |
|
455 |
+
| 57.2917 | 16500 | 0.0014 | - |
|
456 |
+
| 58.0 | 16704 | - | 0.6642 |
|
457 |
+
| 59.0 | 16992 | - | 0.6579 |
|
458 |
+
| 59.0278 | 17000 | 0.0013 | 0.6592 |
|
459 |
+
| 60.0 | 17280 | - | 0.6589 |
|
460 |
+
| 60.7639 | 17500 | 0.0014 | - |
|
461 |
+
| 61.0 | 17568 | - | 0.6685 |
|
462 |
+
| 62.0 | 17856 | - | 0.6673 |
|
463 |
+
| 62.5 | 18000 | 0.0012 | 0.6669 |
|
464 |
+
| 63.0 | 18144 | - | 0.6665 |
|
465 |
+
| 64.0 | 18432 | - | 0.6626 |
|
466 |
+
| 64.2361 | 18500 | 0.0012 | - |
|
467 |
+
| 65.0 | 18720 | - | 0.6619 |
|
468 |
+
| 65.9722 | 19000 | 0.0012 | 0.6643 |
|
469 |
+
| 66.0 | 19008 | - | 0.6651 |
|
470 |
+
| 67.0 | 19296 | - | 0.6628 |
|
471 |
+
| 67.7083 | 19500 | 0.0011 | - |
|
472 |
+
| 68.0 | 19584 | - | 0.6658 |
|
473 |
+
| 69.0 | 19872 | - | 0.6615 |
|
474 |
+
| 69.4444 | 20000 | 0.0011 | 0.6627 |
|
475 |
+
| 70.0 | 20160 | - | 0.6657 |
|
476 |
+
| 71.0 | 20448 | - | 0.6663 |
|
477 |
+
| 71.1806 | 20500 | 0.0011 | - |
|
478 |
+
| 72.0 | 20736 | - | 0.6634 |
|
479 |
+
| 72.9167 | 21000 | 0.001 | 0.6649 |
|
480 |
+
| 73.0 | 21024 | - | 0.6632 |
|
481 |
+
| 74.0 | 21312 | - | 0.6658 |
|
482 |
+
| 74.6528 | 21500 | 0.001 | - |
|
483 |
+
| 75.0 | 21600 | - | 0.6639 |
|
484 |
+
| 76.0 | 21888 | - | 0.6601 |
|
485 |
+
| 76.3889 | 22000 | 0.001 | 0.6623 |
|
486 |
+
| 77.0 | 22176 | - | 0.6607 |
|
487 |
+
| 78.0 | 22464 | - | 0.6613 |
|
488 |
+
| 78.125 | 22500 | 0.0009 | - |
|
489 |
+
| 79.0 | 22752 | - | 0.6613 |
|
490 |
+
| 79.8611 | 23000 | 0.0009 | 0.6615 |
|
491 |
+
| 80.0 | 23040 | - | 0.6615 |
|
492 |
+
| 81.0 | 23328 | - | 0.6617 |
|
493 |
+
| 81.5972 | 23500 | 0.0008 | - |
|
494 |
+
| 82.0 | 23616 | - | 0.6604 |
|
495 |
+
| 83.0 | 23904 | - | 0.6605 |
|
496 |
+
| 83.3333 | 24000 | 0.0008 | 0.6602 |
|
497 |
+
| 84.0 | 24192 | - | 0.6628 |
|
498 |
+
| 85.0 | 24480 | - | 0.6603 |
|
499 |
+
| 85.0694 | 24500 | 0.0008 | - |
|
500 |
+
| 86.0 | 24768 | - | 0.6602 |
|
501 |
+
| 86.8056 | 25000 | 0.0008 | 0.6592 |
|
502 |
+
| 87.0 | 25056 | - | 0.6611 |
|
503 |
+
| 88.0 | 25344 | - | 0.6612 |
|
504 |
+
| 88.5417 | 25500 | 0.0008 | - |
|
505 |
+
| 89.0 | 25632 | - | 0.6607 |
|
506 |
+
| 90.0 | 25920 | - | 0.6598 |
|
507 |
+
| 90.2778 | 26000 | 0.0008 | 0.6607 |
|
508 |
+
| 91.0 | 26208 | - | 0.6615 |
|
509 |
+
| 92.0 | 26496 | - | 0.6615 |
|
510 |
+
| 92.0139 | 26500 | 0.0007 | - |
|
511 |
+
| 93.0 | 26784 | - | 0.6609 |
|
512 |
+
| 93.75 | 27000 | 0.0007 | 0.6607 |
|
513 |
+
| 94.0 | 27072 | - | 0.6612 |
|
514 |
+
| 95.0 | 27360 | - | 0.6624 |
|
515 |
+
| 95.4861 | 27500 | 0.0007 | - |
|
516 |
+
| 96.0 | 27648 | - | 0.6627 |
|
517 |
+
| 97.0 | 27936 | - | 0.6618 |
|
518 |
+
| 97.2222 | 28000 | 0.0007 | 0.6619 |
|
519 |
+
| 98.0 | 28224 | - | 0.6621 |
|
520 |
+
| 98.9583 | 28500 | 0.0007 | - |
|
521 |
+
| 99.0 | 28512 | - | 0.6623 |
|
522 |
+
| 100.0 | 28800 | - | 0.6623 |
|
523 |
+
|
524 |
+
</details>
|
525 |
+
|
526 |
+
### Framework Versions
|
527 |
+
- Python: 3.10.13
|
528 |
+
- Sentence Transformers: 3.0.0
|
529 |
+
- Transformers: 4.41.2
|
530 |
+
- PyTorch: 2.1.2
|
531 |
+
- Accelerate: 0.30.1
|
532 |
+
- Datasets: 2.19.2
|
533 |
+
- Tokenizers: 0.19.1
|
534 |
+
|
535 |
+
## Citation
|
536 |
+
|
537 |
+
### BibTeX
|
538 |
+
|
539 |
+
#### Sentence Transformers
|
540 |
+
```bibtex
|
541 |
+
@inproceedings{reimers-2019-sentence-bert,
|
542 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
543 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
544 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
545 |
+
month = "11",
|
546 |
+
year = "2019",
|
547 |
+
publisher = "Association for Computational Linguistics",
|
548 |
+
url = "https://arxiv.org/abs/1908.10084",
|
549 |
+
}
|
550 |
+
```
|
551 |
+
|
552 |
+
<!--
|
553 |
+
## Glossary
|
554 |
+
|
555 |
+
*Clearly define terms in order to be accessible across audiences.*
|
556 |
+
-->
|
557 |
+
|
558 |
+
<!--
|
559 |
+
## Model Card Authors
|
560 |
+
|
561 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
562 |
+
-->
|
563 |
+
|
564 |
+
<!--
|
565 |
+
## Model Card Contact
|
566 |
+
|
567 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
568 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Rajan/NepaliBERT",
|
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": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 6,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.2",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 50000
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.0",
|
4 |
+
"transformers": "4.41.2",
|
5 |
+
"pytorch": "2.1.2"
|
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:1067c8f2fe7b9c8e13cb5dbbbd9d643db0b81fb45b58bcf76709ff1273ee6b1f
|
3 |
+
size 327667976
|
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,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 1000000000000000019884624838656,
|
50 |
+
"never_split": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"sep_token": "[SEP]",
|
53 |
+
"strip_accents": null,
|
54 |
+
"tokenize_chinese_chars": true,
|
55 |
+
"tokenizer_class": "BertTokenizer",
|
56 |
+
"unk_token": "[UNK]"
|
57 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|