nshepperd / gpt-2

Code for the paper "Language Models are Unsupervised Multitask Learners"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to generate interactive conditional samples after retraining on custom dataset?

nikilp opened this issue · comments

When I retrain GPT-2 345M on custom dataset I get good samples during the training process itself, but after I stop the training and I run interactive_conditional_samples.py the samples are NOT from the same retrained model. How do I obtain samples from the new model?
Thanks

Did you make sure to use the --model_name parameter?

python interactive_conditional_samples.py --model_name YOURMODELNAME

I use the same model which I used during training 345M:
python3 src/interactive_conditional_samples.py --top_k 40 --model_name "345M"
but it is not loading the checkpoint, just the basic model. Anyway, i pull out some of the relevant code from the training script which got the trick for me.

@nikilp could you share that code?

After training, you have to copy the latest checkpoint files from the checkpoint folder into your previous model folder.
See https://youtu.be/oEpLMb5D_G0?t=312