File size: 2,492 Bytes
0568bc5
 
 
 
 
 
2f0d1f4
0568bc5
2f0d1f4
0568bc5
2f0d1f4
0568bc5
 
 
 
 
2f0d1f4
 
0568bc5
2f0d1f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0568bc5
 
 
 
 
2f0d1f4
0568bc5
 
 
 
 
2f0d1f4
0568bc5
39ffcb5
0568bc5
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Hugging Face's logo
---
language: ha
datasets:

---
# bert-base-multilingual-cased-finetuned-swahili
## Model description
**bert-base-multilingual-cased-finetuned-swahili** is a **Swahili BERT** model obtained by fine-tuning **bert-base-multilingual-cased** model on Swahili language texts.  It provides **better performance** than the multilingual BERT on text classification and named entity recognition datasets.  

Specifically, this model is a *bert-base-multilingual-cased* model that was fine-tuned on Swahili corpus. 
## Intended uses & limitations
#### How to use
You can use this model with Transformers *pipeline* for masked token prediction.
```python
>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='Davlan/bert-base-multilingual-cased-finetuned-swahili')
>>> unmasker("Jumatatu, Bwana Kagame alielezea shirika la France24 huko [MASK] kwamba "hakuna uhalifu ulitendwa")
                    
[{'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Paris kwamba hakuna uhalifu ulitendwa', 
'score': 0.31642526388168335, 
'token': 10728, 
'token_str': 'Paris'}, 
{'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Rwanda kwamba hakuna uhalifu ulitendwa', 
'score': 0.15753623843193054, 
'token': 57557, 
'token_str': 'Rwanda'}, 
{'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Burundi kwamba hakuna uhalifu ulitendwa', 
'score': 0.07211585342884064, 
'token': 57824, 
'token_str': 'Burundi'}, 
{'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko France kwamba hakuna uhalifu ulitendwa', 
'score': 0.029844321310520172, 
'token': 10688, 
'token_str': 'France'}, 
{'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Senegal kwamba hakuna uhalifu ulitendwa', 
'score': 0.0265930388122797, 
'token': 38052, 
'token_str': 'Senegal'}]

```
#### Limitations and bias
This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains. 
## Training data
This model was fine-tuned on [Swahili CC-100](http://data.statmt.org/cc-100/)

## Training procedure
This model was trained on a single NVIDIA V100 GPU

## Eval results on Test set (F-score, average over 5 runs)
Dataset| mBERT F1 | sw_bert F1
-|-|-
[MasakhaNER](https://github.com/masakhane-io/masakhane-ner) | 86.80 | 89.36 

### BibTeX entry and citation info
By David Adelani
```

```