HuggingFace镜像/indobert-base-p1
模型介绍文件和版本分析

IndoBERT 基础模型(第一阶段 - 不区分大小写)

IndoBERT 是基于 BERT 模型的印尼语最先进语言模型。该预训练模型通过掩码语言建模(MLM)目标和下一句预测(NSP)目标进行训练。

所有预训练模型

模型参数数量架构训练数据
indobenchmark/indobert-base-p1124.5MBaseIndo4B(23.43 GB 文本)
indobenchmark/indobert-base-p2124.5MBaseIndo4B(23.43 GB 文本)
indobenchmark/indobert-large-p1335.2MLargeIndo4B(23.43 GB 文本)
indobenchmark/indobert-large-p2335.2MLargeIndo4B(23.43 GB 文本)
indobenchmark/indobert-lite-base-p111.7MBaseIndo4B(23.43 GB 文本)
indobenchmark/indobert-lite-base-p211.7MBaseIndo4B(23.43 GB 文本)
indobenchmark/indobert-lite-large-p117.7MLargeIndo4B(23.43 GB 文本)
indobenchmark/indobert-lite-large-p217.7MLargeIndo4B(23.43 GB 文本)

使用方法

加载模型和分词器

from transformers import BertTokenizer, AutoModel
import torch
import torch_npu

device = torch.device('npu:0')
tokenizer = BertTokenizer.from_pretrained("indobenchmark/indobert-base-p1")
model = AutoModel.from_pretrained("indobenchmark/indobert-base-p1").to(device)

提取上下文表征

x = torch.LongTensor(tokenizer.encode('aku adalah anak [MASK]')).view(1,-1).to(device)
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}
}
下载使用量0