The visual projector serves as an essential bridge between the visual encoder and the Large Language Model (LLM) in a Multimodal LLM (MLLM). Typically, MLLMs adopt a simple MLP to preserve all visual contexts via one-to-one transformation. However, the visual tokens are redundant and can be considerably increased when dealing with high-resolution images, impairing the efficiency of MLLMs significantly. Some recent works have introduced resampler or abstractor to reduce the number of resulting visual tokens. Unfortunately, they fail to capture finer details and undermine the visual reasoning capabilities of MLLMs. In this work, we propose a novel visual projector, which adopts a coarse-to-fine scheme to inject the enriched characteristics to generate the condensed visual tokens. In specific, we first interpolate the visual features as a low-resolution point query, providing the overall visual representation as the foundation. Then, we introduce a region-to-point injection module that utilizes high-resolution, multi-level region-based cues as fine-grained reference keys and values, allowing them to be fully absorbed within the corresponding local context region. This step effectively updates the coarse point query, transforming it into an enriched one for the subsequent LLM reasoning. Extensive experiments demonstrate that our approach compresses the visual tokens by 75%~89%, while achieves comparable or even better performance across diverse benchmarks with significantly higher efficiency. The source codes can be found at https://github.com/CircleRadon/TokenPacker.
翻译:在多模态大语言模型(MLLM)中,视觉投影器是连接视觉编码器与大语言模型(LLM)的关键桥梁。现有MLLM通常采用简单的多层感知机(MLP),通过一对一变换保留全部视觉上下文信息。然而,视觉标记本身存在冗余性,在处理高分辨率图像时其数量会急剧增加,从而显著损害MLLM的效率。近期研究尝试引入重采样器或抽象器来减少视觉标记数量,但这些方法往往无法捕捉精细细节,削弱了MLLM的视觉推理能力。本文提出一种新颖的视觉投影器,采用由粗到精的方案注入丰富特征以生成压缩视觉标记。具体而言,我们首先将视觉特征插值为低分辨率点查询,提供整体视觉表征作为基础;随后引入区域到点注入模块,利用高分辨率、多层次的区域线索作为细粒度参考键与值,使其充分融入对应的局部上下文区域。该步骤有效更新粗粒度点查询,将其转化为可供后续LLM推理使用的增强表征。大量实验表明,本方法在压缩75%~89%视觉标记的同时,于多种基准测试中取得相当甚至更优的性能,且效率显著提升。源代码发布于https://github.com/CircleRadon/TokenPacker。