GitHub Issue

Engineering findings: K/V norm disparity + MSE > Prod + outlier mixed precision

Discovered On Mar 28, 2026
Primary Metric open
Hi! We independently implemented TurboQuant and ran systematic benchmarks across 8 models. Found some things that might be useful for your outlier.py implementation: ## K/V Norm Disparity Modern models have dramatically different K vs V norms: | Model | K norm | V norm | Ratio | |-------|--------|--------|-------| | GPT-2 | 11.8 | 2.0 | 6x | | Phi-2 | 13.1 | 3.0 | 4x | | Qwen2.5-3B | 172.1 | 3.3 | 52x | | Qwen2.5-7B | 274.0 | 2.6 | 106x | | Qwen2.5-1.5B | 778.6 | 4.3 | 182x | This means K and V need very different bit budgets. K/V ratio > 100x (Qwen family) needs mixed precision for K — uniform quantization fails catastrophically. ## MSE beats Prod for Attention Paper recommends TurboQuantProd (QJL) for Keys. We found MSE for both K and V works much better: - GPT-2 b=3: MSE gives +7.6% PPL, Prod gives +300% PPL - Reason: QJL variance is amplified by softmax ## Dynamic vs Fixed Outlier Detection Your outlier.py uses the paper's fixed allocation (32 outlier / 96 regular for d=128). We tried dynamic detection (channels with RMS > 3x median = outlier): - Layer 0 has ~20% outliers (RMS up to 272 vs median 1.7) - Middle layers have only 4-6% outliers - Per-layer dynamic detection may be more efficient than fixed allocation ## Result With dynamic outlier detection (outliers at 8-bit, rest at 3-bit): - Qwen2.5-1.5B: **3.6-bit avg, +2.1% PPL** (vs +78% with uniform 4.5-bit) Our implementation + all benchmark data: https://github.com/scos-lab/turboquant Great work on turboq...
View Raw Thread

Developer & User Discourse

TheTom • Mar 28, 2026
this is great work, thanks for sharing. the K/V norm disparity data across models is something we hadn't quantified — 182x ratio on Qwen2.5-1.5B is wild. that directly informs the head_dim=128 quality gap we've been chasing.

the MSE vs Prod finding for keys is interesting too. we dropped QJL early on (MSE-only approach) and buun's CUDA experiments independently confirmed it — your GPT-2 numbers showing Prod at +300% PPL vs MSE at +7.6% add more evidence that QJL variance gets amplified through softmax.

dynamic outlier detection with per-layer RMS thresholding is a smarter approach than the fixed 32/96 split. getting Qwen2.5-1.5B to 3.6-bit avg at +2.1% PPL vs +78% uniform is a massive improvement. we'll take a closer look at your repo.

appreciate the contribution.
TheTom • Mar 28, 2026
update on this: we ran a full turbo4 investigation this week and your MSE > Prod finding is now independently confirmed on three setups:

1. our Metal (M5 Max): QJL ablation on turbo4 shows removing QJL improves PPL from 6.1894 to 6.1756. QJL actively hurts.
2. buun's CUDA (RTX 3090): turbo4 degrades from -0.28% at 2K to +3.69% at 64K. QJL noise accumulates with context.
3. your GPT-2 data: Prod at +300% PPL vs MSE at +7.6%.

we've dropped QJL from turbo4 entirely and fixed the dequant path (byte-aligned packing, direct extraction). turbo4 now matches turbo3 speed and quality. the QJL bit was pure waste.

next step for us is looking at asymmetric K/V using your norm disparity data as a starting point.