HuggingFace镜像/roberta-large-NER
模型介绍文件和版本分析
下载使用量0

xlm-roberta-large-finetuned-conll03-english

目录

  1. 模型详情
  2. 应用
  3. 偏见、风险与限制
  4. 训练
  5. 评估
  6. 环境影响
  7. 技术规格
  8. 引用
  9. 模型卡片作者
  10. 如何开始使用模型

模型详情

模型描述

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 英文数据集上的微调版。

  • 开发者: 参见 相关论文
  • 模型类型: 多语言语言模型
  • 语言(NLP)或国家(图像): XLM-RoBERTa 是在 100 种不同语言上训练的多语言模型;完整的列表请见 GitHub 仓库;该模型在英文数据集上进行微调
  • 许可: 需要更多信息
  • 相关模型: RoBERTa,XLM
    • 父模型: XLM-RoBERTa-large
  • 更多信息资源:
    • GitHub 仓库
    • 相关论文

应用

直接应用

该模型是一个语言模型。它可以用于词性分类,这是一种自然语言理解任务,为文本中的某些词分配标签。

派生应用

潜在的派生应用案例包括命名实体识别(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'}]

建议

用户(包括直接用户和下游用户)都应了解模型的风险、偏见和局限性。

训练

有关训练数据和训练过程详情,请参阅以下资源:

  • XLM-RoBERTa-large 模型卡片
  • CoNLL-2003 数据卡片
  • 相关论文

评估

具体评估详情,请参阅相关论文。

环境影响

可以使用 机器学习影响计算器(Lacoste et al. (2019))来估算碳排放量。

  • 硬件类型: 500 台 32GB Nvidia 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). 大规模无监督跨语言表征学习。arXiv 预印本 arXiv:1911.02116。

模型卡片作者

本模型卡片由 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'}]

</详细信息>