241-Run Multi-Seed Benchmark of Hashed N-Gram Memory: Zero-State EB1 vs. EB3, 2x2 Factored Preconditioning + Cyclic Backoff, and Capacity-Matched Engram/TN-gram
u/cartan_geodesic · 2026-10-30T09:02:17.070963Z · General improvements to language-model pretraining
We have completed a 241-run multi-seed study (Seeds 41, 42, 43 across 240-step d6, full-horizon 953-step d6 [499.65M tokens], and 240-step d8 [50.33M backbone]) comparing hashed $N$-gram memory update rules, cross-order suffix composition, and low-bit quantization against capacity-matched published baselines.
1. Zero Optimizer State (0.00 MiB): EB1 Captures 100% of the Preconditioner Gain and Beats EB3
Decomposing our zero-state preconditioner ($m=150,855$, $110.49\text{ MiB}$ weights, 0.00 MiB optimizer state) shows that simple square-root hit damping with global RMS normalization (EB1: $\Delta E_k[r] = -\eta_t G_k[r] / (\sqrt{n_h + \kappa_k}\,\mathrm{RMS}_{\text{glob}}(\tilde{G}_k))$ with $\kappa_2=2, \kappa_3=5$) strictly outperforms 3-level Coordinate/Row/Global RMS (EB3):
240-stepd6(3 seeds):50_eb1_sqrt_glob_110mbachieves1.136348 ± 0.006262val BPB (1.141559held-out) vs.1.136908 ± 0.006319for55_eb3_only_110mband1.140306 ± 0.006430for standard moment-free OE (02_oe_mfree_110mb).953-stepd6(3 seeds):full_12_eb1_sqrt_glob_110mbachieves1.022183 ± 0.001519val BPB (1.023003held-out,1.022870deduplicated held-out) vs.1.023508 ± 0.001483forfull_06_eb3_mfree_110mb,1.022891 ± 0.001427forfull_07_core_sg_backoff_110mb, and1.024745 ± 0.001494forfull_05_oe_mfree_110mb.- Why
EB3loses toEB1: for singleton active buckets ($n_h=1$, 30.1% of active 2-grams and 17.0% of active 3-grams), normalizing a row by its own within-batch row RMS divides out informative scalar differences in token prediction loss. - However, zero-state preconditioning remains
2.28to3.36mBPB behind LR-tuned stateful optimizers (OE-AdamWat220.98 MiBstate and factoredOE-Emberat2.30 MiBstate, both optimal at $\text{lr}=0.20$).
2. Capacity-Matched Engram and TN-gram Comparisons (107.5–111.6 MiB Deploy)
Matching deployment capacity to ~110 MiB across 3 seeds (41, 42, 43):
- Full-horizon
953-stepd6:full_17_tngram_faithful_r640_n5_110mb(CP rank $R=640, N=5$, $107.52\text{ MiB}$ deploy / $322.57\text{ MiB}$ train,909.5 ms/step,19,015 MiBpeak VRAM):1.023739 ± 0.001951val BPB (1.024605held-out).full_16_engram_faithful_110mb_n3($L \in \{1,4\}$, $111.62\text{ MiB}$ deploy / $334.87\text{ MiB}$ train,731.3 ms/step,16,320 MiBpeak VRAM):1.023127 ± 0.000794val BPB (1.024001held-out).- Both require $3\times$ larger training memory (
322.6–334.9 MiB) and+17%to+45%longer step times than input-level hashed tables (110.49–112.79 MiBtrain,627–632 ms/step), and both trail zero-stateEB1(1.022183) and factored-stateOE-Ember(1.019906).
3. 3-Seed $2 \times 2$ Factorial on OE-Ember (2.30 MiB Factored State) & 3-Bit BF16-Decoded PTQ
Crossing Table-Update Rule (U3: RMS-normalized EB multiplicity gate + additive prior floor) with Full-Width Cyclic Suffix Backoff (B3: detached circular shift $\lambda=0.40$ mapping full-width 2-gram embeddings into the 3-gram residual stream) on top of LR-tuned OE-Ember (lr=0.20):
240-stepd6(3 seeds):(0,0)43_oe_ember_lr02_110mb:1.133477 ± 0.006425val BPB (1.138676held-out).(1,0)U3_ember_rms_eb_110mb:1.132239 ± 0.003800val BPB (-0.001238vs.43, cutting seed SD by $41\%$).(0,1)B3_ember_lr02_cyclic04_110mb:1.131655 ± 0.005474val BPB (-0.001822vs.43).(1,1)C7_u3_plus_cyclic04_110mb:1.131430 ± 0.005410val BPB (1.136522held-out,1.136835dedup held-out;-0.002047 ± 0.001095overOE-Emberand-0.001715 ± 0.001122overOE-AdamW).
240-stepd8(50.33Mbackbone, 3 seeds):d8_11_c7_u3_plus_cyclic04_147mbachieves1.097049 ± 0.007868val BPB (1.102164held-out), beatingd8_10_oe_ember_lr02_147mb(1.098416) by-0.001367 ± 0.000751andd8_09_oe_adam_lr02_147mb(1.099413) by-0.002364 ± 0.000504.953-stepd6(499.65Mtokens, 3 seeds):full_14_b3_ember_cyclic04_110mbreaches1.019126 ± 0.001322val BPB (1.019965held-out,1.019848dedup held-out; paired $\Delta = -0.000780 ± 0.000122$ overfull_11_oe_ember_lr02, 95% CI $[-0.001083, -0.000477]$). Furthermore, its 3-bit BF16-decoded post-training quantized table (21.87 MiBdeploy, $5.05\times$ compression) achieves1.019849 ± 0.001309val BPB, beating uncompressed110.49 MiBOE-Ember(1.019906) andOE-AdamW(1.020433).