Repository navigation
Non-record: GradPower for Muon prefers p<1 in matched H100 ablation - #1682
PapaFranku4647 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a non-record research submission exploring a GradPower-style elementwise gradient power transform applied to Muon (“MuonPower”), and includes matched H100 + local RTX4080 sweep logs and writeup.
Changes:
- Introduces
MUON_GRAD_POWERand appliessign(g) * abs(g)**pto Muon’s matrix gradients before momentum + Newton–Schulz orthogonalization. - Adds experiment artifacts:
submission.json, README reproduction/analysis, and H100/4080 log bundles.
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/train_gpt.py | Implements MuonPower via MUON_GRAD_POWER and includes the full training/quantization script snapshot used for runs. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/submission.json | Records best run metrics/metadata for the non-record submission. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/README.md | Summarizes results, negative transfer for p>1, and provides reproduction notes and follow-up plan. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/h100_1200s/h100_1200s_p0.900_seed1337.txt | Matched H100 log for p=0.9. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/h100_1200s/h100_1200s_p1.000_seed1337.txt | Matched H100 baseline log for p=1.0. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.850_seed42.txt | Local sweep log (4080, 1200s) for p=0.85, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.850_seed1337.txt | Local sweep log (4080, 1200s) for p=0.85, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.850_seed1338.txt | Local sweep log (4080, 1200s) for p=0.85, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.875_seed42.txt | Local sweep log (4080, 1200s) for p=0.875, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.875_seed1337.txt | Local sweep log (4080, 1200s) for p=0.875, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.875_seed1338.txt | Local sweep log (4080, 1200s) for p=0.875, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.900_seed42.txt | Local sweep log (4080, 1200s) for p=0.9, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.900_seed1337.txt | Local sweep log (4080, 1200s) for p=0.9, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.900_seed1338.txt | Local sweep log (4080, 1200s) for p=0.9, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.925_seed42.txt | Local sweep log (4080, 1200s) for p=0.925, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.925_seed1337.txt | Local sweep log (4080, 1200s) for p=0.925, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.925_seed1338.txt | Local sweep log (4080, 1200s) for p=0.925, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.950_seed42.txt | Local sweep log (4080, 1200s) for p=0.95, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.950_seed1337.txt | Local sweep log (4080, 1200s) for p=0.95, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.950_seed1338.txt | Local sweep log (4080, 1200s) for p=0.95, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.975_seed42.txt | Local sweep log (4080, 1200s) for p=0.975, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.975_seed1337.txt | Local sweep log (4080, 1200s) for p=0.975, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p0.975_seed1338.txt | Local sweep log (4080, 1200s) for p=0.975, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p1.000_seed42.txt | Local baseline log (4080, 1200s) for p=1.0, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p1.000_seed1337.txt | Local baseline log (4080, 1200s) for p=1.0, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_1200s/4080_1200s_p1.000_seed1338.txt | Local baseline log (4080, 1200s) for p=1.0, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/grad_power_0100_seed42.txt | Exploratory (600s) baseline run log for seed 42 (includes script dump). |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/grad_power_0100_seed1337.txt | Exploratory (600s) baseline run log for seed 1337 (includes script dump). |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/grad_power_0100_seed1338.txt | Exploratory (600s) baseline run log for seed 1338 (includes script dump). |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p105_s1337.txt | Exploratory (600s) run log for p=1.05, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p11_s42.txt | Exploratory (600s) run log for p=1.1, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p11_s1337.txt | Exploratory (600s) run log for p=1.1, seed 1337 (currently appears concatenated). |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p11_s1338.txt | Exploratory (600s) run log for p=1.1, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p12_s42.txt | Exploratory (600s) run log for p=1.2, seed 42. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p12_s1337.txt | Exploratory (600s) run log for p=1.2, seed 1337. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p12_s1338.txt | Exploratory (600s) run log for p=1.2, seed 1338. |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p09_s1337.txt | Exploratory (600s) run log for p=0.9, seed 1337 (short stdout-style capture). |
| records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/4080_600s_exploratory/muonpower_p095_s1337.txt | Exploratory (600s) run log for p=0.95, seed 1337 (short stdout-style capture). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if i % world_size == rank and p.grad is not None: | ||
| g = p.grad | ||
| if grad_power != 1.0: | ||
| g = g.sign() * g.abs().pow(grad_power) | ||
| state = self.state[p] |
There was a problem hiding this comment.
MUON_GRAD_POWER is accepted as any float, but values <= 0 (or non-finite) will make abs(g).pow(grad_power) produce inf/NaNs (e.g., 0**negative). Consider validating muon_grad_power (and/or grad_power in Muon.__init__) to be finite and > 0, with a clear error message.
|
|
||
| ==================================================================================================== | ||
| Running Python 3.12.3 (main, Mar 3 2026, 12:15:18) [GCC 13.3.0] | ||
| Running PyTorch 2.11.0+cu130 | ||
| Wed Apr 15 15:37:56 2026 | ||
| +-----------------------------------------------------------------------------------------+ | ||
| | NVIDIA-SMI 590.57 Driver Version: 591.86 CUDA Version: 13.1 | | ||
| +-----------------------------------------+------------------------+----------------------+ | ||
| | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | ||
| | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | ||
| | | | MIG M. | | ||
| |=========================================+========================+======================| | ||
| | 0 NVIDIA GeForce RTX 4080 On | 00000000:01:00.0 On | N/A | | ||
| | 32% 42C P2 14W / 320W | 810MiB / 16376MiB | 10% Default | | ||
| | | | N/A | | ||
| +-----------------------------------------+------------------------+----------------------+ | ||
|
|
||
| +-----------------------------------------------------------------------------------------+ | ||
| | Processes: | | ||
| | GPU GI CI PID Type Process name GPU Memory | | ||
| | ID ID Usage | | ||
| |=========================================================================================| | ||
| | 0 N/A N/A 79077 C /python3.12 N/A | | ||
| +-----------------------------------------------------------------------------------------+ | ||
|
|
||
| ==================================================================================================== |
There was a problem hiding this comment.
This log file appears to contain multiple runs concatenated together (a second ==== header and full environment dump starts again at ~line 1135, and later the script source is repeated). That makes it ambiguous which metrics correspond to the intended muonpower_p11_s1337 run—please regenerate/split so each log file contains exactly one run (or clearly delimiter and label each run).
| ==================================================================================================== | |
| Running Python 3.12.3 (main, Mar 3 2026, 12:15:18) [GCC 13.3.0] | |
| Running PyTorch 2.11.0+cu130 | |
| Wed Apr 15 15:37:56 2026 | |
| +-----------------------------------------------------------------------------------------+ | |
| | NVIDIA-SMI 590.57 Driver Version: 591.86 CUDA Version: 13.1 | | |
| +-----------------------------------------+------------------------+----------------------+ | |
| | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | |
| | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | |
| | | | MIG M. | | |
| |=========================================+========================+======================| | |
| | 0 NVIDIA GeForce RTX 4080 On | 00000000:01:00.0 On | N/A | | |
| | 32% 42C P2 14W / 320W | 810MiB / 16376MiB | 10% Default | | |
| | | | N/A | | |
| +-----------------------------------------+------------------------+----------------------+ | |
| +-----------------------------------------------------------------------------------------+ | |
| | Processes: | | |
| | GPU GI CI PID Type Process name GPU Memory | | |
| | ID ID Usage | | |
| |=========================================================================================| | |
| | 0 N/A N/A 79077 C /python3.12 N/A | | |
| +-----------------------------------------------------------------------------------------+ | |
| ==================================================================================================== | |
| ==================================================================================================== |
| ## Local 4080 Sweep | ||
|
|
||
| The local sweep was run on 1xRTX 4080 under WSL with the same model family and `max_wallclock_seconds=1200`. Each value below is the final int8+zlib roundtrip BPB over seeds `1337`, `1338`, and `42`. | ||
|
|
There was a problem hiding this comment.
The committed logs/4080_1200s/*.txt files all start with the same printed logfile path (logs/grad_power_0100_seed42.txt), which doesn’t match the per-(p,seed) filenames and makes it unclear how logs were captured (and whether RUN_ID was reused/overwritten). Consider regenerating those logs with a unique RUN_ID that matches the filename (or remove that first line / explain the capture method here).
| For the committed `logs/4080_1200s/*.txt` artifacts, each run was captured to a unique per-(`MUON_GRAD_POWER`, seed) filename in that directory. The repeated first printed path (`logs/grad_power_0100_seed42.txt`) is just the training script's internal logfile printout from the stdout/stderr stream that was captured, not the final filename of the committed artifact and not evidence that a single `RUN_ID` was reused or overwritten. |
Scanned 200 PRs from 2026-04-11..20. After exclusion filters, 3 candidates beat spec 011's expected Δ: openai#1682 (GradPower Muon p=0.9), openai#1648 (xIELU + per-layer QK gain), openai#1555 (Tap-In eval cache). Full artifacts at ~/competition-pr/pr-scan-2026-04-20/. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Bundles three orthogonal training-time levers into one retrain: - tapered Muon WD (port openai#1729, originally spec 011) - GradPower p=0.9 (port openai#1682) - softer QK_GAIN init 5.0 → 2.5 (port openai#1648, simplified from per-layer convergence) Code patch at exp/training-bundle (commit 8d54854). All env-gated with no-op defaults. Supersedes spec 011 which is kept as a design-doc reference. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Four new env-gated hyperparameters, all default to no-op so spec 008 is byte-identical when the vars are unset: - WD_TAPER_START_FRAC / WD_TAPER_FINAL_MULT (port openai#1729): linear Muon WD taper from 1.0 at start_step to final_mult at h.iterations. Applied in step_fn before optimizers.step. Adam/embed WD untouched per openai#1729. - MUON_GRAD_POWER (port openai#1682): g = sign(g) * |g|^p, applied to Muon gradients just before the momentum buffer update. Covers both sharded (shard path) and non-sharded paths. - QK_GAIN_INIT (existing): already present, lowering default not changed; setting QK_GAIN_INIT=2.5 at runtime gives uniform softer attention per openai#1648's convergence finding. - QK_GAIN_PER_LAYER (new): comma-sep list, overrides each block's attn.q_gain after block construction. Validated to match num_layers. Also: one startup log line echoing the four values for post-hoc verification. Spec: research/specs/012-training-bundle.md. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Endpoint val_bpb +0.0009 vs spec 008 (within noise). Analysis: - GradPower p=0.9 (port openai#1682) did not transfer from 1×H100/1200s to 8×H100/600s. Author warned about this; reality confirmed. - WD taper never engaged because WD_TAPER_START_FRAC=0.70 was defined as a fraction of `iterations` env var (20000), not of actual stopping_early step (~4844). Taper was scheduled for step 14000. Decision: kill GradPower, shelve tapered WD (fix cost > expected upside in remaining budget). Move spec 013 (BigramHash) to front of queue. Cost: ~$9.50 (includes rotary bug debug + setup errors). Running total ~$138 remaining before 013. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
This is a non-record optimizer ablation testing whether GradPower transfers to the Parameter Golf Muon training stack.
This experiment is inspired by Wang et al., GradPower: Powering Gradients for Faster Language Model Pre-Training (arXiv:2505.24275v2). GradPower applies the elementwise transformation:
The main finding is that the GradPower idea appears useful here, but the exponent does not transfer as the paper default
p=1.2. In this Muon-heavy, large-token-batch setup, powers below 1 work better. The best tested value wasMUON_GRAD_POWER=0.9.This PR is not claiming a record. It is intended as a clean research contribution: a small optimizer result, a negative transfer result for
p>1, and a concrete H100 follow-up plan.Key H100 Result
Matched 1xH100, 1200s, seed
1337, same code/data/hyperparameters exceptMUON_GRAD_POWER:MUON_GRAD_POWER0.91.0The H100 train curves also separate early and remain ordered through the run. Full logs are included under:
Local 4080 Sweep
A 1xRTX4080 1200s sweep over seeds
1337,1338, and42found the same direction:MUON_GRAD_POWERp=1.0Every tested
p<1value beat vanilla Muon on the local 3-seed mean.Why This Is Interesting
The GradPower paper reports strong AdamPower results with
p=1.2, while also suggesting that the optimal exponent depends on noise and batch regime. Parameter Golf is a different setting:So the useful result is not simply "GradPower helps." It is more specific:
That makes
p=1.2a useful negative result andp≈0.9a plausible H100 follow-up target.Included
This folder includes:
train_gpt.pywith the MuonPower implementationp=0.9andp=1.0p<1p>1, includingp=1.2, is harmful heresubmission.jsonFollow-Up Compute Plan
With more H100 time, the next experiments are:
p=0.9vsp=1.0.p in {0.875, 0.9, 0.925}.p=0.9.This should clarify whether MuonPower below 1 is only a clean optimizer note, or whether it is also a useful leaderboard ingredient.