Balancing Performance and Efficiency: A Multimodal Large Language Model Pruning Method based Image Text Interaction

Gaotong Yu, Yi Chen, Jian XuarXiv 2024

Abstract

Recently, multimodal large language models (MM-LLMs) have achieved significant success in various tasks, but their high computational costs limit widespread application. The main computational burden arises from processing concatenated text and visual tokens in the LLM layer, where input token length directly affects efficiency. Our analysis of visual tokens reveals that their similarity to the CLS token follows a long-tail distribution, with only a few showing high similarity. To address this, we propose a dynamic pruning algorithm that identifies the inflection point in the visual CLS token similarity curve, enabling effective trimming of visual markers to accelerate model performance. Additionally, we perform a second round of pruning in the LLM layer, filtering out low-correlation tokens through the interaction between visual and textual features. Experimental results demonstrate that our method achieves performance comparable to the original while utilizing only 22% of the original token quantity.

Introduction

Multimodal Large Language Models (MM-LLMs) like LLaVA or InternVL have revolutionized vision-language tasks by converting images into sequences of visual tokens processed alongside text. However, this approach incurs a significant "computational tax" because LLM complexity grows quadratically with input token length. Most current models employ a fixed number of visual tokens (e.g., 576), regardless of image complexity. This leads to two major inefficiencies: visual redundancy, where many tokens represent background or non-semantic areas, and static constraints, where fixed "Top-K" pruning fails to account for varying scene complexity.

Methodology

We propose a dynamic, two-stage pruning pipeline that adapts to the content of each specific image and question, utilizing a Dynamic Optimized Long-tail CLS (DOLC) Visual Encoder and a Visual-Text Interactive Pruning Module.

Overall architecture of the proposed dynamic pruning method, featuring the DOLC Visual Encoder and the Visual-Text Interactive Pruning Module.

Dynamic Segmentation of the Long Tail

Analysis of visual tokens reveals that their similarity to the global image representation ([CLS] token) follows a long-tail distribution. While a few "head" tokens are highly relevant, a vast "tail" contains tokens with minimal semantic contribution. Instead of a fixed threshold, we utilize an objective function to identify the inflection point (the "elbow") of this curve dynamically for every image. This allows the model to flexibly decide how many tokens are important on a case-by-case basis.

The long-tail distribution of visual token similarity. The dynamic split point separates reserved 'head' tokens from discarded 'tail' tokens.

Visual-Text Interactive Pruning

Following the initial pruning, the remaining visual tokens are projected into the LLM space. We then perform a second round of pruning based on the correlation between visual tokens and the textual prompt. If a visual token is semantically important to the image but irrelevant to the specific user query (e.g., a car in the background when asking about the weather), it is discarded before entering the heavy LLM layers. This cross-modal filtering ensures that only task-relevant information consumes computational resources.

Experimental Results

Our method was evaluated across standard benchmarks including VQAv2, ScienceQA, MMBench, and MME, using base models such as LLaVA-1.5 and InternVL2-1B.

  • Efficiency: The method achieves comparable performance to original models while utilizing only ~22% of the original tokens. On an NVIDIA A100, prefill time was reduced from 30.3ms to 9.7ms, significantly slashing memory usage.
  • Performance Retention: On the MME benchmark, a pruned LLaVA-1.5 scored 1430.5, nearly matching the original's 1476.9 despite an 80% reduction in visual data.
  • Versatility: The method is training-free and works "out of the box," though it can be further enhanced with LoRA fine-tuning for specific applications.

Conclusion

By leveraging the long-tail distribution of visual token similarity and cross-modal interaction, we significantly reduce the computational burden of MM-LLMs without sacrificing intelligence. This dynamic approach moves beyond static constraints, allowing models to allocate resources where they are most needed. Future work will focus on refining the inflection point detection and ensuring that fine-grained details in the "tail" are not prematurely discarded in highly specific tasks.

Summary updated

BibTeX
@misc{yu2024balancing,
  author = {Gaotong Yu and Yi Chen and Jian Xu},
  title = {{Balancing Performance and Efficiency: A Multimodal Large Language Model Pruning Method based Image Text Interaction}},
  year = {2024},
  eprint = {2409.01162},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.01162},
}
Figure