说明文档
xlm-roberta-large-finetuned-conll03-english
目录
模型详情
模型描述
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中提出。它基于Facebook于2019年发布的RoBERTa模型。这是一个大型多语言语言模型,基于2.5TB过滤后的CommonCrawl数据训练而成。本模型是XLM-RoBERTa-large在conll2003英语数据集上微调而成。
- 开发者: 参见相关论文
- 模型类型: 多语言语言模型
- 语言(NLP)或国家(图像): XLM-RoBERTa是一个在100种不同语言上训练的多语言模型;完整语言列表请参见GitHub仓库;模型在英语数据集上进行了微调
- 许可证: 需要更多信息
- 相关模型: RoBERTa、XLM
- 父模型: XLM-RoBERTa-large
- 更多信息资源:
用途
直接使用
该模型是一个语言模型。该模型可用于标记分类,这是一项为文本中的某些标记分配标签的自然语言理解任务。
下游使用
潜在的下游用例包括命名实体识别(NER)和词性标注(PoS)。要了解更多关于标记分类和其他潜在下游用例的信息,请参阅Hugging Face的标记分类文档。
超出范围的使用
该模型不应被用于故意为人们创造敌对或排斥的环境。
偏见、风险与局限性
内容警告:读者应注意,本模型生成的语言内容可能对某些人造成困扰或冒犯,并可能传播历史和当代的刻板印象。
大量研究已探索了语言模型中的偏见和公平性问题(参见例如Sheng等人(2021)和Bender等人(2021))。在涉及本模型的任务背景下,Mishra等人(2020)探索了英语NER系统中的社会偏见,发现现有NER系统存在系统性偏见——它们无法识别不同人口群体中的命名实体(尽管该论文未研究BERT)。例如,使用Mishra等人(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等人(2019)提出的机器学习影响计算器进行估算。
- 硬件类型: 500块32GB英伟达V100 GPU(来自相关论文)
- 使用时长: 需要更多信息
- 云服务提供商: 需要更多信息
- 计算区域: 需要更多信息
- 碳排放量: 需要更多信息
技术规格
更多技术规格详情请参阅相关论文。
引用
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:
- Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., ... & Stoyanov, V. (2019). Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116.
模型卡作者
本模型卡由Hugging Face团队编写。
如何开始使用模型
使用以下代码开始使用该模型。您可以在NER任务中直接使用此模型。
<details> <summary> 点击展开 </summary>
>>> 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'}]
</details>
FacebookAI/xlm-roberta-large-finetuned-conll03-english
作者 FacebookAI
创建时间: 2022-03-02 23:29:04+00:00
更新时间: 2024-02-19 12:48:53+00:00
在 Hugging Face 上查看