issues with seq length with inference code for classification
## Environment info     
- `transformers` version: 3.5.1
- Platform: Google Colab
- Python version: 3.7
- PyTorch version (GPU?):
- Tensorflow version (GPU?):
- Using GPU in script?: yes
- Using distributed or parallel set-up in script?: No

### Who can help
@LysandreJik , @mfuntowicz , @VictorSanh


## Information

Model I am using: BERT

The problem arises when using:
* [X] the official example scripts: (give details below)
Modified the official scripts slightly to change the length of the input sequence.
```
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased-finetuned-mrpc")
model = AutoModelForSequenceClassification.from_pretrained("bert-base-cased-finetuned-mrpc", return_dict=True)
classes = ["not paraphrase", "is paraphrase"]
sequence_0 = "The company HuggingFace is based in New York City" * 100
sequence_1 = "Apples are especially bad for your health"
sequence_2 = "HuggingFace's headquarters are situated in Manhattan"
paraphrase = tokenizer(sequence_0, sequence_2, return_tensors="pt")
not_paraphrase = tokenizer(sequence_0, sequence_1, return_tensors="pt")
paraphrase_classification_logits = model(**paraphrase).logits
not_paraphrase_classification_logits = model(**not_paraphrase).logits
paraphrase_results = torch.softmax(paraphrase_classification_logits, dim=1).tolist()[0]
not_paraphrase_results = torch.softmax(not_paraphrase_classification_logits, dim=1).tolist()[0]
# Should be paraphrase
for i in range(len(classes)):
    print(f"{classes[i]}: {int(round(paraphrase_results[i] * 100))}%")
# Should not be paraphrase
for i in range(len(classes)):
    print(f"{classes[i]}: {int(round(not_paraphrase_results[i] * 100))}%")```

```
The tasks I am working on is:
* [X ] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

1. If you run the code above, you run into the RunTime Error
Error:
```Token indices sequence length is longer than the specified maximum sequence length for this model (1313 > 512). Running this sequence through the model will result in indexing errors
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-f386a657dfdb> in <module>()
      9 paraphrase = tokenizer(sequence_0, sequence_2, return_tensors="pt")
     10 not_paraphrase = tokenizer(sequence_0, sequence_1, return_tensors="pt")
---> 11 paraphrase_classification_logits = model(**paraphrase).logits
     12 not_paraphrase_classification_logits = model(**not_paraphrase).logits
     13 paraphrase_results = torch.softmax(paraphrase_classification_logits, dim=1).tolist()[0]

5 frames
/usr/local/lib/python3.6/dist-packages/transformers/modeling_bert.py in forward(self, input_ids, token_type_ids, position_ids, inputs_embeds)
    199         token_type_embeddings = self.token_type_embeddings(token_type_ids)
    200 
--> 201         embeddings = inputs_embeds + position_embeddings + token_type_embeddings
    202         embeddings = self.LayerNorm(embeddings)
    203         embeddings = self.dropout(embeddings)

RuntimeError: The size of tensor a (1313) must match the size of tensor b (512) at non-singleton dimension 1```



There is an issue here because your sequence is now to long for your model. The model only supports sequences of size 512 or less, but this code:

```py
sequence_0 = "The company HuggingFace is based in New York City" * 100
sequence_1 = "Apples are especially bad for your health"
sequence_2 = "HuggingFace's headquarters are situated in Manhattan"
paraphrase = tokenizer(sequence_0, sequence_2, return_tensors="pt")
not_paraphrase = tokenizer(sequence_0, sequence_1, return_tensors="pt")
```
creates tensors of length `1310` and `1313`, which is too long for your model. You should enable the truncation parameter on your tokenizer to ensure that the length is correct:
```py
paraphrase = tokenizer(sequence_0, sequence_2, return_tensors="pt", truncation=True)
not_paraphrase = tokenizer(sequence_0, sequence_1, return_tensors="pt", truncation=True)
```