Skip to main content
QUICK REVIEW

[논문 리뷰] LLaVA-PruMerge: Adaptive Token Reduction for Efficient Large Multimodal Models

Yuzhang Shang, Mu Cai|arXiv (Cornell University)|2024. 03. 22.
Topic ModelingComputer Science인용 수 5
한 줄 요약

이 논문은 대형 다중 모달 모델용 적응적 시각 토큰 감소 방법인 PruMerge를 소개합니다. 이 방법은 시각 토큰 수를 줄이면서도 성능을 보존하여 평균적으로 약 6.9%의 토큰으로 비슷한 결과를 달성합니다.

ABSTRACT

Large Multimodal Models (LMMs) have shown significant visual reasoning capabilities by connecting a visual encoder and a large language model. LMMs typically take in a fixed and large amount of visual tokens, such as the penultimate layer features in the CLIP visual encoder, as the prefix content. Recent LMMs incorporate more complex visual inputs, such as high-resolution images and videos, which further increases the number of visual tokens significantly. However, due to the inherent design of the Transformer architecture, the computational costs of these models tend to increase quadratically with the number of input tokens. To tackle this problem, we explore a token reduction mechanism that identifies significant spatial redundancy among visual tokens. In response, we propose PruMerge, a novel adaptive visual token reduction strategy that significantly reduces the number of visual tokens without compromising the performance of LMMs. Specifically, to metric the importance of each token, we exploit the sparsity observed in the visual encoder, characterized by the sparse distribution of attention scores between the class token and visual tokens. This sparsity enables us to dynamically select the most crucial visual tokens to retain. Subsequently, we cluster the selected (unpruned) tokens based on their key similarity and merge them with the unpruned tokens, effectively supplementing and enhancing their informational content. Empirically, when applied to LLaVA-1.5, our approach can compress the visual tokens by 14 times on average, and achieve comparable performance across diverse visual question-answering and reasoning tasks. Code and checkpoints are at https://llava-prumerge.github.io/.

연구 동기 및 목표

  • 대형 다중 모달 모델(LMMs)에서 긴 시각 토큰 시퀀스로 인한 계산 비용이 크게 증가하는 문제를 해결한다.
  • 이미지 내용에 따라 정보 토큰을 선택하는 적응형 토큰 감소 메커니즘을 개발한다.
  • 시각 질문 응답 및 추론 작업에서 모델의 성능을 유지하면서 토큰 수를 대폭 줄인다.
  • 잘려진 토큰의 정보를 보완하기 위한 토큰 병합 전략을 도입한다.
  • extensive retraining 없이도 LLaVA-1.5에 Plug-and-Play 적용성을 입증한다.

제안 방법

  • 클래스 토큰의 시공간 텍스트 주의 분포를 이용해 이상치 기반 선택(IQR)으로 중요한 시각 토큰을 식별한다.
  • [CLS] 토큰에 대한 주의를 기반으로 목표 m << n으로 토큰을 적응적으로 가지치기한다.
  • 선택된 토큰을 k-최근접 이웃으로 클러스터링하고 가중 평균으로 클러스터 중심을 업데이트한다(토큰 보강).
  • 가지치된 토큰을 K의 점곱 유사도를 이용해 비슷한 클러스터로 합쳐 남아 있는 토큰을 풍부하게 한다.
  • 축소된 토큰 체제에 더 잘 맞도록 LLM을 파인튜닝(LoRA)한다.
  • PruMerge+ 버전은 추가 토큰의 공간적으로 균일한 샘플링을 더해 성능의 안정성을 높인다.

실험 결과

연구 질문

  • RQ1LMM에서 시각 토큰을 감소시키면 다양한 VQA 및 추론 벤치마크에서 성능을 보존할 수 있는가?
  • RQ2다중 모달 이해에 의미 있는 저하 없이 달성 가능한 토큰 감소량은 얼마나 되는가?
  • RQ3적응형 토큰 선택이 고정 또는 균일 샘플링 전략보다 작업 간 성능이 우수한가?
  • RQ4가지치된 토큰의 병합이 과도한 가지치기로 인한 정보 손실을 완화하는가?

주요 결과

  • LLaVA-1.5에 적용 시 PruMerge는 시각 토큰을 약 5.5%(평균 약 32개 토큰)로 축소하되 비슷한 성능을 유지한다.
  • 6개 벤치마크에서 LLaVA-PruMerge는 원래 LLaVA-1.5에 비해 경쟁력 있는 결과를 달성하고 일부 베이스라인(BLIP-2, InstructBLIP)을 능가한다.
  • PruMerge+는 선택 토큰 확장 및 공간 샘플링 덕분에 거의 성능 저하 없이 토큰 수를 약 4배 더 감소시킨다.
  • ViT-7B/INT4 환경에서 PruMerge를 사용할 때 프리패드 및 총 비용이 크게 감소하는 등 효율성 분석에서 FLOP/메모리 절감 효과가 뚜렷하다.
  • 파인튜닝으로 더 나은 결과를 얻을 수 있으며 ScienceQA, TextVQA, POPE, MME와 같은 과제에서 성능이 개선된다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.