Add 11L RotaryFix + LegalTTT + BIGRAM3072 — val_bpb 1.11869 (3-seed m…#714
Add 11L RotaryFix + LegalTTT + BIGRAM3072 — val_bpb 1.11869 (3-seed m…#714Upsalla wants to merge 2 commits intoopenai:mainfrom
Conversation
…ean) Key changes vs. existing entries: - Rotary NTK-Scaling bug fix: train_seq_len=2048 now correctly propagated to both base_model and eval_model (previously hardcoded to 1024) - BIGRAM vocabulary size 3072 (vs 1536) - Late QAT threshold 0.57 for ~1700 QAT steps (vs ~525 steps at 0.15) - torch.no_grad() instead of torch.inference_mode() in TTT scoring phase to prevent Autograd graph corruption when RoPE caches cross phase boundary Results (8xH100 SXM, 600s training + ~425s TTT): Seed 1337: legal_ttt_bpb = 1.11877 Seed 42: legal_ttt_bpb = 1.11836 Seed 2025: legal_ttt_bpb = 1.11893 Mean: 1.11869 ± 0.00024
The previous commit only included records/ changes but left train_gpt.py as the unmodified baseline script. This commit adds the actual modified training script used to achieve val_bpb 1.11869 (3-seed mean). Features included: - Legal Score-First TTT (test-time training, causal, barrier-synced) - BigramHash 3072 vocabulary - LeakyReLU(0.5)^2 MLP activation - ValueEmbedding (VE128) on layers 9-10 - XSA (Cross-Sequence Attention) on last 4 layers - EMA (decay=0.997) + Tight SWA (every 50 steps) - Late QAT (GPTQ-lite int6 + lzma), threshold=0.57 - Sliding Window Eval (stride=64) - Partial RoPE (16/64 dims), train_seq_len=2048 (Rotary NTK bug fixed) - LN Scale (1/sqrt(layer+1)) - Parameter Banking + Parallel Muon optimizer MD5: 5926353668cf98f9c97b2ec171b59818
Four major additions to the Kuda Architecture: 1. Hedge Mixer (5-expert, eval-time): Multiplicative Weights Update mixing neural + unigram + bigram + trigram + entropy experts. Based on online learning theory (Freund & Schapire 1997). Same principle as PAQ/CMIX world-best compressors. Expected -0.065 BPB (PR openai#700 validated). 2. CROWN-Q warmdown penalty: lambda * mean(w^2 * delta^2 / 12) pushes weights into flat minima that survive quantization. delta^2/12 is the uniform quantization noise variance. w^2 is diagonal Fisher proxy. Applied during warmdown only. From PR openai#693. 3. RoPE NTK fix: Propagate train_seq_len to all blocks' Rotary modules. Prevents positional encoding mismatch between train (2048) and eval. From PR openai#714 — produced tightest seed variance in competition. 4. TTT infrastructure: Score-first eval with SGD adaptation on scored tokens. FiLM-only TTT planned for Kuda recurrence mode. All features verified locally: forward/backward, CROWN-Q penalty, 5-expert Hedge mixing, Hedge weight updates, RoPE propagation. Script now 1,559 lines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Community Review — Add 11L RotaryFix + LegalTTT + BIGRAM3072 — val_bpb 1.11869 (3-seed m…BPB: 1.11869 | Compliance: LOOKS CLEAN — score-first-per-chunk TTT (legal #1416/#1423 pattern) What I found in the code (head SHA The TTT path at line 1100 implements the score-first-per-chunk pattern: each chunk is scored under 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 CPU smoke test (CT2038 proteus-engine, 2026-04-11): import OK in 0.04s, dim=512, layers=11, vocab=1024, code=93173 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.04s, dim=512, layers=11, vocab=1024, code=93173 B, SMOKE_TEST_PASS. Classification via deterministic AST-based |
…ean)
Key changes vs. existing entries:
Results (8xH100 SXM, 600s training + ~425s TTT):
Seed 1337: legal_ttt_bpb = 1.11877
Seed 42: legal_ttt_bpb = 1.11836
Seed 2025: legal_ttt_bpb = 1.11893
Mean: 1.11869 ± 0.00024