arXiv:2409.14846cs.AIcs.CV2024-09AAAI被引 9

针对视觉语言模型设计自适应注意力机制,提升推理效率

A-VL: Adaptive Attention for Large Vision-Language Models

  • 按模态分离处理视觉与文本注意力,分别优化计算
  • 在五数据集上减少内存占用,保持模型性能不变
  • 适合需要高效推理的视觉语言应用开发

大型视觉语言模型(LVLM)融合了计算机视觉与自然语言处理技术,具有广泛的应用潜力。然而,其推理过程消耗大量资源。自适应注意力技术可动态减少计算冗余,提升效率。尽管现有方法显著降低了基于Transformer的语言模型内存需求,但未针对LVLM进行优化。我们观察到,LVLM的响应生成依赖远距离图像标记和局部文本标记,且不同模态具有不同的注意力模式。由此启发,我们分别管理各模态的注意力:对视觉输入,缓存潜在有用信息,仅计算关键部分;对语言输入,更关注局部上下文。基于此分析,我们提出A-VL——一种专为LVLM推理设计的即插即用式自适应注意力方法。在三个视觉语言任务、五个数据集上的广泛评估表明,该方法在不牺牲性能的前提下,优于现有自适应注意力技术,有效降低内存占用与计算负载。

原文摘要 · Abstract (English)

The Large Vision-Language Model (LVLM) integrates computer vision and natural language processing techniques, offering substantial application potential. However, these models demand extensive resources during inference. Adaptive attention techniques can dynamically reduce computational redundancy and thus improve efficiency. Although current adaptive attention methods significantly reduce the memory requirements of Transformer-based language models, they are not tailored for LVLMs. We observe that LVLMs generate responses from both remote image tokens and local text tokens, and different modalities have different attention patterns. This observation inspires us to manage the attention for each modality separately. Specifically, for visual input, we store the cache of potentially useful information but only compute the most critical parts. For language input, we care more about local information. Based on our observation and analysis of vision-language attention patterns, we develop A-VL, a plug-and-play adaptive attention tailored for LVLM inference. Extensive evaluations on three vision-language tasks and five datasets show the effectiveness of our designs. Our approach A-VL outperforms existing adaptive attention methods in reducing memory usage and computational load without compromising performance.

视觉语言模型自适应注意力推理优化

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