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

ST$^3$:通过时空视觉令牌修剪加速多模态大语言模型

ST$^3$: Accelerating Multimodal Large Language Model by Spatial-Temporal Visual Token Trimming

Zhejiang University(浙江大学);Alibaba Cloud Computing(阿里云)

Jiedong Zhuang, Lu Lu, Ming Dai, Rui Hu, Jian Chen, Qiang Liu, Haoji Hu

AI总结:

本文提出时空视觉令牌修剪框架ST$^3$,通过渐进式视觉令牌剪枝和视觉令牌退火两种无需重训练的技术,在保持性能的同时实现约2倍推理加速和约70%的KV缓存内存节省。

摘要:

多模态大语言模型(MLLMs)通过整合视觉和文本信息来增强其感知能力。然而,处理大量视觉令牌会产生显著的计算成本。现有对 MLLM 注意力机制的分析仍较为浅层,导致粗粒度的令牌剪枝策略无法有效平衡速度与精度。本文对 LLaVA 的 MLLM 注意力机制进行了全面研究。我们发现,在解码过程中,大量视觉令牌和部分注意力计算是冗余的。基于这一发现,我们提出了时空视觉令牌修剪(ST$^3$),这是一个无需重新训练即可加速 MLLM 推理的框架。ST$^3$ 包含两个主要组件:1)渐进式视觉令牌剪枝(PVTP),用于跨层消除注意力较低的视觉令牌;2)视觉令牌退火(VTA),随着生成令牌的增长,动态减少每一层中的视觉令牌数量。这些技术共同实现了约 2 倍更快的推理速度,同时相比原始 LLaVA 仅需约 30% 的 KV 缓存内存,并在各种数据集上保持一致的性能。关键是,ST$^3$ 可以无缝集成到现有的预训练 MLLM 中,为高效推理提供即插即用的解决方案。

英文摘要:

Multimodal large language models (MLLMs) enhance their perceptual capabilities by integrating visual and textual information. However, processing the massive number of visual tokens incurs a significant computational cost. Existing analysis of the MLLM attention mechanisms remains shallow, leading to coarse-grain token pruning strategies that fail to effectively balance speed and accuracy. In this paper, we conduct a comprehensive investigation of MLLM attention mechanisms with LLaVA. We find that numerous visual tokens and partial attention computations are redundant during the decoding process. Based on this insight, we propose Spatial-Temporal Visual Token Trimming ($\textbf{ST}^{3}$), a framework designed to accelerate MLLM inference without retraining. $\textbf{ST}^{3}$ consists of two primary components: 1) Progressive Visual Token Pruning (\textbf{PVTP}), which eliminates inattentive visual tokens across layers, and 2) Visual Token Annealing (\textbf{VTA}), which dynamically reduces the number of visual tokens in each layer as the generated tokens grow. Together, these techniques deliver around $\mathbf{2\times}$ faster inference with only about $\mathbf{30\%}$ KV cache memory compared to the original LLaVA, while maintaining consistent performance across various datasets. Crucially, $\textbf{ST}^{3}$ can be seamlessly integrated into existing pre-trained MLLMs, providing a plug-and-play solution for efficient inference.

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

↑