Repository navigation
Conversation
This branch has not been deployed
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
When
set_weight_decay_floor_normsis active,_apply_updates_with_weight_decayruns onevector_normlaunch per floored parameter. Since parameters in batched Muon/Aurora chunks and in size-sorted groups already form contiguous runs of identical shapes, we can apply the exact same per-output-channel floored decay once per run._decay_stacked_run_inpython/muon/muon.py, gated byKATAGO_MUON_STACKED_WD(default1)._step_muon_params_batched) and the distributed bf16-gather apply path (_apply_muon_updates), falling back cleanly to_apply_updates_with_weight_decayfor singleton or unfloored runs.set_weight_decay_floor_normsis called.python/tests/test_floored_weight_decay.pycovering both orientations, 1x1 conv shapes, rows below floor, all-zero rows, and_apply_muon_updates.Numerics & Measurements
Measured on RTX PRO 6000 Blackwell (
b11c768h12nbt3tflrs-fson-silu, batch 160, FP16 AMP + Aurora +-wd-floor-frac 0.05):_apply_muon_updates(DDP speed itself not separately benchmarked).(Note: ported cleanly onto current
masterand syntax-checked locally on macOS; the newly added CPU tests intest_floored_weight_decay.pymirror the GPU unit tests above and have not yet been re-run viapytestafter porting.)