Speeding Up Local LLM Inference Without a New GPU: Draft Models and Speculative Decoding in Practice

    This article explains why local LLM generation can stay slow even when the model fits in GPU memory. It covers how speculative decoding uses a small draft model to propose candidate tokens that a target model verifies together, why verification must preserve the target distribution, which factors determine the real speedup, how to choose a draft model, and how to benchmark and roll out the technique on local hardware.

    1. Why the GPU Is Not Fully Busy, Yet Generation Is Still Slow

    When you deploy a large language model locally, a common situation arises. The model fits in VRAM, and responses generate correctly, but the text output speed is still disappointing. In this case, looking only at the GPU’s peak compute capability often does not explain the actual experience.

    To understand this problem, it helps to split inference into two stages.

    Stage one is prefill. The model processes the input prompt all at once, computes the representations at each layer, and builds the key-value cache (KV Cache) that the attention mechanism needs. Because many input positions can be processed in parallel, this stage usually makes better use of the GPU’s compute. Input length, batch size, and operator implementation all affect its performance.

    Stage two is decoding. In standard autoregressive generation, the model predicts the next token from the context it already has, appends that token to the context, and predicts the next one. There is a strict dependency here: each step usually has to wait for the result of the previous step.

    For low-concurrency, small-batch local generation, decoding is often limited by memory bandwidth. Each forward pass must read a large number of model weights, and it also reads the KV cache for the current context. Some of this data may hit the cache, but reading the full set of weights can still account for most of the cost.

    This means the bottleneck is not only how fast the computation runs. It also includes how fast data moves and how many times the data must be moved.

    Speculative decoding starts from the second question: can one execution of the target model confirm multiple output positions, instead of advancing only one token?

    2. Core Idea: Propose Candidates First, Then Verify Them Together

    Speculative decoding usually involves two roles:

    • Target model: determines the final output probability distribution. It is the large model that would otherwise run directly.
    • Draft model: predicts, at lower cost, several tokens that may come next, providing a candidate sequence for the target model.

    For example, given the input “A database connection failed, so the first step is to,” the draft model might propose the candidates “check,” “network,” “connection,” and “status.”

    These candidates are not the final answer shown to the user. They are submitted to the target model for verification.

    Because the candidate sequence is already fixed, the target model can compute the conditional distributions at all candidate positions in one forward pass, using causal attention. This does not mean the target model can generate unknown future content in parallel without conditions. It means the target model can evaluate a proposed sequence in parallel.

    If the first few candidates pass verification, they all enter the formal output together. At the first candidate that fails, that position and every unconfirmed candidate after it cannot be used directly. The algorithm generates a corrected token and restarts drafting from the new context.

    The gain from speculative decoding therefore comes from a trade-off between two costs:

    More cheap candidate generation and verification overhead, in exchange for fewer serial execution rounds of the expensive target model.

    3. “Verification Passed” Is Not Just a Check for Identical Answers

    The most common misunderstanding about speculative decoding is that the target model simply checks whether the draft looks reasonable.

    In practice, if you want to preserve the target model’s original sampling distribution, you must use strict probability correction. A candidate cannot be accepted just because it is semantically similar, has a high probability, or reads fluently.

    Suppose that at a given position, the draft model assigns candidate token (x) probability (q(x)), and the target model assigns it probability (p(x)). In the classic exact sampling scheme, the acceptance probability of the candidate is:

    [
    a(x)=\min\left(1,\frac{p(x)}{q(x)}\right)
    ]

    When a candidate is rejected, the replacement is not simply drawn again from the target distribution. Instead, it is sampled from a normalized residual distribution:

    [
    r(x)\propto \max(0,p(x)-q(x))
    ]

    All these probabilities are computed from the confirmed context before the current position. In real deployments, temperature scaling, candidate truncation, and other sampling constraints must also be applied consistently.

    When the algorithm and implementation meet the relevant conditions, this mechanism preserves the target model’s output distribution. The output does not come from the draft model standing in for the large model. However, matching distributions does not guarantee identical output token by token under the same random seed, because the path of random number consumption can change.

    With greedy decoding, the verification logic is more straightforward: check whether each candidate matches the highest-probability token the target model selects at that position. Each decoding mode must be verified separately. Correctness conclusions for one mode cannot be carried over to another.

    4. Why a Clear Speedup Is Possible, but a Fixed Multiplier Cannot Be Promised

    Speculative decoding is not a case of “adding a small model always makes things faster.” Whether it helps depends on whether the effective number of tokens produced per round is large enough to offset the new work.

    A simplified model helps explain the gain. Let:

    • the average time to generate one token with standard decoding be (T_{\text{base}});
    • the time for one draft generation round be (T_{\text{draft}});
    • the time for target model verification be (T_{\text{verify}});
    • the additional time for cache maintenance, scheduling, and similar work be (T_{\text{extra}});
    • the average number of output tokens confirmed per round be (L).

    The approximate speedup is:

    [
    S\approx
    \frac{L\cdot T{\text{base}}}
    {T
    {\text{draft}}+T{\text{verify}}+T{\text{extra}}}
    ]

    This is an approximation for analysis, not a performance guarantee. Real latency also depends on sequence length, concurrency scheduling, memory usage, and execution efficiency.

    Among these factors, average acceptance length is the key metric, but it cannot be judged apart from the other costs.

    A very small draft model is cheap to run, but it may differ too much from the target model, so candidates get rejected often. A larger draft model predicts more like the target, but it may consume too much time and memory. A candidate sequence that is too short cannot amortize the verification overhead. A candidate sequence that is too long may have its later part discarded frequently.

    Therefore, “close to fourfold” should be understood only as a result that may occur for a specific model pair, hardware, and workload. It should not be treated as the default expectation for every local deployment. Engineers should validate with their own task distribution, rather than using a single demo result as the basis for capacity planning.

    5. Criteria for Choosing a Draft Model

    1. Is the output space compatible?

    Classic two-model speculative decoding usually requires the draft and target models to use compatible token spaces, so that candidates and their probabilities can be compared directly.

    If