目的:トークンのマージと剪定を介した多モーダルLLMの適応推論
AIM: Adaptive Inference of Multi-Modal LLMs via Token Merging and Pruning
December 4, 2024
著者: Yiwu Zhong, Zhuoming Liu, Yin Li, Liwei Wang
cs.AI
要旨
大規模言語モデル(LLMs)は、画像や動画などの視覚データの強力な理解を示すマルチモーダルLLMsの作成を可能にしました。ただし、これらのモデルは通常、高い計算要求を伴う視覚エンコーダからの広範な視覚トークンに依存しており、これはリソース制約のある環境や長いコンテキストのタスクでの適用範囲を制限しています。本研究では、最小限の性能低下で幅広い効率要件に対応できるトレーニングフリーの適応推論手法を提案します。当社の手法は、LLMsの前に埋め込み類似性に基づく反復トークンマージングと、マルチモーダルの重要性に基づくLLMs層内の進行的なトークン剪定から構成されています。シンプルな設計により、当社の手法は動画および画像LLMsの両方に適用できます。多様な動画および画像ベンチマークでの広範な実験により、当社の手法は、動画および画像LLMsの性能を維持しながら計算負荷を大幅に削減します(例:FLOPsで7倍の削減)。さらに、同様の計算コストの下で、当社の手法は長い動画理解において最先端の手法を上回ります(例:MLVUで+4.6)。さらに、トークンの冗長性やLLM層の挙動に関する詳細な分析は、効率的なマルチモーダルLLMsの設計における将来の研究のための指針を提供します。当社のコードはhttps://github.com/LaVi-Lab/AIMで入手可能となります。
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 7-fold reduction in
FLOPs) while preserving the performance of video and image LLMs. Further, under
a similar computational cost, our method outperforms the state-of-the-art
methods in long video understanding (e.g., +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 will be available at
https://github.com/LaVi-Lab/AIM.Summary
AI-Generated Summary