Add BartModel
Author: sshleifer
Pull request: yes
Labels: name: seq2seq

This ports BART, a "sequence-to-sequence model trained with denoising as pretraining objective." from https://github.com/pytorch/fairseq/tree/master/examples/bart
The decoder is left-to-right, the encoder is biredictional. As such, the code only uses a causal attention mask in the decoder.

### TODO:
- [x] conversion of pretrained weights
- [x] some unit testing
- [x] inference produces the same results as the fairseq version. 
- [x] decide on signature/splitting of encoder, decoder arguments (see https://github.com/huggingface/transformers/blob/808bbd5a6abe5b26656ffd809ce0e753495c912a/src/transformers/modeling_encoder_decoder.py#L240

)
- [x] Docstrings
- [x] More comments for code readers

### Future PRs
- [ ] example with correct pretraining objective
- [ ] `BartForSummarization.from_pretrained('bart-large-cnn')`


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

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

```diff
@@            Coverage Diff            @@
##           master   #2745      +/-   ##
=========================================
+ Coverage   75.34%   76.1%   +0.76%     
=========================================
  Files          94      98       +4     
  Lines       15440   15946     +506     
=========================================
+ Hits        11633   12136     +503     
- Misses       3807    3810       +3
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/2745?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_encoder\_decoder.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19lbmNvZGVyX2RlY29kZXIucHk=) | `26.66% <ø> (+1.36%)` | :arrow_up: |
| [src/transformers/utils\_encoder\_decoder.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy91dGlsc19lbmNvZGVyX2RlY29kZXIucHk=) | `0% <0%> (ø)` | |
| [src/transformers/modeling\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `95.71% <100%> (-0.07%)` | :arrow_down: |
| [src/transformers/\_\_init\_\_.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9fX2luaXRfXy5weQ==) | `98.91% <100%> (+0.03%)` | :arrow_up: |
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `73.6% <100%> (+12.27%)` | :arrow_up: |
| [src/transformers/modeling\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19hdXRvLnB5) | `75.47% <100%> (+0.23%)` | :arrow_up: |
| [src/transformers/configuration\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `100% <100%> (ø)` | |
| [src/transformers/configuration\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2F1dG8ucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/tokenization\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmFydC5weQ==) | `100% <100%> (ø)` | |
| [src/transformers/tokenization\_auto.py](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYXV0by5weQ==) | `97.29% <100%> (+0.07%)` | :arrow_up: |
| ... and [6 more](https://codecov.io/gh/huggingface/transformers/pull/2745/diff?src=pr&el=tree-more) | |

------

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


I marked some things "resolved" that I've done locally so that I can keep track. Pls advise if it is confusing/not the correct style!

> I marked some things "resolved" that I've done locally so that I can keep track. Pls advise if it is confusing/not the correct style!

It's ok but obviously I can't discuss the new changes then.