Add NorMuon optimizer (row-wise adaptive normalization for Muon)#1651
Open
bzantium wants to merge 1 commit intogoogle-deepmind:mainfrom
Open
Add NorMuon optimizer (row-wise adaptive normalization for Muon)#1651bzantium wants to merge 1 commit intogoogle-deepmind:mainfrom
bzantium wants to merge 1 commit intogoogle-deepmind:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
277c1f7 to
7df9c09
Compare
NorMuon extends Muon with row-wise second moment tracking and adaptive normalization after Newton-Schulz orthogonalization, ensuring balanced neuron utilization with negligible memory overhead. Reference: Li et al., "NorMuon: Making Muon more efficient and scalable" (arxiv:2510.05491), 2025
107a36f to
4bdb9e6
Compare
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.
Summary
optax.contribbased on arXiv:2510.05491Algorithm
NorMuon adds row-wise adaptive normalization after Newton-Schulz orthogonalization:
M_t = β₁ M_{t-1} + (1 - β₁) G_tO_t = NS5(M_t)(same as Muon)v_t = β₂ v_{t-1} + (1 - β₂) mean_cols(O_t²)wherev_t ∈ ℝ^mÔ_t = O_t / (√V_t + ε)η̂ = 0.2 · η · √(mn) / ‖Ô_t‖_FMemory overhead vs Muon: only
madditional scalars per(m, n)parameter — negligible.Changes
optax/contrib/_normuon.py—scale_by_normuon()andnormuon()implementationsoptax/contrib/_normuon_test.py— 8 unit testsoptax/contrib/_normuon_benchmark_test.py— training benchmark comparing NorMuon vs Muonoptax/contrib/__init__.py— exportnormuon,NorMuonState,scale_by_normuonBenchmark Results
Training a 2-layer MLP (32→64→1) on synthetic regression data for 500 steps:
Test plan
pytest optax/contrib/_normuon_test.py— 8 unit tests passtest_normuon_vs_muon_convergence— both optimizers converge, NorMuon comparable to Muontest_normuon_no_side_effects— no NaN/Inf, monotonic decrease, finite paramstest_normuon_mixed_params_training— all params updated correctly