模型:
XLM-RoBERTa 模型由Alexis Conneau、Kartikay Khandelwal、Naman Goyal、Vishrav Chaudhary、Guillaume Wenzek、Francisco Guzmán、Edouard Grave、Myle Ott、Luke Zettlemoyer和Veselin Stoyanov于2019年提出。它基于Facebook于2019年发布的RoBERTa模型。该模型是在2.5TB的经过过滤的CommonCrawl数据上进行训练的大型多语言语言模型。该模型是通过使用英语数据集进行微调的。
该模型是一个语言模型。模型可用于进行标记分类,这是一种将标签分配给文本中的某些标记的自然语言理解任务。
潜在的下游使用案例包括命名实体识别(NER)和词性标注(PoS)。要了解有关标记分类和其他潜在的下游使用案例的更多详细信息,请参阅Hugging Face token classification docs 。
不应将该模型用于有意创建敌对或疏远人们的环境。
内容警告:读者应该意识到该模型生成的语言可能对某些人来说令人不安或冒犯,并可能传播历史和当前的刻板印象。
对语言模型的偏见和公平性问题进行了大量的研究(参见 Sheng et al. (2021) 和 Bender et al. (2021) )。在与该模型相关的任务背景下, Mishra et al. (2020) 探索了英文NER系统中的社会偏见,并发现现有的NER系统存在系统偏见,无法识别来自不同人口群体的命名实体(尽管该论文没有涉及BERT)。例如,使用 Mishra et al. (2020) 中的一个样本句子:
>>> from transformers import pipeline
>>> tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
>>> model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
>>> classifier = pipeline("ner", model=model, tokenizer=tokenizer)
>>> classifier("Alya told Jasmine that Andrew could pay with cash..")
[{'end': 2,
'entity': 'I-PER',
'index': 1,
'score': 0.9997861,
'start': 0,
'word': '▁Al'},
{'end': 4,
'entity': 'I-PER',
'index': 2,
'score': 0.9998591,
'start': 2,
'word': 'ya'},
{'end': 16,
'entity': 'I-PER',
'index': 4,
'score': 0.99995816,
'start': 10,
'word': '▁Jasmin'},
{'end': 17,
'entity': 'I-PER',
'index': 5,
'score': 0.9999584,
'start': 16,
'word': 'e'},
{'end': 29,
'entity': 'I-PER',
'index': 7,
'score': 0.99998057,
'start': 23,
'word': '▁Andrew'}]
用户(直接和下游用户)应该了解模型的风险、偏见和局限性。
有关训练数据和训练过程详细信息,请参阅以下资源:
有关评估详细信息,请参见 associated paper 。
可以使用 Machine Learning Impact calculator 中提出的方法估算碳排放量。
有关更多细节,请参阅 associated paper 。
BibTeX:
@article{conneau2019unsupervised,
title={Unsupervised Cross-lingual Representation Learning at Scale},
author={Conneau, Alexis and Khandelwal, Kartikay and Goyal, Naman and Chaudhary, Vishrav and Wenzek, Guillaume and Guzm{\'a}n, Francisco and Grave, Edouard and Ott, Myle and Zettlemoyer, Luke and Stoyanov, Veselin},
journal={arXiv preprint arXiv:1911.02116},
year={2019}
}
APA:
此模型卡片由Hugging Face团队撰写。
使用以下代码开始使用模型。您可以直接在NER管道中使用此模型。
点击展开>>> from transformers import AutoTokenizer, AutoModelForTokenClassification
>>> from transformers import pipeline
>>> tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
>>> model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
>>> classifier = pipeline("ner", model=model, tokenizer=tokenizer)
>>> classifier("Hello I'm Omar and I live in Zürich.")
[{'end': 14,
'entity': 'I-PER',
'index': 5,
'score': 0.9999175,
'start': 10,
'word': '▁Omar'},
{'end': 35,
'entity': 'I-LOC',
'index': 10,
'score': 0.9999906,
'start': 29,
'word': '▁Zürich'}]