XLM-RoBERTa 模型在 Alexis Conneau、Kartikay Khandelwal、Naman Goyal、Vishrav Chaudhary、Guillaume Wenzek、Francisco Guzmán、Edouard Grave、Myle Ott、Luke Zettlemoyer 和 Veselin Stoyanov 的论文《Unsupervised Cross-lingual Representation Learning at Scale》中提出。该模型基于 2019 年 Facebook 发布的 RoBERTa 模型。这是一个大规模的多语言语言模型,在经过过滤的 2.5TB CommonCrawl 数据上训练而成。该模型是 XLM-RoBERTa-large 在 conll2003 英文数据集上的微调版。
该模型是一个语言模型。它可以用于词性分类,这是一种自然语言理解任务,为文本中的某些词分配标签。
潜在的派生应用案例包括命名实体识别(NER)和词性标注。要了解关于词性分类和其他潜在派生应用的更多信息,请参见 Hugging Face 的 词性分类文档。
该模型不应被用于有意为人们创造敌对或疏远的环境。
内容警告:读者应当意识到,该模型生成的语言可能对某些人来说是令人不安或冒犯的,并可能传播历史和当前的刻板印象。
大量研究探讨了语言模型中的偏见和公平性问题(例如,参见 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'}]用户(包括直接用户和下游用户)都应了解模型的风险、偏见和局限性。
有关训练数据和训练过程详情,请参阅以下资源:
具体评估详情,请参阅相关论文。
可以使用 机器学习影响计算器(Lacoste et al. (2019))来估算碳排放量。
进一步详情,请参阅相关论文。
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'}]</详细信息>