from_pretrained: convert DialoGPT format
Author: yet-another-account
Pull request: yes

DialoGPT checkpoints have "lm_head.decoder.weight" instead of "lm_head.weight". 

(see: https://www.reddit.com/r/MachineLearning/comments/dt5woy/p_dialogpt_state_of_the_art_conversational_model/f6vmwuy?utm_source=share&utm_medium=web2x)

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=h1) Report
> Merging [#1778](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/7a9aae1044aa4699310a8004f631fc0a4bdf1b65?src=pr&el=desc) will **increase** coverage by `0.06%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/1778/graphs/tree.svg?width=650&token=9qOlN6Hb1c&height=150&src=pr)](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1778      +/-   ##
==========================================
+ Coverage   84.03%   84.09%   +0.06%     
==========================================
  Files          94       94              
  Lines       14032    14036       +4     
==========================================
+ Hits        11792    11804      +12     
+ Misses       2240     2232       -8
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [transformers/modeling\_tf\_pytorch\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/1778/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX3RmX3B5dG9yY2hfdXRpbHMucHk=) | `95.13% <100%> (+2.18%)` | :arrow_up: |
| [transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/1778/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX3V0aWxzLnB5) | `91.05% <100%> (+1.41%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=footer). Last update [7a9aae1...90f6e73](https://codecov.io/gh/huggingface/transformers/pull/1778?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Looks good to me, thanks @eukaryote31 !

also cc @sshleifer 

LGTM!

Ok great, merging!

This was incorrect: we have multiple models that contain a valid `lm_head.decoder` layer (RoBERTa and its variants, CamemBERT, XLM-R...) and this PR broke `from_pretrained` for those models in the `ForMaskedLM` case.

The way to go in the particular `DialoGPT` case would be to either:
- create a conversion script and upload the GPT2 compatible weights somewhere.
- or, add a special test in from_pretrained that the current instance is an instance of `GPT2...Head` (this is not pretty in terms of OOP encapsulation 💩)
- or, expose some kind of overrideable list of key mapping (that can be implemented by the GPT2 subclass)

(1. seems like the easier solution) 

cc @LysandreJik @sshleifer @thomwolf 

Also cc @patrickvonplaten 🤯