An Image is Worth 1/2 Tokens After Layer 2: Plug-and-Play Inference Acceleration for Large Vision-Language Models

要約

本研究では、特にLLaVA-1.5、QwenVL-Chat、Video-LLaVAといった著名なモデルにおいて、大規模視覚言語モデル(LVLM)における非効率な注意現象を明らかにする。我々は、一般的なLVLMの深層において、視覚的トークンに対する注意の計算が極めて非効率であることを発見し、テキストデータの処理と比較して、よりスパースなアプローチの必要性を示唆した。この目的のために、我々はFastVを導入する。FastVは、初期の層で適応的な注意パターンを学習し、後続の層で視覚的トークンを刈り込むことにより、計算効率を最適化するように設計された汎用性の高いプラグアンドプレイ手法である。我々の評価により、FastVが、画像や映像の理解という幅広いタスクにおいて、性能を犠牲にすることなく、計算コストを劇的に削減できることが実証された(例えば、LLaVA-1.5-13BではFLOPsを45削減)。FastVの計算効率と性能のトレードオフは、高度にカスタマイズ可能であり、パレート効率に優れています。FastVは、13BパラメータモデルのFLOPsを圧縮し、7BパラメータモデルのFLOPsよりも低いバジェットを達成することができます。FastVは、エッジデバイスや商用モデルへのLVLMの展開において実用的な価値を持つと確信しています。コードはhttps://github.com/pkunlp-icler/FastV。

要約(オリジナル)

In this study, we identify the inefficient attention phenomena in Large Vision-Language Models (LVLMs), notably within prominent models like LLaVA-1.5, QwenVL-Chat and Video-LLaVA. We find out that the attention computation over visual tokens is of extreme inefficiency in the deep layers of popular LVLMs, suggesting a need for a sparser approach compared to textual data handling. To this end, we introduce FastV, a versatile plug-and-play method designed to optimize computational efficiency by learning adaptive attention patterns in early layers and pruning visual tokens in subsequent ones. Our evaluations demonstrate FastV’s ability to dramatically reduce computational costs (e.g., a 45 reduction in FLOPs for LLaVA-1.5-13B) without sacrificing performance in a wide range of image and video understanding tasks. The computational efficiency and performance trade-off of FastV are highly customizable and pareto-efficient. It can compress the FLOPs of a 13B-parameter model to achieve a lower budget than that of a 7B-parameter model, while still maintaining superior performance. We believe FastV has practical values for deployment of LVLMs in edge devices and commercial models. Code is released at https://github.com/pkunlp-icler/FastV.

arxiv情報

著者 Liang Chen,Haozhe Zhao,Tianyu Liu,Shuai Bai,Junyang Lin,Chang Zhou,Baobao Chang
発行日 2024-09-02 05:48:54+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.CL, cs.CV パーマリンク