无需训练,5分钟完成视觉令牌剪枝,大幅降耗保精度。
Fit and Prune: Fast and Training-free Visual Token Pruning for Multi-modal Large Language Models
- 将剪枝建模为注意力分布差异最小化问题,基于少量推理数据快速生成剪枝方案。
- 在LLaVA-NEXT上减少54.9%计算量,仅损失0.5%准确率。
- 适用于追求高效推理的多模态大模型部署,尤其适合资源受限场景。
多模态大语言模型(MLLMs)常使用大量图像令牌以弥补视觉表征不足,但导致显著冗余和高计算开销。令牌剪枝是加速MLLM的有效手段,但何时何地剪枝仍具挑战。本文提出一种新颖的、无需训练的视觉令牌剪枝方法FitPrune,可依据预设预算快速生成完整的剪枝方案。具体而言,FitPrune将剪枝视为MLLM的统计问题,目标是最小化剪枝前后注意力分布的差异。实际应用中,仅需少量推理数据的注意力统计即可快速完成,避免昂贵的模型试错。根据生成的剪枝方案,模型可在推理阶段直接移除不同样本的冗余视觉令牌。我们在一系列近期MLLMs(包括LLaVA-1.5、LLaVA-HR和LLaVA-NEXT)上验证了该方法,在多个基准测试中表现优异:例如在LLaVA-NEXT上实现54.9%的FLOPs降低,仅0.5%准确率下降。值得注意的是,剪枝方案生成耗时约5分钟。代码已开源。
原文摘要 · Abstract (English)
Recent progress in Multimodal Large Language Models(MLLMs) often use large image tokens to compensate the visual shortcoming of MLLMs, which not only exhibits obvious redundancy but also greatly exacerbates the already high computation. Token pruning is an effective solution for speeding up MLLMs, but when and how to drop tokens still remains a challenge. In this paper, we propose a novel and training-free approach for the effective visual token pruning of MLLMs, termed FitPrune, which can quickly produce a complete pruning recipe for MLLMs according to a pre-defined budget. Specifically, FitPrune considers token pruning as a statistical problem of MLLM and its objective is to find out an optimal pruning scheme that can minimize the divergence of the attention distributions before and after pruning. In practice, FitPrune can be quickly accomplished based on the attention statistics from a small batch of inference data, avoiding the expensive trials of MLLMs. According to the pruning recipe, an MLLM can directly remove the redundant visual tokens of different examples during inference. To validate FitPrune, we apply it to a set of recent MLLMs, including LLaVA-1.5, LLaVA-HR and LLaVA-NEXT, and conduct extensive experiments on a set of benchmarks. The experimental results show that our FitPrune can not only reduce the computational complexity to a large extent, while retaining high performance, e.g., -54.9% FLOPs for LLaVA-NEXT with only 0.5% accuracy drop. Notably, the pruning recipe can be obtained in about 5 minutes. Our code is available at https://github.com/ywh187/FitPrune.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。