通过动态合并冗余视觉标记,加速扩散模型推理
D$^{3}$ToM: Decider-Guided Dynamic Token Merging for Accelerating Diffusion MLLMs
- 用前步生成的决策标记构建重要性图,动态筛选关键视觉标记
- 每轮去噪时按比例合并非关键标记,实现推理速度提升
- 无需修改模型参数,适合希望提速的扩散多模态模型用户
基于扩散的多模态大语言模型(Diffusion MLLMs)在视觉-语言任务中展现出强大的非自回归生成能力。然而,其推理速度远低于自回归模型:每轮去噪需对整个序列进行全双向自注意力计算,导致解码复杂度为立方级,在数千个视觉标记下变得计算不可行。为此,我们提出 D³ToM——一种由决策标记引导的动态令牌合并方法,可在不同去噪步骤中动态合并冗余视觉标记以加速推理。每轮去噪时,D³ToM利用前一步生成的决策标记构建所有视觉标记的重要性图,保留最显著的部分,并通过基于相似性的聚合合并其余部分。该模块可无缝嵌入单个Transformer层,物理缩短后续所有层的视觉标记序列,且不改变模型参数。此外,D³ToM采用随去噪步骤动态变化的合并比例,与扩散模型原生解码过程一致,在等量计算预算下表现更优。大量实验表明,D³ToM在保持竞争力性能的同时显著加速推理。代码已开源:https://github.com/bcmi/D3ToM-Diffusion-MLLM。
原文摘要 · Abstract (English)
Diffusion-based multimodal large language models (Diffusion MLLMs) have recently demonstrated impressive non-autoregressive generative capabilities across vision-and-language tasks. However, Diffusion MLLMs exhibit substantially slower inference than autoregressive models: Each denoising step employs full bidirectional self-attention over the entire sequence, resulting in cubic decoding complexity that becomes computationally impractical with thousands of visual tokens. To address this challenge, we propose D$^{3}$ToM, a Decider-guided dynamic token merging method that dynamically merges redundant visual tokens at different denoising steps to accelerate inference in Diffusion MLLMs. At each denoising step, D$^{3}$ToM uses decider tokens-the tokens generated in the previous denoising step-to build an importance map over all visual tokens. Then it maintains a proportion of the most salient tokens and merges the remainder through similarity-based aggregation. This plug-and-play module integrates into a single transformer layer, physically shortening the visual token sequence for all subsequent layers without altering model parameters. Moreover, D$^{3}$ToM employs a merge ratio that dynamically varies with each denoising step, aligns with the native decoding process of Diffusion MLLMs, achieving superior performance under equivalent computational budgets. Extensive experiments show that D$^{3}$ToM accelerates inference while preserving competitive performance. The code is released at https://github.com/bcmi/D3ToM-Diffusion-MLLM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。