Repository navigation
Opus pre-flight: selective-TTT patch + experiment specs + pod scripts - #2
Merged
Merged
Conversation
CPU-only prep ahead of RunPod access. Everything we can do without spending GPU credits. Code: - train_gpt_base.py: decompressed PR openai#1493 SOTA (read-only reference) - train_gpt_v1.py: base + TTT_PARAM_FILTER hyperparameter and _select_ttt_params helper. Default 'all' preserves baseline behavior. Filters: scales, scales+embed, last_n_layers:K, attn_only, mlp_only. Notes: - selective_ttt_patch.md: patch design + parameter accounting + risks Experiments (6 specs ready to run): 001 baseline reproduction (seed=42 on 1xH100) 002 TTT param-filter sweep 003 TTT LR x epochs sweep on winning filter 004 TTT chunk-size sweep on winning config 005 3-seed validation on 8xH100 010 mixed-bit GPTQ (fallback if TTT angle fails) Scripts: setup_pod.sh: fresh-pod bootstrap (idempotent) run_repro.sh: one-command Experiment 001 validate_param_filter.py: filter assertions, runs locally on CPU Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
GodlyDonuts
added a commit
that referenced
this pull request
Apr 28, 2026
Synthesis of (a) deep records-folder pass, (b) modded-nanogpt record openai#80 gold standard, (c) FP8 / CUDA Graphs / distillation literature. Key findings: 1. Leaderboard converged on gradient-quality + quantization tricks while leaving raw throughput largely unexplored. Modded-nanogpt has absorbed multiple compute-maxing techniques that haven't crossed into PG. 2. NEVER-TRIED on the leaderboard (open territory): - CUDA Graphs (record openai#80 of modded-nanogpt uses heavily) - Multiple parallel training rounds in unused VRAM - Multiple EMAs / Polyak averaging - Distillation initialization - Larger GPTQ calibration set (>64 batches) - Sequence-length warmup 3. Top-8 ranked actionable items (CUDA Graphs #1, batch-size sweep #2, FP8 head openai#3, multi-EMA openai#4). Cost estimates and confidence per item. 4. Modded-nanogpt techniques NOT in our SOTA: FP8 head + asymmetric rescale, fused softcapped CE, Cautious Weight Decay, "Adam every other step", paired-head Q/K orthogonalization, attention window warmup, MTP. 5. TRIED-AND-DROPPED on PG (don't waste compute): seq_len=4096, parallel residual MLP-skip, 3-loop mini-recurrence, ternary, YaRN, NeoMuon, hash embeddings, etc. Verbatim quotes from records folder for each. 6. FP8 honest analysis: 1.6x typical training speedup (not 3x), with documented loss-spike instability. FP8 only on lm_head + tok_emb is the right initial bet (small surface, well-conditioned matmuls). Decision rules tied to Phase 3 outcome: - Phase 2 mean > 1.0780: prioritize throughput stack (CUDA Graphs + batch sweep + FP8 head) plus Newton-Muon as gradient-quality lever. - Phase 2 mean 1.0760-1.0780: just CUDA Graphs + LR follow-on + Newton-Muon. - Phase 2 mean clears 1.0760: ship; none of this matters this cycle. Still-research items: torch.compile(mode='reduce-overhead'), MTP re-test, qTTT paper body, Cautious WD diff from modded-nanogpt. None spend GPU. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
Pre-flight work for the Day 1 leaderboard run, all done on CPU before any RunPod compute is spent. Builds on the Opus folder merged in #1.
What changed
Code (
Opus/code/)train_gpt_base.py— decompressed PR Record: SP8192 + 3-Layer Recurrence + Parallel Residuals + QK-Gain 5.25 + Legal TTT — val_bpb 1.0810 (3-seed mean) openai/parameter-golf#1493 SOTA (read-only reference)train_gpt_v1.py— base + newTTT_PARAM_FILTERenv var. Defaultallmatches PR Record: SP8192 + 3-Layer Recurrence + Parallel Residuals + QK-Gain 5.25 + Legal TTT — val_bpb 1.0810 (3-seed mean) openai/parameter-golf#1493 byte-for-byte. Filters:scales,scales+embed,last_n_layers:K,attn_only,mlp_onlyExperiments (
Opus/experiments/) — 6 specs, each with hypothesis / commands / decision criteriascalesvsall)Notes (
Opus/notes/)selective_ttt_patch.md— patch design, parameter accounting, risksScripts (
Opus/scripts/)setup_pod.sh— idempotent fresh-pod bootstrap (clone, deps, dataset, sanity)run_repro.sh— one-command Experiment 001validate_param_filter.py— local CPU unit test for the new filter logic (assertions all pass on Python 3.11)Why
The hypothesis I'm betting compute on: SOTA TTT trains every parameter (~34M floats) on each chunk, including the int6-quantized matrices that just came off a careful GPTQ rate-distortion fit — every TTT step pulls them off the grid for marginal data signal. Restricting TTT to the ~38K-float fp32 control surface (
q_gain,attn_scale,mlp_scale,resid_mix,skip_weights,skip_gates) should give cleaner adaptation per chunk. SeeOpus/notes/selective_ttt_patch.mdfor the parameter accounting.Reviewer notes
all) so any existing run reproduces PR Record: SP8192 + 3-Layer Recurrence + Parallel Residuals + QK-Gain 5.25 + Legal TTT — val_bpb 1.0810 (3-seed mean) openai/parameter-golf#1493 unchanged.Test plan
val_bpb_ttt = 1.08079(Experiment 001)