ChatPaper.aiChatPaper

SparseMM: La sparsità delle testate emerge dalle risposte ai concetti visivi nei MLLM

SparseMM: Head Sparsity Emerges from Visual Concept Responses in MLLMs

June 5, 2025
Autori: Jiahui Wang, Zuyan Liu, Yongming Rao, Jiwen Lu
cs.AI

Abstract

I Modelli Linguistici Multimodali di Grande Dimensione (MLLMs) sono comunemente derivati estendendo Modelli Linguistici Pre-addestrati di Grande Dimensione (LLMs) con capacità visive. In questo lavoro, indaghiamo come gli MLLMs elaborano gli input visivi analizzando i loro meccanismi di attenzione. Riveliamo un fenomeno sorprendente di sparsità: solo un piccolo sottoinsieme (approssimativamente meno del 5%) delle teste di attenzione negli LLMs contribuisce attivamente alla comprensione visiva, denominate teste visive. Per identificare queste teste in modo efficiente, progettiamo un framework senza addestramento che quantifica la rilevanza visiva a livello di testa attraverso un'analisi mirata delle risposte. Basandoci su questa scoperta, introduciamo SparseMM, una strategia di ottimizzazione KV-Cache che assegna budget computazionali asimmetrici alle teste negli LLMs in base ai loro punteggi visivi, sfruttando la sparsità delle teste visive per accelerare l'inferenza degli MLLMs. Rispetto ai precedenti metodi di accelerazione KV-Cache che ignorano la particolarità del visivo, SparseMM priorizza lo stress e il mantenimento della semantica visiva durante la decodifica. Valutazioni estese su benchmark multimodali mainstream dimostrano che SparseMM raggiunge migliori compromessi tra accuratezza ed efficienza. In particolare, SparseMM offre un'accelerazione in tempo reale di 1.38x e una riduzione della memoria del 52% durante la generazione, mantenendo la parità di prestazioni nei test di efficienza. Il nostro progetto è open source all'indirizzo https://github.com/CR400AF-A/SparseMM.
English
Multimodal Large Language Models (MLLMs) are commonly derived by extending pre-trained Large Language Models (LLMs) with visual capabilities. In this work, we investigate how MLLMs process visual inputs by analyzing their attention mechanisms. We reveal a surprising sparsity phenomenon: only a small subset (approximately less than 5%) of attention heads in LLMs actively contribute to visual understanding, termed visual heads. To identify these heads efficiently, we design a training-free framework that quantifies head-level visual relevance through targeted response analysis. Building on this discovery, we introduce SparseMM, a KV-Cache optimization strategy that allocates asymmetric computation budgets to heads in LLMs based on their visual scores, leveraging the sparity of visual heads for accelerating the inference of MLLMs. Compared with prior KV-Cache acceleration methods that ignore the particularity of visual, SparseMM prioritizes stress and retaining visual semantics during decoding. Extensive evaluations across mainstream multimodal benchmarks demonstrate that SparseMM achieves superior accuracy-efficiency trade-offs. Notably, SparseMM delivers 1.38x real-time acceleration and 52% memory reduction during generation while maintaining performance parity on efficiency test. Our project is open sourced at https://github.com/CR400AF-A/SparseMM.
PDF160June 6, 2025