Skip to content

Non-record: GradPower for Muon prefers p<1 in matched H100 ablation - #1682

Open
PapaFranku4647 wants to merge 1 commit into
openai:mainfrom
PapaFranku4647:submission/muonpower-gradpower-plt1
Open

PapaFranku4647 wants to merge 1 commit into
openai:mainfrom
PapaFranku4647:submission/muonpower-gradpower-plt1

Conversation

@PapaFranku4647

Copy link
Copy Markdown

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:

g = sign(g) * abs(g) ** p

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 was MUON_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 except MUON_GRAD_POWER:

MUON_GRAD_POWER steps last val BPB final int8+zlib BPB delta
0.9 2391 1.2818 1.28338224 -0.00352966
1.0 2355 1.2852 1.28691190 baseline

The H100 train curves also separate early and remain ordered through the run. Full logs are included under:

records/track_non_record_16mb/2026-04-16_MuonPower_GradPower_pLT1/logs/h100_1200s/

Local 4080 Sweep

A 1xRTX4080 1200s sweep over seeds 1337, 1338, and 42 found the same direction:

MUON_GRAD_POWER mean final BPB sample std delta vs p=1.0
0.850 1.36693001 0.00266328 -0.00170810
0.875 1.36682637 0.00256659 -0.00181174
0.900 1.36672930 0.00298812 -0.00190881
0.925 1.36695266 0.00176984 -0.00168545
0.950 1.36710799 0.00162211 -0.00153012
0.975 1.36778177 0.00161212 -0.00085634
1.000 1.36863811 0.00188080 baseline

Every tested p<1 value 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:

  • most large matrix parameters are optimized by Muon, not Adam
  • Muon orthogonalizes matrix updates after receiving the gradient
  • the effective token batch is large
  • the objective is wallclock-limited and artifact-size-limited

So the useful result is not simply "GradPower helps." It is more specific:

In this Muon-heavy Parameter Golf regime, the GradPower exponent appears to flip below 1.

That makes p=1.2 a useful negative result and p≈0.9 a plausible H100 follow-up target.

Included

This folder includes:

  • train_gpt.py with the MuonPower implementation
  • matched H100 logs for p=0.9 and p=1.0
  • 4080 3-seed sweep logs for p<1
  • exploratory logs showing p>1, including p=1.2, is harmful here
  • submission.json
  • README with reproduction notes and proposed follow-up experiments

Follow-Up Compute Plan

With more H100 time, the next experiments are:

  1. Multi-seed H100 confirmation of p=0.9 vs p=1.0.
  2. H100 plateau check around p in {0.875, 0.9, 0.925}.
  3. Matrix LR retune with p=0.9.
  4. Transfer test on the strongest current SP8192/MuonEq-R/TTT-style stack.
  5. Optional ablation applying GradPower separately to Adam parameter groups.

This should clarify whether MuonPower below 1 is only a clean optimizer note, or whether it is also a useful leaderboard ingredient.

Copilot AI review requested due to automatic review settings April 16, 2026 22:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_POWER and applies sign(g) * abs(g)**p to 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.

Comment on lines +147 to +151
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]

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +1134 to +1159

====================================================================================================
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 |
+-----------------------------------------------------------------------------------------+

====================================================================================================

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
====================================================================================================
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 |
+-----------------------------------------------------------------------------------------+
====================================================================================================
====================================================================================================

Copilot uses AI. Check for mistakes.
## 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`.

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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.

Copilot uses AI. Check for mistakes.
leon2k2k2k added a commit to leon2k2k2k/parameter-golf that referenced this pull request Apr 20, 2026
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]>
leon2k2k2k added a commit to leon2k2k2k/parameter-golf that referenced this pull request Apr 20, 2026
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]>
leon2k2k2k added a commit to leon2k2k2k/parameter-golf that referenced this pull request Apr 20, 2026
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]>
leon2k2k2k added a commit to leon2k2k2k/parameter-golf that referenced this pull request Apr 20, 2026
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]>
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.

2 participants