warn with FutureWarning when using `output_attentions` in the configu…
…ration
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/4887?src=pr&el=h1) Report
> Merging [#4887](https://codecov.io/gh/huggingface/transformers/pull/4887?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/13aa174112f0c2ee794c44188ecf13b241694db0&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `80.00%`.

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

```diff
@@            Coverage Diff             @@
##           master    #4887      +/-   ##
==========================================
+ Coverage   76.97%   76.99%   +0.01%     
==========================================
  Files         128      128              
  Lines       21602    21607       +5     
==========================================
+ Hits        16629    16636       +7     
+ Misses       4973     4971       -2     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/4887?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/configuration\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/4887/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX3V0aWxzLnB5) | `95.80% <80.00%> (-0.58%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/4887/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl91dGlscy5weQ==) | `87.26% <0.00%> (-0.16%)` | :arrow_down: |
| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/4887/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `39.62% <0.00%> (+0.94%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/4887?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/4887?src=pr&el=footer). Last update [13aa174...513ba3b](https://codecov.io/gh/huggingface/transformers/pull/4887?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>Are we actually planning on completely removing `output_attentions` from the config? I changed my mind a bit in that I think we can keep the hierarchy 1. use function argument 2. if nothing is provided => use config parameter as is done for the generation arguments. Also another small advantage of keeping it in the config would be that attentions can easily be outputted when using torchscript. 

What is your opinion on that @thomwolf ?<|||||>Ah, I wasn't aware of that, I thought we were deprecating them to be later removed :sweat_smile: 

In that case, we should add back the documentation regarding `output_attentions` that [was removed](https://github.com/huggingface/transformers/commit/6e603cb7892b49a2cbbc10ba859759f92c3fb7a6#diff-0f9b535706b4f09eb22f7189c6c9039cL46-L49) in #4538.<|||||>I wanted to do a PR about this and also add `use_cache` correctly back to the configs<|||||>Cool, sounds good @patrickvonplaten 