

TITLE
Warning tells you you will get indexing errors in T5 for going beyond max length

COMMENTS
1

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 1
rocket: 0
eyes: 0

BODY
### System Info

```shell
- `transformers` version: 4.16.2
- Python version: 3.8.12
```


### Who can help?

@patrickvonplaten @saul

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

To reproduce:

```python
>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("t5-base")
>>> inputs = tokenizer("foo " * 2000, return_tensors="pt")
Outputs `Token indices sequence length is longer than the specified maximum sequence length for this model (4001 > 512). Running this sequence through the model will result in indexing errors`
```
```python
>>> from transformers import AutoModelForSeq2SeqLM
>>> model = AutoModelForSeq2SeqLM.from_pretrained("t5-base")
>>> model.generate(**inputs)
tensor([[   0, 5575,   32, 5575,   32, 5575,   32, 5575,   32, 5575,   32, 5575,
           32, 5575,   32, 5575,   32, 5575,   32, 5575]])
```
No indexing errors

### Expected behavior
The warning is wrong for T5 since it uses relative positional embeddings.
I would expect no warning, or otherwise, a warning about memory usage

I suppose this issue should apply to all models that do no have fixed length postional encodings

