bonadossou commited on
Commit
2c6ae88
·
1 Parent(s): 8457ff9

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Paper: `FonMTL: Toward Building a Multi-Task Learning Model for Fon Language`, accepted at WiNLP co-located at EMNLP 2023
2
+
3
+ - Official Github: https://github.com/bonaventuredossou/multitask_fon
4
+
5
+ - Build Multi-task Learning Model: For the shared layers (encoders) we used the following language model heads:
6
+
7
+ - [AfroLM-Large](https://huggingface.co/bonadossou/afrolm_active_learning)
8
+ - [AfroLM: A Self-Active Learning-based Multilingual Pretrained Language Model for 23 African Languages](https://aclanthology.org/2022.sustainlp-1.11/) (Dossou et.al., EMNLP 2022)
9
+
10
+ - [XLMR-Large](https://huggingface.co/xlm-roberta-large):
11
+ - [Unsupervised Cross-lingual Representation Learning at Scale](https://aclanthology.org/2020.acl-main.747) (Conneau et.al., ACL 2020)
12
+
13
+ - Evaluation:
14
+
15
+ - The goal primarily is to explore whether multitask learning improves performance on downstream tasks for Fon. We try two settings: (a) training only on Fon and evaluating on Fon, (b) training on all languages and evaluating on Fon. We evaluate the multi-task learning model on NER and POS tasks, and compare it with baselines (models finetuned and evaluated on single tasks)
16
+
17
+ # How to get started
18
+
19
+ - Run the training: `sbatch run.sh`
20
+
21
+ This command will:
22
+
23
+ - Set up the environement
24
+ - Install required libraries: `pip install -r requirements.txt -q`
25
+ - Move to the code folder: `cd code`
26
+ - Run the training & evaluate: `python run_train.py`
27
+
28
+ # NER Results
29
+ Model | Task | Pretraining/Finetuning Dataset | Pretraining/Finetuning Language(s) | Evaluation Dataset | Metric | Metric's Value |
30
+ |:---: |:---: |:---: | :---: |:---: | :---: | :---: |
31
+ `AfroLM-Large` | Single Task | MasakhaNER 2.0 | All | FON NER | F1-Score | 80.48 |
32
+ `AfriBERTa-Large` | Single Task | MasakhaNER 2.0 | All | FON NER | F1-Score | 79.90 |
33
+ `XLMR-Base` | Single Task | MasakhaNER 2.0 | All | FON NER | F1-Score | 81.90 |
34
+ `XLMR-Large` | Single Task | MasakhaNER 2.0 | All | FON NER | F1-Score | 81.60 |
35
+ `AfroXLMR-Base` | Single Task | MasakhaNER 2.0 | All | FON NER | F1-Score | 82.30 |
36
+ `AfroXLMR-Large` | Single Task | MasakhaNER 2.0 | All | FON NER | F1-Score | 82.70 |
37
+ |:---: |:---: |:---: | :---: |:---: | :---: |
38
+ `MTL Sum (ours)` | Multi-Task | MasakhaNER 2.0 & MasakhaPOS | All | FON NER | F1-Score | 79.87 |
39
+ `MTL Weighted (ours)` | Multi-Task | MasakhaNER 2.0 & MasakhaPOS | All | FON NER | F1-Score | 81.92 |
40
+ `MTL Weighted (ours)` | Multi-Task | MasakhaNER 2.0 & MasakhaPOS | Fon Data | FON NER | F1-Score | 64.43 |
41
+
42
+
43
+ # POS Results
44
+ Model | Task | Pretraining/Finetuning Dataset | Pretraining/Finetuning Language(s) | Evaluation Dataset | Metric | Metric's Value |
45
+ |:---: |:---: |:---: | :---: |:---: | :---: | :---: |
46
+ `AfroLM-Large` | Single Task | MasakhaPOS | All | FON POS | Accuracy | 82.40 |
47
+ `AfriBERTa-Large` | Single Task | MasakhaPOS | All | FON POS | Accuracy | 88.40 |
48
+ `XLMR-Base` | Single Task | MasakhaPOS | All | FON POS | Accuracy | 90.10 |
49
+ `XLMR-Large` | Single Task | MasakhaPOS | All | FON POS | Accuracy | 90.20 |
50
+ `AfroXLMR-Base` | Single Task | MasakhaPOS | All | FON POS | Accuracy | 90.10 |
51
+ `AfroXLMR-Large` | Single Task | MasakhaPOS | All | FON POS | Accuracy | 90.40 |
52
+ |:---: |:---: |:---: | :---: |:---: | :---: |
53
+ `MTL Sum (ours)` | Multi-Task | MasakhaNER 2.0 & MasakhaPOS | All | FON POS | Accuracy | 82.45 |
54
+ `MTL Weighted (ours)` | Multi-Task | MasakhaNER 2.0 & MasakhaPOS | All | FON POS | Accuracy | 89.20 |
55
+ `MTL Weighted (ours)` | Multi-Task | MasakhaNER 2.0 & MasakhaPOS | Fon Data | FON POS | Accuracy | 80.85 |
56
+
57
+ # Model End-Points
58
+
59
+ - [`multitask_model_fon_False_multiplicative.bin`](https://huggingface.co/bonadossou/multitask_model_fon_False_multiplicative) is the MTL Fon Model which has been pre-trained on all MasakhaNER 2.0 and MasakhaPOS datasets, and merging representations in a multiplicative way.
60
+
61
+ - [`multitask_model_fon_True_multiplicative.bin`](https://huggingface.co/bonadossou/multitask-learning-fon-true-multiplicative) is the MTL Fon Model which has been pre-trained only on Fon data from the MasakhaNER 2.0 and MasakhaPOS datasets, and merging representations in a multiplicative way.
62
+
63
+ # How to run inference when you have the model
64
+ To run inference with the model(s), you can use the [testing block](https://github.com/bonaventuredossou/multitask_fon/blob/main/code/run_train.py#L209) defined in our MultitaskFON class.