How to load pretraind XLM model
Author: ksopyla
Pull request: no

## ❓ Questions & Help

Facebook recently released a new pre-trained language model (17 and 100) (https://github.com/facebookresearch/XLM#pretrained-cross-lingual-language-models) 

I want to load 17 language model. 

Could someone guide me on how to achieve this? The straightforward way didn't work for me.

I have downloaded the 3 files  listed on facebook GitHub:
- model - https://dl.fbaipublicfiles.com/XLM/mlm_17_1280.pth
- bpe codes - https://dl.fbaipublicfiles.com/XLM/codes_xnli_17
- vocabulary - https://dl.fbaipublicfiles.com/XLM/vocab_xnli_17

and saved them in folder '/home/ksopyla/xlm/mlm17l'. Then I have tried to load the model with XLMModel.form_pretrained function

`
model = XLMTokenizer.from_pretrained('/home/ksopyla/xlm/mlm17/')
`
got
`
Model name '/home/ksopyla/xlm/mlm17' was not found in model name list (xlm-mlm-en-2048, xlm-mlm-ende-1024, xlm-mlm-enfr-1024, xlm-mlm-enro-1024, xlm-mlm-tlm-xnli15-1024, xlm-mlm-xnli15-1024, xlm-clm-enfr-1024, xlm-clm-ende-1024). We assumed '/home/ksopyla/xlm/mlm17/config.json' was a path or url but couldn't find any file associated to this path or url.
Traceback (most recent call last):
  File "/home/ksopyla/.vscode/extensions/ms-python.python-2019.8.30787/pythonFiles/ptvsd_launcher.py", line 43, in <module>
    main(ptvsdArgs)
  File "/home/ksopyla/.vscode/extensions/ms-python.python-2019.8.30787/pythonFiles/lib/python/ptvsd/__main__.py", line 432, in main
    run()
  File "/home/ksopyla/.vscode/extensions/ms-python.python-2019.8.30787/pythonFiles/lib/python/ptvsd/__main__.py", line 316, in run_file
    runpy.run_path(target, run_name='__main__')
  File "/home/ksopyla/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/home/ksopyla/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/home/ksopyla/.pyenv/versions/3.7.3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ksopyla/dev/document_embeddings/xlm_from_pretraind.py", line 34, in <module>
    output_hidden_states=True,
  File "/home/ksopyla/.local/share/virtualenvs/szrek-data-PaoX74GN/lib/python3.7/site-packages/pytorch_transformers/modeling_utils.py", line 430, in from_pretrained
    **kwargs
TypeError: cannot unpack non-iterable NoneType object
`

I suspect that I should change the file names and adjust the vocab file format. But I can't find it in the documentation.

Comments:
~~Hello, we haven't yet converted those models and hosted them on our S3, but you indeed should be able to do it yourself; we used [this script](https://github.com/huggingface/pytorch-transformers/blob/master/pytorch_transformers/convert_xlm_checkpoint_to_pytorch.py) for the other XLM checkpoints, you could use it to convert this checkpoint.~~

The models are now available on our S3. You should upgrade your `pytorch-transformers` version to the current source (master), you can then load your model with:

```py
from pytorch_transformers import XLMModel
model = XLMModel.from_pretrained("xlm-mlm-17-1280")
# or 
model = XLMModel.from_pretrained("xlm-mlm-100-1280")
```

Wow. You are fast :)
Thank you.