跳到正文
arXiv (AI + Vision + Imaging)· Mohammad Mahdi Moradi, Ali Pourranjbar, Zongzuo Wang, Mingming Zhu, Ben Feng, Boxing Chen·· 1 天前AI 评分48

CPA:面向并行投机解码的纠错前缀注意力方法

Look Back, Draft Ahead: Corrective Prefix Attention for Parallel Speculative Decoding

AI 导读

论文提出纠错前缀注意力(CPA),让并行投机解码中每个候选token关注块内更早的选择,并用辅助自回归损失在干净前缀上训练共享主干,不增加推理开销。在Qwen3-4B与Qwen3-8B目标模型、昇腾NPU上的八个数学、代码与对话基准中,CPA每轮验证提交的token数比DSpark多13–15%、比DFlash多25–26%,贪心解码平均加速3.35倍和3.37倍,采样解码为2.86倍。

正文 · 原文

arXiv:2611.31112v1 Announce Type: new Abstract: Parallel speculative decoders propose an entire token block at once, yet one early inconsistency can cause the target to reject its remaining suffix. We introduce Corrective Prefix Attention (CPA), which combines prefix-aware selection with autoregressive supervision to improve these parallel drafts. CPA lets each candidate attend to earlier choices within the block. Fixed candidate shortlists allow all pairwise interactions to be computed before selection, reducing the sequential walk to table lookups, accumulation and lightweight scoring rather than repeated neural evaluations. An auxiliary autoregressive loss trains the shared backbone on clean prefixes without adding an inference pass. Across eight math, code and dialogue benchmarks with Qwen3-4B and Qwen3-8B targets on Ascend NPUs, CPA commits 13--15\% more tokens per verification round than DSpark and 25--26\% more than DFlash. Its mean speedups reach $3.35\times$ and $3.37\times$ under greedy decoding and $2.86\times$ under sampling for both targets. Ablations support both components, while capacity sweeps demonstrate that greater acceptance alone does not guarantee faster decoding. These results motivate correcting parallel proposals with causal information while keeping sequential computation inexpensive.

来源:arXiv (AI + Vision + Imaging) · arxiv.org