Skip to content

Record: 11L VR + GA + LeakyReLU² + Legal Score-First TTT (val_bpb=pending)#490

Draft
amaljithkuttamath wants to merge 4 commits intoopenai:mainfrom
amaljithkuttamath:submission/vr-ga-adamw-ttt
Draft

Record: 11L VR + GA + LeakyReLU² + Legal Score-First TTT (val_bpb=pending)#490
amaljithkuttamath wants to merge 4 commits intoopenai:mainfrom
amaljithkuttamath:submission/vr-ga-adamw-ttt

Conversation

@amaljithkuttamath
Copy link
Copy Markdown

@amaljithkuttamath amaljithkuttamath commented Mar 23, 2026

Summary

val_bpb = pending rerun | 8xH100 SXM | Legal score-first TTT

Architecture improvements on the standard 11L stack: Value Residual + Gated Attention + LeakyReLU(0.5)², with legal score-first TTT.

Update (Mar 23)

Initial submission used pre-eval TTT (non-compliant per #402). This update switches to legal score-first TTT: score each validation chunk before training on it. Score pending rerun with compute credits.

Architecture

  • Value Residual (arXiv:2410.17897): Learned lambda blends first-block V into subsequent blocks. +2 params/layer.
  • Gated Attention (arXiv:2505.06708): Per-head sigmoid gate on attention output. +4104 params/layer.
  • LeakyReLU(0.5)²: Replaces relu² in MLP. Preserves negative gradient flow.
  • Legal score-first TTT: AdamW lr=1e-4, 3 epochs, cosine LR across 131K-token chunks, last 2 blocks + norms unfrozen. Every token scored BEFORE model trains on it.

VR+GA ablated in PR #413 (-0.017 bpb combined). LeakyReLU² proven by PR #569 and #535.

Run command

torchrun --standalone --nproc_per_node=8 train_gpt.py

All hyperparameters set as defaults.

Credits

Value Residual + Gated Attention on PR openai#442 stack.
Single seed (1337), 8xH100 SXM, 14.2 MB artifact.
sahiee-dev added a commit to sahiee-dev/parameter-golf that referenced this pull request Mar 23, 2026
Full stack on thwu1 base (1.1428):
- Value Residual: lambda_v * v0 shortcut to every block, init=0
- Gated Attention: learned scalar gate on attn output, init=1
- XSA: orthogonal self-value removal, last 4 layers
- EMA: decay=0.9999 shadow model used at final eval
- AdamW TTT: lr=0.001, 3 epochs on val tokens before eval
- BigramHash(10240): restored to full size after ablation

Techniques consistent with PR openai#490 (1.0891) and PR openai#486 (1.0887).
Expected range: 1.08-1.10 on 8xH100s.
Trigram ablation confirmed negative at small scale — removed.
Pre-eval TTT was non-compliant per issue openai#402. Now uses
score-first TTT: score each chunk before training on it.
Added LeakyReLU(0.5)² replacing relu² (proven by openai#569, openai#535).
Score pending rerun with compute credits.
@amaljithkuttamath amaljithkuttamath changed the title Record: 11L Value Residual + Gated Attention + AdamW TTT (val_bpb=1.0891) Record: 11L VR + GA + LeakyReLU² + Legal Score-First TTT (val_bpb=pending) Mar 23, 2026
XSA + Partial RoPE + LN Scale + Late QAT + GPTQ + score-first TTT
with temp calibration. Untested, needs 1xH100 validation.
- Deep-clone state dict before bf16 calibration cast (was silently
  corrupting fp32 weights to bf16 before GPTQ, causing 0.328 bpb gap)
- Keep tok_emb.weight as fp16 passthrough instead of int8 quantization
- Fix TTT eval: keep CastedLinear weights in fp32 for stable AdamW
- Remove torch.compile from TTT chunk loop (re-compilation + weight
  mutation = crash)
- Add quant diagnostics: GPTQ key matching + per-layer error stats
@MatoTeziTanka
Copy link
Copy Markdown

Community Review — Record: 11L VR + GA + LeakyReLU² + Legal Score-First TTT (val_bpb=pending)

BPB: 0.017 (cache parse — may be delta/std, not val_bpb; check PR title) | Compliance: LOOKS CLEAN — score-first-per-chunk TTT (legal #1416/#1423 pattern)

What I found in the code (head SHA 3c4c4bd3dfec, file records/track_10min_16mb/2026-03-23_11L_VR_GA_AdamWTTT_1.0891/train_gpt.py):

The TTT path at line 1042 implements the score-first-per-chunk pattern: each chunk is scored under torch.no_grad() / inference_mode() before the base_model.train() + SGD adaptation runs on that same chunk, with an is_last_chunk guard so the final chunk gets no adaptation pass. This is the structural shape the legal frontier uses (PRs #1416 erichroepke, #1423 aryanbhosale).

Per Issue #402 and Issue #677, TTT is legal when each token is scored before the adapter updates on it, and that's what the code does here — chunk ci is scored under weights adapted only on chunks 0..ci-1. No prequant_ttt_adapt_adamw(val_tokens, ...) multi-epoch fine-tune, no scored-region SLOT, no target-in-key n-gram cache.

CPU smoke test (CT2038 proteus-engine, 2026-04-11): import OK in 0.04s, dim=512, layers=11, vocab=1024, code=84868 B, SMOKE_TEST_PASS

Verdict: LOOKS CLEAN.

Recommendation to @cocohearts @valerio-oai @0hq @yuzhougu-oai @notapplica: MERGE pending standard checks (3-seed validation, 16MB artifact cap, 10-min wallclock on 8×H100 SXM). The compliance picture matches the legal reference frontier and no flags were raised by the classification pass.

Auto-classification caveat: this review was drafted by the AST-based classifier against a template derived from manually-reviewed cluster PRs (#1420, #1450, #1487, #1541, #1529, #1533, #1518). If I've misread a subtlety in your eval path — e.g., multi-epoch TTT that I mistook for single-pass, or a target-in-key lookup I missed in a helper function — please flag it and I'll re-run the audit manually.


Reviewed by @MatoTeziTankaThe Agora. CPU smoke test (CT2038 proteus-engine, 2026-04-11): import OK in 0.04s, dim=512, layers=11, vocab=1024, code=84868 B, SMOKE_TEST_PASS. Classification via deterministic AST-based classify_prs.py (pattern bank derived from ~65 manually-reviewed PRs earlier in the 2026-04-11 sweep). This review was auto-drafted from a template and spot-checked before posting — if the template misread your code, please call it out so I can iterate the classifier.

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