🚀 Indo-roberta-indonli
Indo-roberta-indonli 是一个基于 Indo-roberta 模型的自然语言推理分类器。它在 IndoNLI 数据集上进行训练。所使用的模型为 Indo-roberta,并通过迁移学习转换为自然推理分类器模型。该模型使用 GitHub 仓库中提供的验证集、测试层数据集和专家测试数据集进行测试,结果如下所示。
✨ 主要特性
- 基于强大的 Indo-roberta 模型,在自然语言推理任务上表现出色。
- 在 IndoNLI 数据集上进行训练,具有良好的泛化能力。
📦 安装指南
文档未提及安装步骤,此处跳过。
💻 使用示例
作为自然语言推理分类器
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 lahir di Kota Medan, Sumatera Utara, 27 April 1907. Ia meninggal di Surakarta, Jawa Tengah, pada 19 Desember 1948 dalam usia 41 tahun. </s></s> Amir Sjarifoeddin Harahap masih hidup.")
📚 详细文档
结果
数据集 |
准确率 |
F1 值 |
精确率 |
召回率 |
测试层数据集 |
0.74329 |
0.74075 |
0.74283 |
0.74133 |
专家测试数据集 |
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 |
🔧 技术细节
文档未提供足够详细的技术实现细节,此处跳过。
📄 许可证
本项目采用 MIT 许可证。
⚠️ 重要提示
需要考虑预训练的 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",
}