@@ -5,16 +5,61 @@ program.
55
66## Reproducible baselines
77
8- [ ` baseline/ ` ] ( baseline ) contains matched MLP3/MNIST baselines for:
8+ [ ` baseline/ ` ] ( baseline ) contains the reference experiments used to evaluate the
9+ RG optimizer variants. The goal is to test optimizer behavior across several
10+ architectures and modalities rather than against a single toy model.
911
10- - SGD with momentum;
11- - AdamW;
12- - SGD with momentum plus Muon.
12+ | Baseline | Model / data | Reference optimizers | Primary purpose |
13+ | --- | --- | --- | --- |
14+ | ** MLP3 / MNIST** | ` 784 -> 512 -> 512 -> 10 ` MLP on MNIST | SGD + momentum, AdamW, SGD + momentum + Muon | Cheap, tightly controlled optimizer and spectral debugging |
15+ | ** Small ViT / CIFAR-10** | 6-block, 192-wide Vision Transformer with 4x4 patches | SGD + Nesterov, AdamW, Muon + auxiliary AdamW | Transformer optimization on vision data with residual/attention structure |
16+ | ** nanochat d12** | 12-layer, 768-wide, 2048-context nanochat language model | Native nanochat Muon + AdamW recipe | Modern small-LLM reference baseline with tuned initialization, parameter groups, scaling rules, and schedules |
1317
14- Each notebook runs three independent seeds and measures full train/test loss
15- and accuracy plus original WeightWatcher full-` M ` diagnostics at epoch zero and
16- every training epoch. Plots use a fixed color-blind-safe palette and two-sided
17- 95% Student-t confidence intervals across complete training runs.
18+ ### MLP3 / MNIST
19+
20+ The MNIST suite runs three independent seeds for each optimizer and records full
21+ train/test loss and accuracy, checkpoints, and WeightWatcher diagnostics at
22+ epoch zero and every training epoch. The comparison notebook reports
23+ run-level two-sided 95% Student-t confidence intervals.
24+
25+ Notebooks:
26+
27+ - ` baseline/notebooks/MNIST_MLP3_SGD_Momentum_Baseline.ipynb `
28+ - ` baseline/notebooks/MNIST_MLP3_AdamW_Baseline.ipynb `
29+ - ` baseline/notebooks/MNIST_MLP3_SGD_Momentum_Muon_Baseline.ipynb `
30+ - ` baseline/notebooks/MNIST_MLP3_Baseline_Comparison.ipynb `
31+
32+ ### Small ViT / CIFAR-10
33+
34+ ` baseline/notebooks/CIFAR10_ViT_Optimizer_Baselines.ipynb ` trains the same
35+ small Vision Transformer from scratch with SGD + Nesterov, AdamW, and Muon +
36+ auxiliary AdamW. It uses three seeds, optimizer-specific tuned hyperparameters,
37+ warmup/cosine schedules, CIFAR-10 augmentation, checkpoint persistence, and
38+ WeightWatcher spectral diagnostics.
39+
40+ ### nanochat d12
41+
42+ ` baseline/notebooks/NanoChat_D12_Reference_Baseline.ipynb ` is the modern
43+ language-model reference baseline. It pins upstream nanochat commit
44+ ` 92d63d4e8bb4df75c3b71618f31ddde2378b2bcd ` and deliberately keeps nanochat's
45+ training recipe intact rather than replacing it with a generic GPT/AdamW
46+ configuration.
47+
48+ The d12 reference uses 12 transformer layers, width 768, and context length
49+ 2048 . It preserves nanochat's native initialization, Muon/AdamW parameter
50+ partitioning, separate embedding/unembedding/matrix/scalar learning rates,
51+ depth- and batch-aware scaling rules, 40-step warmup, long linear warmdown,
52+ Muon momentum schedule, and cautious cosine-decayed weight decay. The wrapper
53+ adds reproducible independent seeds, periodic checkpoints and validation,
54+ final CORE evaluation, tidy CSV logs, and offline WeightWatcher analysis so
55+ spectral diagnostics do not perturb timed training.
56+
57+ The reusable runner lives at:
58+
59+ - ` baseline/rg_baselines/nanochat_reference.py `
60+
61+ See [ ` baseline/README.md ` ] ( baseline/README.md ) for detailed run instructions,
62+ output layouts, metrics, and reproducibility conventions.
1863
1964## Optimizer variants
2065
0 commit comments