OSError: gpt2 does not appear to have a file named config.json. Checkout 'https://huggingface.co/gpt2/None' for available files.

#98
by Iust1n2 - opened

I'm using AutoTokenizer.from_pretrained("gpt2") with transformers Version: 4.35.2 and tokenizers Version: 0.15.0

Try:

tokenizer = GPT2Tokenizer.from_pretrained(model_name
config = GPT2Config.from_pretrained(model_name)
model = GPT2LMHeadModel.from_pretrained(model_name, config=config)
model.to(device)

I dont believe the AutoTokenizer is supported

Sign up or log in to comment