Manuscript Offprint

arXiv:2610.09202

Few Bits, One Law: Toward W2A4KV2

Kai Yi, Tarek Elgamal, Sruthikesh Surineni, Vignesh Vivekraja, Soumyadeep Ghosh, Steven Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Kai Yi, Tarek Elgamal, Sruthikesh Surineni, Vignesh Vivekraja, Soumyadeep Ghosh, Steven Li

Meta AI

Extreme low-bit LLM compression is most challenging when weights, activations, and KV caches are quantized together: their distributions differ, and quantization errors interact throughout the network. We introduce CanonQ, a unified quantization-aware training framework that addresses these challenges by separating source canonicalization from task-aware adaptation. Fixed rotations and energy normalization map heterogeneous tensor sources to canonical coordinates, enabling frozen Gaussian-reference codebooks to be reused across layers and models. Joint training then adapts the network to the coupled errors of weight, activation, and cache quantization within a common scalar/vector interface. We bound frozen-codebook transfer error and local task loss, and derive an exact normalization-aware straight-through Jacobian that links quantization distortion to gradient bias. The strongest gains arise under joint W2A4KV2 compression: across LLaMA3-1B/3B/8B, CanonQ-Omni achieves up to 14.28×14.28\times lower WikiText-2 perplexity and up to 57.9% higher mean zero-shot accuracy than prior state-of-the-art and representative quantization baselines. The benefits extend to Qwen3-1.7B, code generation, and mathematical reasoning: on instruction-tuned MobileLLM-Pro-1B at W2A16KV16, CanonQ achieves relative improvements of 41.7% in HumanEval pass@1 and 39.1% in GSM8K exact match over the strongest evaluated quantization baseline.

Correspondence: kaiyi96@meta.com

Meta

(a) Source canonicalization

Figure

One coordinate interface for W/A/K/V

(b) Shared frozen codebooks

2bd2^{bd} entries; bd bits per d-tuple

Reused across layers and models

(c) Joint model adaptation

Joint adaptation across W/A/K/V

W2A4KV2

Figure 1 Schematic overview of CanonQ. Fixed source-specific transforms and normalization map tensor blocks to canonical coordinates. Frozen Gaussian-reference codebooks are reused across layers and models for matching (b,d)(b, d). Joint QAT adapts the model to coupled quantization errors at W2A4KV2.

1 Introduction

LLM inference is increasingly limited by memory movement: weights dominate model storage and matrix-multiplication bandwidth, activations affect prefill, and the KV cache grows with batch size and context length. Quantization is therefore central to deployment, yet the most attractive regimes, which include W1/W2 weights, A4 activations, and KV2 caches, remain difficult. Post-Training Quantization (PTQ) is effective at moderate precision but often collapses when several components are compressed simultaneously (Dettmers et al., 2022; Xiao et al., 2023; Frantar et al., 2023; Lin et al., 2024; Shao et al., 2024; Egiazarian et al., 2024; Malinovskii et al., 2024). Quantization-Aware Training (QAT) can recover quality by adapting the model to the quantized computation (Liu et al., 2024a, 2025b; Chen et al., 2025; Li et al., 2026; Yi et al., 2026), but the result still depends on the discrete representation to which the model is trained.

At such low precision, that representation is not a minor implementation choice. Uniform quantization uses equally spaced reconstruction levels, even though weights, activations, and KV states have different distributional shapes. A data-fitted codebook can accommodate those differences, but ties the representation to the tensors or calibration data used to construct it. Joint compression makes the choice harder: weights shape the activation distribution, and quantized activations generate the keys and values that must themselves survive a two-bit cache. This motivates a common quantization interface that supports adaptation across the coupled computation.

We ask: can a small quantization interface be designed once, then reused while an LLM learns to operate through it? Our approach separates two decisions. Source-specific transforms and normalization determine the coordinates presented to the quantizer; a source-independent reference determines the reconstruction alphabet. QAT then adapts the network to the resulting fixed codec. We introduce CanonQ around this principle: canonicalize the source, then train the model to use the codec. A fixed source-specific Hadamard-diagonal-permutation (HDP) transform mixes each block, and energy normalization removes its magnitude. The codebooks and HDP maps stay fixed throughout QAT. CanonQ-W applies this interface to weights; CanonQ-Omni applies it to the complete W/A/K/V computation.

Our central finding is that the benefit of canonical quantization becomes most pronounced when weights, activations, and KV caches are compressed together.

Our contributions are: (1) A unified framework for joint W/A/KV quantization. We introduce CanonQ, which unifies scalar and vector quantization of weights, activations, and KV caches through a common canonical interface. Frozen reference codebooks are reusable across layers and models, while joint QAT adapts the network to interacting quantization errors across the full computation. (2) A unified theory linking source alignment to optimization. We establish a quantitative chain from source mismatch to codebook distortion, local task loss, and optimization error. Wasserstein bounds characterize when frozen reference codebooks transfer to actual tensor distributions, while an exact normalization-aware straight-through estimator (STE) Jacobian identity reveals how assignment distortion controls backward sensitivity and gradient bias. We further derive distortion-dependent stationarity guarantees for a smooth reference objective, providing a theoretical foundation for the canonical training interface. (3) Large quality gains under extreme joint compression. At W2A4KV2, CanonQ-Omni achieves up to 14.28×14.28\times lower WikiText-2 perplexity and up to 57.9% higher mean zero-shot accuracy than strong quantization baselines across LLaMA3-1B/3B/8B. Further evaluations demonstrate transfer to Qwen3-1.7B, substantial coding and GSM8K improvements under W2A16KV16, and stable relative perplexity within the 8K continued-QAT training range.

References (47)