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

DForkTree:采用感知分叉的块扩散草稿树加速推测解码

DForkTree: Accelerating Speculative Decoding with Fork-Aware Block Diffusion Draft Trees

The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Tsinghua University(清华大学)

Zhicheng Zheng, Cheng Zhang, Chenkai Tang, Tianxiang Zhao

AI总结:

本文提出DForkTree,一种无需训练的推测解码加速方法,通过重新锚定分支、引入目标模型n元语法统计并在GPU构建最优树,在Qwen3.5-4B/9B上比DFlash、DDTree及自回归解码实现显著加速。

摘要:

推测解码通过让轻量级草稿模型提出多个未来token,由目标模型并行验证,从而加速语言模型。DFlash等块扩散草稿模型在一次前向传播中生成整个块,DDTree则基于各位置分布构建草稿树。这些分布均假设草稿模型自身最可能的延续是正确的,但树结构仅在偏离该延续的分支上优于链结构,此时草稿模型的Top-1准确率从89%降至18%,候选列表更易遗漏正确token。从分叉token重新运行时,同一草稿模型通常正确,因此错误源于分布所依赖的前缀,而非草稿模型的认知。本文提出DForkTree,一种无需训练的方法,将每个分支重新锚定到自身token,把目标模型自身输出的n元语法统计作为点互信息添加到草稿模型的分数中,在分叉后赋予更高权重,并在GPU上基于这些分数精确构建最优树。在Qwen3.5-4B和9B模型上,当所有树方法共享一个草稿模型、树流水线和验证器时,DForkTree在所有基准测试中均为最快的树方法,在相同设置下比DFlash快达41.5%,比DDTree快达15.1%,相比自回归解码的平均加速比高达4.75倍。

英文摘要:

Speculative decoding speeds up language models by having a lightweight drafter propose future tokens that the target model verifies in parallel. Block diffusion drafters such as DFlash predict an entire block in one forward pass, and DDTree builds draft trees directly from their per-position distributions. Each distribution implicitly assumes that the drafter's own greedy continuation is accepted, whereas a draft tree improves over a chain only on branches that leave this greedy path. Once a path forks, the drafter's top-1 accuracy drops from 89% to 18% and its top candidates often miss the true token. Re-running the drafter from the fork token largely restores its accuracy, showing that the errors stem from conditioning on an outdated prefix rather than from limited model capacity. In this paper, we introduce DForkTree, a training-free method that re-anchors each branch on its own tokens. It adjusts the drafter's scores with pointwise mutual information from target-generated n-grams, weighted more heavily after a fork, and a layer-wise GPU search recovers the exact optimal tree under these scores. On Qwen3.5-4B and 9B, DForkTree outperforms all baselines on every benchmark, by up to 41.5% over DFlash and 15.1% over DDTree, with average speedups of up to 4.75x over autoregressive decoding.

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

相关深度报道

↑