from_pretrained() never works
Author: sadaszewski
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->
     
- `transformers` version: 3.0.2
- Platform: Linux
- Python version: 3.6
- PyTorch version (GPU?): 1.5.1 (yes)
- Tensorflow version (GPU?): 
- Using GPU in script?: not relevant
- Using distributed or parallel set-up in script?: no

### Who can help
@LysandreJik , @TevenLeScao , @mfuntowicz 
<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.
 
 albert, bert, GPT2, XLM: @LysandreJik 
 tokenizers: @mfuntowicz
 Trainer: @sgugger
 Speed and Memory Benchmarks: @patrickvonplaten
 Model Cards: @julien-c
 Translation: @sshleifer
 Summarization: @sshleifer
 TextGeneration: @TevenLeScao 
 examples/distillation: @VictorSanh
 nlp datasets: [different repo](https://github.com/huggingface/nlp)
 rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
 Text Generation: @TevenLeScao
 blenderbot: @mariamabarham
 Bart: @sshleifer
 Marian: @sshleifer
 T5: @patrickvonplaten
 Longformer/Reformer: @patrickvonplaten
 TransfoXL/XLNet: @TevenLeScao 
 examples/seq2seq: @sshleifer
 tensorflow: @jplu 
documentation: @sgugger
 -->

## Information

Model I am using (Bert, XLNet ...): any

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [X] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [X] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

1. `import transformers as pt`
2. `pt.AutoModelForSequenceClassification.from_pretrained(<any_valid_model_id>)`
3. Observe the error below

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

```python
>>> pt.AutoModelForSequenceClassification.from_pretrained('xlnet-base-cased')
I0814 15:00:47.832349 46912496391360 configuration_utils.py:264] loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/xlnet-base-cased-config.json from cache at /xxx/torch/transformers/c9cc6e53904f7f3679a31ec4af244f4419e25ebc8e71ebf8c558a31cbcf07fc8.69e5e35e0b798cab5e473f253752f8bf4d280ee37682281a23eed80f6e2d09c6
I0814 15:00:47.832984 46912496391360 configuration_utils.py:300] Model config XLNetConfig {
  "architectures": [
    "XLNetLMHeadModel"
  ],
  "attn_type": "bi",
  "bi_data": false,
  "bos_token_id": 1,
  "clamp_len": -1,
  "d_head": 64,
  "d_inner": 3072,
  "d_model": 768,
  "dropout": 0.1,
  "end_n_top": 5,
  "eos_token_id": 2,
  "ff_activation": "gelu",
  "initializer_range": 0.02,
  "layer_norm_eps": 1e-12,
  "mem_len": null,
  "model_type": "xlnet",
  "n_head": 12,
  "n_layer": 12,
  "pad_token_id": 5,
  "reuse_len": null,
  "same_length": false,
  "start_n_top": 5,
  "summary_activation": "tanh",
  "summary_last_dropout": 0.1,
  "summary_type": "last",
  "summary_use_proj": true,
  "task_specific_params": {
    "text-generation": {
      "do_sample": true,
      "max_length": 250
    }
  },
  "untie_r": true,
  "vocab_size": 32000
}

Traceback (most recent call last):
  File "/xxx/.conda/envs/xxx/lib/python3.6/site-packages/transformers/modeling_utils.py", line 655, in from_pretrained
    raise EnvironmentError
OSError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/xxx/.conda/envs/xxx/lib/python3.6/site-packages/transformers/modeling_auto.py", line 1363, in from_pretrained
    return model_class.from_pretrained(pretrained_model_name_or_path, *model_args, config=config, **kwargs)
  File "/xxx/.conda/envs/xxx/lib/python3.6/site-packages/transformers/modeling_utils.py", line 662, in from_pretrained
    raise EnvironmentError(msg)
OSError: Can't load weights for 'xlnet-base-cased'. Make sure that:

- 'xlnet-base-cased' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'xlnet-base-cased' is the correct path to a directory containing a file named one of pytorch_model.bin, tf_model.h5, model.ckpt.
```

## Expected behavior

<!-- A clear and concise description of what you would expect to happen. -->
A pretrained model should be loaded. This worked (and still works) great in `pytorch_transformers`. I switched to `transformers` because XLNet-based models stopped working in `pytorch_transformers`. But surprise surprise in `transformers` no model whatsoever works for me.

Comments:
Hello! This is probably an error with your network. Are you behind a firewall? Does it work on any other machine on the same network?

Many thanks for a quick response. It is possible. It works on another machine on another network. Is there any way to debug what it tries to download and why it fails? Any idea why the downloads work in pytorch_transformers but not in transformers?

Hi @sadaszewski ,

I think you can use the following script for just making a get request to the xlnet configuration file:

```python
import requests

r = requests.get("https://s3.amazonaws.com/models.huggingface.co/bert/xlnet-base-cased-config.json")

print(r.text)
```

would be interesting to see the response then :)

Well but doesn't it seem like that's the only file it actually **manages** to get? As you can see in the printout it shows the config of the model... It fails loading weights I guess. How do I check those?

Oh, I can remember a recent location/CDN change. So the json configuration is loaded from the s3 link, but the model weight is located at `https://cdn.huggingface.co/xlnet-large-cased-pytorch_model.bin` -> could you check if you have access to this file?

And in `pytorch-transformers` the model was downloaded from:

```bash
https://s3.amazonaws.com/models.huggingface.co/bert/xlnet-base-cased-pytorch_model.bin
```

I can confirm that it was a problem specific to my setup with trusted certificate for cdn.huggingface.co. Now fixed by specifying REQUESTS_CA_BUNDLE. Nevertheless it was nowhere to be found in the exception thrown by transformers that ultimately it has been caused by requests TLS handshake error. It would be very helpful if you considered adding exception chaining - https://www.python.org/dev/peps/pep-3134/ . Thanks for all your speedy replies!