julien-c HF staff commited on
Commit
3c0a963
1 Parent(s): a19ebf8

Migrate model card from transformers-repo

Browse files

Read announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/asafaya/bert-mini-arabic/README.md

Files changed (1) hide show
  1. README.md +72 -0
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: ar
3
+ datasets:
4
+ - oscar
5
+ - wikipedia
6
+ ---
7
+
8
+ # Arabic BERT Mini Model
9
+
10
+ Pretrained BERT Mini language model for Arabic
11
+
12
+ _If you use this model in your work, please cite this paper:_
13
+
14
+ <!--```
15
+ @inproceedings{
16
+ title={KUISAIL at SemEval-2020 Task 12: BERT-CNN for Offensive Speech Identification in Social Media},
17
+ author={Safaya, Ali and Abdullatif, Moutasem and Yuret, Deniz},
18
+ booktitle={Proceedings of the International Workshop on Semantic Evaluation (SemEval)},
19
+ year={2020}
20
+ }
21
+ ```-->
22
+
23
+ ```
24
+ @misc{safaya2020kuisail,
25
+ title={KUISAIL at SemEval-2020 Task 12: BERT-CNN for Offensive Speech Identification in Social Media},
26
+ author={Ali Safaya and Moutasem Abdullatif and Deniz Yuret},
27
+ year={2020},
28
+ eprint={2007.13184},
29
+ archivePrefix={arXiv},
30
+ primaryClass={cs.CL}
31
+ }
32
+ ```
33
+
34
+ ## Pretraining Corpus
35
+
36
+ `arabic-bert-mini` model was pretrained on ~8.2 Billion words:
37
+
38
+ - Arabic version of [OSCAR](https://traces1.inria.fr/oscar/) - filtered from [Common Crawl](http://commoncrawl.org/)
39
+ - Recent dump of Arabic [Wikipedia](https://dumps.wikimedia.org/backup-index.html)
40
+
41
+ and other Arabic resources which sum up to ~95GB of text.
42
+
43
+ __Notes on training data:__
44
+
45
+ - Our final version of corpus contains some non-Arabic words inlines, which we did not remove from sentences since that would affect some tasks like NER.
46
+ - Although non-Arabic characters were lowered as a preprocessing step, since Arabic characters does not have upper or lower case, there is no cased and uncased version of the model.
47
+ - The corpus and vocabulary set are not restricted to Modern Standard Arabic, they contain some dialectical Arabic too.
48
+
49
+ ## Pretraining details
50
+
51
+ - This model was trained using Google BERT's github [repository](https://github.com/google-research/bert) on a single TPU v3-8 provided for free from [TFRC](https://www.tensorflow.org/tfrc).
52
+ - Our pretraining procedure follows training settings of bert with some changes: trained for 3M training steps with batchsize of 128, instead of 1M with batchsize of 256.
53
+
54
+ ## Load Pretrained Model
55
+
56
+ You can use this model by installing `torch` or `tensorflow` and Huggingface library `transformers`. And you can use it directly by initializing it like this:
57
+
58
+ ```python
59
+ from transformers import AutoTokenizer, AutoModel
60
+
61
+ tokenizer = AutoTokenizer.from_pretrained("asafaya/bert-mini-arabic")
62
+ model = AutoModel.from_pretrained("asafaya/bert-mini-arabic")
63
+ ```
64
+
65
+ ## Results
66
+
67
+ For further details on the models performance or any other queries, please refer to [Arabic-BERT](https://github.com/alisafaya/Arabic-BERT)
68
+
69
+ ## Acknowledgement
70
+
71
+ Thanks to Google for providing free TPU for the training process and for Huggingface for hosting this model on their servers 😊
72
+