Fixing CTRL tokenizer - Update error messages - XLM-MLM in run_generation
Author: thomwolf
Pull request: yes

# CTRL tokenizer

We are trying to find a good full-python replacement for the fastBPE tokenizer originally used for CTRL.

We don't really want to depend on fastBPE, even though it's fast, because it's a cython package which means we may then have installation issues on specific platforms like Windows.

Current options are:
- test our own Bert whitespace tokenizer
- uses Moses which is already included (as sacredmoses) for XLM
- using a regex like GPT-2.

Currently favored option is sacredmoses.

cc @LysandreJik @keskarnitish @stefan-it 

[UPDATE]: Updating this, upon deeper inspection, fastBPE tokenizer just basically [split on spaces only](https://github.com/glample/fastBPE/blob/master/fastBPE/fastBPE.hpp?fbclid=IwAR1Vp2WMLxDjpmBIpU6mkddeyxzi2vpvHOcm8fL4iaWL1m3tVbSfz-yZAcE#L652).

This tokenizer was used in CTRL which is confirmed by the fact that many vocabulary tokens in CTRL vocabulary contains end or start punctuation (see CTRL vocabulary [here](https://raw.githubusercontent.com/salesforce/ctrl/master/ctrl-vocab.json)).

So the most logical solution is thus just to split on spaces which is also the easiest solution :-)

# Error messages

Improved error messages of `from_pretrained` when files are not found

# XLM MLM in run_generation

Add support for XLM MLM models in run_generation (though these models are not really intended for that anyway).

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/1480?src=pr&el=h1) Report
> Merging [#1480](https://codecov.io/gh/huggingface/transformers/pull/1480?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/036483fae538faff62f78448b38787f3adb94f97?src=pr&el=desc) will **increase** coverage by `0.06%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master    #1480      +/-   ##
==========================================
+ Coverage   85.53%   85.59%   +0.06%     
==========================================
  Files          91       91              
  Lines       13539    13526      -13     
==========================================
- Hits        11580    11578       -2     
+ Misses       1959     1948      -11
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/1480?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [transformers/tokenization\_ctrl.py](https://codecov.io/gh/huggingface/transformers/pull/1480/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL3Rva2VuaXphdGlvbl9jdHJsLnB5) | `96.03% <ø> (+7.64%)` | :arrow_up: |
| [transformers/tokenization\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/1480/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL3Rva2VuaXphdGlvbl91dGlscy5weQ==) | `91.43% <ø> (+0.42%)` | :arrow_up: |
| [transformers/configuration\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/1480/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL2NvbmZpZ3VyYXRpb25fdXRpbHMucHk=) | `97.29% <ø> (ø)` | :arrow_up: |
| [transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/1480/diff?src=pr&el=tree#diff-dHJhbnNmb3JtZXJzL21vZGVsaW5nX3V0aWxzLnB5) | `92.44% <ø> (ø)` | :arrow_up: |

------

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


Updating this, upon deeper inspection, `fastBPE` tokenizer just basically [split on spaces only](https://github.com/glample/fastBPE/blob/master/fastBPE/fastBPE.hpp?fbclid=IwAR1Vp2WMLxDjpmBIpU6mkddeyxzi2vpvHOcm8fL4iaWL1m3tVbSfz-yZAcE#L652).

This tokenizer was used in CTRL which is confirmed by the fact that many vocabulary tokens in CTRL vocabulary contains end or start punctuation (see CTRL vocabulary [here](https://raw.githubusercontent.com/salesforce/ctrl/master/ctrl-vocab.json)).

So the most logical solution is thus just to split on spaces which is also the easiest solution :-)

Ok, merging.