[BartTokenizer] add prepare s2s batch
Author: patil-suraj
Pull request: yes

This PR adds prepare_seq2seq_batch method to BartTokenizer as per the proposal in #6080

@sshleifer

Comments:
Thanks @sgugger  for theses helpful suggestions!. Will keep these in mind for future PRs.

@sgugger , can you help me with the build_doc failure ? Thanks! 

Fixed, you needed to have the beginning of the docstrings on a new line for sphinx to understand the indentation.

# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6212?src=pr&el=h1) Report
> Merging [#6212](https://codecov.io/gh/huggingface/transformers/pull/6212?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/8edfaaa81b9995cedea2f8805e4c18c2b6cb5bfc&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `100.00%`.

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

```diff
@@            Coverage Diff             @@
##           master    #6212      +/-   ##
==========================================
+ Coverage   78.29%   78.35%   +0.05%     
==========================================
  Files         146      146              
  Lines       26607    26619      +12     
==========================================
+ Hits        20832    20856      +24     
+ Misses       5775     5763      -12     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6212?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmFydC5weQ==) | `96.38% <100.00%> (+0.61%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `23.38% <0.00%> (-73.39%)` | :arrow_down: |
| [src/transformers/data/processors/utils.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvdXRpbHMucHk=) | `27.63% <0.00%> (+1.31%)` | :arrow_up: |
| [src/transformers/tokenization\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `90.09% <0.00%> (+1.80%)` | :arrow_up: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (+2.25%)` | :arrow_up: |
| [src/transformers/tokenization\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcm9iZXJ0YS5weQ==) | `98.63% <0.00%> (+2.73%)` | :arrow_up: |
| [src/transformers/training\_args.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmluZ19hcmdzLnB5) | `81.00% <0.00%> (+14.00%)` | :arrow_up: |
| [src/transformers/data/processors/glue.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL3Byb2Nlc3NvcnMvZ2x1ZS5weQ==) | `49.09% <0.00%> (+17.09%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `95.32% <0.00%> (+23.67%)` | :arrow_up: |
| [src/transformers/trainer.py](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90cmFpbmVyLnB5) | `39.14% <0.00%> (+24.04%)` | :arrow_up: |
| ... and [5 more](https://codecov.io/gh/huggingface/transformers/pull/6212/diff?src=pr&el=tree-more) | |

------

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


> Fixed, you needed to have the beginning of the docstrings on a new line for sphinx to understand the indentation.

Thanks @sgugger !

Hi @LysandreJik  
> and not the fast tokenizer, is there a reason for that?

No, just forgot to add that.

Upstream will be useful but we will need handle few cases differently for each seq2seq model i.e in case of t5 we manually need to add the deocder_start_token_id as T5 don't have a `bos` token. Also `eos' needs to be added manually. In case of mBart, it needs the language code as prefix token etc. And also AFAIK lot of people seem to be unfamiliar with the processors API

hi @sshleifer , @LysandreJik any update ?

@sshleifer  updated the docs.

@LysandreJik  I will add this for fast tokenizer too once this PR is merged.

Sounds good!

@LysandreJik , doc error is fixed, not sure if current failure is related to this PR.