w11wo commited on
Commit
a84d215
1 Parent(s): 2bd8778

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +66 -0
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: id
3
+ tags:
4
+ - indonesian-roberta-base-indonli
5
+ license: mit
6
+ datasets:
7
+ - indonli
8
+ widget:
9
+ - text: "Andi tersenyum karena mendapat hasil baik. </s></s> Andi sedih."
10
+ ---
11
+
12
+ ## Indonesian RoBERTa Base IndoNLI
13
+
14
+ Indonesian RoBERTa Base IndoNLI is a natural language inference (NLI) model based on the [RoBERTa](https://arxiv.org/abs/1907.11692) model. The model was originally the pre-trained [Indonesian RoBERTa Base](https://hf.co/flax-community/indonesian-roberta-base) model, which is then fine-tuned on [`IndoNLI`](https://github.com/ir-nlp-csui/indonli)'s dataset consisting of Indonesian Wikipedia, news, and Web articles [1].
15
+
16
+ After training, the model achieved an evaluation/dev accuracy of 77.06%. On the benchmark `test_lay` subset, the model achieved an accuracy of 74.24% and on the benchmark `test_expert` subset, the model achieved an accuracy of 61.66%.
17
+
18
+ Hugging Face's `Trainer` class from the [Transformers](https://huggingface.co/transformers) library was used to train the model. PyTorch was used as the backend framework during training, but the model remains compatible with other frameworks nonetheless.
19
+
20
+ ## Model
21
+
22
+ | Model | #params | Arch. | Training/Validation data (text) |
23
+ | --------------------------------- | ------- | ------------ | ------------------------------- |
24
+ | `indonesian-roberta-base-indonli` | 124M | RoBERTa Base | `IndoNLI` |
25
+
26
+ ## Evaluation Results
27
+
28
+ The model was trained for 5 epochs, with a batch size of 16, a learning rate of 2e-5, a weight decay of 0.1, and a warmup ratio of 0.2, with linear annealing to 0. The best model was loaded at the end.
29
+
30
+ | Epoch | Training Loss | Validation Loss | Accuracy |
31
+ | ----- | ------------- | --------------- | -------- |
32
+ | 1 | 0.989200 | 0.691663 | 0.731452 |
33
+ | 2 | 0.673000 | 0.621913 | 0.766045 |
34
+ | 3 | 0.449900 | 0.662543 | 0.770596 |
35
+ | 4 | 0.293600 | 0.777059 | 0.768320 |
36
+ | 5 | 0.194200 | 0.948068 | 0.764224 |
37
+
38
+ ## How to Use
39
+
40
+ ### As NLI Classifier
41
+
42
+ ```python
43
+ from transformers import pipeline
44
+
45
+ pretrained_name = "w11wo/indonesian-roberta-base-indonli"
46
+
47
+ nlp = pipeline(
48
+ "sentiment-analysis",
49
+ model=pretrained_name,
50
+ tokenizer=pretrained_name
51
+ )
52
+
53
+ nlp("Andi tersenyum karena mendapat hasil baik. </s></s> Andi sedih.")
54
+ ```
55
+
56
+ ## Disclaimer
57
+
58
+ Do consider the biases which come from both the pre-trained RoBERTa model and the `IndoNLI` dataset that may be carried over into the results of this model.
59
+
60
+ ## References
61
+
62
+ [1] Mahendra, R., Aji, A. F., Louvan, S., Rahman, F., & Vania, C. (2021, November). [IndoNLI: A Natural Language Inference Dataset for Indonesian](https://arxiv.org/abs/2110.14566). _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_. Association for Computational Linguistics.
63
+
64
+ ## Author
65
+
66
+ Indonesian RoBERTa Base IndoNLI was trained and evaluated by [Wilson Wongso](https://w11wo.github.io/). All computation and development are done on Google Colaboratory using their free GPU access.