Shortcut to special tokens' ids - fix GPT2 & RoBERTa tokenizers - improved testing for GPT/GPT-2
This PR:
- Add shortcut to each special tokens with `_id` properties (e.g. `tokenizer.cls_token_id` for the id in the vocabulary of the `tokenizer.cls_token`)
- Fix GPT2 and RoBERTa tokenizer so that sentences to be tokenized always begins with at least one space (see note by fairseq authors: https://github.com/pytorch/fairseq/blob/master/fairseq/models/roberta/hub_interface.py#L38-L56)
- Fix and clean up byte-level BPE tests
- Update Roberta tokenizer to depend on GPT2
- Update GPT2DoubleHeadModel docstring so that the given example is clear and works well
- Update the test classes for OpenAI GPT and GPT-2 to now depend on `CommonTestCases.CommonModelTester` so that these models are tested against other common tests.
# [Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074?src=pr&el=h1) Report
> Merging [#1074](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/pytorch-transformers/commit/f7978490b20ca3a8861bddb72689a464f0c59e84?src=pr&el=desc) will **decrease** coverage by `0.29%`.
> The diff coverage is `89.23%`.

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

```diff
@@           Coverage Diff            @@
##           master   #1074     +/-   ##
========================================
- Coverage    80.7%   80.4%   -0.3%     
========================================
  Files          46      46             
  Lines        7411    7529    +118     
========================================
+ Hits         5981    6054     +73     
- Misses       1430    1475     +45
```


| [Impacted Files](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pytorch\_transformers/modeling\_openai.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfb3BlbmFpLnB5) | `81.84% <ø> (+7.07%)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_xlnet.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX3hsbmV0LnB5) | `89.18% <100%> (ø)` | :arrow_up: |
| [...h\_transformers/tests/tokenization\_tests\_commons.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdGVzdHMvdG9rZW5pemF0aW9uX3Rlc3RzX2NvbW1vbnMucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_bert.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2JlcnQucHk=) | `94.88% <100%> (ø)` | :arrow_up: |
| [pytorch\_transformers/tests/modeling\_common\_test.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdGVzdHMvbW9kZWxpbmdfY29tbW9uX3Rlc3QucHk=) | `73% <100%> (-21.74%)` | :arrow_down: |
| [pytorch\_transformers/tokenization\_gpt2.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX2dwdDIucHk=) | `96.69% <100%> (+0.02%)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_xlm.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX3hsbS5weQ==) | `83.33% <100%> (ø)` | :arrow_up: |
| [...torch\_transformers/tests/tokenization\_gpt2\_test.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdGVzdHMvdG9rZW5pemF0aW9uX2dwdDJfdGVzdC5weQ==) | `97.36% <100%> (+0.07%)` | :arrow_up: |
| [pytorch\_transformers/tokenization\_roberta.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvdG9rZW5pemF0aW9uX3JvYmVydGEucHk=) | `100% <100%> (+3.7%)` | :arrow_up: |
| [pytorch\_transformers/modeling\_gpt2.py](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree#diff-cHl0b3JjaF90cmFuc2Zvcm1lcnMvbW9kZWxpbmdfZ3B0Mi5weQ==) | `83.84% <100%> (+8%)` | :arrow_up: |
| ... and [9 more](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074?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/pytorch-transformers/pull/1074?src=pr&el=footer). Last update [f797849...50e615f](https://codecov.io/gh/huggingface/pytorch-transformers/pull/1074?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
<|||||>Ok this one is also good to go. Let's merge.