通过动态退出视觉令牌,显著降低多模态大模型计算开销。
Accelerating Multimodal Large Language Models via Dynamic Visual-Token Exit and the Empirical Findings
- 根据文本状态动态决定何时移除视觉令牌,缓解冗余计算。
- 在多个模型和基准上实现高达30%的推理加速,且性能几乎不变。
- 适合关注多模态模型效率优化的研究者与工程师。
现有多模态大语言模型(MLLMs)过度使用视觉令牌,导致明显冗余并带来高昂计算成本。为深入理解此问题,我们对MLLMs的注意力行为进行了广泛实证研究,总结出三个主要推理阶段:(i) 视觉与文本令牌快速融合;(ii) 单模态建模阶段;(iii) 多模态推理持续至推理结束。特别发现,当文本令牌获取足够图像信息后,视觉令牌便不再贡献于推理,产生显著冗余。基于此观察,我们提出一种简单有效的高效方法——动态视觉令牌退出(DyVTE)。DyVTE利用轻量级超网络感知文本令牌状态,在特定层后移除所有视觉令牌,从而解决视觉冗余问题。我们在LLaVA、VILA、Eagle和InternVL等多个MLLM上应用该方法,并在多个基准上进行实验。结果表明,该方法显著提升模型效率,同时揭示了MLLMs的通用建模模式,有助于深入理解其运行机制。代码已开源:https://github.com/DoubtedSteam/DyVTE。
原文摘要 · Abstract (English)
The excessive use of visual tokens in existing Multimoal Large Language Models (MLLMs) often exhibits obvious redundancy and brings in prohibitively expensive computation. To gain insights into this problem, we first conduct extensive empirical studies on the attention behaviors of MLLMs, and summarize three main inference stages in MLLMs: (i) Early fusion between tokens is first accomplished quickly. (ii) Intra-modality modeling then comes to play. (iii) Multimodal reasoning} resumes and lasts until the end of inference. In particular, we reveal that visual tokens will stop contributing to reasoning when the text tokens receive enough image information, yielding obvious visual redundancy. Based on these generalized observations, we propose a simple yet effective method to improve the efficiency of MLLMs, termed dynamic visual-token exit (DyVTE). DyVTE uses lightweight hyper-networks to perceive the text token status and decide the removal of all visual tokens after a certain layer, thereby addressing the observed visual redundancy. To validate VTE, we apply it to a set of MLLMs, including LLaVA, VILA, Eagle and InternVL, and conduct extensive experiments on a bunch of benchmarks. The experiment results not only show the effectiveness of our VTE in improving MLLMs' efficiency, but also yield the general modeling patterns of MLLMs, well facilitating the in-depth understanding of MLLMs. Our code is released at https://github.com/DoubtedSteam/DyVTE.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。