Marissa commited on
Commit
a1ba297
1 Parent(s): 3daa989

Preliminary model card

Browse files
Files changed (1) hide show
  1. README.md +269 -0
README.md ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - multilingual
4
+ - af
5
+ - am
6
+ - ar
7
+ - as
8
+ - az
9
+ - be
10
+ - bg
11
+ - bn
12
+ - br
13
+ - bs
14
+ - ca
15
+ - cs
16
+ - cy
17
+ - da
18
+ - de
19
+ - el
20
+ - en
21
+ - eo
22
+ - es
23
+ - et
24
+ - eu
25
+ - fa
26
+ - fi
27
+ - fr
28
+ - fy
29
+ - ga
30
+ - gd
31
+ - gl
32
+ - gu
33
+ - ha
34
+ - he
35
+ - hi
36
+ - hr
37
+ - hu
38
+ - hy
39
+ - id
40
+ - is
41
+ - it
42
+ - ja
43
+ - jv
44
+ - ka
45
+ - kk
46
+ - km
47
+ - kn
48
+ - ko
49
+ - ku
50
+ - ky
51
+ - la
52
+ - lo
53
+ - lt
54
+ - lv
55
+ - mg
56
+ - mk
57
+ - ml
58
+ - mn
59
+ - mr
60
+ - ms
61
+ - my
62
+ - ne
63
+ - nl
64
+ - no
65
+ - om
66
+ - or
67
+ - pa
68
+ - pl
69
+ - ps
70
+ - pt
71
+ - ro
72
+ - ru
73
+ - sa
74
+ - sd
75
+ - si
76
+ - sk
77
+ - sl
78
+ - so
79
+ - sq
80
+ - sr
81
+ - su
82
+ - sv
83
+ - sw
84
+ - ta
85
+ - te
86
+ - th
87
+ - tl
88
+ - tr
89
+ - ug
90
+ - uk
91
+ - ur
92
+ - uz
93
+ - vi
94
+ - xh
95
+ - yi
96
+ - zh
97
+ ---
98
+
99
+ # xlm-roberta-large-finetuned-conll03-english
100
+
101
+ # Table of Contents
102
+
103
+ 1. [Model Details](#model-details)
104
+ 2. [Uses](#uses)
105
+ 3. [Bias, Risks, and Limitations](#bias-risks-and-limitations)
106
+ 4. [Training](#training)
107
+ 5. [Evaluation](#evaluation)
108
+ 6. [Model Examination](#model-examination)
109
+ 7. [Environmental Impact](#environmental-impact)
110
+ 8. [Technical Specifications](#technical-specifications)
111
+ 9. [Citation](#citation)
112
+ 10. [Glossary](#glossary)
113
+ 11. [More Information](#more-information)
114
+ 12. [Model Card Authors](#model-card-authors)
115
+ 13. [Model Card Contact](#model-card-contact)
116
+ 14. [How To Get Started With the Model](#how-to-get-started-with-the-model)
117
+
118
+
119
+ # Model Details
120
+
121
+ ## Model Description: The XLM-RoBERTa model was proposed in [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) by Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov. It is based on Facebook's RoBERTa model released in 2019. It is a large multi-lingual language model, trained on 2.5TB of filtered CommonCrawl data. This model is [XLM-RoBERTa-large](https://huggingface.co/xlm-roberta-large) fine-tuned with the [conll2003](https://huggingface.co/datasets/conll2003) dataset in English.
122
+
123
+ - **Developed by:** See [associated paper](https://arxiv.org/abs/1911.02116)
124
+ - **Model type:** Multi-lingual language model
125
+ - **Language(s) (NLP) or Countries (images):** XLM-RoBERTa is a multilingual model trained on 100 different languages; see [GitHub Repo](https://github.com/facebookresearch/fairseq/tree/main/examples/xlmr) for full list; model is fine-tuned on a dataset in English
126
+ - **License:** More information needed
127
+ - **Related Models:** [RoBERTa](https://huggingface.co/roberta-base), [XLM](https://huggingface.co/docs/transformers/model_doc/xlm)
128
+ - **Parent Model:** [XLM-RoBERTa-large](https://huggingface.co/xlm-roberta-large)
129
+ - **Resources for more information:**
130
+ -[GitHub Repo](https://github.com/facebookresearch/fairseq/tree/main/examples/xlmr)
131
+ -[Associated Paper](https://arxiv.org/abs/1911.02116)
132
+
133
+ # Uses
134
+
135
+ ## Direct Use
136
+
137
+ The model is a language model. The model can be used for token classification, a natural language understanding task in which a label is assigned to some tokens in a text.
138
+
139
+ ## Downstream Use
140
+
141
+ Potential downstream use cases include Named Entity Recognition (NER) and Part-of-Speech (PoS) tagging. To learn more about token classification and other potential downstream use cases, see the Hugging Face [token classification docs](https://huggingface.co/tasks/token-classification).
142
+
143
+ ## Out-of-Scope Use
144
+
145
+ The model should not be used to intentionally create hostile or alienating environments for people.
146
+
147
+ # Bias, Risks, and Limitations
148
+
149
+ **CONTENT WARNING: Readers should be made aware that language generated by this model may be disturbing or offensive to some and may propagate historical and current stereotypes.**
150
+
151
+ Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). In the context of tasks relevant to this model, [Mishra et al. (2020)](https://arxiv.org/pdf/2008.03415.pdf) explore social biases in NER systems for English and find that there is systematic bias in existing NER systems in that they fail to identify named entities from different demographic groups (though this paper did not look at BERT). For example, using a sample sentence from [Mishra et al. (2020)](https://arxiv.org/pdf/2008.03415.pdf):
152
+
153
+ ```python
154
+ >>> from transformers import pipeline
155
+ >>> tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
156
+ >>> model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
157
+ >>> classifier = pipeline("ner", model=model, tokenizer=tokenizer)
158
+ >>> classifier("Alya told Jasmine that Andrew could pay with cash..")
159
+ [{'end': 2,
160
+ 'entity': 'I-PER',
161
+ 'index': 1,
162
+ 'score': 0.9997861,
163
+ 'start': 0,
164
+ 'word': '▁Al'},
165
+ {'end': 4,
166
+ 'entity': 'I-PER',
167
+ 'index': 2,
168
+ 'score': 0.9998591,
169
+ 'start': 2,
170
+ 'word': 'ya'},
171
+ {'end': 16,
172
+ 'entity': 'I-PER',
173
+ 'index': 4,
174
+ 'score': 0.99995816,
175
+ 'start': 10,
176
+ 'word': '▁Jasmin'},
177
+ {'end': 17,
178
+ 'entity': 'I-PER',
179
+ 'index': 5,
180
+ 'score': 0.9999584,
181
+ 'start': 16,
182
+ 'word': 'e'},
183
+ {'end': 29,
184
+ 'entity': 'I-PER',
185
+ 'index': 7,
186
+ 'score': 0.99998057,
187
+ 'start': 23,
188
+ 'word': '▁Andrew'}]
189
+ ```
190
+
191
+ ## Recommendations
192
+
193
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
194
+
195
+ # Training
196
+
197
+ See the following resources for training data and training procedure details:
198
+ - [XLM-RoBERTa-large model card](https://huggingface.co/xlm-roberta-large)
199
+ - [CoNLL-2003 data card](https://huggingface.co/datasets/conll2003)
200
+ - [Associated paper](https://arxiv.org/pdf/1911.02116.pdf)
201
+
202
+ # Evaluation
203
+
204
+ See the [associated paper](https://arxiv.org/pdf/1911.02116.pdf) for evaluation details.
205
+
206
+ # Environmental Impact
207
+
208
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
209
+
210
+ - **Hardware Type:** 500 32GB Nvidia V100 GPUs (from the [associated paper](https://arxiv.org/pdf/1911.02116.pdf))
211
+ - **Hours used:** More information needed
212
+ - **Cloud Provider:** More information needed
213
+ - **Compute Region:** More information needed
214
+ - **Carbon Emitted:** More information needed
215
+
216
+ # Technical Specifications
217
+
218
+ See the [associated paper](https://arxiv.org/pdf/1911.02116.pdf) for further details.
219
+
220
+ # Citation
221
+
222
+ **BibTeX:**
223
+
224
+ ```bibtex
225
+ @article{conneau2019unsupervised,
226
+ title={Unsupervised Cross-lingual Representation Learning at Scale},
227
+ 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},
228
+ journal={arXiv preprint arXiv:1911.02116},
229
+ year={2019}
230
+ }
231
+ ```
232
+
233
+ **APA:**
234
+ - 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.
235
+
236
+ # Model Card Authors
237
+
238
+ This model card was written by the team at Hugging Face.
239
+
240
+ # How to Get Started with the Model
241
+
242
+ Use the code below to get started with the model. You can use this model directly within a pipeline for NER.
243
+
244
+ <details>
245
+ <summary> Click to expand </summary>
246
+ ```python
247
+ >>> from transformers import AutoTokenizer, AutoModelForTokenClassification
248
+ >>> from transformers import pipeline
249
+ >>> tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
250
+ >>> model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-large-finetuned-conll03-english")
251
+ >>> classifier = pipeline("ner", model=model, tokenizer=tokenizer)
252
+ >>> classifier("Hello I'm Omar and I live in Zürich.")
253
+
254
+ [{'end': 14,
255
+ 'entity': 'I-PER',
256
+ 'index': 5,
257
+ 'score': 0.9999175,
258
+ 'start': 10,
259
+ 'word': '▁Omar'},
260
+ {'end': 35,
261
+ 'entity': 'I-LOC',
262
+ 'index': 10,
263
+ 'score': 0.9999906,
264
+ 'start': 29,
265
+ 'word': '▁Zürich'}]
266
+ ```
267
+ </details>
268
+
269
+ More information needed