Add nanoGPT Muon-HyperBall baseline - #52
Draft
charlesmartin14 wants to merge 1 commit into
Draft
Conversation
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.
Purpose
Add a separate one-head nanoGPT experiment family for a matched comparison of ordinary long-horizon Muon and Muon with a relative Frobenius HyperBall projection. Existing
baseline/nanogpt_one_headsource and results are untouched.HyperBall rule
For each hidden transformer matrix, reference Muon first proposes its complete displacement, including matrix weight decay. The new arm applies
[
\Delta W_{HB}=\Delta W\min\left(1,\frac{\rho\lVert W\rVert_F}{\lVert\Delta W\rVert_F+\epsilon}\right),
]
with reference radius
rho = 0.01. The projection is radial, so it preserves Muon's proposed direction and changes only its magnitude. The tied embedding/head, normalization parameters, and other non-hidden parameters retain auxiliary AdamW.Long-horizon schedule correction
The failed ten-epoch pilot stretched the original five-percent warmup over the full ten-epoch horizon. Muon's LR therefore kept increasing until epoch 0.5 and the run became non-finite near step 4250. This experiment separates training and LR-schedule horizons:
Both
muonandmuon_hyperballuse this exact schedule, data, seed, architecture, evaluation probes, and WeightWatcher cadence.Diagnostics
The new runtime records HyperBall activation fraction, mean/min projection scale, proposed/applied update-to-weight ratios, proposed/applied update norms, and radius statistics. It also aborts on non-finite train/validation metrics before invoking WeightWatcher, preventing optimizer divergence from surfacing later as an SVD-convergence error.
Contents
baseline/nanogpt_muon_hyperballpackage and/tmp/rg-nanogpt-muon-hyperballresult namespacemuonandmuon_hyperballprofilesValidation
The full ten-epoch scientific run has not been executed in CI.