无法等待验证:并行草稿生成消除推测解码中的验证器空闲时间
Cannot Wait to Verify: Parallel Drafting to Eliminate Verifier Idle Time in Speculative Decoding
AI总结:
本文针对推测解码中验证器空闲的问题,提出并行化的自适应草稿生成方法,无需修改架构或重训练,可将草稿生成加速最高1.65倍,精度下降极小且保持原性能。
摘要:
大型Transformer模型的自回归推理受限于token级的顺序执行,导致高延迟和低GPU利用率。推测解码(Speculative Decoding, SD)通过引入草稿模型与验证器模型缓解该瓶颈,但草稿生成阶段仍为顺序执行,导致验证器空闲,计算资源未被充分利用。为解决此问题,本文提出一种即插即用的自适应草稿生成方法,在草稿生成过程中对Transformer层间推理进行并行化处理。该方法从共享隐藏状态出发,并行评估多个层,并通过测量隐藏状态空间的发散度验证一致性;当偏差较小时接受分层草稿状态,否则应用校正步骤。通过利用Transformer层间的冗余性,该方法可加速草稿生成并提升硬件利用率,无需修改模型架构或进行重新训练。在NLP任务上的实验结果表明,本文方法可将草稿生成阶段加速最高达1.65倍,同时精度下降极小,且保持与SD相同的性能。
英文摘要:
Autoregressive inference in large transformer models is limited by token-level sequential execution, resulting in high latency and low GPU utilization. Speculative decoding (SD) mitigates this bottleneck by introducing a draft-and-verifier model. However, the drafting stage remains sequential, leaving the verifier idle and underutilizing compute. To address this, we propose a plug-and-play drafting adaptive drafting method that parallelizes inference across transformer layers during draft generation. Starting from a shared hidden state, our approach evaluates multiple layers in parallel and verifies consistency by measuring divergence in hidden-state space. Layer-wise draft states are accepted when deviations are small; otherwise, a correction step is applied. By exploiting redundancy across transformer layers, our method accelerates draft generation and improves hardware utilization without modifying architectures or requiring retraining. Experimental results on NLP tasks show that our method speeds up the drafting stage by up to $1.65\times$ with minimal degradation in accuracy, while maintaining the same performance as SD.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。