Optimizer restart equivalence means that restoring an optimization checkpoint reproduces the uninterrupted optimizer's parameter sequence for a specified subsequent computation. State the optimizer update rule, continuation inputs and intended notion of equality. Exact mathematical equality and agreement within a numerical tolerance are different claims.
For a deterministic algorithm modeled by , equality of the restored full state at step , together with the same update rule and future inputs , is sufficient. One application of gives equal next states; mathematical induction then gives equal continuations. This is a sufficient condition for the chosen observations, not a claim that every internal field must always affect them.
For an original exact example, take andFrom , one step gives . Restoring that pair gives and , exactly as uninterrupted execution. Resetting the buffer while restoring gives and . Thus a parameter-only save is not restart-equivalent for this recurrence.
Practical checkpoints must also retain the optimizer state-to-parameter association and the relevant settings, update position, learning rate schedule, data position and pseudorandom number generator state.[ref]
Saving and Loading Models in the PyTorch tutorials. General checkpoint for resuming training: model and optimizer dictionaries and training position
Fixing a random seed alone does not specify all of this continuation. Floating-point arithmetic and nondeterministic operations can additionally affect exact reproduction across environments; the primary documentation does not guarantee identical results across releases or platforms.[ref]Reproducibility in the PyTorch documentation. PyTorch2.15, opening reproducibility statement and controlling randomness
Articles by others on the same topic
There are currently no matching articles.