l4rz / gpt-2-training

Training GPT-2 on a Russian language corpus
87 stars 28 forks source link

Can't use last 1250M model #2

Open max-frai opened 4 years ago

max-frai commented 4 years ago

Hello! I try to use downloaded 1250M model. So I clone this repo, copy model into models folder and run:

PYTHONPATH=src python3 src/interactive_conditional_samples.py --temperature=0.8 --top_k=40 --length=500

And this fails to:

  File "src/interactive_conditional_samples.py", line 68, in interact_model
    saver.restore(sess, ckpt)
  File "/usr/local/lib/python3.7/site-packages/tensorflow/python/training/saver.py", line 1274, in restore
    raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.

And with smaller downloaded model 117M it works okay. I also noticed smaller model has checkpoint and counter files inside and bigger one - no.

l4rz commented 4 years ago

Hi, thank you for noticing this!

Seems like i forgot to include the checkpoint file in the package. Please create an checkpoint file in the model dir, e.g. for the 61k steps pretrained model:

echo model_checkpoint_path: \"model-61000\" > checkpoint