减少视觉令牌计算量,让多模态模型更快更省资源
Treat Visual Tokens as Text? But Your MLLM Only Needs Fewer Efforts to See
- 用注意力机制筛选关键视觉令牌,丢弃冗余计算
- 在LLaVA上降低88%计算量,性能几乎不变
- 适合追求高效推理的多模态模型研究者
通过将视觉编码器生成的视觉令牌当作文本令牌处理,多模态大语言模型(MLLM)在多种视觉理解任务中取得显著进展,借助大语言模型(LLM)的强大架构。然而,随着令牌数量增加,LLM的二次计算复杂度带来显著效率瓶颈,制约进一步扩展。尽管已有研究尝试剪枝视觉令牌或使用轻量级LLM架构,但视觉令牌带来的计算开销仍是主要挑战。本文以代表性MLLM LLaVA为对象,分析其在参数与计算模式层面的视觉计算冗余,提出一系列优化策略:邻域感知视觉令牌注意力、剪枝无效视觉注意力头、选择性跳过视觉计算层。在LLaVA上应用这些策略后,计算需求降低88%,同时在多个关键基准测试中保持性能。此外,我们在Qwen2-VL-7B和InternVL-2.0-4B/8B/26B等其他MLLM中验证了视觉计算冗余的存在。该工作为处理密集视觉令牌提供了低开销新路径。代码与模型检查点将公开以支持后续研究。
原文摘要 · Abstract (English)
By treating visual tokens from visual encoders as text tokens, Multimodal Large Language Models (MLLMs) have achieved remarkable progress across diverse visual understanding tasks, leveraging the robust architectures of Large Language Models (LLMs). However, as token counts grow, the quadratic scaling of computation in LLMs introduces a significant efficiency bottleneck, impeding further scalability. Although recent approaches have explored pruning visual tokens or employing lighter LLM architectures, the computational overhead from an increasing number of visual tokens remains a substantial challenge. In this study, we investigate the redundancy in visual computation at both the parameter and computational pattern levels within LLaVA, a representative MLLM, and introduce a suite of streamlined strategies to enhance efficiency. These include neighbor-aware visual token attention, pruning of inactive visual attention heads, and selective layer dropping for visual computations. By implementing these strategies in LLaVA, we achieve a reduction in computational demands of 88% while maintaining model performance across key benchmarks. Additionally, we validate the existence of visual computational redundancy in other MLLMs, such as Qwen2-VL-7B and InternVL-2.0-4B/8B/26B. These results present a novel pathway for MLLMs to handle dense visual tokens with minimal computational costs. Code and model checkpoints will be released to support further research.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。