Unable to load custom tokens
Author: sashank06
Pull request: no

## 🐛 Bug

<!-- Important information -->

Model I am using (Bert, XLNet....): GPT2

Language I am using the model on (English, Chinese....): English

I am unable to load the custom tokens that were added to GPT2 tokenizer while training.

Code used while training
```
SPECIAL_TOKENS = ["bos_token","eos_token","persona, "personb", "pad_token"]
tokenizer = tokenizer_class.from_pretrained("gpt2",unk_token="unk_token")
model = model_class.from_pretrained("gpt2")
tokenizer.add_tokens(SPECIAL_TOKENS)
model.resize_token_embeddings(len(tokenizer))

#To save the tokenizer 
tokenizer.save_pretrained(directory)
```

While Loading
```
tokenizer = GPT2Tokenizer.from_pretrained('./experiment1_conversation/runs/new/')
```

![Screen Shot 2019-08-16 at 2 04 26 PM](https://user-images.githubusercontent.com/8636933/63188235-d79e1180-c02e-11e9-92fc-ad1a908fb0ab.png)

I run into the issue of unable to convert the custom tokens and it produces *None *. Is there something wrong in the way I am loading the tokenizer or saving it?

I get 
## Environment

* OS: Ubuntu
* Python version: 3.6.8
* PyTorch version:1.1
* PyTorch Transformers version (or branch):1.1
* Using GPU ? Yes



Comments:
Hello, thanks for the bug report. 

Could you please show me what's inside the directory `experiment1_conversation/runs/new` and `experiment1_conversation/runs/old`?

@LysandreJik the previous issue I had posted was due to a mistake on my side. I updated the issue. 

@LysandreJik This is the content inside the directory. 
![Screen Shot 2019-08-16 at 2 12 34 PM](https://user-images.githubusercontent.com/8636933/63188668-f224ba80-c02f-11e9-9101-60ed862799dc.png)


No, the way you're saving your tokenizer is correct. If you study what's inside the `added_tokens.json`, you should have: 
```
{"bos_token": 50257, "eos_token": 50258, "persona": 50259, "personb": 50260, "pad_token": 50261}
```

Following your procedure, when I print `tokenizer.convert_tokens_to_ids(["bos_token"])` after loading from the saved directory, I get `[50257]`, which is correct.

Could you show me what is inside of  your `added_tokens.json`?

@LysandreJik The added_tokens.json is saved in the wrong way for me. 
```{"50257": "bos_token", "50258": "eos_token", "50259": "persona", "50260": "personb", "50261": "pad_token"}```

Any reason for this?

What are `tokenizer_class` and `model_class` instances of? Are they instances of `GPT2Tokenizer` and `GPT2Model`?

Do you get the same result if you run this script?

```python
from pytorch_transformers import GPT2Tokenizer, GPT2Model

import os
os.makedirs("save_it_here")

SPECIAL_TOKENS = ["bos_token", "eos_token", "persona", "personb", "pad_token"]
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
model = GPT2Model.from_pretrained("gpt2")
tokenizer.add_tokens(SPECIAL_TOKENS)
model.resize_token_embeddings(len(tokenizer))

# To save the tokenizer
tokenizer.save_pretrained("save_it_here")

tokenizer = GPT2Tokenizer.from_pretrained("save_it_here")
print(tokenizer.convert_tokens_to_ids(["bos_token"]))
```

The above script produces the same results as what you got. I will investigate how mine went wrong when training. Thanks for the help. I will close this for now?

Alright, glad I could help. Don't hesitate to re-open if you see something weird :).