TFMarianModel from_pretrained can't load weights
Author: brand17
Pull request: no

## Environment info
- `transformers` version: 4.3.2
- Platform: Windows-7-6.1.7601-SP1
- Python version: 3.6.6
- PyTorch version (GPU?): 1.5.1+cpu (False)
- Tensorflow version (GPU?): 2.3.0 (False)
- 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 ...): TFMarianMT

The problem arises when using:
* [+] the official example scripts: (give details below)

## To reproduce
```python
from transformers import MarianTokenizer, TFMarianModel
model = TFMarianModel.from_pretrained('Helsinki-NLP/opus-mt-en-de')

```
Steps to reproduce the behavior:

1. Run the above code 
2. Get an error:

> Exception has occurred: OSError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
> Can't load weights for 'Helsinki-NLP/opus-mt-en-de'. Make sure that:
> 
> - 'Helsinki-NLP/opus-mt-en-de' is a correct model identifier listed on 'https://huggingface.co/models'
> 
> - or 'Helsinki-NLP/opus-mt-en-de' is the correct path to a directory containing a file named one of tf_model.h5, pytorch_model.bin.
> 
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\transformers\modeling_tf_utils.py", line 1219, in from_pretrained
>     raise EnvironmentError(msg)
>   File "C:\Users\FA.PROJECTOR-MSK\Google Диск\Colab Notebooks\PoetryTransformer\Unsupervised\translation\paraphrases_translation.py", line 14, in <module>
>     model = TFMarianModel.from_pretrained('Helsinki-NLP/opus-mt-en-de')
>   File "C:\Users\FA.PROJECTOR-MSK\Google Диск\Colab Notebooks\PoetryTransformer\Unsupervised\translation\run_locally.py", line 1, in <module>
>     from paraphrases_translation import run
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 85, in _run_code
>     exec(code, run_globals)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 96, in _run_module_code
>     mod_name, mod_spec, pkg_name, script_name)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 263, in run_path
>     pkg_name=pkg_name, script_name=fname)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 85, in _run_code
>     exec(code, run_globals)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 193, in _run_module_as_main (Current frame)
>     "__main__", mod_spec)
> 

## Expected behavior
No error


Comments:
Thanks for the issue! 

I uploaded the TF weights https://huggingface.co/Helsinki-NLP/opus-mt-en-de/commit/1a8c2263da11e68e50938f97e10cd57820bd504c. Should be fixed now - could you try again?

Thanks, this method working now. Please upload a model 'Helsinki-NLP/opus-mt-ru-en'. And I think other models are not working as well.

But now I can not call the model:

```python
from transformers import MarianTokenizer, TFMarianModel
import tensorflow as tf
tokenizer = MarianTokenizer.from_pretrained('Helsinki-NLP/opus-mt-en-de')
model = TFMarianModel.from_pretrained('Helsinki-NLP/opus-mt-en-de')
inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

```

I am getting an error:

> Exception has occurred: ValueError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
> You have to specify either decoder_input_ids or decoder_inputs_embeds
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\transformers\models\marian\modeling_tf_marian.py", line 924, in call
>     raise ValueError("You have to specify either decoder_input_ids or decoder_inputs_embeds")
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 985, in __call__
>     outputs = call_fn(inputs, *args, **kwargs)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\transformers\models\marian\modeling_tf_marian.py", line 1137, in call
>     training=inputs["training"],
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 985, in __call__
>     outputs = call_fn(inputs, *args, **kwargs)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\transformers\models\marian\modeling_tf_marian.py", line 1232, in call
>     training=inputs["training"],
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 985, in __call__
>     outputs = call_fn(inputs, *args, **kwargs)
>   File "C:\Users\FA.PROJECTOR-MSK\Google Диск\Colab Notebooks\PoetryTransformer\Unsupervised\translation\paraphrases_translation.py", line 16, in <module>
>     outputs = model(inputs)
>   File "C:\Users\FA.PROJECTOR-MSK\Google Диск\Colab Notebooks\PoetryTransformer\Unsupervised\translation\run_locally.py", line 1, in <module>
>     from paraphrases_translation import run
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 85, in _run_code
>     exec(code, run_globals)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 96, in _run_module_code
>     mod_name, mod_spec, pkg_name, script_name)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 263, in run_path
>     pkg_name=pkg_name, script_name=fname)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 85, in _run_code
>     exec(code, run_globals)
>   File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Lib\runpy.py", line 193, in _run_module_as_main (Current frame)
>     "__main__", mod_spec)

There are quite a lot of other models to upload, so this will take some time. 
I'll start writing a script to automate this process...

Until then you can make use of this easy fix:

```python
from transformers import MarianTokenizer, TFMarianModel
import tensorflow as tf
tokenizer = MarianTokenizer.from_pretrained('Helsinki-NLP/opus-mt-ru-de')
model = TFMarianModel.from_pretrained('Helsinki-NLP/opus-mt-ru-en', from_pt=True)
inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)
```

Thanks, the model is loading. But I am still not able to call it. Should I report this bug separately ?

Hi! I think there's an error in the `TFMarianModel` docstring, it should be similar to the `MarianModel` docstring. You can't call encoder-decoder models with only input IDs (with a few exceptions like BART), you also need to provide decoder input IDs.

In your case this should work:

```py
from transformers import MarianTokenizer, TFMarianModel
import tensorflow as tf

tokenizer = MarianTokenizer.from_pretrained('Helsinki-NLP/opus-mt-en-de')
model = TFMarianModel.from_pretrained('Helsinki-NLP/opus-mt-en-de')

input_ids = tokenizer("Studies have been shown that owning a dog is good for you", return_tensors="tf").input_ids  # Batch size 1
decoder_input_ids = tokenizer("<pad> Studien haben gezeigt dass es hilfreich ist einen Hund zu besitzen", return_tensors="tf", add_special_tokens=False).input_ids  # Batch size 1

outputs = model(input_ids=input_ids, decoder_input_ids=decoder_input_ids)
last_hidden_states = outputs.last_hidden_state
```

Thanks, it works

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.