HyQuant: Hybrid-Precision Quantization for LLM Attention

arXiv:2608.27875 · 2026-09-12 공개 · arXiv · PDF

kv-cache memory-efficiency low-bit-quantization llm-attention hybrid-quantization vertical-line-tokens local-window prefill-stage

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 .

한국어 요약

한 줄 요약

HyQuant는 LLM의 어텐션 모듈을 혼합 정밀도로 양자화하여 정확도와 효율성을 균형 있게 유지하는 프레임워크이다.

핵심 기여도

핵심 아이디어

기존의 LLM 양자화 방법은 대부분 **스무딩 기법**에 의존하며, 모든 토큰을 동일하게 처리하는 방식이 일반적이었다. 그러나 **비균일 어텐션 패턴**으로 인해 특정 토큰이 오차에 더 민감한데, 이를 고려하지 못한 기존 방법은 정확도 손실을 초래한다. HyQuant은 **수직선 구조**를 가진 토큰과 **로컬 윈도우**가 어텐션의 핵심 영역임을 관찰하고, 이들만 고정밀로 유지함으로써 오차를 줄이면서도 효율성을 확보한다. 이는 **lightweight vertical-line-aware attention-pattern signals**를 사용하여 선택되며, 전체 양자화 오버헤드는 최소화된다.

기술적 접근법

주요 결과

의의 및 한계

HyQuant은 **혼합 정밀도 양자화**를 통해 **정확도와 효율성**을 균형 있게 유지하는 새로운 접근법을 제시하며, **긴 문맥 추론**에서 특히 유용하다. **수직선 토큰**의 선택은 **lightweight attention signal**을 기반으로 하므로, 추가적인 복잡도 없이도 **오버헤드 최소화**를 달성했다는 점에서 실용적 가치가 크다. 그러나 **모든 어텐션 패턴이 수직선 구조를 가진다고 가정**하는 점에서, **다양한 어텐션 패턴을 가진 모델**에서는 한계가 있을 수 있다.

실용적 활용

HyQuant은 **긴 문맥 추론**이 필요한 **LLM 기반 추론 엔진**, 특히 **CoT 추론**을 활용하는 **AI 어시스턴트**, **데이터 분석 시스템**, **대규모 문서 처리 플랫폼** 등에 적용 가능하다. **저비용 고성능 추론**이 요구되는 산업 현장에서 유용하게 활용될 수 있다.