arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.02040cs.CLcs.AIcs.LG
收藏

M2R2:多速率残差混合用于高效Transformer推理

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

Apple(苹果公司)

Nikhil Bhendawade, Mahyar Najibi, Devang Naik, Irina Belousova

AI总结:

M2R2框架通过动态调制残差速度改善早期对齐,在自推测解码和MoE架构中分别实现2.8倍和2.9倍加速,超越现有基于距离的方法。

摘要:

残差变换增强了大型语言模型(LLMs)的表示深度和表达能力。然而,在自回归生成过程中对所有token应用静态残差变换会导致推理效率与生成保真度之间的次优权衡。现有方法,包括Early Exiting、Skip Decoding和Mixture-of-Depth,通过基于token级复杂度调制残差变换来解决这一问题。然而,这些方法主要考虑token在模型层中穿行的距离,忽略了残差演化的潜在速度。我们提出Mixture of Multi-rate Residuals(M2R2),这是一个动态调制残差速度以改善早期对齐、提升推理效率的框架。在面向推理的任务(如Koala、Self-Instruct、WizardLM和MT-Bench)上的评估表明,M2R2超越了最先进的基于距离的策略,平衡了生成质量和加速效果。在自推测解码设置中,M2R2在MT-Bench上实现了高达2.8倍的加速,优于2-model speculative decoding、Medusa、LookAhead Decoding和DEED等方法。在Mixture-of-Experts(MoE)架构中,将早期残差对齐与提前将专家加载到高带宽内存(HBM)相结合,可加速解码、减少专家切换瓶颈,并实现2.9倍的加速,使其在资源受限环境中非常有效。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑