Update README.md
Browse files
README.md
CHANGED
|
@@ -5,3 +5,35 @@ tags:
|
|
| 5 |
- bert-persian
|
| 6 |
license: apache-2.0
|
| 7 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
- bert-persian
|
| 6 |
license: apache-2.0
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
DAL-BERT: Another pre-trained language model for Persian
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
DAL-BERT is a transformer-based model trained on more than 80 gigabytes of Persian text including both formal and informal (conversational) contexts. The architecture of this model follows the original BERT [[Devlin et al.](https://arxiv.org/abs/1810.04805)].
|
| 14 |
+
|
| 15 |
+
How to use the Model
|
| 16 |
+
---
|
| 17 |
+
```python
|
| 18 |
+
from transformers import BertForMaskedLM, BertTokenizer, pipeline
|
| 19 |
+
model = BertForMaskedLM.from_pretrained('sharif-dal/dal-bert')
|
| 20 |
+
tokenizer = BertTokenizer.from_pretrained('sharif-dal/dal-bert')
|
| 21 |
+
fill_sentence = pipeline('fill-mask', model=model, tokenizer=tokenizer)
|
| 22 |
+
fill_sentence('اینجا جمله مورد نظر خود را بنویسید و کلمه موردنظر را [MASK] کنید')
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
The Training Data
|
| 26 |
+
---
|
| 27 |
+
The abovementioned model was trained on a bunch of newspapers, news agencies' websites, technology-related sources, people's comments, magazines, literary criticism, and some blogs.
|
| 28 |
+
|
| 29 |
+
Evaluation
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
| Training Loss | Epoch | Step | MLM Accuracy |
|
| 33 |
+
|:-------------:|:-----:|:-----:| |
|
| 34 |
+
| 0.0036 | 1.0 | 322906 | |
|
| 35 |
+
|
| 36 |
+
Contributors
|
| 37 |
+
---
|
| 38 |
+
- [Arman Malekzadeh](http://ce.sharif.edu/~malekzaadeh/), PhD Student in AI @ Sharif University of Technology [[Linkedin](https://www.linkedin.com/in/arman-malekzadeh/)] [[Github](https://github.com/arm-on)]
|
| 39 |
+
- [Amirhossein Ramazani], Master's Student in AI @ Sharif University of Technology [[Linkedin](https://www.linkedin.com/in/amirhossein-ramazani/)] [[Github](https://github.com/amirhossein1376)]
|