模型:

indobenchmark/indobert-lite-large-p1

英文

IndoBERT-Lite 大型模型 (phase1 - uncased)

IndoBERT 是基于BERT模型的印尼语最先进的语言模型。这个预训练模型是使用遮蔽语言建模 (MLM) 和下一个句子预测 (NSP) 目标进行训练的。

所有预训练模型

Model #params Arch. Training data
indobenchmark/indobert-base-p1 124.5M Base Indo4B (23.43 GB of text)
indobenchmark/indobert-base-p2 124.5M Base Indo4B (23.43 GB of text)
indobenchmark/indobert-large-p1 335.2M Large Indo4B (23.43 GB of text)
indobenchmark/indobert-large-p2 335.2M Large Indo4B (23.43 GB of text)
indobenchmark/indobert-lite-base-p1 11.7M Base Indo4B (23.43 GB of text)
indobenchmark/indobert-lite-base-p2 11.7M Base Indo4B (23.43 GB of text)
indobenchmark/indobert-lite-large-p1 17.7M Large Indo4B (23.43 GB of text)
indobenchmark/indobert-lite-large-p2 17.7M Large Indo4B (23.43 GB of text)

如何使用

加载模型和分词器

from transformers import BertTokenizer, AutoModel
tokenizer = BertTokenizer.from_pretrained("indobenchmark/indobert-lite-large-p1")
model = AutoModel.from_pretrained("indobenchmark/indobert-lite-large-p1")

提取上下文表示

x = torch.LongTensor(tokenizer.encode('aku adalah anak [MASK]')).view(1,-1)
print(x, model(x)[0].sum())

作者

IndoBERT 的训练与评估由 Bryan Wilie*,Karissa Vincentio*,Genta Indra Winata*,Samuel Cahyawijaya*,Xiaohong Li,Zhi Yuan Lim,Sidik Soleman,Rahmad Mahendra,Pascale Fung,Syafri Bahar,Ayu Purwarianti 完成。

引用

如使用我们的工作,请引用:

@inproceedings{wilie2020indonlu,
  title={IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding},
  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},
  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},
  year={2020}
}