Can't run 124M using transformers
Author: MK096
Pull request: no

I have downloaded gpt 124M on my local machine and i was able to run the interactivesample.py that was provided by them

But when i try to load 124M using transformers, i get following error:
        _OSError: Can't load config for 'models\124M'. Make sure that:
        
        - 'models\124M' is a correct model identifier listed on 'https://huggingface.co/models'
        
        - or 'models\124M' is the correct path to a directory containing a config.json file_

**My code:**
tokenizer = AutoTokenizer.from_pretrained("models\\124M")

124M contains following json file : encoder

Comments:
Do you have a reproducible code example, or a colab notebook? What is your environment as requested in the issue template? Did you try with a forward slash?

> Do you have a reproducible code example, or a colab notebook? What is your environment as requested in the issue template? Did you try with a forward slash?

My Code:

import gpt_2_simple as gpt2
from transformers import pipeline, set_seed,GPT2Tokenizer, TFGPT2LMHeadModel
from transformers import GPT2LMHeadModel, GPT2Tokenizer,AutoTokenizer, AutoModelWithLMHead
from aitextgen import aitextgen
import os.path

data_folder = os.path.join(os.getcwd())
file_to_open = os.path.join(data_folder, "124M")

print(file_to_open) 
tokenizer = AutoTokenizer.from_pretrained(file_to_open)
model = AutoModelWithLMHead.from_pretrained(file_to_open)

I have attached image of my directory, files inside 124M and error
![124M](https://user-images.githubusercontent.com/20142735/122244766-90109700-cede-11eb-8710-e252e7eea440.PNG)

![01](https://user-images.githubusercontent.com/20142735/122244479-593a8100-cede-11eb-8d20-fedf9f3fd187.PNG)

![output](https://user-images.githubusercontent.com/20142735/122244472-58a1ea80-cede-11eb-8104-a646f65e864d.PNG)


I don't know how you obtained your `124M` folder but it doesn't seem to be using one of our libraries?

Our libraries save models with a `config.json`, `pytorch_model.bin` if PyTorch and `tf_model.h5` if TensorFlow.

> Our libraries save models with a `config.json`, `pytorch_model.bin` if PyTorch and `tf_model.h5` if TensorFlow.

I got it from https://github.com/openai/gpt-2
download_model.py 124M (in cmd i wrote)

I was able to run interactive_conditional_samples.py  (in src folder)

Is that model different from the `gpt2` available on our model hub? https://huggingface.co/gpt2

You would load it like so:
```
tokenizer = AutoTokenizer.from_pretrained("gpt2")
model = AutoModelWithLMHead.from_pretrained("gpt2")
```

If it is different, then you should use the conversion script to convert it to a HF-style checkpoint: https://github.com/huggingface/transformers/blob/master/src/transformers/models/gpt2/convert_gpt2_original_tf_checkpoint_to_pytorch.py

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.