arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.02846cs.AI
收藏

SpecOPD:用于推测解码的分支并行在线策略蒸馏

SpecOPD: Branch-Parallel On-Policy Distillation for Speculative Decoding

Qwen Business Unit of Alibaba(阿里巴巴通义千问业务部);University of Science and Technology of China(中国科学技术大学);Zhejiang University(浙江大学);Carnegie Mellon University(卡内基梅隆大学);University of Edinburgh(爱丁堡大学);University of Chinese Academy of Sciences(中国科学院大学);The Hong Kong Polytechnic University(香港理工大学)

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

AI总结:

SpecOPD 是一种分支并行在线策略蒸馏框架,通过并行处理分支实现推测解码,在多类模型、架构和任务上,显著提升接受长度、监督 token 吞吐量及生成速度。

摘要:

推测解码(SD)通过减少逐 token 生成的序列成本来加速大语言模型推理。先进的 SD 方法采用并行草稿模型,通过一次前向传播预测完整块以降低草稿成本,但整体加速仍取决于接受长度。在线策略蒸馏(OPD)可使训练良好的草稿模型突破接受长度瓶颈,然而传统流程通过顺序草稿-验证回滚收集监督信号。我们的核心见解是,在线策略监督无需继承这些依赖:草稿块可仅通过其参考前缀和草稿采样历史进行监督。我们提出 SpecOPD,这是一种分支并行 OPD 框架,在参考锚点处从演化的草稿模型策略中抽取独立分支,并行执行草稿采样和目标监督。我们将这些分支打包成提议树以共享目标前缀计算,使用树掩码实现全注意力、分支一致索引器组实现稀疏注意力,以及索引状态重放实现线性注意力,从而保留每个分支的历史。我们采用 E2E-TV 代理训练草稿模型,直接以接受长度为目标。本研究涵盖 8B 全注意力(GQA)、27B 全线性(GDN)、125B 稀疏线性(QSA-GDN)三类目标模型,三种并行草稿架构(DFlash、DSpark、DFlash V2),以及四个任务领域(对话、编码、数学、智能体决策)。SpecOPD 的平均接受长度最高提升 41.45%,在原生配置下,监督 token 吞吐量是顺序回滚 OPD 的 16.09 倍,生成速度比自回归解码最高提升 3.56 倍。

英文摘要:

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.

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

↑