AutoModels: model_type is defined in config.json, not hardcoded in model's name
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/2494?src=pr&el=h1) Report
> Merging [#2494](https://codecov.io/gh/huggingface/transformers/pull/2494?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/331065e62d11d5c26642cb92a597904eee4c159b?src=pr&el=desc) will **increase** coverage by `1.47%`.
> The diff coverage is `75.55%`.

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

```diff
@@            Coverage Diff             @@
##           master    #2494      +/-   ##
==========================================
+ Coverage   73.24%   74.71%   +1.47%     
==========================================
  Files          87       87              
  Lines       15005    14792     -213     
==========================================
+ Hits        10990    11052      +62     
+ Misses       4015     3740     -275
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/2494?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/configuration\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3hsbS5weQ==) | `96.22% <100%> (+0.07%)` | :arrow_up: |
| [src/transformers/configuration\_xlm\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3hsbV9yb2JlcnRhLnB5) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/configuration\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2dwdDIucHk=) | `97.05% <100%> (+0.08%)` | :arrow_up: |
| [src/transformers/configuration\_bert.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JlcnQucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/configuration\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX29wZW5haS5weQ==) | `97.22% <100%> (+0.07%)` | :arrow_up: |
| [src/transformers/configuration\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3JvYmVydGEucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/configuration\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2F1dG8ucHk=) | `100% <100%> (+56.52%)` | :arrow_up: |
| [src/transformers/configuration\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3hsbmV0LnB5) | `93.47% <100%> (+0.14%)` | :arrow_up: |
| [src/transformers/configuration\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2Rpc3RpbGJlcnQucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `70.19% <100%> (-0.15%)` | :arrow_down: |
| ... and [13 more](https://codecov.io/gh/huggingface/transformers/pull/2494/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/2494?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/2494?src=pr&el=footer). Last update [331065e...764f836](https://codecov.io/gh/huggingface/transformers/pull/2494?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>(Sorry for spurious CI related commits I’m on mobile!)