Skip to content

Add LeakyReLU² + 4ep Legal TTT submission - #1039

Open
yufengli-oai wants to merge 3 commits into
mainfrom
codex/parameter-golf-11l-sdpa
Open

yufengli-oai wants to merge 3 commits into
mainfrom
codex/parameter-golf-11l-sdpa

Conversation

@yufengli-oai

@yufengli-oai yufengli-oai commented Mar 28, 2026 •

Copy link
Copy Markdown

Summary

A solution generated by codex, not sure about its performance

  • add a new 1.1189 bpb (3-seed mean, std 0.0006) record submission based on 2026-03-23_LeakyReLU_LegalTTT_ParallelMuon
  • increase legal TTT to lr=0.0025 and 4 epochs
  • skip diagnostic pre-TTT evals to keep eval under 10 minutes
  • add eval-only checkpoint loading for fast TTT sweeps

Validation

  • seed 2025: 1.11835341 bpb, 83.8ms/step, 545.4s TTT
  • seed 1337: 1.11903472 bpb, 83.9ms/step, 548.2s TTT
  • seed 42: 1.11944510 bpb, 84.0ms/step, 541.6s TTT
  • 3-seed mean: 1.11894441 bpb, std 0.00055142

icryo added a commit to icryo/parameter-golf that referenced this pull request Mar 29, 2026
PR openai#1039 claims 1.1184 BPB with just TTT_LR=0.0025, TTT_EPOCHS=4
(vs SOTA's 0.002/3ep). This is a potential record from a 2-line change.

TTT sweep now tests 4 configs:
  A: SOTA (lr=0.002, 3ep) — baseline reproduction
  B: PR openai#1039 (lr=0.0025, 4ep) — claimed 1.1184 BPB
  C: 5 epochs (lr=0.002, 5ep) — deeper adaptation
  D: Aggressive (lr=0.003, 4ep) — higher LR + more epochs

Also from PR review:
- DeltaNet "Medusa" achieves 0.77 BPB single seed (different arch)
- Bayesian posterior packets show early TTT chunks hit 1.109 then drift
- Block 7 c_k has kurtosis 11.9 (quantization outlier)
- AdamW TTT confirmed catastrophic (SGD is correct)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
icryo added a commit to icryo/parameter-golf that referenced this pull request Mar 29, 2026
PR openai#1043 found early TTT chunks achieve 1.109 BPB (below SOTA!)
but accumulated SGD updates cause drift to 1.126 by late chunks.

Fix: periodically reset model weights to the original checkpoint.
This prevents catastrophic drift while preserving local adaptation.

Implementation:
- TTT_RESET_EVERY=N: reset weights every N chunks (0=disabled)
- Resets both weights and optimizer momentum state
- Uses in-place copy (no reallocation, parameter references preserved)

H100 sweep now tests 11 configurations:
  6 temperatures × sliding eval
  5 TTT configs:
    A: SOTA baseline (lr=0.002, 3ep)
    B: PR openai#1039 (lr=0.0025, 4ep)
    C: 5 epochs (lr=0.002, 5ep)
    D: PR openai#1039 + reset/100 (anti-drift)
    E: PR openai#1039 + reset/50 (anti-drift)

If early chunks consistently hit 1.109 and reset prevents drift,
the mean across all chunks could drop from 1.119 toward 1.110-1.114.
That's record territory.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
icryo added a commit to icryo/parameter-golf that referenced this pull request Mar 29, 2026
Competition moved while we were experimenting locally:
  PR openai#634: 1.1178 BPB (Full GPTQ + XSA-all + selective pruning)
  PR openai#1060: 1.1122 BPB (+ coprime loader + BigramHash 2816)

Our contribution: TTT periodic reset on the PR openai#1060 base.
PR openai#1060 found TTT unnecessary with Full GPTQ, but they
didn't test TTT with anti-drift reset. If TTT drift was the
reason it stopped helping, reset could unlock further gains.

Files:
  train_gpt_ours.py  — PR openai#1060 + TTT reset mechanism
  train_gpt_pr634.py — Full GPTQ reference (for study)
  train_gpt_pr1060.py — Original PR openai#1060 (for comparison)
  run_h100.sh — Train once, sweep 4 TTT configs

TTT configs tested:
  A: SOTA (lr=0.002, 3ep) — baseline TTT
  B: PR openai#1039 (lr=0.0025, 4ep) — tuned TTT
  C: B + reset/100 — anti-drift, moderate
  D: B + reset/50 — anti-drift, aggressive

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@yufengli-oai
yufengli-oai marked this pull request as ready for review March 30, 2026 19:03
@MatoTeziTanka

Copy link
Copy Markdown

Community Review — Add LeakyReLU² + 4ep Legal TTT submission

BPB: 1.1189 | Compliance: LOOKS CLEAN — score-first-per-chunk TTT (legal #1416/#1423 pattern)

What I found in the code (head SHA 39f7ba759f92, file records/track_10min_16mb/2026-03-28_LeakyReLU_LegalTTT_EvalOnlySweep/train_gpt.py):

The TTT path at line 1077 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.09s, dim=512, layers=11, vocab=1024, code=95763 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 @MatoTeziTanka — The Agora. CPU smoke test (CT2038 proteus-engine, 2026-04-11): import OK in 0.09s, dim=512, layers=11, vocab=1024, code=95763 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