arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.04359cs.CV
收藏

PackCache: 一种无需训练的统一自回归视频生成加速方法通过紧凑的KV缓存

PackCache: A Training-Free Acceleration Method for Unified Autoregressive Video Generation via Compact KV-Cache

Institute of Artificial Intelligence, University of Central Florida(人工智能学院,中央佛罗里达大学)

Kunyang Li, Mubarak Shah, Yuzhang Shang

AI总结:

PackCache通过动态压缩KV缓存提升统一自回归视频生成效率,显著加速长序列生成。

摘要:

统一的自回归模型是一种基于Transformer的框架,旨在将多种多模态任务(例如文本、图像、视频)作为单个序列建模问题,在共享的令牌空间下进行处理。此类模型依赖KV缓存机制将注意力计算从O(T^2)降低到O(T);然而,KV缓存大小与生成的令牌数量成线性增长,且迅速成为限制推理效率和生成长度的主要瓶颈。统一的自回归视频生成继承了这一限制。我们的分析表明,KV缓存令牌具有不同的时空特性:(i)文本和条件图像令牌作为持久的语义锚点,始终接收高关注;(ii)对先前帧的关注会随着时间距离自然衰减。基于这些观察,我们引入了PackCache,一种无需训练的KV缓存管理方法,通过三种协调机制动态压缩KV缓存:条件锚定以保留语义参考,跨帧衰减建模以根据时间距离分配缓存预算,以及空间保留位置嵌入以在缓存移除下保持一致的3D结构。在效率方面,PackCache在48帧长的序列上加速端到端生成1.7-2.2倍,展示了其强大的潜力,使更长序列的视频生成成为可能。值得注意的是,最终的四帧——受逐渐扩大的KV缓存影响最大且成本最高的片段——PackCache在48帧视频中分别对A40和H200提供了2.6倍和3.7倍的加速。

英文摘要:

A unified autoregressive model is a Transformer-based framework that addresses diverse multimodal tasks (e.g., text, image, video) as a single sequence modeling problem under a shared token space. Such models rely on the KV-cache mechanism to reduce attention computation from O(T^2) to O(T); however, KV-cache size grows linearly with the number of generated tokens, and it rapidly becomes the dominant bottleneck limiting inference efficiency and generative length. Unified autoregressive video generation inherits this limitation. Our analysis reveals that KV-cache tokens exhibit distinct spatiotemporal properties: (i) text and conditioning-image tokens act as persistent semantic anchors that consistently receive high attention, and (ii) attention to previous frames naturally decays with temporal distance. Leveraging these observations, we introduce PackCache, a training-free KV-cache management method that dynamically compacts the KV cache through three coordinated mechanisms: condition anchoring that preserves semantic references, cross-frame decay modeling that allocates cache budget according to temporal distance, and spatially preserving position embedding that maintains coherent 3D structure under cache removal. In terms of efficiency, PackCache accelerates end-to-end generation by 1.7-2.2x on 48-frame long sequences, showcasing its strong potential for enabling longer-sequence video generation. Notably, the final four frames - the portion most impacted by the progressively expanding KV-cache and thus the most expensive segment of the clip - PackCache delivers a 2.6x and 3.7x acceleration on A40 and H200, respectively, for 48-frame videos.

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

↑