Skip to content

Preserve each Adam group's beta2 in OneCycle - #8495

Open
vineethsaivs wants to merge 1 commit into
deepspeedai:masterfrom
vineethsaivs:fix/onecycle-preserve-beta2-20260912
Open

Preserve each Adam group's beta2 in OneCycle#8495
vineethsaivs wants to merge 1 commit into
deepspeedai:masterfrom
vineethsaivs:fix/onecycle-preserve-beta2-20260912

Conversation

@vineethsaivs

Copy link
Copy Markdown
Contributor

Constructing OneCycle silently replaces every Adam group's beta2 with 0.99, changing the second-moment estimator before training starts.

Cause: Both momentum bounds hardcode (beta1, 0.99).
Fix: Preserve each group's existing beta2 while scheduling beta1.
Test: DS_ACCELERATOR=cpu python -m pytest tests/unit/runtime/test_lr_schedulers.py -k preserves_per_group_beta2: fails before, passes after. A six-step linear-model training loop matches Adam with the configured beta2 values through both cycle and decay. All 44 standalone scheduler cases pass. Tested on Apple M2 Pro CPU, torch 2.11.0. Changed-file pre-commit checks pass.

Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant