🚀 xlm-roberta-large-finetuned-conll03-english
這是一個基於XLM - RoBERTa-large模型,使用英文conll2003數據集微調的多語言語言模型,可用於分詞分類等自然語言處理任務。
🚀 快速開始
使用以下代碼開始使用該模型。你可以直接在命名實體識別(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'}]
✨ 主要特性
📚 詳細文檔
模型詳情
模型描述
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
- 更多信息資源:
用途
直接使用
該模型是一個語言模型,可用於分詞分類,這是一種自然語言理解任務,為文本中的某些分詞分配標籤。
下游使用
潛在的下游用例包括命名實體識別(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的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). Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116.
模型卡片作者
此模型卡片由Hugging Face團隊編寫。