Davlan commited on
Commit
f0bf28d
1 Parent(s): 447133e

adding in Hausa XLM-R

Browse files

README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Hugging Face's logo
2
+ ---
3
+ language: ha
4
+ datasets:
5
+
6
+ ---
7
+ # xlm-roberta-base-finetuned-swahili
8
+ ## Model description
9
+ **xlm-roberta-base-finetuned-swahili** is a **Swahili RoBERTa** model obtained by fine-tuning **xlm-roberta-base** model on Swahili language texts. It provides **better performance** than the XLM-RoBERTa on text classification and named entity recognition datasets.
10
+
11
+ Specifically, this model is a *xlm-roberta-base* model that was fine-tuned on Swahili corpus.
12
+ ## Intended uses & limitations
13
+ #### How to use
14
+ You can use this model with Transformers *pipeline* for masked token prediction.
15
+ ```python
16
+ >>> from transformers import pipeline
17
+ >>> unmasker = pipeline('fill-mask', model='Davlan/xlm-roberta-base-finetuned-swahili')
18
+ >>> unmasker("Jumatatu, Bwana Kagame alielezea shirika la France24 huko <mask> kwamba hakuna uhalifu ulitendwa")
19
+
20
+ [{'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Ufaransa kwamba hakuna uhalifu ulitendwa',
21
+ 'score': 0.5077782273292542,
22
+ 'token': 190096,
23
+ 'token_str': 'Ufaransa'},
24
+ {'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Paris kwamba hakuna uhalifu ulitendwa',
25
+ 'score': 0.3657738268375397,
26
+ 'token': 7270,
27
+ 'token_str': 'Paris'},
28
+ {'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Gabon kwamba hakuna uhalifu ulitendwa',
29
+ 'score': 0.01592041552066803,
30
+ 'token': 176392,
31
+ 'token_str': 'Gabon'},
32
+ {'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko France kwamba hakuna uhalifu ulitendwa',
33
+ 'score': 0.010881908237934113,
34
+ 'token': 9942,
35
+ 'token_str': 'France'},
36
+ {'sequence': 'Jumatatu, Bwana Kagame alielezea shirika la France24 huko Marseille kwamba hakuna uhalifu ulitendwa',
37
+ 'score': 0.009554869495332241,
38
+ 'token': 185918,
39
+ 'token_str': 'Marseille'}]
40
+
41
+
42
+ ```
43
+ #### Limitations and bias
44
+ 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.
45
+ ## Training data
46
+ This model was fine-tuned on [Swahili CC-100](http://data.statmt.org/cc-100/)
47
+
48
+ ## Training procedure
49
+ This model was trained on a single NVIDIA V100 GPU
50
+
51
+ ## Eval results on Test set (F-score, average over 5 runs)
52
+ Dataset| XLM-R F1 | sw_roberta F1
53
+ -|-|-
54
+ [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) | 87.37 | 89.74
55
+
56
+ ### BibTeX entry and citation info
57
+ By David Adelani
58
+ ```
59
+
60
+ ```
61
+
62
+
config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "xlm-roberta-base",
3
+ "architectures": [
4
+ "XLMRobertaForMaskedLM"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "xlm-roberta",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "transformers_version": "4.4.2",
24
+ "type_vocab_size": 1,
25
+ "use_cache": true,
26
+ "vocab_size": 250002
27
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04a4a0a0d2716d99457ae746e3ef366ebd590fd5d686d5a7eaf934c16dc8c550
3
+ size 1113271890
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "xlm-roberta-base"}
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ee625eff09af13af87cf5c80b43e5e5d3ce407d5464b3e3eb0b21e7ad73c340
3
+ size 2287