arXiv:2608.04074v1 cs.LG

쿼리가 주목하는 곳에 비트를 투자하다: 어텐션 보존 변환을 적용한 KV 캐시 벡터 양자화

Spend Bits Where Queries Look: KV Cache Vector Quantization with Attention-Preserving Transforms

Samuel Fernández-Menduiña, Amir Ziashahabi, Eduardo Pavez, Antonio Ortega, Salman Avestimehr

제출 2026-08-04

한국어 초록

긴 컨텍스트(long-context) 대규모 언어 모델(LLM) 디코딩은 매 스텝마다 키-값(KV) 캐시를 읽습니다. 이를 로드하는 것이 캐시에 대한 어텐션(attention)을 계산하는 것보다 더 오래 걸리기 때문에, 처리량은 대역폭에 의해 제한(bandwidth-bound)됩니다. 따라서 캐시 크기를 줄이면 디코딩 속도와 서빙 용량을 모두 향상시킬 수 있습니다. 과제는 어텐션 곱을 보존하고 재구성 비용을 낮게 유지하며 토큰(token)당 고정된 비트 수를 사용하면서 캐시 크기를 줄이는 것입니다. 원소당 2비트에서 가장 경쟁력 있는 방법들은 직교 변환에 의존합니다. 그러나 기존 기법들은 데이터에 무관(data-oblivious)하거나 왜곡 기준(distortion criterion)으로부터 변환을 도출하지 않고 쿼리 통계만을 사용합니다. 또한, 에너지를 압축하기보다는 원소 전반의 분산을 균등화하는 무작위 또는 아다마르(Hadamard) 회전을 기반으로 구축된 변환과 저비트율에서 최적이 아닌 고정 폭 스칼라 양자화기(quantizer)에 의존합니다. 본 논문에서는 KV 캐시 양자화(quantization)를 어텐션 곱의 오차를 왜곡으로 정의하는 변환 부호화(transform coding) 문제로 공식화합니다. 고해상도 모델(model) 하에서 캘리브레이션 통계로부터 키와 값에 대한 닫힌 형식(closed-form)의 최적 변환을 도출합니다. 최적의 키 변환은 직교하지 않으며 일반화된 파세발 관계(Parseval relation)를 만족함을 보여줍니다. 즉, 어텐션을 고려한 왜곡은 변환 영역에서 평균제곱오차(MSE)가 됩니다. 따라서 변환된 키 계수에 직접 적용되는 MSE 최적 벡터 양자화기를 사용할 수 있습니다. 고정 폭 레이아웃 요구사항을 충족하기 위해 계수들을 동일 부피의 파티션으로 그룹화하면 동일 크기의 코드북이 동일한 고해상도 모델 하에서 가변 비트율 최적에 도달함을 보여줍니다. 원소당 2비트에서 NOVA-KV라 명명된 본 논문의 방법은 유사한 처리량을 유지하면서 스칼라 양자화 방식에 의해 손실된 긴 컨텍스트 검색 정확도의 대부분을 회복합니다.

원문 초록

Long-context LLM decoding reads the key-value (KV) cache at every step. Loading it takes longer than computing attention over it, so throughput is bandwidth-bound. Hence, reducing the cache size can raise both decoding speed and serving capacity. The challenge is to reduce cache size while preserving the attention products, keeping reconstruction cheap, and using a fixed per-token bit count. At two bits per element, the most competitive methods rely on orthogonal transforms. However, existing techniques are either data-oblivious or use the query statistics without deriving the transform from a distortion criterion. Moreover, they rely on transforms built on top of random or Hadamard rotations, which equalize variances across entries rather than compacting energy, and fixed-width scalar quantizers, which are suboptimal at low rates. In this paper, we formulate KV cache quantization as a transform coding problem in which distortion is the error in the attention products. We derive closed-form optimal transforms for keys and values from calibration statistics, under a high-resolution model. We show that the optimal key transform is not orthogonal and satisfies a generalized Parseval relation: the attention-aware distortion becomes mean-squared error (MSE) in the transform domain. Thus, we can use MSE-optimal vector quantizers applied directly to the transformed key coefficients. To meet the fixed-width layout requirement, we show that grouping coefficients into equal-volume partitions makes equal-size codebooks attain the variable-rate optimum under the same high-resolution model. At two bits per element, our method, termed NOVA-KV, recovers most of the long-context retrieval accuracy lost by scalar quantization methods at comparable throughput.

제출 이력

확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.

  1. arXiv:2608.04074v1제출 시각 미확인

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

공통 태그로 연결된 공개 논문이 아직 없습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.