Speeding Up LLM Inference with Multi-Token Prediction Draft Models

    This article explains how multi-token prediction (MTP) draft models can reduce the number of forward passes that a large language model needs during inference. It covers the basics of speculative decoding and three core optimizations: Target Activations, KV Cache Sharing, and Efficient Embedder. For each one, it describes the function, the conditions it requires, and its trade-offs. It ends with a checklist of items to verify before deployment.

    The short answer: A multi-token prediction (MTP) draft model reduces the number of forward passes that the main model must run. The actual speedup depends on model architecture, hardware, batch size, and input length. No universal fixed multiplier exists.

    How Speculative Decoding Works

    In autoregressive generation, the model runs a full forward pass for every token it outputs. At small batch sizes, each forward pass reads all model weights from GPU memory. Generation speed is therefore often limited by memory bandwidth rather than compute.

    Speculative decoding splits generation into two steps. First, a draft model quickly proposes a candidate sequence of length N. Then the main model takes these N candidate tokens as one input, computes the output distribution at every position in parallel, and checks each candidate in order from front to back.

    The acceptance rule works as follows. If all N candidates are accepted, the main model can produce one additional token in the same forward pass, so a single verification yields at most N+1 tokens. If the candidates diverge at position k, the first k-1 candidates are kept, the token at position k is replaced by the main model’s prediction, and all later candidates are discarded.

    The main model determines the final output. A poor draft model only shortens the accepted length. It never writes an incorrect token into the final result.

    To estimate the gain, assume that acceptance rates at each position are independent. Let α be the per-position acceptance rate and N the draft length. The average number of tokens produced per verification is (1−α^(N+1))/(1−α). For example, with α = 0.8 and N = 4, each verification produces about 3.36 tokens on average. This figure reflects only the relationship between acceptance rate and draft length. The actual speedup must also subtract the compute time of the draft model and scheduling overhead, so the real speedup is usually lower than this value.

    Target Activations: Raising the Draft Acceptance Rate

    Target Activations allows the draft model to use the internal state of the main model, not only the tokens. Specifically, the hidden states of the target model (typically the last layer’s activations) are concatenated with the embeddings of the draft model’s input tokens. A linear layer then projects the result to the draft model’s hidden dimension.

    The draft model receives the main model’s representation of the current context. Its predictions therefore track the main model more closely than those of a small model that sees only tokens, and its acceptance rate is usually higher.

    In multi-step prediction, the inputs for the second and later steps also concatenate the draft model’s own hidden output from the previous step. This keeps context coherent across steps and reduces the chance that later candidates are rejected because the context broke.

    This technique has two prerequisites. First, the draft model must be trained with this concatenation scheme. It cannot be attached directly to an arbitrary pretrained model. Second, concatenation and the linear projection add computation to the draft model’s inputs. The lighter the draft model, the more this overhead must be measured separately.

    KV Cache Sharing: Required Conditions

    The KV cache consumes a large amount of memory. If the draft model maintains its own separate cache, memory usage and cache write volume both increase. KV Cache Sharing lets the draft model read the key-value cache that the main model has already computed. This reduces redundant computation and extra memory use.

    Whether sharing works depends on whether the two models’ architectures align. The draft model’s attention layers must correspond one-to-one with the main model’s layers. The number of layers, the number of attention heads, the head dimension, and the position encoding method must all match. If these conditions are not met, the meaning of each cache entry shifts, and reads return incorrect results.

    Attention types must also match. By design, local attention layers (such as sliding window attention) read the local cache from the main model’s most recent computation. Global attention layers read the global cache from the main model’s last layer. If the draft model’s attention types do not correspond to the main model’s, it cannot reuse these caches directly.

    The implementation must also handle rollback. When the main model rejects draft tokens, the corresponding cache entries must be rolled back or overwritten. If the rollback logic is flawed, later generation reads the wrong context. These errors are hard to detect from the output alone, so they require dedicated test coverage.

    KV Cache Sharing reduces redundant computation, but it applies only to model pairs with aligned structures. It is not a general-purpose, zero-cost solution.

    Efficient Embedder: Reducing Vocabulary Computation Overhead

    The language model head (LM Head) performs a matrix multiplication over the entire vocabulary and then computes a Softmax. Vocabularies typically range from tens of thousands to hundreds of thousands