Update README.md
Browse files
README.md
CHANGED
@@ -1,60 +1,21 @@
|
|
1 |
---
|
2 |
language: id
|
3 |
-
tags:
|
4 |
-
- indobert
|
5 |
-
- indobenchmark
|
6 |
-
- indonlu
|
7 |
-
license: mit
|
8 |
inference: false
|
9 |
-
datasets:
|
10 |
-
- Indo4B
|
11 |
---
|
12 |
|
13 |
-
# IndoBERT-Lite Base Model
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
## All Pre-trained Models
|
18 |
-
|
19 |
-
| Model | #params | Arch. | Training data |
|
20 |
-
|--------------------------------|--------------------------------|-------|-----------------------------------|
|
21 |
-
| `indobenchmark/indobert-base-p1` | 124.5M | Base | Indo4B (23.43 GB of text) |
|
22 |
-
| `indobenchmark/indobert-base-p2` | 124.5M | Base | Indo4B (23.43 GB of text) |
|
23 |
-
| `indobenchmark/indobert-large-p1` | 335.2M | Large | Indo4B (23.43 GB of text) |
|
24 |
-
| `indobenchmark/indobert-large-p2` | 335.2M | Large | Indo4B (23.43 GB of text) |
|
25 |
-
| `indobenchmark/indobert-lite-base-p1` | 11.7M | Base | Indo4B (23.43 GB of text) |
|
26 |
-
| `indobenchmark/indobert-lite-base-p2` | 11.7M | Base | Indo4B (23.43 GB of text) |
|
27 |
-
| `indobenchmark/indobert-lite-large-p1` | 17.7M | Large | Indo4B (23.43 GB of text) |
|
28 |
-
| `indobenchmark/indobert-lite-large-p2` | 17.7M | Large | Indo4B (23.43 GB of text) |
|
29 |
|
30 |
## How to use
|
31 |
|
32 |
-
###
|
33 |
-
```python
|
34 |
-
from transformers import BertTokenizer, AutoModel
|
35 |
-
tokenizer = BertTokenizer.from_pretrained("indobenchmark/indobert-lite-base-p2")
|
36 |
-
model = AutoModel.from_pretrained("indobenchmark/indobert-lite-base-p2")
|
37 |
-
```
|
38 |
-
|
39 |
-
### Extract contextual representation
|
40 |
```python
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
## Citation
|
51 |
-
If you use our work, please cite:
|
52 |
-
|
53 |
-
```bibtex
|
54 |
-
@inproceedings{wilie2020indonlu,
|
55 |
-
title={IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding},
|
56 |
-
author={Bryan Wilie and Karissa Vincentio and Genta Indra Winata and Samuel Cahyawijaya and X. Li and Zhi Yuan Lim and S. Soleman and R. Mahendra and Pascale Fung and Syafri Bahar and A. Purwarianti},
|
57 |
-
booktitle={Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing},
|
58 |
-
year={2020}
|
59 |
-
}
|
60 |
```
|
|
|
1 |
---
|
2 |
language: id
|
|
|
|
|
|
|
|
|
|
|
3 |
inference: false
|
|
|
|
|
4 |
---
|
5 |
|
6 |
+
# SQuAD IndoBERT-Lite Base Model
|
7 |
|
8 |
+
Fine-tuned IndoBERT-Lite from IndoBenchmark using Translated SQuAD datasets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
## How to use
|
11 |
|
12 |
+
### Using pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
```python
|
14 |
+
from transformers import BertTokenizerFast, pipeline
|
15 |
+
tokenizer = BertTokenizerFast.from_pretrained(
|
16 |
+
'Wikidepia/albert-bahasa-uncased-squad',
|
17 |
+
do_lower_case = True,
|
18 |
+
)
|
19 |
+
# a) Get predictions
|
20 |
+
nlp = pipeline('question-answering', model="Wikidepia/albert-bahasa-uncased-squad", tokenizer=tokenizer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
```
|