SpecOPD: Branch-Parallel On-Policy Distillation for Speculative Decoding
作者: Tianyu Liu, Jun Zhang, Wenjie Huang, Yuhao Shen, Tianqi Xu, Xinyue Hao, Hongyaoxing Gu, Xuyang Liu, Baolin Zhang, Yating Zhu, Shuang Ge, Jun Dai, Lei Chen, Yue Li, Mingchen Wan
分类: cs.AI
发布日期: 2026-11-02
💡 一句话要点
提出SpecOPD以解决大语言模型推理速度瓶颈问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 推理加速 在线蒸馏 并行计算 生成模型
📋 核心要点
- 现有的推理方法在生成过程中受限于接受长度,导致整体速度提升有限。
- SpecOPD通过并行化草稿采样和目标监督,打破了传统依赖于序列生成的限制。
- 实验显示,SpecOPD在接受长度上提高了41.45%,并在生成速度上实现了3.56倍的提升。
📝 摘要(中文)
论文提出了一种名为SpecOPD的框架,通过分支并行的在线蒸馏方法加速大语言模型的推理过程。现有的推理方法在生成过程中存在接受长度的限制,导致整体速度提升有限。SpecOPD通过并行化草稿采样和目标监督,利用独立分支和提案树结构,显著提高了模型的接受长度和生成速度。实验结果表明,SpecOPD在多个任务领域中实现了显著的性能提升。
🔬 方法详解
问题定义:论文要解决的具体问题是现有的推理方法在生成过程中受限于接受长度,导致整体速度提升有限。传统的在线蒸馏方法依赖于序列生成的草稿和验证回合,造成了效率低下。
核心思路:论文的核心解决思路是提出SpecOPD框架,通过并行化草稿采样和目标监督,利用独立分支来打破传统方法的依赖性,从而提高生成效率和接受长度。
技术框架:SpecOPD的整体架构包括多个独立的分支,这些分支从不断演变的草稿策略中提取信息,并通过提案树结构共享目标前缀的计算。主要模块包括分支并行的草稿采样、目标监督和基于树的注意力机制。
关键创新:最重要的技术创新点在于通过分支并行的在线蒸馏方法,打破了传统序列生成的限制,允许草稿块仅使用其参考前缀和草稿采样历史进行监督。这种设计有效提高了模型的接受长度和生成速度。
关键设计:在关键设计上,SpecOPD使用树掩码实现全注意力机制,采用分支一致的索引器组实现稀疏注意力,并通过索引状态重放实现线性注意力,以保留每个分支的历史信息。
🖼️ 关键图片
📊 实验亮点
实验结果显示,SpecOPD在接受长度上提高了41.45%,在监督令牌吞吐量上达到了16.09倍的提升,相较于传统的序列回合在线蒸馏方法,生成速度提升达到了3.56倍。这些结果表明SpecOPD在多任务领域的有效性和优越性。
🎯 应用场景
该研究的潜在应用领域包括对话系统、编程助手、数学问题求解和智能代理等。通过提高大语言模型的推理速度和效率,SpecOPD能够在实际应用中显著提升用户体验和系统响应能力,具有广泛的实际价值和未来影响。
📄 摘要(原文)
Speculative decoding (SD) accelerates large language model inference by reducing the sequential cost of token-by-token generation. Advanced SD methods reduce proposal cost with parallel drafters that predict entire blocks in one forward pass, but overall speedup still depends on acceptance length. On-policy distillation (OPD) can push well-trained drafters beyond acceptance-length plateaus, yet conventional pipelines collect supervision through sequential draft-and-verify rollouts. Our key insight is that on-policy supervision need not inherit these dependencies: a draft block can be supervised using only its reference prefix and draft-sampled history. We propose SpecOPD, a branch-parallel OPD framework that parallelizes draft sampling and target supervision across independent branches drawn from the evolving drafter policy at reference anchors. We pack these branches into proposal trees to share target-prefix computation, using tree masks for full attention, branch-consistent indexer groups for sparse attention, and indexed state replay for linear attention to preserve each branch's history. We train the drafter with an E2E-TV surrogate that directly targets acceptance length. Our study spans 8B full-attention (GQA), 27B full-linear (GQA--GDN), and 125B sparse-linear (QSA--GDN) targets, three parallel draft architectures (DFlash, DSpark, and DFlash V2), and four task domains (dialogue, coding, mathematics, and agentic). SpecOPD achieves up to 41.45% higher mean acceptance length, $16.09\times$ supervised-token throughput over sequential-rollout OPD under native configurations, and up to $3.56\times$ generation speedup over autoregressive decoding.