2025-05-27 · 进阶 · 机器学习 · 计算机视觉

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

本文提出了一种名为ScaleKV的新型KV缓存压缩框架,旨在提高视觉自回归建模的内存效率,通过自适应缓存管理显著减少内存消耗,同时保持像素级图像质量。

更新于 2025-05-27。作者:Kunjun Li、Zigeng Chen、Cheng-Yen Yang、Jenq-Neng Hwang。

中文摘要

视觉自回归(VAR)建模因其创新的下一尺度预测方法而受到广泛关注,该方法在效率、可扩展性和零样本泛化方面带来了显著提升。然而,VAR中固有的从粗到细的方法导致推理过程中KV缓存的指数级增长,从而造成大量内存消耗和计算冗余。为了解决这些瓶颈,我们引入了ScaleKV,这是一个针对VAR架构量身定制的KV缓存压缩框架。ScaleKV利用了两个关键观察:Transformer层之间缓存的差异需求以及不同尺度上的不同注意力模式。基于这些洞察,ScaleKV将Transformer层分为两个功能组:草稿制作者和细化者。草稿制作者在多个尺度上表现出分散的注意力,因此需要更大的缓存容量。相反,细化者将注意力集中在当前标记图上以处理局部细节,从而需要大幅减少缓存容量。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.

解读

一句话总结

本文提出了一种名为ScaleKV的新型KV缓存压缩框架,旨在提高视觉自回归建模的内存效率,通过自适应缓存管理显著减少内存消耗,同时保持像素级图像质量。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt