HyQuant: Hybrid-Precision Quantization for LLM Attention

Jiatong Ding, Bingxin Xing, Yu Zhang, Dian Ding, Xiaodong Yi, Xianbin Ouyang, Feihu Zhou, Kun Zhang, Zhenyu Guo, Hao Pan, Guangtao Xue, Yiming ZhangarXiv 2026

TL;DR

HyQuant is a hybrid-precision quantization framework for LLM attention that keeps a tiny fraction (<5%) of critical "vertical-line" tokens and local context in full precision while compressing the rest into low-bit formats. By optimizing both the prefill and decode stages with fused mixed-precision kernels, it delivers nearly lossless accuracy alongside up to a 3.58× speedup in decoding kernels for long-context inference.

What Problem Does This Paper Address?

As Large Language Models (LLMs) shift toward complex Chain-of-Thought (CoT) reasoning, context lengths are exploding into tens of thousands of tokens. This creates massive operational bottlenecks: the Prefill stage becomes heavily compute-bound due to large matrix multiplications, while the Decode stage becomes severely memory-bound as the system repeatedly reads and writes historical Key-Value (KV) states.

Quantization reduces these costs, but uniformly forcing the entire attention mechanism into ultra-low bit-widths (like 4-bit) severely degrades model accuracy. The core issue is that token importance in LLM attention is highly non-uniform. A few "heavy hitter" tokens dominate the attention mass. Uniform quantization over-compresses these critical tokens, amplifying errors across long sequences, while standard token-eviction strategies can permanently discard information that might become crucial later in a complex reasoning chain.

Methods

HyQuant introduces a token-level, hybrid-precision quantization strategy designed to protect accuracy-critical tokens while aggressively compressing the rest.

Figure 3: Overview of HyQuant. HyQuant retains vertical-line positions and a local window in full preci- sion, while quantizing the remaining majority for effi- cient prefill and decode.

The framework consists of three core components:

  1. Vertical-Line Identification: Using a lightweight online reduction procedure, HyQuant calculates column-wise attention mass to identify persistent "vertical-line" tokens—attention sinks or semantically critical anchors that naturally attract a disproportionate amount of attention.
  2. Prefill-Stage Hybrid Attention: The keys and values are split. The top-5% vertical-line tokens and a local sliding window are retained in full precision (FP16/BF16), while the remaining bulk of the context is quantized to low-bit formats (e.g., INT8/FP8 or INT4/FP4). Crucially, both precision paths are fused into a single FlashAttention-style operator to eliminate execution overhead.
  3. Decode-Stage Fused Attention: The KV cache is stored in a hybrid format. To avoid wasting memory bandwidth, HyQuant utilizes a fused "dequantize-in-attention" kernel. It unpacks low-bit blocks on the fly within a single online-softmax pass, ensuring that a full-precision cache is never materialized in GPU memory.

Datasets

The authors evaluated HyQuant across several prominent long-context and mathematical reasoning benchmarks using models like Qwen3-8B, Qwen3-32B, LLaMA3.1-8B-Instruct, and GLM-4-9B-0414:

  • LongBench v1: Used to assess multi-step reasoning, summarization, and information aggregation over long sequences.
  • GSM8K & MATH500: Used to evaluate the impact of quantization on complex, multi-step mathematical reasoning capabilities.

Key Insights and Ideas

  • The "Vertical-Line" Phenomenon is Universal: Across different model families (Qwen, LLaMA, Gemma), attention heatmaps consistently reveal stable, vertical stripes. A tiny fraction of tokens (<5%) persistently anchors the attention distribution over long generation spans.
Figure 1: Vertical-line-dominated attention across model families. Rows from top to bottom: Qwen3-8B, Gemma4-31B, Qwen3.5-4B, and Llama3-8B. Across layers, heads, and model families, persistent vertical bright stripes indicate that a small number of positions are repeatedly attended over long spans, revealing a highly imbalanced attention distribution and motivating compression strategies that prioritize a small set of criti- cal positions.
  • Asymmetric Error Amplification: Quantization errors are highly destructive at high-score token positions because small perturbations there get amplified through repeated KV cache accesses. Keeping just the top 1% to 5% of these positions in full precision dramatically suppresses the overall mean squared error (MSE), bringing it down to near 8-bit error levels.
Figure 2: Amplified quantization error at high-score positions (Qwen3-8B, Layer 28). Uniform 4-bit quan- tization incurs substantially larger MSE than uniform 8-bit quantization. When the remaining positions are quantized to 4-bit, retaining only the top-1%/top-5% high-score positions in full precision significantly re- duces the error and consistently approaches the 8-bit error level across different sequence lengths.
  • Co-Design Beats Naive Pipelines: Traditional mixed-precision methods often follow a "dequantize-then-attend" strategy, which wastes memory bandwidth. Fusing dequantization directly into the attention scanning loop unlocks massive throughput gains and prevents out-of-memory (OOM) errors during high-parallelism serving.

Key Results

  • Nearly Lossless Accuracy: Across diverse tasks, HyQuant preserves full-precision performance (FlashAttention-2) and consistently beats strict low-bit baselines like KIVI and KVTuner. For example, on Qwen3-8B (LongBench), HyQuant achieved an average score of 45.04 (vs. full-precision 44.59), whereas KIVI degraded to 37.68.
  • Substantial Speedups: As context scales up to 32K tokens, HyQuant achieves a 1.32× to 3.58× speedup in the decode kernel and a 1.04× to 1.17× end-to-end decode speedup.
  • High Parallelism Capabilities: While competing low-bit methods hit OOM limits at larger batch sizes due to memory overhead, HyQuant successfully runs at a batch size of 16 on a single H100 GPU with a 32K prefix, delivering a high throughput of 231.6 tokens/s.

Limitations and Future Work

  • Short-Context Efficiency: The benefits of preserving vertical-line tokens are most prominent in long-context scenarios. For short-context tasks, HyQuant remains competitive but does not offer the same level of hardware acceleration.
  • Hardware and Scale Constraints: The evaluations were strictly conducted on high-end NVIDIA H100 GPUs and models up to 32B parameters. The end-to-end speedups may be less pronounced on lower-end hardware where the decoding pipeline isn't entirely memory-bound.
  • Task Scope: The authors note that it remains unknown whether this hybrid-precision approach maintains its effectiveness in specialized agentic or coding-related workflows.

Summary updated

BibTeX
@misc{ding2026hyquant,
  author = {Jiatong Ding and Bingxin Xing and Yu Zhang and Dian Ding and Xiaodong Yi and Xianbin Ouyang and Feihu Zhou and Kun Zhang and Zhenyu Guo and Hao Pan and Guangtao Xue and Yiming Zhang},
  title = {{HyQuant: Hybrid-Precision Quantization for LLM Attention}},
  year = {2026},
  eprint = {2608.27875},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.27875},
}
Figure