Wrong max_position_embeddings for roberta-large
## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.11.3
- Platform: Linux-5.13.0-7614-generic-x86_64-with-glibc2.33
- Python version: 3.8.12
- PyTorch version (GPU?): 1.9.1+cu102 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

### Who can help
@patrickvonplaten 

## Information

Model I am using (Bert, XLNet ...): roberta-large

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [x] my own modified scripts: (give details below)

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

I am using roberta-large and giving it texts that are as large as max_position_embeddings (514).
This causes an error during forward pass:
```
...venv/lib/python3.8/site-packages/torch/nn/functional.py", line 2043, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self
```

https://huggingface.co/roberta-large#preprocessing states that the number of max position embeddings are 512.
The config, however, sets them to 514. Only using 512 token large texts does work without the error.

## To reproduce

Steps to reproduce the behavior:

1. Load roberta-large using `AutoTokenizer.from_pretrained('roberta-large')` and `model = AutoModel.from_pretrained('roberta-large')`
2. Get `em = model.config.max_position_embeddings` which is 514 (given by https://huggingface.co/roberta-large/blob/main/config.json)
3. Input texts with size `em`  (514) into the model.

## Expected behavior
The `max_position_embeddings` in the config should be correct and not cause the transformer to crash.

I can provide further information if necessary.
Thank you!
Hey @Jabb0, 

While `model.config.max_position_embeddings` says 514 is the maximum allowed # of position embeddings, the actual number is 512. One should rather look at:

```python
from transformers import RobertaTokenizer
tok = RobertaTokenizer.from_pretrained("roberta-large")
tok.model_max_length  # is 512
```<|||||>cc @Narsil <|||||>Hi @patrickvonplaten,
thank you.
I am using `tokenizer.model_max_length` now.