Follow-up study: Direct K/V prediction vs. input-space RidgeFill (Llama 64K RMSNorm diagnosis, Qwen3 pre-k_norm, and hybrid LFM3)

#1
by darioooooo0o - opened

Hi @Dyluhn @tcclaviger β€” loved your RidgeFill paper (arXiv:2611.09709), really clean idea.

I ran a follow-up study comparing direct K/V prediction from the normalized split state (Direct-KV, 2×–3.5Γ— smaller maps) head-to-head against input-space RidgeFill across Llama-3.1-8B-Instruct, Qwen3-8B, Qwen2.5-7B-Instruct, and hybrid LiquidAI/LFM3-1.7B (plus block-32 Q8_0 baselines), and thought you might find a few of the mechanisms interesting:

  • Llama-3.1-8B (64K mechanism): Input-space shrinkage before input_layernorm shrinks bulk residual dimensions more than the top-16 dimensions (0.726 vs. 0.964), inflating key norms to 1.262Γ— after RMSNorm and shifting late-layer attention onto low-norm prefix keys (31.8% 64K RULER on released+ktail; +4.37 key loss on refit+ktail). Direct K/V regression sidesteps input_layernorm and reaches 83.6–86.4% at 64K at half the map size.

  • Qwen3-8B (QK-norm): Input-space RidgeFill easily beats naive post-k_norm direct regression (+0.057 vs. +0.689 nats) because k_norm re-projects keys onto the RMS shell. Predicting pre-k_norm keys before applying k_norm resolves that failure and edges ahead on novel loss at half the map size.

  • Qwen2.5-7B & LFM3-1.7B: Strong k_proj.bias damps input-space inflation on Qwen2.5 (where RidgeFill leans ahead on key tokens), and on hybrid LFM3-1.7B a shrinking conv+SWA tapered halo pairs with your input-space maps (16–24 MiB) for 98.8% overall / 99.7% 64K RULER (1.40×–1.85Γ— eager 32K TTFT) β€” input-space maps also keep a consistent edge over direct K/V on LFM3 key tokens.

  • Preprint PDF: https://huggingface.co/darioooooo0o/lfm3-1.7b-prefill-skip/blob/main/paper.pdf

  • Drop-in LFM3 projectors & runner: https://huggingface.co/darioooooo0o/lfm3-1.7b-prefill-skip

Would love any feedback or pushback if anything looks off on our RidgeFill comparisons β€” thanks again for releasing the code and maps!

(P.S. First-time arXiv submitter here β€” if either of you happens to have cs.LG endorsement privileges and thinks this is worth posting, my endorsement code is 9DCJYN: https://arxiv.org/auth/endorse?x=9DCJYN β€” no pressure at all!)

Sign up or log in to comment