ChatPaper.aiChatPaper

Geheugenefficiënte visuele autoregressieve modellering met schaalbewuste KV-cachecompressie

Memory-Efficient Visual Autoregressive Modeling with Scale-Aware KV Cache Compression

May 26, 2025
Auteurs: Kunjun Li, Zigeng Chen, Cheng-Yen Yang, Jenq-Neng Hwang
cs.AI

Samenvatting

Visueel Autoregressief (VAR) modelleren heeft aanzienlijke aandacht gekregen vanwege zijn innovatieve aanpak voor voorspelling op de volgende schaal, wat aanzienlijke verbeteringen oplevert in efficiëntie, schaalbaarheid en zero-shot generalisatie. Desalniettemin resulteert de grof-naar-fijn methodologie die inherent is aan VAR in een exponentiële groei van de KV-cache tijdens inferentie, wat aanzienlijk geheugenverbruik en computationele redundantie veroorzaakt. Om deze knelpunten aan te pakken, introduceren we ScaleKV, een nieuw KV-cachecompressie framework speciaal ontworpen voor VAR-architecturen. ScaleKV maakt gebruik van twee cruciale observaties: variërende cachebehoeften over transformer-lagen en verschillende aandachtspatronen op verschillende schalen. Op basis van deze inzichten categoriseert ScaleKV transformer-lagen in twee functionele groepen: drafters en refiners. Drafters vertonen verspreide aandacht over meerdere schalen, waardoor ze een grotere cachecapaciteit vereisen. Refiners daarentegen richten hun aandacht op de huidige tokenkaart om lokale details te verwerken, waardoor ze aanzienlijk minder cachecapaciteit nodig hebben. ScaleKV optimaliseert de multi-schaal inferentiepijplijn door schaalspecifieke drafters en refiners te identificeren, wat gedifferentieerd cachebeheer mogelijk maakt dat is afgestemd op elke schaal. Evaluatie van de state-of-the-art tekst-naar-beeld VAR-modelfamilie, Infinity, toont aan dat onze aanpak het benodigde KV-cachegeheugen effectief reduceert tot 10% terwijl pixelnauwkeurigheid behouden blijft.
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.
PDF132May 27, 2025