Wikidepia commited on
Commit
d562719
1 Parent(s): 73d7b91

Initial Commits

Browse files
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 (phase2 - uncased)
14
+
15
+ [IndoBERT](https://arxiv.org/abs/2009.05387) is a state-of-the-art language model for Indonesian based on the BERT model. The pretrained model is trained using a masked language modeling (MLM) objective and next sentence prediction (NSP) objective.
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
+ ### Load model and tokenizer
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
+ x = torch.LongTensor(tokenizer.encode('aku adalah anak [MASK]')).view(1,-1)
42
+ print(x, model(x)[0].sum())
43
+ ```
44
+
45
+ ## Authors
46
+
47
+ <b>IndoBERT</b> was trained and evaluated by Bryan Wilie\*, Karissa Vincentio\*, Genta Indra Winata\*, Samuel Cahyawijaya\*, Xiaohong Li, Zhi Yuan Lim, Sidik Soleman, Rahmad Mahendra, Pascale Fung, Syafri Bahar, Ayu Purwarianti.
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
+ ```
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "indobert-lite-base-p2",
3
+ "_num_labels": 2,
4
+ "architectures": [
5
+ "AlbertForQuestionAnswering"
6
+ ],
7
+ "attention_probs_dropout_prob": 0,
8
+ "bos_token_id": 2,
9
+ "classifier_dropout_prob": 0.1,
10
+ "down_scale_factor": 1,
11
+ "embedding_size": 128,
12
+ "eos_token_id": 3,
13
+ "gap_size": 0,
14
+ "hidden_act": "gelu",
15
+ "hidden_dropout_prob": 0,
16
+ "hidden_size": 768,
17
+ "initializer_range": 0.02,
18
+ "inner_group_num": 1,
19
+ "intermediate_size": 3072,
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "albert",
23
+ "net_structure_type": 0,
24
+ "num_attention_heads": 12,
25
+ "num_hidden_groups": 1,
26
+ "num_hidden_layers": 12,
27
+ "num_memory_blocks": 0,
28
+ "output_past": true,
29
+ "pad_token_id": 0,
30
+ "position_embedding_type": "absolute",
31
+ "type_vocab_size": 2,
32
+ "vocab_size": 30000
33
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f229d7e8be69e5509a51c77bf12e2461caab8a5910a6dd79f67f950b710e383
3
+ size 44393497
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"max_len": 512}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff