ChatPaper.aiChatPaper

교차 주의 시각적 특징 트리밍을 통한 효율적인 LLaMA-3.2-Vision

Efficient LLaMA-3.2-Vision by Trimming Cross-attended Visual Features

April 1, 2025
저자: Jewon Lee, Ki-Ung Song, Seungmin Yang, Donguk Lim, Jaeyeon Kim, Wooksu Shin, Bo-Kyeong Kim, Yong Jae Lee, Tae-Ho Kim
cs.AI

초록

시각적 토큰 축소는 대규모 시각-언어 모델(LVLMs)에서 광범위한 이미지 특징으로 인한 추론 비용을 낮춥니다. 자기 주의력(self-attention)만을 사용하는 LVLMs에서 토큰을 가지치기(prune)하는 관련 연구들과 달리, 본 연구는 우수한 성능을 달성하는 교차 주의력(cross-attention) 기반 모델을 독창적으로 다룹니다. 우리는 교차 주의력 레이어에서 이미지 토큰의 키-값(KV) 캐시 크기가 자기 주의력 레이어의 텍스트 토큰 크기를 크게 초과하여 주요 계산 병목 현상을 일으킨다는 점을 확인했습니다. 이 문제를 완화하기 위해, 우리는 교차 주의력 맵의 희소성(sparse nature)을 활용하여 중복된 시각적 특징을 선택적으로 가지치기합니다. 우리의 Trimmed Llama는 추가 학습 없이도 KV 캐시 요구량을 효과적으로 줄입니다. 50% 감소된 시각적 특징의 이점을 통해, 우리의 모델은 벤치마크 성능을 유지하면서 추론 지연 시간과 메모리 사용량을 줄일 수 있습니다.
English
Visual token reduction lowers inference costs caused by extensive image features in large vision-language models (LVLMs). Unlike relevant studies that prune tokens in self-attention-only LVLMs, our work uniquely addresses cross-attention-based models, which achieve superior performance. We identify that the key-value (KV) cache size for image tokens in cross-attention layers significantly exceeds that of text tokens in self-attention layers, posing a major compute bottleneck. To mitigate this issue, we exploit the sparse nature in cross-attention maps to selectively prune redundant visual features. Our Trimmed Llama effectively reduces KV cache demands without requiring additional training. By benefiting from 50%-reduced visual features, our model can reduce inference latency and memory usage while achieving benchmark parity.

Summary

AI-Generated Summary

PDF152April 2, 2025