Open c-box opened 1 year ago
@c-box Hey, you are correct, it would be the last checkpoint which would be save when executing that piece of code. However also your request was recently addressed in https://github.com/CarperAI/trlx/pull/429. Now with setting trainer.save_optimizer: False
, you will be able to load the best checkpoint with just AutoModelForCausalLM.from_pretrained(path)
(where path will be in trainer.checkpoint_dir
/best_checkpoint and best checkpoint will be saved automatically)
🚀 The feature, motivation, and pitch
Here is the reply for #365 :
And I have another question about this issue, when executing:
Is the trainer storing the last checkpoint or the best checkpoint? I suspect that it is the last checkpoint? If so, how can I save the best checkpoint so that I can load it using:
Alternatives
No response
Additional context
No response