arXiv:2508.06084cs.CV2025-08被引 8

通过动态文本引导自适应剪枝,显著降低视觉语言模型推理延迟。

AdaptInfer: Adaptive Token Pruning for Vision-Language Model Inference with Dynamical Text Guidance

  • 利用层间文本注意力图构建动态软先验,指导视觉标记重要性评分。
  • 在保持93.1%平均准确率下,减少61.3% CUDA延迟,优于现有方法。
  • 轻量级插件式设计,适用于多模态任务,适合部署优化场景。

视觉语言模型(VLM)在视觉问答、图像描述等多模态推理任务中表现优异,但其推理成本因预填充阶段处理大量视觉标记而居高不下。现有剪枝方法多依赖注意力模式或静态文本提示,未能利用推理过程中的动态内部信号。为此,我们提出 AdaptInfer,一种可即插即用的自适应视觉标记剪枝框架。首先,引入细粒度的动态文本引导剪枝机制,重用层间文本-文本注意力图构建文本标记重要性的软先验,实现每阶段更精准的视觉标记评分。其次,通过离线分析跨模态注意力转移,识别出推理过程中的稳定转折点,启发设计更合理高效的剪枝策略。该方法轻量且通用,适用于多种多模态任务。实验表明,AdaptInfer 在 LLaVA-1.5-7B 上将 CUDA 延迟降低 61.3%,平均准确率保持在 93.1%;在相同标记预算下,性能超越当前最优方法。

原文摘要 · Abstract (English)

Vision-language models (VLMs) have achieved impressive performance on multimodal reasoning tasks such as visual question answering, image captioning and so on, but their inference cost remains a significant challenge due to the large number of vision tokens processed during the prefill stage. Existing pruning methods often rely on directly using the attention patterns or static text prompt guidance, failing to exploit the dynamic internal signals generated during inference. To address these issues, we propose AdaptInfer, a plug-and-play framework for adaptive vision token pruning in VLMs. First, we introduce a fine-grained, dynamic text-guided pruning mechanism that reuses layer-wise text-to-text attention maps to construct soft priors over text-token importance, allowing more informed scoring of vision tokens at each stage. Second, we perform an offline analysis of cross-modal attention shifts and identify consistent inflection locations in inference, which inspire us to propose a more principled and efficient pruning schedule. Our method is lightweight and plug-and-play, also generalizable across multi-modal tasks. Experimental results have verified the effectiveness of the proposed method. For example, it reduces CUDA latency by 61.3% while maintaining an average accuracy of 93.1% on vanilla LLaVA-1.5-7B. Under the same token budget, AdaptInfer surpasses SOTA in accuracy.

视觉语言模型推理优化剪枝

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。