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

Liang Chen, Haozhe Zhao, Tianyu Liu, Shuai Bai, Junyang Lin, Chang Zhou, Baobao Chang

arXiv:2403.06764 · 2026-07-27 공개 · arXiv · PDF

vision-language token-efficiency edge-deployment llava large-models inference-acceleration visual-tokens flop-reduction

Abstract

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.

한국어 요약

한 줄 요약

FastV는 LVLM에서 이미지 토큰의 불필요한 어텐션 계산을 제거하여 추론 비용을 45%까지 절감하는 플러그 앤 플레이 방식의 효율화 기법이다.

핵심 기여도

핵심 아이디어

기존 LVLM에서 이미지 토큰은 깊은 레이어에서 텍스트 토큰에 비해 극히 낮은 어텐션 점수를 받는다는 점에서 통찰을 도출했다. 예를 들어, LLaVA-1.5 모델에서 깊은 레이어(2층 이후)에서 이미지 토큰의 평균 어텐션 점수는 시스템 프롬프트의 0.21%에 불과하다. 이는 시스템 프롬프트나 사용자 지시어에 집중된 어텐션이 이미지 토큰의 기여도를 약화시키는 현상으로, 어텐션 메커니즘의 레이어별 역할 차이를 반영한다. FastV는 이러한 현상을 기반으로, 특정 레이어 이후로 어텐션 점수 기준을 설정하여 이미지 토큰을 선택적으로 제거함으로써 추론 비용을 절감한다. 이는 기존의 희소 어텐션(sparse attention)과 달리 토큰 자체를 제거함으로써 Self-Attention과 FFN 모듈 모두의 계산을 생략하는 점에서 차별화된다.

기술적 접근법

주요 결과

의의 및 한계

FastV는 LVLM의 추론 효율성을 극대화하면서도 성능 저하 없이 다양한 작업에 적용 가능한 유연한 방법이다. 특히, 13B 파라미터 모델의 FLOPs를 7B 모델 수준으로 줄이는 것은 모델 크기와 추론 비용 간의 트레이드오프를 재정의할 수 있는 실용적 가치를 제공한다. 그러나 FastV는 특정 레이어에서 토큰을 제거하는 방식으로, 모든 작업에서 동일한 성능을 보장하지는 않는다. 또한, 어텐션 점수 기반의 제거 기준은 모델 종류나 작업 유형에 따라 최적화가 필요할 수 있다.

실용적 활용

FastV는 모바일 기기나 에지 디바이스에서 LVLM을 배포할 때 유용하며, 대규모 모델을 상용화하면서도 비용을 절감하고자 하는 상황에도 적합하다. 특히, 이미지 해상도를 높이면서도 추론 비용을 유지할 수 있어, 고해상도 시각 정보 처리가 필요한 산업 분야(예: 자율주행, 의료 영상 분석)에 적용 가능하다.