Manuscript Offprint

arXiv:2608.27875

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 Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Quantization has been widely adopted in LLM training and inference to reduce cost and improve efficiency. However, low-bit quantization of the attention module often introduces large errors at very low bit-widths, causing performance degradation. Existing methods mainly rely on smoothing techniques to handle outliers, while we propose a hybrid quantization design to better balance accuracy and efficiency. Specifically, we propose HyQuant, an efficient hybrid quantization framework for LLM attention. HyQuant quantizes most attention states into low-bit formats while retaining a small set of vertical-line tokens and local-window states in high precision. These accuracy-critical regions are selected using lightweight vertical-line-aware attention-pattern signals, reducing quantization error with limited overhead. In the Prefill stage, HyQuant uses a hybrid-precision quantized attention operator that preserves vertical-line tokens and a local sliding window in full precision while quantizing the remaining context. In the Decode stage, HyQuant applies the same principle to KV-cache compression and fuses KV dequantization with attention computation to improve memory and hardware efficiency. Across diverse tasks, models, and datasets, HyQuant maintains nearly lossless accuracy with an extremely simple design, demonstrating the efficiency and practical feasibility of hybrid quantization for LLM attention. Code is available at: https://github.com/jerrysfls/HyQuant.

1 Introduction

With OpenAI's o1 series (OpenAI, 2024), Gemini (Gemini Team, 2025), and DeepSeek (DeepSeek-AI, 2025) bringing Chain-of-Thought (CoT) reasoning into mainstream, Large Language Models (LLMs) have shifted from brief answers to long multi-step reasoning traces, often reaching tens of thousands of tokens.

In long-context inference, bottlenecks differ across stages. During Prefill, full-prefix attention is dominated by large matrix multiplications and is mainly compute-bound. During Decode, each new token repeatedly reads/writes past KV states, so memory capacity and bandwidth become the constraints.

Quantization is widely deployed to reduce compute and memory costs, but aggressively pushing precision to very low bit-widths can degrade end-to-end model quality (Zheng et al., 2026). In our setting, uniform token-wise precision further fails to account for the non-uniform sensitivity induced by imbalanced attention. This stems from non-uniform sensitivity under imbalanced attention, a few high-contribution positions dominate the error, so uniform compression over-compresses critical tokens while wasting budget elsewhere. Existing approaches, whether sparsification-based (eviction, block-sparse attention) or quantization-based (KV-cache quantization, approximated attention) largely treat tokens as homogeneous and do not answer a reasoning-centric mixed-precision question: how to design a mixed precision that accounts for heterogeneous token sensitivity to balance accuracy and efficiency in long-context CoT inference.

As shown in Fig. 1, we repeatedly observe vertical-line structures across attention heatmaps, consistent with prior observations (Jiang et al., 2024). Unlike drifting diagonal and oblique bands, these vertical lines carry higher and more stable attention mass, but cover only a tiny fraction of tokens (typically <5%< 5\%). This motivates preserving such positions in full precision during low-bit quantization.

Motivated by these observations, we propose HyQuant, a mixed-precision quantization method that keeps full precision for a tiny set of positions—persistent vertical-line positions and a

∗^{*} Equal contribution. †\dagger Corresponding author.

recent sliding window while quantizing the rest to low bit-width. HyQuant identifies vertical lines with a lightweight procedure and uses a fixed window size with small overhead. In Prefill (compute-intensive), we design a quantized attention operator that runs most computation in low precision while keeping vertical lines and the local window in full precision, fusing both paths into a single operator. In Decode (memory-intensive), we quantize the KV cache to reduce capacity and bandwidth pressure while keeping the same critical positions unquantized, and fuse KV dequantization with attention computation for efficiency.

We evaluate HyQuant on Qwen3-8B, Qwen3-32B, LLaMA3.1-8B, and GLM-4-9B with Long-Bench, GSM8K, and MATH500, achieving 1.32×1.32\times to 3.58×3.58\times decode-kernel speedup and 1.04×1.04\times to 1.17×1.17\times end-to-end decode speedup, while maintaining near-full-precision accuracy and improving over strict low-bit baselines in most settings.

References (14)