Skip to content

Integrate sharded Muon into MaxText. - #5120

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_975384637
Open

Integrate sharded Muon into MaxText.#5120
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_975384637

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Integrate sharded Muon into MaxText.

  • Implements sharded_muon_utils.py to pair Muon dimension numbers paired with NamedSharding trees.
  • Adds flags for muon_type ('maxtext_muon' vs 'optax_muon') and muon_use_all_to_all.
  • Plumbs mesh through create_training_optimizer in train_utils.py, train_compile.py, and maxtext_engine.py. This is necessary to make sharded muon work.
  • Adds comprehensive unit test coverage.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.69072% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/optimizers/optimizers.py 47.36% 7 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

- Implements sharded_muon_utils.py to pair Muon dimension numbers paired with NamedSharding trees.
- Adds flags for muon_type ('maxtext_muon' vs 'optax_muon') and muon_use_all_to_all.
- Plumbs mesh through create_training_optimizer in train_utils.py, train_compile.py, and maxtext_engine.py. This is necessary to make sharded muon work.
- Adds comprehensive unit test coverage.

PiperOrigin-RevId: 975384637
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