arXiv:2502.02040cs.CLcs.AI2025-02被引 2

动态调节残差变化速度,提升大模型推理效率与生成质量。

M2R2: Mixture of Multi-Rate Residuals for Efficient Transformer Inference

  • 根据残差演化速度而非层数决定提前退出,更精准控制计算量。
  • 在MT-Bench上实现最高2.8倍推理加速,优于现有方法。
  • 适合资源受限环境下的高效推理,尤其适用于MoE架构。

残差变换能增强大语言模型的表征深度与表达能力,但静态应用在自回归生成中会导致推理效率与生成保真度之间的次优权衡。现有方法如早退、跳过解码和混合深度,主要依据令牌在模型层中的遍历距离调节残差变换,却忽略了残差演化的内在速度。本文提出混合多速率残差(M2R2)框架,通过动态调节残差速度以改善早期对齐,提升推理效率。在面向推理的任务如Koala、Self-Instruct、WizardLM和MT-Bench上的评估表明,M2R2超越了基于距离的先进策略,在生成质量与加速之间取得更好平衡。在自推测解码设置下,M2R2在MT-Bench上实现最高2.8倍加速,优于双模型推测解码、Medusa、LookAhead Decoding和DEED。在混合专家(MoE)架构中,结合早期残差对齐与预加载专家至高带宽内存(HBM),可加速解码、减少专家切换瓶颈,达到2.9倍加速,显著提升资源受限环境下的性能。

原文摘要 · Abstract (English)

Residual transformations enhance the representational depth and expressive power of large language models (LLMs). However, applying static residual transformations across all tokens in auto-regressive generation leads to a suboptimal trade-off between inference efficiency and generation fidelity. Existing methods, including Early Exiting, Skip Decoding, and Mixture-of-Depth address this by modulating the residual transformation based on token-level complexity. Nevertheless, these approaches predominantly consider the distance traversed by tokens through the model layers, neglecting the underlying velocity of residual evolution. We introduce Mixture of Multi-rate Residuals (M2R2), a framework that dynamically modulates residual velocity to improve early alignment, enhancing inference efficiency. Evaluations on reasoning oriented tasks such as Koala, Self-Instruct, WizardLM, and MT-Bench show M2R2 surpasses state-of-the-art distance-based strategies, balancing generation quality and speedup. In self-speculative decoding setup, M2R2 achieves up to 2.8x speedups on MT-Bench, outperforming methods like 2-model speculative decoding, Medusa, LookAhead Decoding, and DEED. In Mixture-of-Experts (MoE) architectures, integrating early residual alignment with ahead-of-time expert loading into high-bandwidth memory (HBM) accelerates decoding, reduces expert-switching bottlenecks, and achieves a 2.9x speedup, making it highly effective in resource-constrained environments.

大模型推理残差优化MoE架构加速技术

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