Audit and strengthen baseline training recipes - #26
Merged
Conversation
charlesmartin14
marked this pull request as ready for review
August 8, 2026 00:08
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.
Scope
Reviewed every reference experiment under
baseline/against its intended role, the repository's current implementation, and the primary optimizer/model recipes. This PR turns that review into an explicit versioned audit and corrects the baseline code where the existing recipe was materially weak or inconsistent.The goal is a strong, reproducible reference recipe. It is not a claim that literature defaults or a finite sweep establish a globally optimal hyperparameter point; a true optimum remains an empirical validation-only question on the target hardware.
MNIST / MLP3
0.05 -> 5e-4, momentum0.90, matrix-only weight decay1e-4.1e-3 -> 1e-5, betas(0.90, 0.999), matrix-only weight decay1e-2.sgd_momentum_muonarm: hidden matrices use Muon, while the classifier and biases now use auxiliary AdamW rather than auxiliary SGD.0.02 -> 0.002, momentum0.95, Nesterov, five Newton-Schulz steps and weight decay0.01; auxiliary AdamW uses3e-4 -> 3e-5, betas(0.90, 0.95).CIFAR-10 / small ViT
The earlier ViT control was under-regularized and did not have a separate validation set. The corrected reference now uses:
0, stochastic depth0.10;0.25;0.80, CutMix1.00, label smoothing0.10;1.0;Optimizer schedules are now explicit and non-zero-floor:
0.10 -> 0.001, 5-epoch warm-up, momentum0.90, weight decay5e-4.1.25e-4 -> 1e-5, 5-epoch warm-up, betas(0.90, 0.999), weight decay0.05. The peak is the DeiT5e-4reference linearly scaled from effective batch 512 to 128.0.02 -> 0.002; auxiliary AdamW3e-4 -> 3e-5; 5-epoch warm-up, momentum0.95, five Newton-Schulz steps.One-head nanoGPT / FineWeb-Edu
Audited and retained the existing implementation:
sample-10BTrevision;6e-4, betas(0.9, 0.95), weight decay0.1, warm-up/cosine schedule);The audit records one caveat: the GPT-2 embedding is large relative to a one-block model, so any parameter-scaling analysis must report or exclude embedding parameters explicitly. The matched optimizer control itself remains valid because every arm shares that embedding and Muon acts only on hidden matrices.
nanochat d12
Audited and retained the pinned native upstream recipe at commit
92d63d4e8bb4df75c3b71618f31ddde2378b2bcd:Updating the pinned upstream commit is explicitly treated as a new baseline version.
WeightWatcher contract
All strict reference baselines preserve direct output from:
The code requires/stores direct layer
alpha,ERG_gap, and randomized-MPnum_trapsvalues. It does not create fallback alpha values, proxy trap counts, or synthesized ERG gaps. The ViT analysis runs on CPU matrix copies so unsupported SVD/RMT operations stay off Apple MPS.Documentation and notebooks
baseline/BASELINE_RECIPE_AUDIT.mdwith the full data, initialization, optimizer, schedule, selection-policy and source audit.Validation performed
torch.optim.AdamWfor auxiliary parameters.The full three-seed MNIST and nine-run 300-epoch CIFAR-10 campaigns were not executed in this environment. No performance or accuracy result is claimed or fabricated.