提出SAISA架构,让多模态大模型训练和推理都更快。
SAISA: Towards Multimodal Large Language Models with Both Training and Inference Efficiency
- 用无视觉令牌间注意力机制,减少冗余计算
- 推理时减少66%算力,训练预算降26%,性能更优
- 适合追求高效多模态模型的开发者与研究者
多模态大语言模型主要分为两类:嵌入空间对齐(如LLaVA-1.5)推理效率低,交叉注意力空间对齐(如Flamingo)训练成本高。本文对比两类架构,发现视觉令牌间注意力是冗余的。为此提出NAAViT(无视觉令牌间注意力)机制,在LLaVA-1.5上验证其冗余性。基于此,提出SAISA架构,将视觉特征直接对齐至自注意力输入空间,降低自注意力块与前馈网络的计算开销。在与LLaVA-1.5相同配置下,SAISA将推理FLOPs降低66%,训练预算减少26%,同时实现更高准确率。消融实验表明其在多种LLM与视觉编码器上均有效。代码与模型将公开于https://github.com/icip-cas/SAISA。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。