nanoGPT
nanoGPT copied to clipboard
How to load the GPT-2 model
Can you give an example of how to use the official GPT-2 model. I downloaded it successfully via https://raw.githubusercontent.com/openai/gpt-2/master/download_model.py Moved and renamed the model.ckpt.data-00000-of-00001 to /out/ckpt.pt But I got some pickl errors when loading it.
python sample.py config\eval_gpt2.py
Traceback (most recent call last):
File "d:\work\AI\nanoGPT\sample.py", line 35, in
In sample.py you need to set
init_from = 'gpt2'
I do not think that this modification is required any longer: config/eval_gpt2.py already contains a line with init_from = 'gpt2' which overwrites the setting in sample.py.
This issue may therefore be closed now, I guess