Spec-AUF: Accept-Until-Fail Training under Train-Inference Misalignment for Masked Block Drafters
Speculative decoding speeds up language model generation by using a small "drafter" model to propose a block of tokens in parallel, which a larger target model then verifies. Current block-based drafters are often trained to predict every token in a block correctly. However, in practice, the verifier stops as soon as it encounters the first incorrect token, discarding all subsequent predictions. This paper introduces "Accept-Until-Fail" (AUF), a training method that aligns the drafter’s learning process with how it is actually used during inference, ensuring the model focuses its training effort only on the tokens that the verifier will actually accept.
The Problem: Training-Inference Mismatch
Standard training for block drafters uses a "full-block" approach, where the model is penalized for errors across every position in a sequence. This creates a structural mismatch: the model spends computational effort trying to get later tokens right, even when those tokens are guaranteed to be rejected because an earlier token in the sequence was wrong. While some existing methods attempt to fix this by weighting early tokens more heavily than later ones, these methods rely on fixed, manually tuned rules that do not adapt to the model's actual performance or the specific data being processed.
How AUF Works
AUF simplifies the training process by replacing complex weighting schemes with a direct, "hard" rule. During training, the model generates a draft block, and the system identifies the first position where the draft model makes a mistake (the "first failure"). AUF then restricts the training loss to only include the tokens up to and including that first failure. By doing this, the model stops receiving gradients for tokens that appear after a mistake, effectively teaching the model to prioritize the "accepted prefix"—the only part of the draft that actually contributes to faster generation. This approach requires no extra auxiliary objectives or complex rollouts; it is a straightforward change to which tokens are supervised during training.
Key Results
When tested on the Qwen3-8B model, AUF consistently improved the average number of accepted tokens across six different benchmarks. Specifically, it raised the average emitted length for the DFlash drafter from 2.40 to 2.61, and for the Domino drafter from 2.56 to 2.68. An interesting finding from the study is that once AUF is applied, traditional techniques like exponential position-decay weighting become redundant. The model’s own performance determines the training support, removing the need for manual hyperparameter tuning and allowing the drafter to naturally improve its "streak" of correct predictions as it learns.
Why This Matters
AUF demonstrates that a simpler, more targeted training objective can outperform more complex, hand-tuned methods. By treating the training support as a dynamic object that changes as the model gets better, AUF removes the need for fixed inductive biases. Because it does not change the inference pipeline or the model architecture, it can be easily integrated into existing speculative decoding workflows to improve speed without compromising the exactness of the generated text.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!