arnolfokam commited on
Commit
0f34ba4
1 Parent(s): 10b5f97

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -1
README.md CHANGED
@@ -14,4 +14,63 @@ widget:
14
  - text: "Ambasaderi Bellomo yavuze ko bishimira ubufatanye burambye hagati ya EU n’u Rwanda, bushingiye nanone ku bufatanye hagati y’imigabane ya Afurika n’u Burayi."
15
  ---
16
 
17
- Model description
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  - text: "Ambasaderi Bellomo yavuze ko bishimira ubufatanye burambye hagati ya EU n’u Rwanda, bushingiye nanone ku bufatanye hagati y’imigabane ya Afurika n’u Burayi."
15
  ---
16
 
17
+ # Model description
18
+ **mbert-base-uncased-ner-kin** is a model based on the fine-tuned Multilingual BERT base uncased model. It has been trained to recognize four types of entities:
19
+
20
+ - dates & time (DATE)
21
+ - Location (LOC)
22
+ - Organizations (ORG)
23
+ - Person (PER)
24
+
25
+ # Intended Use
26
+ - Intended to be used for research purposes concerning Named Entity Recognition for African Languages.
27
+ - Not intended for practical purposes.
28
+
29
+ # Training Data
30
+ This model was fine-tuned on the Kinyarwanda corpus **(kin)** of the [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) dataset. However, we thresholded the number of entity groups per sentence in this dataset to 10 entity groups.
31
+
32
+ # Training procedure
33
+ This model was trained on a single NVIDIA P5000 from [Paperspace](https://www.paperspace.com)
34
+ #### Hyperparameters
35
+ - **Learning Rate:** 5e-5
36
+ - **Batch Size:** 32
37
+ - **Maximum Sequence Length:** 164
38
+ - **Epochs:** 30
39
+
40
+
41
+ # Evaluation Data
42
+ We evaluated this model on the test split of the Kinyarwandan corpus **(kin)** present in the [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) with no thresholding.
43
+
44
+ # Metrics
45
+ - Precision
46
+ - Recall
47
+ - F1-score
48
+
49
+ # Limitations
50
+ - The size of the pre-trained language model prevents its usage in anything other than research.
51
+ - Lack of analysis concerning the bias and fairness in these models may make them dangerous if deployed into production system.
52
+ - The train data is a less populated version of the original dataset in terms of entity groups per sentence. Therefore, this can negatively impact the performance.
53
+
54
+ # Caveats and Recommendations
55
+ - The topics in the dataset corpus are centered around **News**. Future training could be done with a more diverse corpus.
56
+
57
+ # Results
58
+ Model Name| Precision | Recall | F1-score
59
+ -|-|-|-
60
+ **mbert-base-uncased-ner-kin**| 81.35 |83.98 |82.64
61
+
62
+ # Usage
63
+
64
+ ```python
65
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
66
+ from transformers import pipeline
67
+
68
+ tokenizer = AutoTokenizer.from_pretrained("arnolfokam/mbert-base-uncased-ner-kin")
69
+ model = AutoModelForTokenClassification.from_pretrained("arnolfokam/mbert-base-uncased-ner-kin")
70
+
71
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
72
+ example = "Rayon Sports yasinyishije rutahizamu w’Umurundi"
73
+
74
+ ner_results = nlp(example)
75
+ print(ner_results)
76
+ ```