APEX: Speculate smarter, not deeper

📄 arXiv: 2610.07780v1 📥 PDF

作者: Manvi Jha, Zach Zhang, Zhichao Xu, Linbo Liu, Sai Muralidhar Jayanthi, Vinayak Arannil

分类: cs.CL, cs.LG

发布日期: 2026-10-06


💡 一句话要点

提出APEX以优化语言模型推理速度与计算效率

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 语言模型 推测解码 动态调整 计算效率 深度学习

📋 核心要点

  1. 现有的推测解码方法在生成过程中无法灵活应对可预测性、重复性和接受度的变化,导致计算浪费。
  2. APEX通过请求级专家选择和块级深度适应,动态调整解码速度与草稿令牌的使用效率。
  3. 实验表明,APEX-S和APEX-B分别实现了4.27倍和3.27倍的速度提升,同时显著减少了浪费的令牌比例。

📝 摘要(中文)

论文提出了一种名为APEX的学习控制器,通过请求级专家选择和块级深度适应,平衡了语言模型推理中的解码速度与草稿令牌的浪费。APEX-Router在每个请求中选择不同的推测机制,而APEX-Depth则根据因果解码信号和最近的验证反馈调整草稿长度。通过将接受的草稿长度建模为被审查的生存反馈,APEX能够适应推测过程,同时保留目标模型的验证程序。实验结果显示,APEX在多个工作负载中实现了高达5.24倍的速度提升。

🔬 方法详解

问题定义:论文要解决的问题是现有推测解码方法在生成过程中由于固定配置导致的计算浪费和速度提升不足。现有方法无法适应生成过程中的动态变化,导致深度草稿增加了无效计算。

核心思路:APEX的核心思路是通过学习控制器动态调整解码过程中的草稿长度和选择推测机制,从而在保证速度的同时减少草稿令牌的浪费。该方法利用请求级和块级的反馈信息进行智能决策。

技术框架:APEX的整体架构包括APEX-Router和APEX-Depth两个主要模块。APEX-Router负责在每个请求中选择合适的推测机制(如EAGLE-3、n-gram等),而APEX-Depth则根据因果解码信号和验证反馈动态调整草稿长度。

关键创新:APEX的主要创新在于将接受的草稿长度建模为被审查的生存反馈,学习位置级拒绝风险、块执行成本和行动效用,从而实现了推测过程的自适应调整。这一方法与传统的固定推测机制有本质区别。

关键设计:在设计中,APEX使用了多种推测机制的组合,并通过损失函数优化接受率和速度。网络结构上,APEX结合了因果解码信号和反馈信息,确保了动态调整的有效性。

🖼️ 关键图片

fig_0
img_1
img_2

📊 实验亮点

实验结果显示,APEX在与Qwen3-8B模型的评估中,APEX-S实现了4.27倍的速度提升,而APEX-B则实现了3.27倍的速度提升,且相较于固定n-gram推测在k=16时,浪费令牌比例减少了41%。这些结果表明APEX在加速和令牌利用率之间提供了显著的平衡。

🎯 应用场景

APEX的研究成果在自然语言处理领域具有广泛的应用潜力,尤其是在需要实时响应的对话系统、智能助手和在线翻译等场景中。通过优化推理速度和计算效率,APEX能够提升用户体验并降低计算资源消耗,具有重要的实际价值和未来影响。

📄 摘要(原文)

Speculative decoding reduces large language model inference latency by drafting multiple tokens before target-model verification, but its effectiveness depends on both the proposal mechanism and draft depth. Fixed configurations cannot respond to changes in predictability, repetition, and acceptance during generation, so deeper drafting can increase wasted computation without proportional speedup. We introduce APEX, a learned controller that balances decoding speed and draft-token waste through request-level expert selection and block-level depth adaptation. APEX-Router selects among EAGLE-3, n-gram, and draft-model speculation for each request, while APEX-Depth adjusts draft length at each verification block using causal decoding signals and recent verifier feedback. APEX models accepted draft length as censored survival feedback, learning position-wise rejection hazards, block execution costs, and an action utility that balances throughput, accepted progress, and wasted tokens. This allows the controller to adapt speculation while retaining the target model's verification procedure. We integrate APEX into vLLM and evaluate it with Qwen3-8B across six workloads, achieving up to 5.24X speedup over autoregressive decoding. Across the aggregate evaluation, APEX-S achieves 4.27X speedup, while APEX-B achieves 3.27X speedup with a 41.0% relative reduction in wasted-token percentage compared with fixed n-gram speculation at k=16, providing distinct operating points for balancing acceleration and draft-token utilization.