基于强化学习的经验驱动动态退出机制用于大语言模型
Experience-Driven Dynamic Exits for LLMs with Reinforcement Learning
AI总结:
针对大语言模型自回归推理慢的问题,提出LEDE框架,利用离线强化学习动态选择最优退出层和推测长度,实现2.0-2.7倍加速,并比静态推测基线额外提升17%速度。
摘要:
大语言模型遭受缓慢的自回归推理。虽然自我推测解码加速了这一过程,但其效率受到静态配置(如固定退出层和推测长度)的阻碍。我们将此优化重新构建为马尔可夫决策过程,并提出LEDE,一个使用离线强化学习的框架。LEDE学习一个策略,根据每一步生成序列的局部上下文动态选择最优退出层和推测长度,平衡计算成本和草稿质量。在Llama-2和Llama-3模型上的全面评估表明,LEDE相比自回归解码实现了高达2.0倍至2.7倍的加速,并且比静态推测基线额外提供了17%的加速。
英文摘要:
Large Language Models suffer from slow autoregressive inference. While self-speculative decoding accelerates this process, its efficiency is hampered by static configurations like fixed exit layers and speculation lengths. We reframe this optimization as a \textbf{Markov Decision Process} and propose \textbf{LEDE}, a framework that uses offline reinforcement learning. LEDE learns a policy to dynamically select the optimal exit layer and speculation length based on the local context of the generated sequence at each step, balancing computational cost and draft quality. Comprehensive evaluations on Llama-2 and Llama-3 models show LEDE achieves up to a $2.0\times$$\sim$$2.7\times$ speedup over autoregressive decoding and and provides an additional 17\% speedup over the static speculative baselines.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。