arXiv:2410.13859cs.CV2024-10被引 13

通过注意力图秩识别冗余层,实现多模态大模型90%以上层的高效稀疏化。

$γ-$MoD: Exploring Mixture-of-Depth Adaptation for Multimodal Large Language Models

  • 基于注意力图秩(ARank)动态判断哪些层可替换为混合深度结构
  • 在仅损失1.5%性能下,推理时间减少53.2%,训练时间减少31.0%
  • 适用于主流多模态大模型,适合追求高效部署的研究者与工程师

尽管多模态大语言模型(MLLMs)取得显著进展,其高计算成本仍是实际部署的主要障碍。受自然语言处理中混合深度(MoD)启发,本文从“激活标记”角度出发,提出一种新的适应性策略γ-MoD。核心思路是:若多数标记对层计算无贡献,则可通过MoD层跳过。然而直接将密集层转为MoD层会导致性能大幅下降。为此,γ-MoD引入新度量指标——注意力图秩(ARank),精准识别冗余层并指导其替换。基于此,设计了共享视觉-语言路由和掩码路由学习机制,最大化计算稀疏性同时保持性能。实验表明,超过90%的密集层可有效转为MoD层。在三个主流MLLM上测试,9个基准数据集结果验证其显著效率提升与强泛化能力。例如,在仅-1.5%性能损失下,LLaVA-HR的训练与推理时间分别缩短31.0%和53.2%。

原文摘要 · Abstract (English)

Despite the significant progress in multimodal large language models (MLLMs), their high computational cost remains a barrier to real-world deployment. Inspired by the mixture of depths (MoDs) in natural language processing, we aim to address this limitation from the perspective of ``activated tokens''. Our key insight is that if most tokens are redundant for the layer computation, then can be skipped directly via the MoD layer. However, directly converting the dense layers of MLLMs to MoD layers leads to substantial performance degradation. To address this issue, we propose an innovative MoD adaptation strategy for existing MLLMs called $γ$-MoD. In $γ$-MoD, a novel metric is proposed to guide the deployment of MoDs in the MLLM, namely rank of attention maps (ARank). Through ARank, we can effectively identify which layer is redundant and should be replaced with the MoD layer. Based on ARank, we further propose two novel designs to maximize the computational sparsity of MLLM while maintaining its performance, namely shared vision-language router and masked routing learning. With these designs, more than 90% dense layers of the MLLM can be effectively converted to the MoD ones. To validate our method, we apply it to three popular MLLMs, and conduct extensive experiments on 9 benchmark datasets. Experimental results not only validate the significant efficiency benefit of $γ$-MoD to existing MLLMs but also confirm its generalization ability on various MLLMs. For example, with a minor performance drop, i.e., -1.5%, $γ$-MoD can reduce the training and inference time of LLaVA-HR by 31.0% and 53.2%, respectively.

多模态模型稀疏计算效率优化混合深度

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