cs.LGMar 30, 2026

IsoQuant: Hardware-Aligned SO(4) Isoclinic Rotations for LLM KV Cache Compression

Authors: Zhongping Ji

Abstract

Orthogonal feature decorrelation is effective for low-bit online vector quantization, but dense random orthogonal transforms incur prohibitive O(d2)O(d^2) storage and compute. RotorQuant reduces this cost with blockwise 33D Clifford rotors, yet the resulting 33D partition is poorly aligned with modern hardware and offers limited local mixing. We propose IsoQuant, a blockwise rotation framework based on quaternion algebra and the isoclinic decomposition of SO(4)SO(4). It represents each 44D block as a quaternion and applies a closed-form transform T(v)=qLvqR‾T(v)=q_L v \overline{q_R}. This yields two main variants: IsoQuant-Full, which realizes the full SO(4)SO(4) rotation, and IsoQuant-Fast, which keeps only one isoclinic factor for lower cost; the framework also admits a lightweight 22D special case. At d=128d=128, IsoQuant-Full reduces forward rotation cost from about 2,4082{,}408 FMAs in RotorQuant to 1,0241{,}024, while IsoQuant-Fast further reduces it to 512512. Across 1818 fused CUDA settings with d∈128,256,512d \in {128,256,512}, bit widths 2,3,4{2,3,4}, and FP16/FP32 execution, IsoQuant achieves mean kernel-level speedups of about 4.5×4.5\times--4.7×4.7\times over RotorQuant while maintaining comparable reconstruction MSE, with peak speedups above 6×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.

Figures & tables

Explore similar work

May 20, 2026

OCTOPUS: Optimized KV Cache for Transformers via Octahedral Parametrization Under optimal Squared error quantization

The key-value (KV) cache dominates memory bandwidth and footprint in long-context autoregressive inference. Recent rotation-preconditioned codecs (TurboQuant, PolarQuant) show that a structured random rotation followed by a per-coordinate scalar quantizer matched to an analytically tractable marginal is a near-optimal recipe for KV compression. OCTOPUS advances this paradigm through joint quantization of rotated coordinate triplets. Each triplet's direction is mapped to a square via an octahedral parameterization, and the two resulting coordinates and the triplet norm are Lloyd-Max quantized against implementation-matched marginals. Optimizing the per-triplet squared error gives a strictly non-uniform bit allocation depending only on the total dimensionality of the keys. We find the finite-dimensional quality optimum with sweeps to be constant on every real decoder we test. The codec is data-oblivious, online, and deterministic given a seed. Across text, video, and audio, OCTOPUS matches or beats every prior rotation codec at every reported bit width and metric, with a lead that grows as bits drop for extreme compression. Furthermore, a fused Triton implementation reconstructs keys on the fly without materializing the uncompressed key, so the codec adds no decode-time bandwidth or latency over the existing dequantization. Project Page: https://octopus-quant.github.io/
May 26, 2026

Hurwitz Quaternion Multiplicative Quantization for KV Cache Compression

We propose Hurwitz Quaternion Multiplicative Quantization (HQMQ), a 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 product qp⋅qsq_p \cdot q_s, where qpq_p ranges over the 24-element Hurwitz group 2T2T (the 24 vertices of the 24-cell on S3S^3, pairwise angle 60∘60^\circ) and qsq_s ranges over a per-(layer, head) secondary codebook of SS random unit quaternions. The multiplicative composition yields 24S24S effective codewords at SS stored parameters; random initialization suffices because left-multiplication is an S3S^3 isometry, so seeded codebooks vary in end-task ppl by <1.5%<1.5\%. A per-batch median-multiplier outlier extraction step (C=3C{=}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.020.02--0.030.03 ppl points at ∼\sim5 bits. On Qwen2.5-7B and Qwen3-8B, where naive int4 collapses to 104+10^4{+} ppl, HQMQ + Med3×\times recovers fp16 quality within 0.020.02--0.100.10 ppl points at ∼\sim5 bits. HQMQ Pareto-dominates naive int by 33--1900×1900\times at matched bits across all five models, and downstream zero-shot accuracy matches fp16 at 3.793.79 bits on Mistral. Against the strongest calibrated KV-quantization baseline, HQMQ at 3.793.79 bits matches KIVI-4 (∼4.5\sim 4.5 bits) within ∼1{\sim}1 pt on CoQA, 0.60.6 pts on TruthfulQA, and 2.32.3 pts on GSM8K, at 16%16\% fewer bits and without a calibration pass. At the storage level, HQMQ delivers up to 5.05×5.05\times KV compression, shrinking a Llama-3-70B 128k-context cache from 43 GB to 8.5 GB.
Aug 3, 2026

Output-Aware Rotation for INT2 KV-Cache Quantization

The key-value (KV) cache has become a major memory and bandwidth bottleneck in long-context large language model inference, making ultra-low-bit quantization increasingly important. However, existing rotation-based INT2 methods optimize cache statistics or proxy errors before the complete attention readout, even though the model is ultimately affected by the error propagated through attention and the output projection WOW_O. To address this mismatch, we propose OptR, an output-aware rotation method that minimizes post-WOW_O attention-output error. OptR decomposes the post-WOW_O attention-output error into key- and value-induced terms and learns per-head orthogonal corrections through the full INT2 quantization and attention path. OptR further applies an attention-equivalent key reparameterization to reduce large channel-wise offsets without changing the softmax distribution. Across three models and five reasoning and coding benchmarks, OptR consistently improves both QuaRot and OSCAR and strengthens long-context retrieval, while preserving the paged KV-cache format with negligible inference overhead.