通过多阶段裁剪视觉令牌,显著提升多模态大模型推理效率。
Multi-Stage Vision Token Dropping: Towards Efficient Multimodal Large Language Model
- 分三阶段评估视觉令牌重要性:编码、预填充、解码。
- 在LLaVA上减少88.5%计算量,压缩比达92.2%且精度接近原模型。
- 适合追求高效多模态推理的开发者与部署工程师。
多模态大语言模型中的视觉令牌通常存在显著的空间和时间冗余,占据大部分输入令牌,影响推理效率。现有方法仅基于视觉编码或预填充阶段的信息判断令牌重要性。本文提出多阶段令牌裁剪(MustDrop),从视觉编码、预填充到解码全生命周期评估令牌重要性。在视觉编码阶段,合并空间相邻的高相似度令牌,建立关键令牌集以保留核心视觉信息;在预填充阶段,结合文本语义,采用双注意力过滤策略进一步压缩视觉令牌;在解码阶段,设计输出感知缓存策略,降低KV缓存规模。通过多阶段协同优化,MustDrop更精准识别重要与冗余令牌,在保持性能的同时实现高效推理。例如,在LLaVA上减少约88.5%的FLOPs,压缩比达92.2%,且精度相当。代码已开源于https://github.com/liuting20/MustDrop。
原文摘要 · Abstract (English)
The vision tokens in multimodal large language models usually exhibit significant spatial and temporal redundancy and take up most of the input tokens, which harms their inference efficiency. To solve this problem, some recent works were introduced to drop the unimportant tokens during inference where the importance of each token is decided only by the information in either the vision encoding stage or the prefilling stage. In this paper, we propose Multi-stage Token Dropping (MustDrop) to measure the importance of each token from the whole lifecycle, including the vision encoding stage, prefilling stage, and decoding stage. Concretely, in the visual encoding stage, MustDrop merges spatially adjacent tokens with high similarity, and establishes a key token set to retain the most vision-critical tokens, preventing them from being discarded in later stages. In the prefilling stage, MustDrop further compresses vision tokens by the guidance of text semantics, with a dual-attention filtering strategy. In the decoding stage, an output-aware cache policy is proposed to further reduce the size of the KV cache. By leveraging tailored strategies in the multi-stage process, MustDrop can more precisely recognize the important and redundant tokens, thus achieving an optimal balance between performance and efficiency. For instance, MustDrop reduces about 88.5\% FLOPs on LLaVA with a compression ratio of 92.2\% while maintaining comparable accuracy. Our codes are available at \url{https://github.com/liuting20/MustDrop}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。