Skip to content

Add controlled nanoGPT memorization suite: AdamW vs Muon with clip_xmax monitoring - #129

Merged
charlesmartin14 merged 7 commits into
mainfrom
experiments/nanogpt-memorization-controls-20260914
Sep 15, 2026
Merged

charlesmartin14 merged 7 commits into
mainfrom
experiments/nanogpt-memorization-controls-20260914

Conversation

@charlesmartin14

Copy link
Copy Markdown
Member

Summary

Adds only baseline/experiments/nanogpt_memorization/; existing baseline implementations and outputs are untouched.

Eight controlled synthetic suffix-prediction conditions cover exact sequence recall with dose and absent-canary controls, arbitrary key/value associations, clean and corrupted modular-addition labels, and forgetting under disjoint versus conflicting new mappings. The runner imports the existing one-head GPT and plain Muon/AdamW implementations and verifies pinned source blob hashes.

The repository profiles are preserved as source-backed baselines, not mislabeled optimal settings. The existing dated campaign has no checked-in nanoGPT qualification lock and uses MuonClip; this new suite deliberately selects its separate plain-Muon profile. A separately labeled shared_aux_decay control matches auxiliary AdamW settings and per-step decay factors.

WeightWatcher 0.7.7 runs with fix_fingers="clip_xmax", ERG=True, and randomize=True on detached CPU copies of the six hidden matrices. All returned fields, clipped/raw alpha, fit support, and matrix identities are retained. The implementation isolates diagnostic RNGs and checks that evaluation does not mutate model weights. Alpha alone is not treated as evidence of memorization.

Includes exact exposure schedules, paired initialization/data checks, restart checkpoints, per-example behavioral probes, source/data/package/hardware manifests, run/monitor/plan commands, a full protocol, and an explicit execution ledger.

Validation actually performed

  • python -m pytest -q tests: 14 passed, rerun after final code changes.
  • python -m py_compile run.py: passed.
  • Plan generation: 16 smoke/pilot commands and 80 full-campaign commands.
  • Remote runner, test, and config blob hashes match the locally tested files.

Not executed / why this is a draft

  • No real WeightWatcher numerical integration run (the unit test mocks its API).
  • No real parent GPT + AdamW/Muon training smoke, MPS/CUDA restart integration, pilot, or full campaign.
  • No scientific performance or spectral/memorization result is claimed.

Run the documented two-update smoke for both optimizers on the intended hardware before attempting pilots. These are new synthetic, suffix-supervised tasks, not FineWeb pretraining, and losses are not directly comparable with the parent corpus baseline.

Copy link
Copy Markdown
Member Author

Pre-merge review for the requested full campaign:

  • Re-ran the exact memorization suite locally: 14 passed in 1.35s; run.py compiles.
  • Added run_full.sh in commit 1170be813f93ad68a344c14098021aa179b8a7fa. bash -n passes for the launcher and generated plan. Parsed the plan and verified 16 distinct smoke runs followed by 80 distinct full runs, each with explicit device/root/recipe and --resume.
  • The launcher runs the component tests, then all smoke conditions for both optimizers, then the complete five-seed campaign sequentially. It stops on any error, preserves pipeline exit status, and records the executed plan and combined log.
  • Existing CI is not all green: the baseline source-syntax and core-baseline jobs passed, but one-head-nanogpt reports 159 passed / 2 failed. Both failures are static source assertions in the existing test_angular_rg_notebook_smoke.py (test_single_matrix_wrapper_preserves_loader_metadata and test_notebook_displays_the_actual_results_variable). This PR changes neither those tests nor the angular notebooks. They remain unchanged; no checks were removed or disabled.
  • This review did not execute actual WeightWatcher fitting or target-hardware training. The launcher deliberately makes the real two-update smoke checks mandatory before the full runs. No training-performance claims are made.

User explicitly requested checking in and merging this experiment folder. Only this runnable-suite PR is being merged; the separate design-only PR #128 is not included.

@charlesmartin14
charlesmartin14 marked this pull request as ready for review September 15, 2026 00:22
@charlesmartin14
charlesmartin14 merged commit 6730021 into main Sep 15, 2026
2 of 3 checks passed
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.

1 participant