Only the Bert model is currently supported
Author: donttal
Pull request: no

## 🐛 Bug

<!-- Important information -->

Model I am using Model2Model and BertTokenizer:

Language I am using the model on English:

The problem arise when using:
*  the official example scripts: (give details)

<!-- If you have a code sample, error messages, stack traces, please provide it here as well. -->
```
# Let's re-use the previous question
question = "Who was Jim Henson?"
encoded_question = tokenizer.encode(question)
question_tensor = torch.tensor([encoded_question])

# This time we try to generate the answer, so we start with an empty sequence
answer = "[CLS]"
encoded_answer = tokenizer.encode(answer, add_special_tokens=False)
answer_tensor = torch.tensor([encoded_answer])

# Load pre-trained model (weights)
model = Model2Model.from_pretrained('fine-tuned-weights')
model.eval()

# If you have a GPU, put everything on cuda
question_tensor = encoded_question.to('cuda')
answer_tensor = encoded_answer.to('cuda')
model.to('cuda')

# Predict all tokens
with torch.no_grad():
    outputs = model(question_tensor, answer_tensor)
    predictions = outputs[0]

# confirm we were able to predict 'jim'
predicted_index = torch.argmax(predictions[0, -1]).item()
predicted_token = tokenizer.convert_ids_to_tokens([predicted_index])[0]
```
## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

* OS: Colab
* Python version:
* PyTorch version: 
* PyTorch Transformers version (or branch):
* Using GPU ? Yes
* Distributed of parallel setup ? No
* Any other relevant information:



Comments:
You need to give more information. What are you trying to do, what is the code that you use for it, what does not work the way you intended to?

> You need to give more information. What are you trying to do, what is the code that you use for it, what does not work the way you intended to?

I am learning how to use this repo.
I use the example of the official website model2model, the link is as follows
https://huggingface.co/transformers/quickstart.html
And I use google colab to install the transformer and copy and run the official website code

I mean, which error are you getting or what is not working as expected? 

> I mean, which error are you getting or what is not working as expected?

this is my issue topic
Only the Bert model is currently supported
```
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-18-58aac9aa944f> in <module>()
      9 
     10 # Load pre-trained model (weights)
---> 11 model = Model2Model.from_pretrained('fine-tuned-weights')
     12 model.eval()
     13 

/usr/local/lib/python3.6/dist-packages/transformers/modeling_encoder_decoder.py in from_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs)
    281             or "distilbert" in pretrained_model_name_or_path
    282         ):
--> 283             raise ValueError("Only the Bert model is currently supported.")
    284 
    285         model = super(Model2Model, cls).from_pretrained(

ValueError: Only the Bert model is currently supported.
```

That wasn't clear. In the future, please post the trace so it is clear what your error is, like so:

```
Traceback (most recent call last):
  File "C:/Users/bramv/.PyCharm2019.2/config/scratches/scratch_16.py", line 62, in <module>
    model = Model2Model.from_pretrained('fine-tuned-weights')
  File "C:\Users\bramv\.virtualenvs\semeval-task7-Z5pypsxD\lib\site-packages\transformers\modeling_encoder_decoder.py", line 315, in from_pretrained
    raise ValueError("Only the Bert model is currently supported.")
ValueError: Only the Bert model is currently supported.
```

This is not a bug, then of course. In the example, where "fine-tuned-weights" is used, you can load your own fine-tuned model. So if you tuned a model and saved it as "checkpoint.pth" you can use that.

> This is not a bug, then of course. In the example, where "fine-tuned-weights" is used, you can load your own fine-tuned model. So if you tuned a model and saved it as "checkpoint.pth" you can use that.

thanks

Please close this question.