arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.27646cs.LGcs.AI
收藏

Hurwitz四元数乘法量化用于KV缓存压缩

Hurwitz Quaternion Multiplicative Quantization for KV Cache Compression

Massachusetts Institute of Technology, Cambridge, MA, USA(麻省理工学院);IBM Research, Cambridge, MA, USA(IBM研究院);University of Toronto, Toronto, Canada(多伦多大学)

Kabir Swain, Sijie Han, Daniel Karl I. Weidele, Mauro Martino, David Cox, Antonio Torralba

AI总结:

提出一种免校准的Hurwitz四元数乘法量化方法,通过将K/V的4元素块视为四元数并用量化乘积编码,在约5比特下匹配fp16困惑度,实现高达5.05倍KV缓存压缩。

摘要:

我们提出 extbf{Hurwitz四元数乘法量化(HQMQ)},一种用于大语言模型KV缓存压缩的 extbf{免校准}方法。HQMQ将K或V的每个4元素块视为一个四元数,并将其单位方向量化到乘积$q_p \cdot q_s$上,其中$q_p$取自24元素Hurwitz群$2T$($S^3$上24-cell的24个顶点,两两夹角$60^\circ$),$q_s$取自每个(层、头)的二级码本,包含$S$个 extemph{随机}单位四元数。乘法组合在$S$个存储参数下产生$24S$个有效码字;随机初始化即可,因为左乘是$S^3$等距变换,因此种子码本在最终任务困惑度上的变化小于$1.5\%$。一个每批次的中间乘数离群值提取步骤($C=3$,无校准)处理现代离群值密集型架构。我们在五个现代开源模型上评估:Mistral-7B(密集MHA)、Llama-3-8B和Qwen2.5-7B和Qwen3-8B(密集GQA),以及gpt-oss-20b(稀疏MoE)。在Mistral-7B和Qwen3-8B上,HQMQ在约5比特下匹配fp16,困惑度差异在$0.02$--$0.03$点内。在Qwen2.5-7B和Qwen3-8B上,朴素int4导致困惑度崩溃到$10^4+$,而HQMQ + Med3$\times$在约5比特下恢复fp16质量,差异在$0.02$--$0.10$点内。HQMQ在所有五个模型上,在相同比特数下帕累托优于朴素int $3$--$1900\times$,并且在Mistral上以3.79比特的下游零样本准确率匹配fp16。与最强的校准KV量化基线相比,HQMQ在3.79比特下匹配KIVI-4(约4.5比特),在CoQA上差异约1点,TruthfulQA上0.6点,GSM8K上2.3点,同时比特数减少16%且无需校准过程。在存储层面,HQMQ提供高达5.05倍的KV压缩,将Llama-3-70B的128k上下文缓存从43 GB缩小到8.5 GB。

英文摘要:

We propose \textbf{Hurwitz Quaternion Multiplicative Quantization (HQMQ)}, a \textbf{calibration-free} method for KV cache compression of large language models. HQMQ treats each 4-element chunk of K or V as a quaternion and quantizes its unit direction to the \emph{product} $q_p \cdot q_s$, where $q_p$ ranges over the 24-element Hurwitz group $2T$ (the 24 vertices of the 24-cell on $S^3$, pairwise angle $60^\circ$) and $q_s$ ranges over a per-(layer, head) secondary codebook of $S$ \emph{random} unit quaternions. The multiplicative composition yields $24S$ effective codewords at $S$ stored parameters; random initialization suffices because left-multiplication is an $S^3$ isometry, so seeded codebooks vary in end-task ppl by $<1.5\%$. A per-batch median-multiplier outlier extraction step ($C{=}3$, no calibration) handles modern outlier-heavy architectures. We evaluate on five modern open models: Mistral-7B (dense MHA), Llama-3-8B and Qwen2.5-7B and Qwen3-8B (dense GQA), and gpt-oss-20b (sparse MoE). On Mistral-7B and Qwen3-8B, HQMQ matches fp16 within $0.02$--$0.03$ ppl points at $\sim$5 bits. On Qwen2.5-7B and Qwen3-8B, where naive int4 collapses to $10^4{+}$ ppl, HQMQ + Med3$\times$ recovers fp16 quality within $0.02$--$0.10$ ppl points at $\sim$5 bits. HQMQ Pareto-dominates naive int by $3$--$1900\times$ at matched bits across all five models, and downstream zero-shot accuracy matches fp16 at $3.79$ bits on Mistral. Against the strongest calibrated KV-quantization baseline, HQMQ at $3.79$ bits matches KIVI-4 ($\sim 4.5$ bits) within ${\sim}1$ pt on CoQA, $0.6$ pts on TruthfulQA, and $2.3$ pts on GSM8K, at $16\%$ fewer bits and without a calibration pass. At the storage level, HQMQ delivers up to $5.05\times$ KV compression, shrinking a Llama-3-70B 128k-context cache from 43 GB to 8.5 GB.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑