Skip to content

Commit 8481237

Browse files
committed
Record: SP8192 + Triple Recurrence + Banking + Fused MLP + Muon 0.97 — val_bpb 1.0783 (3-seed mean)
Clean resubmission with fixed LZMA wrapper (linecache + compile). Seeds: 1337 (1.07817), 42 (1.07807), 2024 (1.07876)
1 parent cbe5ed1 commit 8481237

6 files changed

Lines changed: 887 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Record: SP8192 + Triple Recurrence + Banking + Fused MLP + Muon 0.97 — val_bpb 1.0783 (3-seed mean)
2+
3+
**val_bpb = 1.0783** (3-seed mean, std 0.0004) | **~15.99 MB** | 8xH100 SXM
4+
5+
## 3-Seed Results
6+
7+
| Seed | Pre-quant BPP | Sliding BPP | **TTT BPP** | Artifact |
8+
|------|---------------|-------------|-------------|----------|
9+
| 1337 | 1.0859 | 1.0798 | **1.0782** | 15,986,623 |
10+
| 42 | 1.0856 | 1.0793 | **1.0781** | 15,983,529 |
11+
| 2024 | 1.0862 | 1.0800 | **1.0788** | 15,986,767 |
12+
| **Mean** | 1.0859 | 1.0797 | **1.0783** | |
13+
14+
## Architecture
15+
16+
```
17+
SP8192 tokenizer, 11 physical / 17 virtual layers
18+
512 dim, MLP 4x (2048 hidden), GQA 8Q/4KV, head_dim=64
19+
Parallel residuals L7+, QK-Gain 5.0, XSA all 11 layers
20+
LeakyReLU(0.5)², skip gates, logit softcap 30
21+
MuonEq-R (lr=0.022, wd=0.095, momentum=0.97) + AdamW
22+
EMA 0.997, warmdown 66.7%, loop at 35%
23+
SDClip GPTQ int6 (k=12.85) + int8 embed (k=20) + brotli
24+
Score-first TTT: SGD lr=0.01, mom=0.9, 3ep, 32K chunks
25+
Hash embedding: 16384x512, zero-init, trained in TTT
26+
~36M params, ~15.99MB artifact
27+
```
28+
29+
## Compliance (Track B — Score-First TTT)
30+
31+
Per Issue #1017:
32+
- **Condition 1:** Hash key uses prefix tokens only
33+
- **Condition 2:** Full normalized softmax distribution
34+
- **Condition 3:** Each chunk scored under no_grad() before TTT update
35+
- **Condition 4:** Single left-to-right pass, no rescoring
36+
37+
No SLOT, no pre-quant TTT, no n-gram caches, no Tap-In.
38+
39+
## Reproduction
40+
41+
```bash
42+
pip install brotli sentencepiece
43+
MATCHED_FINEWEB_REPO_ID=kevclark/parameter-golf python3 data/cached_challenge_fineweb.py --variant sp8192
44+
SEED=1337 TTT_ENABLED=1 HASH_EMBED_ENABLED=1 TTT_LR=0.01 MUON_MOMENTUM=0.97 \
45+
torchrun --standalone --nproc_per_node=8 train_gpt.py
46+
```
47+
48+
## Credits
49+
50+
PR #1420 @abaybektursun (triple loop + fused kernels), PR #1394 @clarkkev (SP8192 + SDClip), PR #1471 @X-Abhishek-X (3-layer recurrence), PR #1477 @aryanbhosale (parallel residuals + score-first TTT), PR #1460 @resouer (eval-time hash embedding), PR #399 @abaybektursun (parameter banking concept), PR #1514 @dexhunter (Muon 0.97)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"author":"EthanYangTW","github_id":"EthanYangTW","name":"SP8192 + Triple Recurrence + Banking + Fused MLP + Muon 0.97 + Score-First TTT + Hash Embedding","date":"2026-04-12","track":"10min_16mb","val_bpb":1.07833,"val_bpb_std":0.00037,"seeds":[1337,42,2024],"seed_results":{"1337":{"val_bpb":1.07817,"artifact_bytes":15986623},"42":{"val_bpb":1.07807,"artifact_bytes":15983529},"2024":{"val_bpb":1.07876,"artifact_bytes":15986767}},"hardware":"8xH100 80GB SXM","pytorch_version":"2.9.1+cu128","technique_summary":"SP8192 + Triple Depth Recurrence (3,4,5 x3, 17 virtual) + Parameter Banking + Fused MLP Triton TMA + CUTLASS EVT + Muon 0.97 + Parallel Residuals (L7+) + QK-Gain 5.0 + Score-First TTT (3ep SGD lr=0.01) + Eval-Time Hash Embedding + SDClip GPTQ int6 + Brotli"}

records/track_10min_16mb/2026-04-12_SP8192_LegalSOTA_Clean/train_gpt.py

Lines changed: 5 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
W0412 04:57:35.750000 1777 torch/distributed/run.py:803]
2+
W0412 04:57:35.750000 1777 torch/distributed/run.py:803] *****************************************
3+
W0412 04:57:35.750000 1777 torch/distributed/run.py:803] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
4+
W0412 04:57:35.750000 1777 torch/distributed/run.py:803] *****************************************
5+
Hyperparameters:
6+
adam_eps: 1e-08
7+
adam_wd: 0.02
8+
beta1: 0.9
9+
beta2: 0.95
10+
compressor: brotli
11+
data_dir: ./data/
12+
datasets_dir: ./data/datasets/fineweb10B_sp8192
13+
distributed: True
14+
ema_decay: 0.997
15+
embed_bits: 8
16+
embed_clip_sigmas: 20.0
17+
embed_lr: 0.6
18+
embed_wd: 0.095
19+
embedding_dim: 512
20+
enable_looping_at: 0.35
21+
eval_seq_len: 2048
22+
eval_stride: 64
23+
gptq_calibration_batches: 64
24+
gptq_reserve_seconds: 12.0
25+
grad_accum_steps: 1
26+
grad_clip_norm: 0.3
27+
hash_embed_enabled: True
28+
hash_embed_size: 16384
29+
head_lr: 0.008
30+
is_main_process: True
31+
iterations: 20000
32+
ln_scale: True
33+
local_rank: 0
34+
logfile: logs/daa165fe-62f5-44c7-9f7b-10d92ebec09c.txt
35+
logit_softcap: 30.0
36+
loop_end: 5
37+
loop_start: 3
38+
matrix_bits: 6
39+
matrix_clip_sigmas: 12.85
40+
matrix_lr: 0.022
41+
max_wallclock_seconds: 600.0
42+
min_lr: 0.0
43+
mlp_mult: 4.0
44+
model_dim: 512
45+
model_path: final_model.pt
46+
muon_backend_steps: 5
47+
muon_beta2: 0.95
48+
muon_momentum: 0.97
49+
muon_momentum_warmup_start: 0.92
50+
muon_momentum_warmup_steps: 1500
51+
muon_row_normalize: True
52+
muon_wd: 0.095
53+
num_heads: 8
54+
num_kv_heads: 4
55+
num_layers: 11
56+
num_loops: 2
57+
qk_gain_init: 5.0
58+
quantized_model_path: final_model.int6.ptz
59+
rank: 0
60+
rope_base: 10000.0
61+
rope_dims: 16
62+
rope_train_seq_len: 2048
63+
run_id: daa165fe-62f5-44c7-9f7b-10d92ebec09c
64+
scalar_lr: 0.02
65+
seed: 1337
66+
skip_gates_enabled: True
67+
sliding_window_enabled: True
68+
tie_embeddings: True
69+
tied_embed_init_std: 0.005
70+
tied_embed_lr: 0.03
71+
tokenizer_path: ./data/tokenizers/fineweb_8192_bpe.model
72+
train_batch_tokens: 786432
73+
train_files: ./data/datasets/fineweb10B_sp8192/fineweb_train_*.bin
74+
train_log_every: 500
75+
train_seq_len: 2048
76+
ttt_adamw_wd: 0.0
77+
ttt_batch_seqs: 32
78+
ttt_chunk_tokens: 32768
79+
ttt_enabled: True
80+
ttt_epochs: 3
81+
ttt_freeze_blocks: 0
82+
ttt_grad_clip: 1.0
83+
ttt_lr: 0.01
84+
ttt_momentum: 0.9
85+
ttt_optimizer: sgd
86+
val_batch_tokens: 524288
87+
val_files: ./data/datasets/fineweb10B_sp8192/fineweb_val_*.bin
88+
val_loss_every: 4000
89+
vocab_size: 8192
90+
warmdown_frac: 0.667
91+
warmup_steps: 20
92+
world_size: 8
93+
xsa_last_n: 11
94+
train_shards: 80
95+
val_tokens: 40540160
96+
model_params:35944537
97+
gptq:reserving 12s, effective=588000ms
98+
warmup_step: 1/20
99+
warmup_step: 2/20
100+
warmup_step: 3/20
101+
warmup_step: 4/20
102+
warmup_step: 5/20
103+
warmup_step: 6/20
104+
warmup_step: 10/20
105+
warmup_step: 20/20
106+
loop_warmup:enabled encoder:[0, 1, 2, 3, 4, 5, 3, 4] decoder:[5, 3, 4, 5, 6, 7, 8, 9, 10]
107+
loop_warmup_step: 1/20
108+
loop_warmup_step: 2/20
109+
loop_warmup_step: 3/20
110+
loop_warmup_step: 4/20
111+
loop_warmup_step: 5/20
112+
loop_warmup_step: 6/20
113+
loop_warmup_step: 10/20
114+
loop_warmup_step: 20/20
115+
0/20000 val_loss: 9.0095 val_bpb: 3.4878
116+
1/20000 train_loss: 9.0103 train_time: 0.0m tok/s: 17603941
117+
2/20000 train_loss: 12.2673 train_time: 0.0m tok/s: 13040294
118+
3/20000 train_loss: 10.9224 train_time: 0.0m tok/s: 10729005
119+
4/20000 train_loss: 9.3858 train_time: 0.0m tok/s: 9811713
120+
5/20000 train_loss: 8.2725 train_time: 0.0m tok/s: 9334895
121+
500/20000 train_loss: 3.3833 train_time: 0.8m tok/s: 7821276
122+
1000/20000 train_loss: 3.2932 train_time: 1.7m tok/s: 7803444
123+
1500/20000 train_loss: 3.1922 train_time: 2.5m tok/s: 7799631
124+
2000/20000 train_loss: 3.1034 train_time: 3.4m tok/s: 7803281
125+
layer_loop:enabled step:2042 frac:0.350 encoder:[0, 1, 2, 3, 4, 5, 3, 4] decoder:[5, 3, 4, 5, 6, 7, 8, 9, 10]
126+
2500/20000 train_loss: 3.1491 train_time: 4.6m tok/s: 7186166
127+
3000/20000 train_loss: 2.9161 train_time: 5.9m tok/s: 6721413
128+
3500/20000 train_loss: 2.9536 train_time: 7.1m tok/s: 6477927
129+
4000/20000 train_loss: 2.8244 train_time: 8.3m tok/s: 6306083
130+
4000/20000 val_loss: 2.8830 val_bpb: 1.1161
131+
4500/20000 train_loss: 2.8384 train_time: 9.5m tok/s: 6178152
132+
4603/20000 val_loss: 2.8044 val_bpb: 1.0857
133+
stopping_early: wallclock_cap train_time: 588166ms step: 4603/20000
134+
peak memory allocated: 39956 MiB reserved: 40024 MiB
135+
ema:applying EMA weights
136+
pre-quantization post-ema val_loss:2.80498827 val_bpb:1.08589837 eval_time:6389ms
137+
Serialized model: 135408623 bytes
138+
Code size: 20681 bytes
139+
GPTQ:collecting Hessians from calibration data...
140+
GPTQ:collected 67 Hessians in 12.4s
141+
Quantized weights:
142+
gptq (int6): blocks.attn.c_k.weight, blocks.attn.c_q.weight, blocks.attn.c_v.weight, blocks.attn.proj.weight, blocks.mlp.fc.weight, blocks.mlp.proj.weight
143+
gptq (int8): tok_emb.weight
144+
passthrough (float16): blocks.attn.q_gain, blocks.attn_scale, blocks.mlp_scale, blocks.resid_mix, lane_merge, skip_gates, skip_weights
145+
Serialized model quantized+brotli: 15965942 bytes
146+
Total submission size quantized+brotli: 15986623 bytes
147+
quantized val_loss:2.83306033 val_bpb:1.09676594 eval_time:27828ms
148+
quantized_sliding_window val_loss:2.78916788 val_bpb:1.07977381 eval_time:123617ms
149+
ttt_sliding:start chunks=1238 chunk_tokens=32768 total_windows=633409 stride=64 ttt_lr=0.01 ttt_epochs=3 freeze_blocks=0 optimizer=sgd hash_embed=True
150+
ttt_sliding:params unfrozen=44333145 frozen=0
151+
ttt_chunk [1/1238] bpb=1.117492 time=44.6s
152+
ttt_chunk [11/1238] bpb=1.069226 time=68.8s
153+
ttt_chunk [21/1238] bpb=1.106644 time=71.4s
154+
ttt_chunk [31/1238] bpb=1.099689 time=74.0s
155+
ttt_chunk [41/1238] bpb=1.093361 time=76.6s
156+
ttt_chunk [51/1238] bpb=1.086964 time=79.2s
157+
ttt_chunk [61/1238] bpb=1.078842 time=81.8s
158+
ttt_chunk [71/1238] bpb=1.086084 time=84.4s
159+
ttt_chunk [81/1238] bpb=1.079623 time=87.0s
160+
ttt_chunk [91/1238] bpb=1.076128 time=89.6s
161+
ttt_chunk [101/1238] bpb=1.075850 time=92.2s
162+
ttt_chunk [111/1238] bpb=1.074081 time=94.8s
163+
ttt_chunk [121/1238] bpb=1.077203 time=97.4s
164+
ttt_chunk [131/1238] bpb=1.080943 time=100.0s
165+
ttt_chunk [141/1238] bpb=1.081458 time=102.6s
166+
ttt_chunk [151/1238] bpb=1.081208 time=105.2s
167+
ttt_chunk [161/1238] bpb=1.081698 time=107.8s
168+
ttt_chunk [171/1238] bpb=1.081580 time=110.3s
169+
ttt_chunk [181/1238] bpb=1.080086 time=112.9s
170+
ttt_chunk [191/1238] bpb=1.079866 time=115.5s
171+
ttt_chunk [201/1238] bpb=1.077432 time=118.1s
172+
ttt_chunk [211/1238] bpb=1.081917 time=120.7s
173+
ttt_chunk [221/1238] bpb=1.082308 time=123.3s
174+
ttt_chunk [231/1238] bpb=1.083948 time=125.8s
175+
ttt_chunk [241/1238] bpb=1.082189 time=128.4s
176+
ttt_chunk [251/1238] bpb=1.082218 time=131.0s
177+
ttt_chunk [261/1238] bpb=1.083265 time=133.6s
178+
ttt_chunk [271/1238] bpb=1.083724 time=136.2s
179+
ttt_chunk [281/1238] bpb=1.083000 time=138.8s
180+
ttt_chunk [291/1238] bpb=1.084080 time=141.3s
181+
ttt_chunk [301/1238] bpb=1.084275 time=143.9s
182+
ttt_chunk [311/1238] bpb=1.083204 time=146.5s
183+
ttt_chunk [321/1238] bpb=1.083052 time=149.1s
184+
ttt_chunk [331/1238] bpb=1.083339 time=151.7s
185+
ttt_chunk [341/1238] bpb=1.082432 time=154.3s
186+
ttt_chunk [351/1238] bpb=1.083202 time=156.9s
187+
ttt_chunk [361/1238] bpb=1.082090 time=159.5s
188+
ttt_chunk [371/1238] bpb=1.080503 time=162.1s
189+
ttt_chunk [381/1238] bpb=1.080910 time=164.7s
190+
ttt_chunk [391/1238] bpb=1.080581 time=167.3s
191+
ttt_chunk [401/1238] bpb=1.080644 time=169.8s
192+
ttt_chunk [411/1238] bpb=1.081146 time=172.4s
193+
ttt_chunk [421/1238] bpb=1.080661 time=175.0s
194+
ttt_chunk [431/1238] bpb=1.080855 time=177.6s
195+
ttt_chunk [441/1238] bpb=1.080873 time=180.2s
196+
ttt_chunk [451/1238] bpb=1.082030 time=182.8s
197+
ttt_chunk [461/1238] bpb=1.080247 time=185.4s
198+
ttt_chunk [471/1238] bpb=1.080256 time=188.0s
199+
ttt_chunk [481/1238] bpb=1.080434 time=190.6s
200+
ttt_chunk [491/1238] bpb=1.080855 time=193.2s
201+
ttt_chunk [501/1238] bpb=1.080472 time=195.8s
202+
ttt_chunk [511/1238] bpb=1.080056 time=198.4s
203+
ttt_chunk [521/1238] bpb=1.079531 time=201.0s
204+
ttt_chunk [531/1238] bpb=1.079483 time=203.6s
205+
ttt_chunk [541/1238] bpb=1.079554 time=206.2s
206+
ttt_chunk [551/1238] bpb=1.079075 time=208.8s
207+
ttt_chunk [561/1238] bpb=1.078385 time=211.4s
208+
ttt_chunk [571/1238] bpb=1.077832 time=214.0s
209+
ttt_chunk [581/1238] bpb=1.078158 time=216.6s
210+
ttt_chunk [591/1238] bpb=1.078420 time=219.2s
211+
ttt_chunk [601/1238] bpb=1.078327 time=221.8s
212+
ttt_chunk [611/1238] bpb=1.078900 time=224.4s
213+
ttt_chunk [621/1238] bpb=1.079747 time=227.0s
214+
ttt_chunk [631/1238] bpb=1.079804 time=229.6s
215+
ttt_chunk [641/1238] bpb=1.080233 time=232.2s
216+
ttt_chunk [651/1238] bpb=1.080547 time=234.7s
217+
ttt_chunk [661/1238] bpb=1.079856 time=237.3s
218+
ttt_chunk [671/1238] bpb=1.079636 time=239.9s
219+
ttt_chunk [681/1238] bpb=1.080911 time=242.5s
220+
ttt_chunk [691/1238] bpb=1.081091 time=245.1s
221+
ttt_chunk [701/1238] bpb=1.080913 time=247.7s
222+
ttt_chunk [711/1238] bpb=1.081619 time=250.3s
223+
ttt_chunk [721/1238] bpb=1.081895 time=252.9s
224+
ttt_chunk [731/1238] bpb=1.081240 time=255.5s
225+
ttt_chunk [741/1238] bpb=1.080877 time=258.1s
226+
ttt_chunk [751/1238] bpb=1.079932 time=260.7s
227+
ttt_chunk [761/1238] bpb=1.079347 time=263.3s
228+
ttt_chunk [771/1238] bpb=1.078309 time=265.8s
229+
ttt_chunk [781/1238] bpb=1.078310 time=268.5s
230+
ttt_chunk [791/1238] bpb=1.078646 time=271.1s
231+
ttt_chunk [801/1238] bpb=1.078925 time=273.7s
232+
ttt_chunk [811/1238] bpb=1.078430 time=276.3s
233+
ttt_chunk [821/1238] bpb=1.077210 time=278.9s
234+
ttt_chunk [831/1238] bpb=1.076847 time=281.5s
235+
ttt_chunk [841/1238] bpb=1.076337 time=284.1s
236+
ttt_chunk [851/1238] bpb=1.076039 time=286.7s
237+
ttt_chunk [861/1238] bpb=1.075668 time=289.3s
238+
ttt_chunk [871/1238] bpb=1.075539 time=291.9s
239+
ttt_chunk [881/1238] bpb=1.075073 time=294.5s
240+
ttt_chunk [891/1238] bpb=1.074550 time=297.1s
241+
ttt_chunk [901/1238] bpb=1.074925 time=299.7s
242+
ttt_chunk [911/1238] bpb=1.074611 time=302.3s
243+
ttt_chunk [921/1238] bpb=1.074869 time=304.9s
244+
ttt_chunk [931/1238] bpb=1.075550 time=307.5s
245+
ttt_chunk [941/1238] bpb=1.075935 time=310.1s
246+
ttt_chunk [951/1238] bpb=1.075848 time=312.7s
247+
ttt_chunk [961/1238] bpb=1.076667 time=315.2s
248+
ttt_chunk [971/1238] bpb=1.077061 time=317.8s
249+
ttt_chunk [981/1238] bpb=1.077401 time=320.4s
250+
ttt_chunk [991/1238] bpb=1.077162 time=323.0s
251+
ttt_chunk [1001/1238] bpb=1.077185 time=325.6s
252+
ttt_chunk [1011/1238] bpb=1.077516 time=328.2s
253+
ttt_chunk [1021/1238] bpb=1.078212 time=330.8s
254+
ttt_chunk [1031/1238] bpb=1.078671 time=333.4s
255+
ttt_chunk [1041/1238] bpb=1.079137 time=336.0s
256+
ttt_chunk [1051/1238] bpb=1.079049 time=338.6s
257+
ttt_chunk [1061/1238] bpb=1.079036 time=341.2s
258+
ttt_chunk [1071/1238] bpb=1.079200 time=343.8s
259+
ttt_chunk [1081/1238] bpb=1.079092 time=346.4s
260+
ttt_chunk [1091/1238] bpb=1.079284 time=349.0s
261+
ttt_chunk [1101/1238] bpb=1.079803 time=351.6s
262+
ttt_chunk [1111/1238] bpb=1.080085 time=354.2s
263+
ttt_chunk [1121/1238] bpb=1.080238 time=356.8s
264+
ttt_chunk [1131/1238] bpb=1.079881 time=359.4s
265+
ttt_chunk [1141/1238] bpb=1.079522 time=361.9s
266+
ttt_chunk [1151/1238] bpb=1.079551 time=364.5s
267+
ttt_chunk [1161/1238] bpb=1.079662 time=367.1s
268+
ttt_chunk [1171/1238] bpb=1.079425 time=369.7s
269+
ttt_chunk [1181/1238] bpb=1.078935 time=372.3s
270+
ttt_chunk [1191/1238] bpb=1.079061 time=374.9s
271+
ttt_chunk [1201/1238] bpb=1.079133 time=377.5s
272+
ttt_chunk [1211/1238] bpb=1.078808 time=380.1s
273+
ttt_chunk [1221/1238] bpb=1.078332 time=382.7s
274+
ttt_chunk [1231/1238] bpb=1.077951 time=385.3s
275+
ttt_chunk [1238/1238] bpb=1.077950 time=407.3s
276+
ttt_sliding:done val_loss=2.785021 val_bpb=1.07816838 elapsed=408.8s
277+
legal_ttt_exact val_loss:2.78502089 val_bpb:1.07816838 eval_time:409073ms

0 commit comments

Comments
 (0)