🚀 西班牙RoBERTa-base模型:基于BNE预训练,针对西班牙问答语料库(SQAC)微调
本模型基于 roberta-base-bne 模型微调而来,用于解决西班牙语的问答任务,在相关语料库上展现出了良好的性能。
🚀 快速开始
代码示例
from transformers import pipeline
nlp = pipeline("question-answering", model="PlanTL-GOB-ES/roberta-base-bne-sqac")
text = "¿Dónde vivo?"
context = "Me llamo Wolfgang y vivo en Berlin"
qa_results = nlp(text, context)
print(qa_results)
✨ 主要特性
- 语言适配:专为西班牙语问答任务设计,基于大规模西班牙语语料库预训练。
- 微调优化:在西班牙问答语料库(SQAC)上进行微调,提升问答性能。
📦 安装指南
文档未提及安装步骤,暂不提供。
💻 使用示例
基础用法
from transformers import pipeline
nlp = pipeline("question-answering", model="PlanTL-GOB-ES/roberta-base-bne-sqac")
text = "¿Dónde vivo?"
context = "Me llamo Wolfgang y vivo en Berlin"
qa_results = nlp(text, context)
print(qa_results)
📚 详细文档
模型描述
roberta-base-bne-sqac 是一个用于西班牙语的问答(QA)模型,它基于 roberta-base-bne 模型微调而来。而 roberta-base-bne 是一个 RoBERTa 基础模型,使用了截至目前已知的最大西班牙语语料库进行预训练,该语料库包含总计 570GB 的干净且去重的文本,这些文本是从西班牙国家图书馆(Biblioteca Nacional de España)在 2009 年至 2019 年期间进行的网络爬取数据中处理而来。
预期用途和限制
roberta-base-bne-sqac 模型可用于抽取式问答。不过,该模型受其训练数据集的限制,可能无法在所有用例中都有良好的泛化能力。
局限性和偏差
在提交时,尚未采取措施来评估模型中嵌入的偏差。但我们深知,由于语料库是通过在多个网络源上进行爬取技术收集的,我们的模型可能存在偏差。我们计划在未来对这些领域进行研究,如果研究完成,此模型卡片将进行更新。
训练
训练数据
我们使用了名为 SQAC语料库 的西班牙语问答数据集进行训练和评估。
训练过程
该模型以 16 的批量大小和 5e - 5 的学习率训练了 5 个 epoch。然后,我们使用相应开发集上的下游任务指标选择了最佳检查点,最后在测试集上进行评估。
评估结果
我们在 SQAC 测试集上针对标准的多语言和单语言基线对 roberta-base-bne-sqac 进行了评估:
模型 |
SQAC (F1) |
roberta-large-bne-sqac |
82.02 |
roberta-base-bne-sqac |
79.23 |
BETO |
79.23 |
mBERT |
75.62 |
BERTIN |
76.78 |
ELECTRA |
73.83 |
更多详细信息,请查看官方 GitHub 仓库 中的微调与评估脚本。
附加信息
作者
巴塞罗那超级计算中心的文本挖掘单元(TeMU)(bsc - temu@bsc.es)
联系信息
如需进一步信息,请发送电子邮件至 <plantl - gob - es@bsc.es>
版权
版权归西班牙数字化与人工智能国务秘书处(SEDIA)所有(2022)
许可信息
Apache 许可证,版本 2.0
资金支持
这项工作由西班牙数字化与人工智能国务秘书处(SEDIA)在 Plan - TL 框架内资助。
引用信息
如果您使用此模型,请引用我们的 论文:
@article{,
abstract = {We want to thank the National Library of Spain for such a large effort on the data gathering and the Future of Computing Center, a
Barcelona Supercomputing Center and IBM initiative (2020). This work was funded by the Spanish State Secretariat for Digitalization and Artificial
Intelligence (SEDIA) within the framework of the Plan-TL.},
author = {Asier Gutiérrez Fandiño and Jordi Armengol Estapé and Marc Pàmies and Joan Llop Palao and Joaquin Silveira Ocampo and Casimiro Pio Carrino and Carme Armentano Oller and Carlos Rodriguez Penagos and Aitor Gonzalez Agirre and Marta Villegas},
doi = {10.26342/2022-68-3},
issn = {1135-5948},
journal = {Procesamiento del Lenguaje Natural},
keywords = {Artificial intelligence,Benchmarking,Data processing.,MarIA,Natural language processing,Spanish language modelling,Spanish language resources,Tractament del llenguatge natural (Informàtica),Àrees temàtiques de la UPC::Informàtica::Intel·ligència artificial::Llenguatge natural},
publisher = {Sociedad Española para el Procesamiento del Lenguaje Natural},
title = {MarIA: Spanish Language Models},
volume = {68},
url = {https://upcommons.upc.edu/handle/2117/367156#.YyMTB4X9A-0.mendeley},
year = {2022},
}
免责声明
本仓库中发布的模型旨在用于通用目的,并可供第三方使用。这些模型可能存在偏差和/或其他不良扭曲。
当第三方使用这些模型(或基于这些模型的系统)部署或向其他方提供系统和/或服务,或成为模型的用户时,他们应注意,减轻使用这些模型所产生的风险是他们的责任,并且在任何情况下,都应遵守适用的法规,包括有关人工智能使用的法规。
在任何情况下,模型的所有者(SEDIA - 数字化与人工智能国务秘书处)和创建者(BSC - 巴塞罗那超级计算中心)均不对第三方使用这些模型所产生的任何结果负责。
🔧 技术细节
文档未提供具体技术细节,暂不提供。
📄 许可证
本模型使用 Apache 许可证,版本 2.0。