QAM-W: 通过哈达玛旋转和激活感知缩放实现LLM权重的联合2D码本量化
QAM-W: Joint 2D Codebook Quantization for LLM Weights via Hadamard Rotation and Activation-Aware Scaling
AI总结:
提出QAM-W方法,通过L2归一化、块哈达玛旋转和2D坐标配对量化,结合激活感知缩放,在约5.5 bpw下使困惑度接近BF16,优于极坐标编码,并在5-6 bpw范围内保持质量。
摘要:
标量后训练量化器丢弃了权重行内的成对坐标结构。我们引入QAM-W(权重正交幅度调制),一种恢复该结构的编解码器:每行经过L2归一化、块哈达玛旋转、配对为2D坐标,并针对在单位圆高斯上训练的单个Lloyd-Max码本进行量化,同时采用激活感知的每通道缩放。在跨越四个家族(1.1B--13B参数)的五种LLM和八种量化配置的跨模型研究中,激活感知变体在约5.5 bpw下,每个模型的WikiText-2困惑度保持在BF16的±0.4%以内,以少32%的权重比特匹配SmoothQuant W8A8质量包络。联合2D编码在相同比特率下,在ΔPPL上优于极坐标(幅度×相位)编码2--15个百分点,且与BF16的配对KL散度在37个(方法,模型)行上以Spearman ρ=0.99跟踪ΔPPL%,与从编解码器失真到KL散度的单调复合界一致。3.5 bpw变体在量化容忍架构上具有竞争力。在严格的4 bpw下,旋转码本前沿方法QTIP优于QAM-W;贡献在于质量保持的5--6 bpw波段。
英文摘要:
Scalar post-training quantizers discard pairwise coordinate structure within weight rows. We introduce QAM-W (Quadrature Amplitude Modulation for Weights), a codec that recovers this structure: each row is L2-normalized, block-Hadamard rotated, paired into 2D coordinates, and quantized against a single Lloyd-Max codebook trained on the unit circular Gaussian, with activation-aware per-channel scaling. In a cross-model study spanning five LLMs from four families (1.1B--13B parameters) and eight quantized configurations, the activation-aware variant at $\approx 5.5$ bpw stays within $\pm 0.4\%$ of BF16 WikiText-2 perplexity on every model, matching the SmoothQuant W8A8 quality envelope at $32\%$ fewer weight bits. Joint 2D coding outperforms polar (amplitude $\times$ phase) coding by 2--15~pp $Δ$PPL at equal bitrate, and paired KL against BF16 tracks $Δ$PPL\% at Spearman $ρ= 0.99$ across 37 (method, model) rows, consistent with a monotone composite bound from codec distortion to KL divergence. A 3.5~bpw variant is competitive on quantization-tolerant architectures. At strict 4~bpw, the rotated-codebook frontier method QTIP outperforms QAM-W; the contribution is the quality-preserving 5--6~bpw band.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。