Repository navigation
Keep Schedule-Free iterates finite during zero-rate warmup - #282
Open
DiadkoShmek wants to merge 1 commit into
Open
DiadkoShmek wants to merge 1 commit into
DiadkoShmek wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An initial zero learning rate makes Schedule-Free Shampoo's cumulative averaging weight zero. The current
lr_power / lr_sumcalculation then produces NaN, which propagates into model parameters on the first optimizer step. A scheduler whose warmup starts at zero can trigger this with the supported CPU optimizer.Keep the previous averaged iterate when the total weight is zero, then use the existing weighting formula once the first positive weight arrives. The coefficient remains a tensor and uses no host/device synchronization. Positive weights are not clamped to an epsilon.
The regression checks the public optimizer against explicit x/y/z recurrences from equations (3)–(5) and (23) of The Road Less Scheduled. It covers initial and later zero rates, powers 0/1/2, tiny positive rates, train/eval transitions, and a default-Shampoo checkpoint taken before the first nonzero rate.
Validation on CPU (Python 3.13.7, PyTorch 2.10.0):
torch.compile(backend="eager")update path.CUDA and the Inductor backend were not tested.