arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.02458cs.CLcs.CV

SAISA:迈向兼具训练与推理效率的多模态大语言模型

SAISA: Towards Multimodal Large Language Models with Both Training and Inference Efficiency

Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学)

Qianhao Yuan, Yanjiang Liu, Yaojie Lu, Hongyu Lin, Ben He, Xianpei Han, Le Sun

AI总结:

本文提出 SAISA 架构,通过消除视觉 token 间冗余注意力并将视觉特征直接对齐到自注意力输入空间,在保持精度的同时显著降低多模态大模型的训练与推理开销。

摘要:

多模态大语言模型(MLLMs)主要分为两种架构,每种架构都涉及训练效率与推理效率之间的权衡:嵌入空间对齐(如 LLaVA-1.5)在推理阶段效率较低,而交叉注意力空间对齐(如 Flamingo)在训练阶段效率较低。在本文中,我们比较了这两种架构,并确定了构建高效 MLLMs 的关键因素。它们之间的一个主要区别在于注意力如何应用于视觉 token,尤其是视觉 token 彼此之间的交互方式。为了研究视觉 token 之间的注意力是否必要,我们提出了一种新的自注意力机制 NAAViT(视觉 token 之间无注意力),该机制消除了这类注意力。我们在 LLaVA-1.5 上的初步实验表明,视觉 token 之间的注意力高度冗余。基于这些发现,我们引入了 SAISA(自注意力输入空间对齐),这是一种能够同时提升训练效率和推理效率的新型架构。SAISA 直接将视觉特征对齐到 NAAViT 自注意力模块的输入空间,从而降低了自注意力模块和前馈网络(FFNs)中的计算开销。在与 LLaVA-1.5 相同的配置下,SAISA 将推理 FLOPs 降低了 66%,将训练预算降低了 26%,同时在准确率方面取得了更优的性能。全面的消融研究进一步验证了 SAISA 在各种 LLMs 和视觉编码器上的有效性。代码和模型将在 https://github.com/icip-cas/SAISA 上公开。

英文摘要:

Multimodal Large Language Models (MLLMs) mainly fall into two architectures, each involving a trade-off between training and inference efficiency: embedding space alignment (e.g., LLaVA-1.5) is inefficient during inference, while cross-attention space alignment (e.g., Flamingo) is inefficient in training. In this paper, we compare these two architectures and identify the key factors for building efficient MLLMs. A primary difference between them lies in how attention is applied to visual tokens, particularly in their interactions with each other. To investigate whether attention among visual tokens is necessary, we propose a new self-attention mechanism, NAAViT (\textbf{N}o \textbf{A}ttention \textbf{A}mong \textbf{Vi}sual \textbf{T}okens), which eliminates this type of attention. Our pilot experiment on LLaVA-1.5 shows that attention among visual tokens is highly redundant. Based on these insights, we introduce SAISA (\textbf{S}elf-\textbf{A}ttention \textbf{I}nput \textbf{S}pace \textbf{A}lignment), a novel architecture that enhance both training and inference efficiency. SAISA directly aligns visual features with the input spaces of NAAViT self-attention blocks, reducing computational overhead in both self-attention blocks and feed-forward networks (FFNs). Using the same configuration as LLaVA-1.5, SAISA reduces inference FLOPs by 66\% and training budget by 26\%, while achieving superior performance in terms of accuracy. Comprehensive ablation studies further validate the effectiveness of SAISA across various LLMs and visual encoders. The code and model will be publicly available at https://github.com/icip-cas/SAISA.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑