Checkpoint parameters

What are the important parameters do we need to save in checkpoint?


Usually you save all the info of your model given by model.state_dict(). This contains the Parameters and Buffers.
If your optimizer also has a state that is important to maintain, you can also save the optimizer’s state_dict().

What about scheduler.state_dict().

Which parameters are the important in order to restart model from the checkpoint?
(model.state_dict(), optimizer.state_dict(), scheduler.state_dict()) all these are important to restart model from checkpoint?

If you use one sure.

It depends a lot on your code and what you use I’m afraid so there isn’t one single overall answer here.
You will need to save the states of all the components that are important and that you want to save the state of.

I am using tranformer model, (

In this case these 3 should be good yes.