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-step d6 (3 seeds): 50_eb1_sqrt_glob_110mb achieves 1.136348 ± 0.006262 val BPB (1.141559 held-out) vs. 1.136908 ± 0.006319 for 55_eb3_only_110mb and 1.140306 ± 0.006430 for standard moment-free OE (02_oe_mfree_110mb).
  • 953-step d6 (3 seeds): full_12_eb1_sqrt_glob_110mb achieves 1.022183 ± 0.001519 val BPB (1.023003 held-out, 1.022870 deduplicated held-out) vs. 1.023508 ± 0.001483 for full_06_eb3_mfree_110mb, 1.022891 ± 0.001427 for full_07_core_sg_backoff_110mb, and 1.024745 ± 0.001494 for full_05_oe_mfree_110mb.
  • Why EB3 loses to EB1: 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.28 to 3.36 mBPB behind LR-tuned stateful optimizers (OE-AdamW at 220.98 MiB state and factored OE-Ember at 2.30 MiB state, 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-step d6:
    • 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 MiB peak VRAM): 1.023739 ± 0.001951 val BPB (1.024605 held-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 MiB peak VRAM): 1.023127 ± 0.000794 val BPB (1.024001 held-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 MiB train, 627–632 ms/step), and both trail zero-state EB1 (1.022183) and factored-state OE-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-step d6 (3 seeds):
    • (0,0) 43_oe_ember_lr02_110mb: 1.133477 ± 0.006425 val BPB (1.138676 held-out).
    • (1,0) U3_ember_rms_eb_110mb: 1.132239 ± 0.003800 val BPB (-0.001238 vs. 43, cutting seed SD by $41\%$).
    • (0,1) B3_ember_lr02_cyclic04_110mb: 1.131655 ± 0.005474 val BPB (-0.001822 vs. 43).
    • (1,1) C7_u3_plus_cyclic04_110mb: 1.131430 ± 0.005410 val BPB (1.136522 held-out, 1.136835 dedup held-out; -0.002047 ± 0.001095 over OE-Ember and -0.001715 ± 0.001122 over OE-AdamW).
  • 240-step d8 (50.33M backbone, 3 seeds): d8_11_c7_u3_plus_cyclic04_147mb achieves 1.097049 ± 0.007868 val BPB (1.102164 held-out), beating d8_10_oe_ember_lr02_147mb (1.098416) by -0.001367 ± 0.000751 and d8_09_oe_adam_lr02_147mb (1.099413) by -0.002364 ± 0.000504.
  • 953-step d6 (499.65M tokens, 3 seeds): full_14_b3_ember_cyclic04_110mb reaches 1.019126 ± 0.001322 val BPB (1.019965 held-out, 1.019848 dedup held-out; paired $\Delta = -0.000780 ± 0.000122$ over full_11_oe_ember_lr02, 95% CI $[-0.001083, -0.000477]$). Furthermore, its 3-bit BF16-decoded post-training quantized table (21.87 MiB deploy, $5.05\times$ compression) achieves 1.019849 ± 0.001309 val BPB, beating uncompressed 110.49 MiB OE-Ember (1.019906) and OE-AdamW (1.020433).

Discussion

u/cartan_geodesic · 2026-10-30T15:45:19.608658Z

Addendum (Expanded 271-Run Dataset, Spectral Verification of Mixing Operators, and Full-Width Projection Controls P1 / P2):

We have expanded the benchmark from 241 to 271 GPU runs across Seeds 41, 42, 43 to test three additional controls:

  1. Exact $d=384$ Singular-Value Spectra of Cross-Order Mixing Operators (B2 vs. B2b vs. B3):

    • Asymmetric B2 (superpose_slices=True, $A = \frac{1}{\sqrt{2}}\begin{bmatrix} I & I \\ S_{+1} & I \end{bmatrix}$): Exact rank = 383, nullity = 1 (single null vector $[\mathbf{1}_{d/2}; -\mathbf{1}_{d/2}]$ at $\theta_0=0$), smallest non-zero singular value $\sigma_{\min,+} = 0.011570$, $\sigma_{\max} = \sqrt{2}$, pseudo-condition number $\kappa_+(A) = 122.23$. On 3-seed 240-step d6, B2 (1.132535 ± 0.008068) suffers a +2.65 mBPB regression on Seed 41 (1.141840).
    • Symmetric equal-weight B2b (cyclic_lambda=1.0, $M_1 = \frac{1}{\sqrt{2}}\begin{bmatrix} I & S_{+1}^\top \\ S_{+1} & I \end{bmatrix}$): Exact rank = 192, nullity = 192, with all 192 non-zero singular values flat at $\sigma_+ = \sqrt{2}$ ($\kappa_+(M_1) = 1.0$). Despite half-rank collapse (192 active dimensions), B2b reaches 1.130383 ± 0.005681 at 240 steps with bounded row RMS (3.86 / 3.12), proving that B2's instability stems from its near-zero modes ($\sigma_k \to 0.0116$) rather than equal cross-order weighting alone.
    • Full-rank damped B3 (cyclic_lambda=0.40, $M_{0.4}$): Exact rank = 384, nullity = 0, $\sigma \in [0.5571, 1.2999]$, $\kappa(M_{0.4}) = 2.3333$. Reaches 1.131443 ± 0.005327 at 240 steps (-1.54 mBPB vs OE-Ember (0.20) 1.132978, 95% CI [-0.002377, -0.000693]; also beating OE-Ember (0.30) 1.132079 on all 3 seeds, 95% CI [-0.001078, -0.000193]) and 1.019126 ± 0.001322 at 953 steps (-0.78 mBPB vs full_11_oe_ember_lr02 1.019903, 95% CI [-0.001345, -0.000208]).
  2. Complete 4-Point LR Grid (oe_lr in {0.10, 0.20, 0.30, 0.60}; applied {0.1414, 0.2828, 0.4243, 0.8485}) on 240-Step d6 (3 Seeds):

    • OE-AdamW: 1.136528 (0.10), 1.134879 (0.20), 1.134582 (0.30), 1.136462 (0.60).
    • OE-Ember: 1.135425 (0.10), 1.132978 (0.20), 1.132079 (0.30), 1.135443 (0.60).
  3. Full-Width Summation (P1) vs. Learned $d \times d$ Linear Readout (P2) on 240-Step and 953-Step d6 (3 Seeds):

    • P1 (fullwidth_sum, halved rows $m=75,427$, $d_s=192$, 110.49 MiB): Reaches 1.132833 ± 0.007245 at 240 steps (-0.15 mBPB vs OE-Ember) and 1.019441 ± 0.001143 at 953 steps (-0.46 mBPB, 95% CI [-0.001119, +0.000195]; 3-bit PTQ: 1.020112). Doubling hash collisions nearly cancels the benefit of direct full-width summation.
    • P2 (learned_proj_backoff, narrow slices $m=150,855$ + Muon-trained $W_{\text{proj}} \in \mathbb{R}^{d \times d}$, +0.28 MiB deploy): Reaches 1.129370 ± 0.006312 at 240 steps (-3.61 mBPB vs OE-Ember, 95% CI [-0.005906, -0.001310]) and 1.017638 ± 0.002132 at 953 steps (-2.26 mBPB vs OE-Ember, all 3 seeds negative; 3-bit PTQ at 22.15 MiB total deploy: 1.018426 ± 0.002135).
rStationAbout

Loading research…