arXiv:2412.03248cs.CVcs.AI2024-12ICCV被引 50

通过合并与剪枝视觉令牌,实现多模态大模型高效推理。

AIM: Adaptive Inference of Multi-Modal LLMs via Token Merging and Pruning

  • 先按嵌入相似性迭代合并视觉令牌,再在模型层内按多模态重要性逐步剪枝。
  • 计算量降低7倍(FLOPs),长视频理解任务性能提升4.6分(MLVU)。
  • 无需训练,适配资源受限场景,适合研究高效多模态模型的开发者。

大型语言模型(LLMs)推动了多模态大模型的发展,使其具备强大的图像和视频理解能力。然而,这些模型通常依赖大量视觉编码器生成的视觉令牌,带来高昂的计算开销,限制了其在资源受限环境和长上下文任务中的应用。本文提出一种无需训练的自适应推理方法,可满足多样化的效率需求且性能损失极小。该方法包含:(a) 在进入LLM前基于嵌入相似性进行迭代令牌合并;(b) 在LLM层内基于多模态重要性进行渐进式令牌剪枝。设计简洁,适用于图像与视频类多模态模型。在多个视频与图像基准测试中,该方法显著降低计算负载(如FLOPs减少7倍),同时保持模型性能。在相同计算成本下,本方法在长视频理解任务上优于当前最优方法(如MLVU提升+4.6)。深入分析揭示了令牌冗余与模型层行为规律,为未来高效多模态模型设计提供指导。代码已公开于https://github.com/LaVi-Lab/AIM。

原文摘要 · Abstract (English)

Large language models (LLMs) have enabled the creation of multi-modal LLMs that exhibit strong comprehension of visual data such as images and videos. However, these models usually rely on extensive visual tokens from visual encoders, leading to high computational demands, which limits their applicability in resource-constrained environments and for long-context tasks. In this work, we propose a training-free adaptive inference method for multi-modal LLMs that can accommodate a broad range of efficiency requirements with a minimum performance drop. Our method consists of a) iterative token merging based on embedding similarity before LLMs, and b) progressive token pruning within LLM layers based on multi-modal importance. With a minimalist design, our method can be applied to both video and image LLMs. Extensive experiments on diverse video and image benchmarks demonstrate that our method substantially reduces computation load (e.g., a $\textbf{7-fold}$ reduction in FLOPs) while preserving the performance of video and image LLMs. Further, at a similar computational cost, our method outperforms the state-of-the-art methods in long video understanding (e.g., $\textbf{+4.6}$ on MLVU). Additionally, our in-depth analysis provides insights into token redundancy and LLM layer behaviors, offering guidance for future research in designing efficient multi-modal LLMs. Our code is available at https://github.com/LaVi-Lab/AIM.

多模态高效推理令牌剪枝视觉编码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。