TL;DR
PackCache is a training-free KV-cache compaction method that accelerates unified autoregressive video generation by up to 3.7× on long sequences. By exploiting intrinsic spatiotemporal attention patterns—permanently anchoring key context while exponentially decaying older frames—it maintains high video quality and stable memory boundaries without requiring model retraining.
What Problem Does This Paper Address?
Unified autoregressive (AR) transformers treat multimodal tasks (text, images, and video) as a single sequence-modeling problem. To avoid quadratic attention costs during generation, these models rely on a Key-Value (KV) cache. However, as a video grows longer, the KV-cache expands linearly with every generated token.
For a 48-frame video, this expansion generates tens of thousands of tokens, creating a massive computational and memory bottleneck. Profiling shows that attention mechanisms consume up to 76% of per-layer execution time. Standard workarounds like sliding windows bound the memory but discard long-range history, leading to severe temporal drift, frame jitter, and structural degradation.
Methods
PackCache introduces a training-free, token-level selection strategy tailored for visual tokens through three coordinated mechanisms:
- Condition Anchoring: Recognizing that text prompts and initial conditioning images act as global semantic anchors, PackCache exempts them from eviction, keeping them permanently in the cache.
- Cross-Frame Decay Modeling: Attention naturally decays with temporal distance. PackCache applies an exponential decay kernel ($b_d = 2^{-\min(d, W-1)}$) to allocate the remaining cache budget, retaining more tokens from recent frames and fewer from distant ones. Crucially, it explicitly evicts masked tokens rather than storing them as redundant zeros.
- Spatially Preserving Position Embedding: When frames are dropped, relative positional structures in 3D rotary position embeddings (MM-RoPE) break down. PackCache introduces a lightweight rebasing operation that shifts the 1D global temporal index to remain continuous while leaving the 3D spatial coordinates intact, preserving spatial consistency.
[Text/Image Anchors] ---> Always Retained
[Recent Frame] ---> High Token Budget (High Fidelity)
[Distant Frame] ---> Low Token Budget (Compressed History)
Datasets
The authors evaluated PackCache using a 160-image subset sampled from the Image-to-Video (I2V) portion of VBench, a comprehensive benchmark suite for video generative models. To generate text prompts for the image-to-video task, they paired each image with a detailed caption generated by the Qwen-32B model.
Key Insights and Ideas
- Attention Dominates the Bottleneck: Module-level profiling confirms that attention operations account for 71–76% of per-layer computation, making KV-cache size the primary limiting factor for long-video synthesis.
- Visual Tokens Aren't Language Tokens: Unlike abstract language tokens, visual tokens exhibit high spatiotemporal redundancy. PackCache leverages the fact that video models naturally favor temporal locality (nearer frames over farther ones).
- Masked Tokens are Dead Weight: Autoregressive video models often use frame-level masking during training. PackCache realizes that keeping these masked positions in the inference cache wastes capacity without contributing to attention scores.
Key Results
PackCache was benchmarked against the original Lumos-1 model (Full KV-Cache) and a sliding-window baseline on NVIDIA A40 and H200 GPUs.
- Substantial Speedups: PackCache accelerates end-to-end 48-frame video generation by 1.7–2.2×. For the final four frames—the most computationally expensive segment—it delivers a 2.6× speedup on the A40 and a 3.7× speedup on the H200.
- Bounded Memory Footprint: While the full-cache baseline suffers from Out-Of-Memory (OOM) errors on 48-frame sequences, PackCache maintains a stable, bounded memory footprint (~38 GiB on an A40), independent of video length.
- High Visual Quality: On VBench metrics, PackCache significantly outperforms the sliding-window approach. It achieves a much higher Dynamic Degree and superior Subject Consistency, preserving long-term cues like continuous wing-flapping or camera panning without structural breakdown.
Limitations and Future Work
The performance of PackCache depends on tuning the window size $W$ and the minimum frame quota $b_{min}$. Ablation studies showed that a 3-frame equivalent budget balances long-range context and per-frame fidelity best, but this hyperparameter may vary across different model scales. Additionally, the method was validated primarily on Lumos-1 (the only open-source unified AR video generator available at the time). The authors suggest that extending this spatiotemporal compaction strategy to other emerging unified multimodal architectures is a promising direction for future research.
Summary updated