Skip to content

[kimi k2.7] Pass muon_lr and adamw_lr separately to the DistMuon recipe - #4755

Merged
tianyu-l merged 1 commit into
pytorch:mainfrom
JavaZeroo:refactor/k2_7-muon-lr
Sep 16, 2026
Merged

tianyu-l merged 1 commit into
pytorch:mainfrom
JavaZeroo:refactor/k2_7-muon-lr

Conversation

@JavaZeroo

Copy link
Copy Markdown
Contributor

Summary

Prerequisite split out of #4596, as requested there: _dist_muon_optimizer in the Kimi K2.7 recipe took a single lr for both the DistMuon and the AdamW parameter groups. This changes it to muon_lr and adamw_lr so a recipe can tune them independently. All four recipes (kimi_k2_5_debugmodel, moonlight_16b_a3b, kimi_k2_5, kimi_vl_a3b) keep passing the same value to both, so no configuration changes. The K3 recipe in #4596 uses the same signature.

Test plan

  • Built all four K2.7 recipes and checked both param groups still get the recipe's lr.
  • pre-commit run and pyrefly clean on the file.

_dist_muon_optimizer took one lr for both parameter groups. Take
muon_lr and adamw_lr so recipes can tune the two optimizers
independently. Every existing recipe keeps passing the same value to
both, so no configuration changes.
@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Sep 16, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 16, 2026
@pytorch-bot

pytorch-bot Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@shuhuayu

Copy link
Copy Markdown
Contributor

it is generally the case that matrix optimizer and adamw use different learning rates, see marin's live streaming pretrain as an example: marin-community/marin#8435

@tianyu-l
tianyu-l merged commit e56c4d7 into pytorch:main Sep 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants