用在线学习让草稿模型自我进化,提升生成速度
When Drafts Evolve: Speculative Decoding Meets Online Learning
- 利用验证反馈迭代优化草稿模型,形成自适应演化循环
- 在7个基准上实现最高24%的推理加速,超越现有方法
- 适合追求高效大模型推理的开发者和研究者
推测解码已成为加速大语言模型推理的主流范式,通过轻量级草稿模型快速生成候选词元,再由大型目标模型并行验证。然而,受限于模型容量,草稿模型难以逼近目标分布,导致接受长度较短,加速效果减弱。一个尚未被充分探索的关键观察是:推测解码天然提供验证反馈,可无额外成本量化草稿与目标模型之间的偏差,形成‘草稿生成-验证反馈-草稿更新’的迭代演化闭环,恰好契合在线学习范式。受此启发,我们提出OnlineSPEC,一个统一框架,系统性地利用交互反馈持续演化草稿模型。基于动态遗憾最小化,我们建立了在线学习性能与推测系统加速率之间的形式化联系,并通过现代在线学习技术设计新算法,包括自适应复用历史梯度的乐观在线学习,以及动态维护多个草稿模型的在线集成学习。所提算法具备理论保障,加速率显著提升,在七个基准和五个基础模型上实现最高24%的速度提升。
原文摘要 · Abstract (English)
Speculative decoding has emerged as a widely adopted paradigm for accelerating large language model inference, where a lightweight draft model rapidly generates candidate tokens that are then verified in parallel by a larger target model. However, due to limited model capacity, drafts often struggle to approximate the target distribution, resulting in shorter acceptance lengths and diminished speedup. A key yet under-explored observation is that speculative decoding inherently provides verification feedback that quantifies the deviation between the draft and target models at no additional cost. This process naturally forms an iterative "draft commits-feedback provides-draft adapts" evolving loop, which precisely matches the online learning paradigm. Motivated by this connection, we propose OnlineSPEC, a unified framework that systematically leverages interactive feedback to continuously evolve draft models. Grounded in dynamic regret minimization, we establish a formal link between online learning performance and speculative system's acceleration rate, and develop novel algorithms via modern online learning techniques, including optimistic online learning that adaptively reuses historical gradients as predictive update hints, and online ensemble learning that dynamically maintains multiple draft models. Our algorithms are equipped with theoretical justifications and improved acceleration rates, achieving up to 24% speedup over seven benchmarks and five foundation models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。