rasyosef commited on
Commit
c7218c7
1 Parent(s): b1a3492

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md CHANGED
@@ -21,3 +21,48 @@ It achieves the following results on the evaluation set:
21
  - `Perplexity: 35.52`
22
 
23
  Even though this model only has `9.7 Million` parameters, its performance is only slightly behind the 28x larger `279 Million` parameter [xlm-roberta-base](https://huggingface.co/FacebookAI/xlm-roberta-base) model on the same Amharic evaluation set.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  - `Perplexity: 35.52`
22
 
23
  Even though this model only has `9.7 Million` parameters, its performance is only slightly behind the 28x larger `279 Million` parameter [xlm-roberta-base](https://huggingface.co/FacebookAI/xlm-roberta-base) model on the same Amharic evaluation set.
24
+
25
+ # How to use
26
+ You can use this model directly with a pipeline for masked language modeling:
27
+
28
+ ```python
29
+ >>> from transformers import pipeline
30
+ >>> unmasker = pipeline('fill-mask', model='rasyosef/bert-mini-amharic')
31
+ >>> unmasker("ከሀገራቸው ከኢትዮጵያ ከወጡ ግማሽ ምዕተ [MASK] ተቆጥሯል።")
32
+
33
+ [{'score': 0.4713546335697174,
34
+ 'token': 9308,
35
+ 'token_str': 'ዓመት',
36
+ 'sequence': 'ከሀገራቸው ከኢትዮጵያ ከወጡ ግማሽ ምዕተ ዓመት ተቆጥሯል ።'},
37
+ {'score': 0.25726795196533203,
38
+ 'token': 9540,
39
+ 'token_str': 'ዓመታት',
40
+ 'sequence': 'ከሀገራቸው ከኢትዮጵያ ከወጡ ግማሽ ምዕተ ዓመታት ተቆጥሯል ።'},
41
+ {'score': 0.07067586481571198,
42
+ 'token': 10354,
43
+ 'token_str': 'አመት',
44
+ 'sequence': 'ከሀገራቸው ከኢትዮጵያ ከወጡ ግማሽ ምዕተ አመት ተቆጥሯል ።'},
45
+ {'score': 0.07064681500196457,
46
+ 'token': 11212,
47
+ 'token_str': 'አመታት',
48
+ 'sequence': 'ከሀገራቸው ከኢትዮጵያ ከወጡ ግማሽ ምዕተ አመታት ተቆጥሯል ።'},
49
+ {'score': 0.012558948248624802,
50
+ 'token': 10588,
51
+ 'token_str': 'ወራት',
52
+ 'sequence': 'ከሀገራቸው ከኢትዮጵያ ከወጡ ግማሽ ምዕተ ወራት ተቆጥሯል ።'}]
53
+ ```
54
+
55
+ # Fine-tuning
56
+
57
+ The following github repository contains a notebook that fine-tunes this model for an Amharic text classification task.
58
+
59
+ https://github.com/rasyosef/amharic-news-category-classification
60
+
61
+ #### Fine-tuned Model Performance
62
+ Since this is a multi-class classification task, the reported precision, recall, and f1 metrics are macro averages.
63
+
64
+ |Model|Size(# params)|Accuracy|Precision|Recall|F1|
65
+ |-----|--------------|--------|---------|------|--|
66
+ |bert-mini-amharic|9.67M|0.87|0.83|0.83|0.83|
67
+ |bert-small-amharic|25.7M|0.89|0.86|0.87|0.86|
68
+ |xlm-roberta-base|279M|0.9|0.88|0.88|0.88|