morit commited on
Commit
81c1359
1 Parent(s): 8150d63

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -0
README.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - xnli
5
+ language:
6
+ - hi
7
+ metrics:
8
+ - accuracy
9
+ pipeline_tag: zero-shot-classification
10
+ ---
11
+
12
+ # XLM-ROBERTA-BASE-XNLI-HI
13
+
14
+ ## Model description
15
+ This model takes the XLM-Roberta-base model which has been continued to pre-traine on a large corpus of Twitter in multiple languages.
16
+ It was developed following a similar strategy as introduced as part of the [Tweet Eval](https://github.com/cardiffnlp/tweeteval) framework.
17
+ The model is further finetuned on the hindi part of the XNLI training dataset.
18
+
19
+ ## Intended Usage
20
+
21
+ This model was developed to do Zero-Shot Text Classification in the realm of Hate Speech Detection. It is focused on the language of hindi as it was finetuned on data in said language. Since the base model was pre-trained on 100 different languages it has shown some effectiveness in other languages. Please refer to the list of languages in the [XLM Roberta paper](https://arxiv.org/abs/1911.02116)
22
+
23
+ ### Usage with Zero-Shot Classification pipeline
24
+ ```python
25
+ from transformers import pipeline
26
+ classifier = pipeline("zero-shot-classification",
27
+ model="morit/hindi_xlm_xnli")
28
+ ```
29
+
30
+
31
+ ## Training
32
+ This model was pre-trained on a set of 100 languages and follwed further training on 198M multilingual tweets as described in the original [paper](https://arxiv.org/abs/2104.12250). Further it was trained on the training set of XNLI dataset in hindi which is a machine translated version of the MNLI dataset. It was trained on 5 epochs of the XNLI train set and evaluated on the XNLI eval dataset at the end of every to find the best performing model. The model which had the highest accuracy on the eval set was chosen at the end.
33
+
34
+ ![Training Charts from wandb](screen_wandb.png)
35
+ - learning rate: 2e-5
36
+ - batch size: 32
37
+ - max sequence: length 128
38
+
39
+ using a GPU (NVIDIA GeForce RTX 3090) resulting in a training time of 1h 47 mins.
40
+
41
+ ## Evaluation
42
+
43
+ The best performing model was evaluatated on the XNLI test set to get a comparable result
44
+ ```
45
+ predict_accuracy = 71.22 %
46
+ ```