用于推测解码的验证感知训练

·

研究论文 · 2026/09/01

推测解码通过草稿模型生成候选令牌,再由目标模型在一次前向传播中验证,从而加速大语言模型推理。验证过程是顺序进行的,并从首次拒绝位置起丢弃所有后续令牌,但现有草稿训练仅使用固定的逐位置权重进行令牌级模仿,未反映这一特性。我们提出验证感知训练(VAT),一种即插即用框架,在每一步训练中模拟验证,并将接受/拒绝模式转化为监督信号。VAT包含两个组件:(i) 验证头,一个轻量级联合训练的二分类器,监督草稿模型每个位置是否在顺序验证中存活;(ii) 验证自适应加权,用保持每个样本首次拒绝点之前的全权重并将衰减重新锚定到该点,替代固定加权方案。VAT仅修改训练目标,因此可叠加在现有方法之上,无需改变草稿架构、目标模型或推理过程。将VAT应用于EAGLE-3和DFlash,在Qwen3-4B、Qwen3-8B和LLaMA-3.1-8B上,平均接受长度提升最高达11.4%,墙钟加速提升最高达8.7%,在数学、代码和聊天基准上均有一致提升。代码将在https://github.com/naver-ai/vat提供。

该论文针对推测解码中训练与推理不一致的问题,提出了一种新颖的训练框架VAT,通过模拟验证过程来优化草稿模型,实验证明在多个模型和基准上均有显著提升,且无需改变推理架构,具有实用价值。

Speculative decoding accelerates large language model inference by using a draft model to generate candidate tokens, which are verified by the target model in a single forward pass. Verification proceeds sequentially and discards every position from the first rejection onward, yet existing draft training relies on token-level imitation of the target with a fixed per-position weighting that reflects neither property. We introduce Verification-Aware Training (VAT), a plug-in framework that simulates verification at every training step and turns the resulting accept and reject patterns into supervision. VAT consists of two components: (i) a verification head, a lightweight jointly trained binary classifier that supervises the draft model on whether each position survives sequential verification; (ii) verification-adaptive weighting, which replaces the fixed weighting schedule by keeping full weight up to each sample's first rejection point and re-anchoring the decay to start there. VAT modifies only the training objective, so it can be layered on top of existing methods without changing the draft architecture, the target model, or the inference procedure. Applied to EAGLE-3 and DFlash on Qwen3-4B, Qwen3-8B, and LLaMA-3.1-8B, VAT improves average acceptance length by up to 11.4% and wall-clock speedup by up to 8.7%, with consistent gains across math, code, and chat benchmarks. Code will be available at https://github.com/naver-ai/vat

阅读原文

参与讨论