🚀 UmBERTo Wikipedia Uncased
UmBERTo是一个基于Roberta的语言模型,在大型意大利语语料库上进行训练,并采用了两种创新方法:SentencePiece和全词掩码(Whole Word Masking)。现在可在 github.com/huggingface/transformers 获取。
Marco Lodola, Monument to Umberto Eco, Alessandria 2019
🚀 快速开始
你可以按照以下步骤快速使用UmBERTo Wikipedia Uncased模型。
✨ 主要特性
- 基于Roberta架构,在大型意大利语语料库上训练。
- 采用SentencePiece和全词掩码(Whole Word Masking)两种创新方法。
📦 安装指南
文档未提及安装步骤,可参考Hugging Face Transformers库的安装方式来使用该模型。
💻 使用示例
基础用法
import torch
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("Musixmatch/umberto-wikipedia-uncased-v1")
umberto = AutoModel.from_pretrained("Musixmatch/umberto-wikipedia-uncased-v1")
encoded_input = tokenizer.encode("Umberto Eco è stato un grande scrittore")
input_ids = torch.tensor(encoded_input).unsqueeze(0)
outputs = umberto(input_ids)
last_hidden_states = outputs[0]
高级用法
from transformers import pipeline
fill_mask = pipeline(
"fill-mask",
model="Musixmatch/umberto-wikipedia-uncased-v1",
tokenizer="Musixmatch/umberto-wikipedia-uncased-v1"
)
result = fill_mask("Umberto Eco è <mask> un grande scrittore")
📚 详细文档
数据集
UmBERTo-Wikipedia-Uncased训练是在一个相对较小的语料库(约7GB)上进行的,该语料库从 Wikipedia-ITA 中提取。
预训练模型
属性 |
详情 |
模型类型 |
umberto-wikipedia-uncased-v1 |
全词掩码(WWM) |
YES |
是否区分大小写 |
YES |
分词器 |
SPM |
词表大小 |
32K |
训练步数 |
100k |
下载链接 |
Link |
该模型使用 SentencePiece 和全词掩码进行训练。
下游任务
这些结果是关于umberto-wikipedia-uncased模型的。所有详细信息可在 Umberto 官方页面查看。
命名实体识别(NER)
数据集 |
F1 |
精确率 |
召回率 |
准确率 |
ICAB-EvalITA07 |
86.240 |
85.939 |
86.544 |
98.534 |
WikiNER-ITA |
90.483 |
90.328 |
90.638 |
98.661 |
词性标注(POS)
数据集 |
F1 |
精确率 |
召回率 |
准确率 |
UD_Italian-ISDT |
98.563 |
98.508 |
98.618 |
98.717 |
UD_Italian-ParTUT |
97.810 |
97.835 |
97.784 |
98.060 |
📄 许可证
所有原始数据集都是公开可用的,或者是在所有者授权下发布的。这些数据集都在CC0或CCBY许可证下发布。
- UD Italian-ISDT数据集 Github
- UD Italian-ParTUT数据集 Github
- I-CAB(意大利语内容标注库),EvalITA 页面
- WIKINER 页面 , 论文
@inproceedings {magnini2006annotazione,
title = {Annotazione di contenuti concettuali in un corpus italiano: I - CAB},
author = {Magnini,Bernardo and Cappelli,Amedeo and Pianta,Emanuele and Speranza,Manuela and Bartalesi Lenzi,V and Sprugnoli,Rachele and Romano,Lorenza and Girardi,Christian and Negri,Matteo},
booktitle = {Proc.of SILFI 2006},
year = {2006}
}
@inproceedings {magnini2006cab,
title = {I - CAB: the Italian Content Annotation Bank.},
author = {Magnini,Bernardo and Pianta,Emanuele and Girardi,Christian and Negri,Matteo and Romano,Lorenza and Speranza,Manuela and Lenzi,Valentina Bartalesi and Sprugnoli,Rachele},
booktitle = {LREC},
pages = {963--968},
year = {2006},
organization = {Citeseer}
}
👥 作者
🌟 关于Musixmatch AI
我们在 musixmatch 进行机器学习和人工智能研究。
在 Twitter Github 上关注我们。