通过渐进式稀疏策略,让多模态大模型更高效,节省近一半算力。
p-MoD: Building Mixture-of-Depths MLLMs via Progressive Ratio Decay
- 分层动态筛选视觉令牌,仅处理关键信息。
- 推理时降低55.6%算力、53.7%显存占用,训练省77.7%时间。
- 适合追求效率的多模态模型部署与研究者使用。
尽管多模态大语言模型(MLLMs)在各类任务中表现优异,但高昂的训练与推理成本制约了其发展。本文提出p-MoD,一种高效MLLM架构,在保持性能的同时显著降低计算开销。多数计算消耗源于变压器结构的LLM处理大量视觉令牌。为此,我们采用混合深度(Mixture-of-Depths, MoD)机制,使每一层仅选择必要视觉令牌处理,跳过冗余部分。为解决训练与推理稳定性及数据有限问题,我们引入两种新设计:tanh门控权重归一化(TanhNorm)和对称令牌重加权(STRing)。此外,我们发现深层中视觉令牌冗余度更高,因此设计渐进比例衰减(PRD)策略,按偏移余弦调度逐层递减保留率。该设计充分释放MoD潜力,显著提升模型效率与性能。在两个基线模型上15个基准测试的实验证明,本模型性能媲美甚至超越基线,推理仅需55.6% TFLOPs与53.7% KV缓存存储,训练仅耗77.7% GPU小时。
原文摘要 · Abstract (English)
Despite the remarkable performance of multimodal large language models (MLLMs) across diverse tasks, the substantial training and inference costs impede their advancement. In this paper, we propose p-MoD, an efficient MLLM architecture that significantly reduces training and inference costs while maintaining model performance. The majority of computation in MLLMs stems from the overwhelming volume of vision tokens processed by the transformer-based LLM. Accordingly, we leverage the Mixture-of-Depths (MoD) mechanism, where each LLM layer selects essential vision tokens to process while skipping redundant ones. However, integrating MoD into MLLMs is non-trivial. To address the challenges of training and inference stability as well as limited training data, we adapt the MoD module with two novel designs: tanh-gated weight normalization (TanhNorm) and symmetric token reweighting (STRing). Moreover, we observe that vision tokens exhibit higher redundancy in deeper layers and thus design a progressive ratio decay (PRD) strategy, which gradually reduces the token retention ratio layer by layer, employing a shifted cosine schedule. This crucial design fully unleashes the potential of MoD, significantly boosting the efficiency and performance of our models. Extensive experiments on two baseline models across 15 benchmarks show that our model matches or even surpasses the performance of corresponding baselines, while requiring only 55.6% TFLOPs and 53.7% KV cache storage during inference, and 77.7% GPU hours during training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。