通过智能剪裁视觉标记,大幅提速大模型推理且不损失性能。
TrimTokenator: Towards Adaptive Visual Token Pruning for Large Multimodal Models
- 仅剪裁视觉标记,利用互信息筛选语义不符的冗余项。
- 在LLaVA-1.5-7B上减少88.9%标记,推理速度提升56.7%。
- 适合追求高效多模态推理的开发者与部署场景。
大型多模态模型(LMMs)在多个任务中取得显著进展,但其将视觉输入编码为密集标记序列,导致推理时计算与内存开销剧增。现有标记剪裁方法常依赖高成本校准或次优重要性度量,造成保留标记冗余。本文分析了视觉与文本标记间的冗余差异,提出仅对视觉标记进行剪裁。基于此,设计一种保留跨模态对齐与模态内信息多样性的剪裁策略:利用互信息移除与文本语义不匹配的视觉标记,确保模态间对齐;同时通过最大化嵌入空间中成对距离的期望值,以贪心算法高效剪裁视觉内部冗余标记。大量实验表明,该方法在LLaVA-1.5-7B和LLaVA-NEXT-7B等模型上实现88.9%的标记减少,推理速度提升56.7%,同时保持强性能。
原文摘要 · Abstract (English)
Large Multimodal Models (LMMs) have achieved significant success across various tasks. These models usually encode visual inputs into dense token sequences, which are then concatenated with textual tokens and jointly processed by a language model. However, the increased token count substantially raises computational and memory costs during inference. Token pruning has emerged as a promising approach to address this issue. Existing token pruning methods often rely on costly calibration or suboptimal importance metrics, leading to redundant retained tokens. In this paper, we analyze the redundancy differences between visual and textual tokens and propose pruning exclusively on visual tokens. Based on this, we propose a visual token pruning strategy that explicitly preserves both cross-modal alignment and intra-modal informational diversity. We introduce a mutual information-based token pruning strategy that removes visual tokens semantically misaligned with textual tokens, effectively preserving the alignment between the visual and textual modalities. To further improve the representational quality of the retained tokens, we additionally prune redundant visual tokens by maximizing the expected pairwise distances in the embedding space, which is solved efficiently with a greedy algorithm. Extensive experiments demonstrate that our method maintains strong performance while reducing tokens by 88.9% on models such as LLaVA-1.5-7B and LLaVA-NEXT-7B, resulting in a 56.7% improvement in inference speed.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。