arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.19602cs.LG
收藏

内存高效的视觉自回归建模与尺度感知KV缓存压缩

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

University of Washington(华盛顿大学);National University of Singapore(新加坡国立大学)

Kunjun Li, Zigeng Chen, Cheng-Yen Yang, Jenq-Neng Hwang

AI总结:

针对视觉自回归模型推理中KV缓存指数增长的内存瓶颈,提出ScaleKV框架,通过区分起草者与精炼者层并实施尺度感知差异化缓存管理,在Infinity模型上将KV缓存内存降至10%且保持像素级保真度。

摘要:

视觉自回归(VAR)建模因其创新的下一尺度预测方法而受到广泛关注,该方法在效率、可扩展性和零样本泛化方面带来了显著改进。然而,VAR固有的从粗到细的方法导致推理过程中KV缓存呈指数级增长,造成相当大的内存消耗和计算冗余。为了解决这些瓶颈,我们引入了ScaleKV,一种专为VAR架构设计的新型KV缓存压缩框架。ScaleKV利用了以下两个关键观察:不同Transformer层对缓存的需求不同,以及不同尺度下注意力模式的差异。基于这些见解,ScaleKV将Transformer层分为两个功能组:起草者(drafters)和精炼者(refiners)。起草者在多个尺度上表现出分散的注意力,因此需要更大的缓存容量。相反,精炼者将注意力集中在当前令牌映射上以处理局部细节,因此需要大幅减少的缓存容量。ScaleKV通过识别特定尺度的起草者和精炼者来优化多尺度推理流程,促进针对每个尺度定制的差异化缓存管理。在最新的文本到图像VAR模型系列Infinity上的评估表明,我们的方法有效地将所需的KV缓存内存减少到10%,同时保持像素级保真度。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑