language: zh
UmBERTo 维基百科无大小写模型
UmBERTo 是一个基于Roberta架构的语言模型,训练于大规模意大利语语料库,并采用两种创新技术:SentencePiece和全词掩码(Whole Word Masking)。现已在github.com/huggingface/transformers上提供。
Marco Lodola创作的翁贝托·埃科纪念碑,亚历山德里亚,2019年
数据集
UmBERTo-Wikipedia-Uncased模型训练使用的语料库相对较小(约7GB),提取自意大利语维基百科。
预训练模型
模型 |
全词掩码 |
区分大小写 |
分词器 |
词汇量 |
训练步数 |
下载链接 |
umberto-wikipedia-uncased-v1 |
是 |
是 |
SPM |
32K |
100k |
链接 |
该模型采用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 |
使用示例
通过AutoModel和AutoTokenizer加载UmBERTo维基百科无大小写模型:
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("翁贝托·埃科是位伟大的作家")
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("翁贝托·埃科曾<mask>一位伟大作家")
引用说明
所有原始数据集均为公开资源或经所有者授权发布,均遵循CC0或CCBY许可协议。
- UD Italian-ISDT数据集 Github
- UD Italian-ParTUT数据集 Github
- I-CAB(意大利内容标注库),EvalITA 页面
- WIKINER 页面 ,论文
@inproceedings {magnini2006annotazione,
title = {意大利语语料库中的概念内容标注: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 = {SILFI 2006会议论文集},
year = {2006}
}
@inproceedings {magnini2006cab,
title = {I-CAB:意大利内容标注库},
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}
}
作者
Loreto Parisi:loreto at musixmatch dot com
, loretoparisi
Simone Francia:simone.francia at musixmatch dot com
, simonefrancia
Paolo Magnani:paul.magnani95 at gmail dot com
, paulthemagno
关于Musixmatch AI

我们在musixmatch从事机器学习与人工智能研究
关注我们的Twitter Github