Roberta for NER task
## ❓ Questions & Help

Hello, is there a way to use Roberta model for NER task? Is there a script somewhere? 

Thank you.
Hi @militu you should take a look at this long thread discussing NER for BERT (should be the same for RoBERTa): https://github.com/huggingface/pytorch-transformers/issues/64<|||||>But there is not RobertaForTokenClassification and TFRobertaForTokenClassification like BertForTokenClassification and TFBertForTokenClassification. <|||||>Not yet indeed, do you want to submit a PR copying these models from Bert?<|||||>@thomwolf is this something the team is open to reviewing? I can open a PR that (ambitiously?) adds both `RobertaForTokenClassification` and `TFRobertaForTokenClassification` in the next few days/week.<|||||>Yes, sure (though I won't commit to a specific delay for reviewing hahaha).

Adding `RobertaForTokenClassification` and `TFRobertaForTokenClassification` should be very simple and basically kept as a copy-past from Bert similar models.

The most important here is actually to finish the PR adding token-to-string-character mappings (#1274 by @michaelrglass) so we can translate NER labels to token labels for training. Though I think there may also be a simpler way to do that by modifying RoBERTa/GPT-2 tokenizers to accept tokenized word but this require some knowledge of the internal functioning of GPT-2 tokenizer.<|||||>Created a PR and looking for feedback. Hoping to jump on the `run_ner.py` script as well tonight/tomorrow.<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
<|||||>This was done and probably should be closed.