Multi-Token Prediction Draft Models: How Speculative Decoding Speeds Up LLM Inference

    This article explains why autoregressive LLM decoding is usually bound by memory bandwidth rather than compute, and how speculative decoding converts that wasted compute into real speedup. It walks through how a lightweight multi-token prediction (MTP) draft model works with the main model, the accept/rollback verification rule with pseudocode, and two key optimizations—target activation injection and KV cache sharing—plus practical trade-offs around draft length, acceptance rate, memory, and batching. Aimed at engineers optimizing low-latency, high-throughput LLM serving.

    1. The Root Cause: Why LLM Inference Stalls on Memory Bandwidth

    Before discussing any acceleration technique, it helps to clear up a commonly misunderstood point: autoregressive decoding in large models is usually memory-bandwidth bound, not compute bound.

    The reason is the sequential nature of generation. Each forward pass of an autoregressive model produces only one token. To produce that single token, the system must move all of the model weights (plus the KV cache) from GPU memory to the compute units. At billions of parameters or more, that transfer is enormous, while the matrix-vector multiply-accumulate work itself is comparatively light. The result is that a large share of GPU compute sits idle, and what actually limits speed is the width of the data path between memory and the compute cores.

    The practical implication is that simply adding compute does little for generation speed. Any real improvement has to come from getting more output per transfer—which is exactly the starting point of speculative decoding.

    2. Speculative Decoding: Trading One Cheap Guess for Overall Throughput

    Speculative decoding can be summarized in one sentence: a lightweight draft model guesses several tokens in parallel, the main model verifies them in a single pass, and many small sequential transfers become one large parallel transfer.

    The collaboration works as follows:

    1. The lightweight draft model uses the current context to quickly predict the next k candidate tokens. Because it is much smaller than the main model, one prediction costs far less time than one token from the main model.
    2. The main model verifies all k candidates in parallel—the whole candidate sequence goes through a single forward pass, producing the distribution the main model would have generated at each position.
    3. Based on the verification result, the accepted tokens are kept or the draft is rolled back.

    The key point is that this main-model forward pass, although it computes k positions jointly, performs only one weight transfer while validating what would otherwise have taken k transfers. Since the bottleneck is bandwidth rather than compute, “verify many tokens per transfer” converts idle compute into measurable speedup.

    One important property: every accepted token must pass the main model’s distribution check, so speculative decoding is mathematically distribution-preserving—output quality is identical to the original main model. It is not an approximation; it is lossless acceleration.

    3. Design Goals for a Multi-Token Prediction Draft Model

    A multi-token prediction (MTP) draft model is the supporting actor purpose-built for speculative decoding. Its design targets three qualities: fast enough, accurate enough, and light enough.

    • Fast enough — the draft model must return several upcoming tokens in less time than the main model takes to generate a single one. Otherwise the time saved by verification is eaten up by the cost of guessing.
    • Accurate enough — draft quality directly determines the speedup ratio. If the draft is frequently rejected, the acceptance rate drops and the gains shrink. The draft model therefore needs output distributions closely aligned with the main model.
    • Light enough — the draft model’s own memory footprint and compute overhead should be as small as possible, typically achieved by reducing layer count, sharing parameters, or sharing the main model’s cache.

    An ideal draft model behaves like the main model’s shadow: it learns to imitate the main model’s next-token output, achieving a high hit rate while adding almost no new performance burden.

    4. Verification: The Accept / Rollback Rule

    The draft model only produces candidates. The main model is always the judge. Verification follows one clear and strict rule:

    • Full acceptance — if the main model agrees with every drafted token, the entire batch is accepted at once. The main model can then generate one extra token for free, since the next position’s distribution was already computed during verification.
    • Partial acceptance — if the first disagreement occurs at position t, only the first t−1 tokens are kept. From position t onward, the main model’s own prediction replaces the drafted token, and all remaining draft tokens are discarded.
    • Rejected at the first token — the step degrades to ordinary single-token generation.

    The logic in illustrative pseudocode:

    1. def speculative_decode(context, draft_model, main_model, k):
    2. # 1. The draft model predicts k candidate tokens in one pass
    3. draft_tokens = draft_model.predict(context, num_tokens=k)
    4. accepted = []
    5. # 2. The main model verifies the candidate sequence in parallel
    6. for t, tok in enumerate(draft_tokens):
    7. if main_model.accepts(tok, context + accepted):
    8. accepted.append(tok) # accept this drafted token
    9. else:
    10. # 3. First mismatch: replace with the main model's output,
    11. # discard all remaining draft tokens
    12. accepted.append(main_model.predict_next(context + accepted))
    13. break
    14. # If everything was accepted, the main model gets one extra token
    15. if len(accepted) == k:
    16. accepted.append(main_model.predict_next(context + accepted))
    17. return accepted

    This captures the essence of the approach: the draft model produces volume, the main model enforces quality, and each does what it is best at.

    5. Two Key Engineering Optimizations

    Two design choices matter most in practice. They address the two questions above: is the draft accurate, and is the draft fast?

    5.1 Target Activations (Injecting Main-Model Features)

    A draft model that only sees the token sequence often has too little information and guesses poorly. The Target Activations approach is to feed the main model’s last-layer representation (embedding) into the draft model as additional context.

    In practice, the main model’s final-layer output embedding is concatenated with the draft model’s current token embedding and then projected to the draft model’s hidden dimension. The draft model no longer guesses in isolation; it can “reference” the main model’s deeper understanding of the current context, which raises prediction accuracy noticeably.

    In multi-turn prediction, subsequent rounds also concatenate the draft model’s own previous output as input, forming a continuous prediction chain that keeps the multiple tokens coherent with one another.

    5.2 KV Cache Sharing

    Every draft prediction needs key/value caches for its attention layers. Recomputing that cache independently would add overhead and erode the speedup. KV Cache Sharing lets the draft model reuse the KV cache the main model has already computed, avoiding duplicate work:

    • Local attention layers: reuse the main model’s most recent local KV cache.
    • Global attention layers: connect to the main model’s last-layer global KV cache.

    With shared cache, the draft model essentially runs as a hitchhiker, with both its compute and memory footprint pushed to the minimum—which is what makes the “lightweight and fast” goal actually achievable.

    6. Practical Deployment Considerations

    A few engineering details are worth attention when deploying speculative decoding:

    • Trading off draft length k — a larger k raises the ceiling on tokens accepted per step, but also wastes more compute when the draft is rejected. The right value depends on draft accuracy and the workload, and should be tuned dynamically.
    • Monitoring the acceptance rate — track it continuously. A low acceptance rate signals poor alignment between draft and main model; revisit draft quality or lower k.
    • Memory and bandwidth budget — KV cache sharing substantially reduces overhead, but capacity and throughput targets still need to be balanced, especially with long contexts or high concurrency.
    • Batching compatibility — when integrating speculative decoding into an existing inference service, verify that it cooperates well with continuous batching, dynamic scheduling, and related mechanisms.

    From a cloud platform engineering perspective, this kind of inference acceleration is typically carried by general-purpose infrastructure such as model serving, containerized deployment, logging, and monitoring and alerting. Developers can deploy and tune on a platform like Baidu AI Cloud using its general compute and operations capabilities, without having to manage the low-level data movement details.

    7. Summary

    The value of a multi-token prediction draft model is that it targets the core pain point of LLM inference: the memory-bandwidth bottleneck. By pairing a draft model that guesses in parallel with a main model that verifies in a single pass, speculative decoding turns a sequential process once consumed by idle compute into efficient, lossless acceleration—delivering roughly a 3x improvement in generation speed while keeping output quality unchanged.

    Target Activations improve draft hit quality by injecting the main model’s deep features; KV Cache Sharing lowers the draft model’s own overhead by reusing existing cache. Together they keep the speedup ratio stable. For LLM applications that need low latency and high throughput, understanding and applying speculative decoding with multi-token prediction is a practical engineering path that balances quality with efficiency.