IsoQuant: 基于硬件对齐的 SO(4) 等倾旋转用于 LLM KV 缓存压缩
IsoQuant: Hardware-Aligned SO(4) Isoclinic Rotations for LLM KV Cache Compression
AI总结:
IsoQuant 基于四元数代数和 SO(4) 的等倾分解,通过块级旋转框架实现低比特在线向量量化,减少存储和计算成本,提升 KV 缓存压缩效率。
摘要:
正交特征去相关对于低比特在线向量量化是有效的,但密集的随机正交变换导致存储和计算成本高昂的O(d²)。RotorQuant通过块级三维克利夫顿旋子降低了这种成本,但所得到的三维分区与现代硬件对齐不佳,且本地混合有限。我们提出了IsoQuant,一种基于四元数代数和SO(4)等倾分解的块级旋转框架。它将每个4D块表示为四元数,并应用闭式变换T(v)=q_L v \overline{q_R}。这产生了两种主要变种:IsoQuant-Full,实现了完整的SO(4)旋转,以及IsoQuant-Fast,仅保留一个等倾因子以降低成本;该框架还允许一个轻量的2D特殊情况。在d=128时,IsoQuant-Full将正向旋转成本从RotorQuant的约2,408个FMA降低到1,024,而IsoQuant-Fast进一步降低到512。在18种融合的CUDA设置中,d∈{128,256,512},比特宽度{2,3,4},以及FP16/FP32执行中,IsoQuant在RotorQuant上实现了平均核级速度提升约4.5倍至4.7倍,同时保持可比的重建MSE,峰值速度提升超过6倍。当前验证仅限于合成归一化向量的阶段1量化-反量化路径;端到端KV缓存评估仍为未来工作。
英文摘要:
Orthogonal feature decorrelation is effective for low-bit online vector quantization, but dense random orthogonal transforms incur prohibitive $O(d^2)$ storage and compute. RotorQuant reduces this cost with blockwise $3$D Clifford rotors, yet the resulting $3$D partition is poorly aligned with modern hardware and offers limited local mixing. We propose \textbf{IsoQuant}, a blockwise rotation framework based on quaternion algebra and the isoclinic decomposition of $SO(4)$. It represents each $4$D block as a quaternion and applies a closed-form transform $T(v)=q_L v \overline{q_R}$. This yields two main variants: \emph{IsoQuant-Full}, which realizes the full $SO(4)$ rotation, and \emph{IsoQuant-Fast}, which keeps only one isoclinic factor for lower cost; the framework also admits a lightweight $2$D special case. At $d=128$, IsoQuant-Full reduces forward rotation cost from about $2{,}408$ FMAs in RotorQuant to $1{,}024$, while IsoQuant-Fast further reduces it to $512$. Across $18$ fused CUDA settings with $d \in {128,256,512}$, bit widths ${2,3,4}$, and FP16/FP32 execution, IsoQuant achieves mean kernel-level speedups of about $4.5\times$--$4.7\times$ over RotorQuant while maintaining comparable reconstruction MSE, with peak speedups above $6\times$. Current validation is limited to the stage-1 quantize--dequantize path on synthetic normalized vectors; end-to-end KV-cache evaluation remains future work.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。