[AutoModels] Fix config params handling of all PT and TF AutoModels
Author: patrickvonplaten
Pull request: yes

As shown in #5474, currently, a command like:

```python
from transformers import AutoModelForCausalLM]
model = AutoModelForCausalLM.from_pretrained('bert-base-uncased', is_decoder=True)
```

fails because `is_decoder` is carried on as a model init argument even though it should *only* be used as a config init argument.

This PR fixes one `AutoModelFor....` for this, but this still has be applied for other `AutoModelFor...` classes. 

Pinging @LysandreJik @sgugger @thomwolf - are you guys ok with this change (bug fix) in general? 

Comments:
Isn't the canonical way:
```
config, kwargs = AutoConfig.from_pretrained(pretrained_model_name_or_path, return_unused_kwargs=True, **kwargs)
```
in the test?

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/5665?src=pr&el=h1) Report
> Merging [#5665](https://codecov.io/gh/huggingface/transformers/pull/5665?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/ce374ba87767d551f720242d5e64bfa976531079&el=desc) will **decrease** coverage by `1.11%`.
> The diff coverage is `55.00%`.

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

```diff
@@            Coverage Diff             @@
##           master    #5665      +/-   ##
==========================================
- Coverage   78.43%   77.32%   -1.12%     
==========================================
  Files         146      146              
  Lines       26002    26002              
==========================================
- Hits        20395    20105     -290     
- Misses       5607     5897     +290     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5665?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/5665/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9hdXRvLnB5) | `63.03% <50.00%> (ø)` | |
| [src/transformers/modeling\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/5665/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `74.41% <60.00%> (ø)` | |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/5665/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `23.38% <0.00%> (-73.39%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5665/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (+0.25%)` | :arrow_up: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5665/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `81.49% <0.00%> (+0.29%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/5665/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `98.79% <0.00%> (+33.89%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/5665?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/5665?src=pr&el=footer). Last update [ce374ba...3bb7966](https://codecov.io/gh/huggingface/transformers/pull/5665?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


> Isn't the canonical way:
> 
> ```
> config, kwargs = AutoConfig.from_pretrained(pretrained_model_name_or_path, return_unused_kwargs=True, **kwargs)
> ```
> 
> in the test?

Oh yeah, that's much cleaner. We should probably update all AutoModels in PT and TF with this then, no?

I think that's correct, and the way it was always meant to be :raised_eyebrow: 

> We should probably update all AutoModels in PT and TF with this then, no?

Yes, I agree.