스케일 인식 KV 캐시 압축을 통한 메모리 효율적인 시각적 자기회귀 모델링
Memory-Efficient Visual Autoregressive Modeling with Scale-Aware KV Cache Compression
May 26, 2025
저자: Kunjun Li, Zigeng Chen, Cheng-Yen Yang, Jenq-Neng Hwang
cs.AI
초록
시각적 자기회귀(VAR) 모델링은 혁신적인 다음 스케일 예측 접근 방식으로 인해 효율성, 확장성, 제로샷 일반화 측면에서 상당한 개선을 이뤄내며 주목받고 있습니다. 그러나 VAR에 내재된 coarse-to-fine 방법론은 추론 과정에서 KV 캐시의 기하급수적 증가를 초래하며, 이는 상당한 메모리 소비와 계산적 중복을 야기합니다. 이러한 병목 현상을 해결하기 위해, 우리는 VAR 아키텍처에 특화된 새로운 KV 캐시 압축 프레임워크인 ScaleKV를 제안합니다. ScaleKV는 두 가지 중요한 관찰을 활용합니다: 트랜스포머 계층 간의 다양한 캐시 요구 사항과 서로 다른 스케일에서의 독특한 어텐션 패턴입니다. 이러한 통찰을 바탕으로, ScaleKV는 트랜스포머 계층을 두 가지 기능적 그룹으로 분류합니다: 드래프터(drafters)와 리파이너(refiners). 드래프터는 여러 스케일에 걸쳐 분산된 어텐션을 보여주며, 이에 따라 더 큰 캐시 용량이 필요합니다. 반면, 리파이너는 현재 토큰 맵에 집중하여 지역적 세부 사항을 처리하므로 상당히 감소된 캐시 용량만 필요로 합니다. ScaleKV는 스케일별 드래프터와 리파이너를 식별함으로써 다중 스케일 추론 파이프라인을 최적화하고, 각 스케일에 맞춤화된 차별화된 캐시 관리를 가능하게 합니다. 최신 텍스트-이미지 VAR 모델 패밀리인 Infinity에 대한 평가 결과, 우리의 접근 방식은 픽셀 수준의 충실도를 유지하면서 필요한 KV 캐시 메모리를 10%로 효과적으로 줄이는 것을 입증했습니다.
English
Visual Autoregressive (VAR) modeling has garnered significant attention for
its innovative next-scale prediction approach, which yields substantial
improvements in efficiency, scalability, and zero-shot generalization.
Nevertheless, the coarse-to-fine methodology inherent in VAR results in
exponential growth of the KV cache during inference, causing considerable
memory consumption and computational redundancy. To address these bottlenecks,
we introduce ScaleKV, a novel KV cache compression framework tailored for VAR
architectures. ScaleKV leverages two critical observations: varying cache
demands across transformer layers and distinct attention patterns at different
scales. Based on these insights, ScaleKV categorizes transformer layers into
two functional groups: drafters and refiners. Drafters exhibit dispersed
attention across multiple scales, thereby requiring greater cache capacity.
Conversely, refiners focus attention on the current token map to process local
details, consequently necessitating substantially reduced cache capacity.
ScaleKV optimizes the multi-scale inference pipeline by identifying
scale-specific drafters and refiners, facilitating differentiated cache
management tailored to each scale. Evaluation on the state-of-the-art
text-to-image VAR model family, Infinity, demonstrates that our approach
effectively reduces the required KV cache memory to 10% while preserving
pixel-level fidelity.Summary
AI-Generated Summary