Large models normally generate one token per step, and each step is slow because the full model must run. In speculative decoding, a cheaper draft model guesses the next few tokens, and the large model checks all of them in a single pass. Tokens that match what the large model would have produced are kept; the first mismatch is replaced and drafting resumes from there.

Because the large model has the final say, the text it produces is the same as it would have been without drafting, in the standard form of the method. The speedup depends on how often the draft is right. DeepSeek’s DeepInfer adds a confidence score so that only the draft tokens most likely to be accepted are verified; see our report.