语言: 印尼语
标签:
- roberta
许可证: mit
数据集:
- indonli
小部件示例:
- 文本: "Amir Sjarifoeddin Harahap 1907年4月27日出生于北苏门答腊省棉兰市,1948年12月19日于中爪哇省梭罗逝世,享年41岁。 Amir Sjarifoeddin Harahap依然在世。"
Indo-roberta-indonli
Indo-roberta-indonli是基于Indo-roberta模型的自然语言推理分类器,使用IndoNLI数据集训练。该模型通过迁移学习将预训练的Indo-roberta转化为自然语言推理分类器,并在GitHub仓库提供的验证集、测试集(Test Lay和Test Expert)上进行了性能测试,结果如下:
测试结果
数据集 |
准确率 |
F1值 |
精确率 |
召回率 |
Test Lay |
0.74329 |
0.74075 |
0.74283 |
0.74133 |
Test Expert |
0.6115 |
0.60543 |
0.63924 |
0.61742 |
模型训练
训练参数:5个周期,批量大小16,学习率2e-5,权重衰减0.01。各周期指标如下:
周期 |
训练损失 |
验证损失 |
准确率 |
F1值 |
精确率 |
召回率 |
1 |
0.942500 |
0.658559 |
0.737369 |
0.735552 |
0.735488 |
0.736679 |
2 |
0.649200 |
0.645290 |
0.761493 |
0.759593 |
0.762784 |
0.759642 |
3 |
0.437100 |
0.667163 |
0.766045 |
0.763979 |
0.765740 |
0.763792 |
4 |
0.282000 |
0.786683 |
0.764679 |
0.761802 |
0.762011 |
0.761684 |
5 |
0.193500 |
0.925717 |
0.765134 |
0.763127 |
0.763560 |
0.763489 |
使用方法
作为NLI分类器
from transformers import pipeline
pretrained_name = "StevenLimcorn/indonesian-roberta-indonli"
nlp = pipeline(
"zero-shot-classification",
model=pretrained_name,
tokenizer=pretrained_name
)
nlp("Amir Sjarifoeddin Harahap 1907年4月27日出生于北苏门答腊省棉兰市,1948年12月19日于中爪哇省梭罗逝世,享年41岁。</s></s> Amir Sjarifoeddin Harahap依然在世。")
免责声明
请注意,预训练RoBERTa模型和INDONLI
数据集可能存在的偏见会影响本模型的输出结果。
作者
Indonesian RoBERTa Base IndoNLI由Steven Limcorn训练和评估,所有计算与开发均在Google Colaboratory的免费GPU资源上完成。
参考文献
使用数据集来自IndoNLI:
@inproceedings{indonli,
title = "IndoNLI: A Natural Language Inference Dataset for Indonesian",
author = "Mahendra, Rahmad and Aji, Alham Fikri and Louvan, Samuel and Rahman, Fahrurrozi and Vania, Clara",
booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2021",
publisher = "Association for Computational Linguistics",
}