loss_fct = CrossEntropyLoss(ignore_index=-1) for BERT/RoBERTa MaksedLM
## 🐛 Bug

<!-- Important information -->

The models I am using (Bert, RoBERTa....):

Language I am using the model on (English):

The problem arise when I tried to fine-tune the model using `MaskedLM` given the `masked_lm_labels`:

It seems that the model forward loop specifies that `loss_fct = CrossEntropyLoss(ignore_index=-1)` where the instructions previously stated masked ids are -100. This gives a "device-side assert triggered " error for GPU training and "Assertion `cur_target >= 0 && cur_target < n_classes' failed.  at /pytorch/aten/src/THNN/generic/ClassNLLCriterion.c:97" for CPU training.


* [modeling_bert.py / modeling_roberta.py ] the official example scripts: for `RobertaForMaskedLM` / `BertForMaskedLM` we have `loss_fct = CrossEntropyLoss(ignore_index=-1)`
* [ ] my own modified scripts: set ignore_index = -100 or simply remove it

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [ ] my own task or dataset: (give details)

## To Reproduce

Steps to reproduce the behavior:

1. run the "run_lm_finetuning.py" file in the examples
2. It seems that if we use `pip install transformers` and get transformers 2.3.0  We would have this error. If installing from source code, the error is gone
3.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well. -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

* OS: Linux 18.04.3
* Python version:  3.6
* PyTorch version:  1.3.1
* PyTorch Transformers version (or branch):  2.3.0
* Using GPU ? yes
* Distributed or parallel setup ? nope
* Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->

Hello! This is due to the pull request #2130. I believe you're running the examples with transformers 2.3.0 whereas they're maintained to work with the current master branch. Please install the library from master:

```pip install git+https://github.com/huggingface/transformers```

in order to get the examples working with the source code.<|||||>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.
