LLM Inference Acceleration: Speculative Decoding and Multi-Token Prediction in Practice

    Speculative decoding and multi-token prediction (MTP) can compress serial autoregressive decoding into parallel verification, but whether they actually deliver a speedup depends heavily on the acceptance rate and the breakeven point. This article explains why the decode phase is memory-bandwidth-bound, how the "draft-then-verify" mechanism works, and why enabling acceleration sometimes makes inference slower rather than faster. It also compares dense and mixture-of-experts (MoE) architectures, discusses the tradeoffs of running models on unified-memory hardware, and lays out a systematic, per-task evaluation and tuning workflow for reliably capturing inference speedups in production.

    1. Background: Why Inference Speed Is a Make-or-Break Variable

    The open-source ecosystem has iterated quickly over the past two years, with mid-scale models (roughly one to ten-plus billion parameters) continually pushing the boundaries of what can be deployed locally. Compared with super-large models that carry tens of billions of parameters, this class of models runs smoothly on consumer-grade hardware and even on unified-memory devices. That makes them a natural choice for privacy-sensitive, offline-capable, low-latency interaction scenarios.

    But “able to run” is not the same as “good to use.” Large-model inference can be split into two phases:

    • Prefill: processes the input in parallel and is mainly compute-bound.
    • Decode: generates output autoregressively, one token at a time. This is a classic memory-bandwidth-bound process—every token requires moving the full set of weights from memory, while compute sits largely idle.

    As a result, improving decode throughput usually does not come from piling on more compute, but from reducing the number of memory accesses per token. Speculative decoding and multi-token prediction are the key techniques built around exactly this idea.

    2. Core Idea: Draft First, Verify Later, Cover Multiple Tokens in One Forward Pass

    The inherent bottleneck of autoregressive decoding is that it produces only one token at a time. The core insight of speculative decoding is this: if you can cheaply “guess” several candidate tokens first, and then have the target model “verify” them with a single parallel forward pass, you can collapse multiple serial steps into one.

    Multi-token prediction (MTP) is one way to realize this idea: the model is designed to (or is fitted with extra prediction heads to) predict several future token positions in a single step, so it can “draft” on its own without a separate small model. This is the same workflow as traditional speculative decoding, where a small model drafts and the large model verifies—but it avoids the complexity of maintaining two separate models.

    A generalized version of the flow looks like this (illustrative pseudocode, not a specific API):

    1. function decode_with_speculation(model, prompt, K):
    2. tokens = prefill(prompt)
    3. while not done:
    4. draft = model.draft(tokens, K) # cheaply draft K candidate tokens
    5. verified = model.verify(tokens, draft) # verify all candidates in one parallel forward pass
    6. accepted = accept_until_first_mismatch(verified)
    7. tokens += accepted
    8. if len(accepted) < K: # a rejection occurred, so correct with the verification output
    9. tokens += correction_from(verified)
    10. return tokens

    The key point: verify needs only a single forward pass to check K candidates in parallel, whereas conventional decoding needs K serial forward passes. When candidates are largely accepted, the number of effective tokens produced per forward pass increases, which is what delivers the speedup.

    3. Acceptance Rate: The Metric That Determines the Speedup

    Whether speculative decoding actually accelerates inference hinges on one core metric—the acceptance rate, i.e., the fraction of drafted tokens that the target model adopts. The following gives an approximate intuition:

    1. expected effective tokens per verification step ≈ 1 + (K - 1) × acceptance-rate-related factor
    2. net speedup ≈ expected effective tokens / (1 + extra overhead of drafting and verification)

    This leads to two conclusions:

    • The higher the acceptance rate, the more effective tokens each forward pass amortizes, and the more pronounced the speedup.
    • Drafting and verification are not free; they introduce extra overhead. So there is a breakeven point—below it, the speedup gains are eaten by the overhead and the overall result is actually slower.

    4. A Counterintuitive Observation: Why Enabling Acceleration Can Make Things Slower

    In engineering practice, it is common to see speed drop after enabling speculation or MTP. This is not necessarily a bug; it is a normal outcome at the mechanism level, for three main reasons:

    1. Insufficient acceptance rate: Task predictability varies enormously. Highly structured tasks such as code completion, retrieval-augmented generation (RAG), and factual question answering are strongly constrained by context, so subsequent tokens are relatively easy to hit and the acceptance rate tends to be high. By contrast, high-entropy, high-divergence tasks such as creative writing, role-playing, and open-ended reasoning see draft tokens “drift off” quickly, and the acceptance rate is noticeably lower.
    2. Amplified extra overhead: Both drafting K tokens and verifying them in parallel consume compute and memory bandwidth. When the acceptance rate is low and many candidates are rejected, this overhead cannot be amortized effectively, and the net gain turns negative.
    3. Verification and scheduling cost: When the framework has not yet been optimized for this architecture, the extra scheduling, tensor concatenation, and branch correction can eat into the gains—and in early versions, an incomplete implementation can slow things down further.

    A rule of thumb that transfers well: when the acceptance rate is roughly 0.7–0.75 or higher, most tasks see a positive speedup; near that threshold the gains are marginal; clearly below it, things are likely to slow down. So “is the acceptance rate stably above the breakeven point?” should be the primary criterion for whether to enable the feature, rather than switching it on blindly.

    5. Architecture Differences: Dense Models vs. Mixture-of-Experts (MoE)

    Model architecture significantly affects decode-phase performance. A dense model activates all of its parameters for every token; a mixture-of-experts (MoE) model routes each token to only a subset of experts, so the number of activated parameters is far smaller than the total.

    Because decode is memory-bandwidth-bound, what determines speed is the number of activated parameters that must be moved per token, not the total parameter count. This means:

    • In bandwidth-constrained deployments, an MoE model with fewer activated parameters moves less data per token and can often deliver higher tokens/s.
    • The tradeoff is that MoE requires all experts to stay resident in memory, so total memory usage is larger and capacity requirements are higher.

    When selecting a model, then, distinguish two dimensions: throughput/speed depends on activated parameters and bandwidth, while whether it fits depends on total parameters and memory capacity. These need to be balanced on the specific hardware rather than decided by a single metric.

    6. Hardware and Memory: Tradeoffs on Unified-Memory Devices

    On a unified-memory architecture where the CPU and GPU share the same physical memory, data no longer has to be shuttled across a bus between devices. Combined with relatively high aggregate bandwidth, this fits the memory-bandwidth-bound nature of decoding particularly well. Here, models with fewer activated parameters and high bandwidth utilization tend to shine. A MoE model with an activated scale in the low tens of billions can often be faster than a dense model of similar perceived size on such devices—provided memory capacity is enough to hold all experts.

    Conversely, if a model’s total memory demand approaches the memory ceiling, paging or degradation can occur, and the speed advantage is erased or even reversed. So when evaluating options on unified-memory devices, be sure to watch both “activated scale” and “resident footprint”; together they determine real-world performance.

    7. How to Evaluate and Tune Properly

    To actually capture the acceleration benefits, evaluation must be systematic rather than intuition-driven:

    1. Stress-test per task category: Cover at least coding, math, reasoning, qa, rag, writing, roleplay, summarization, and multilingual, and record decode tokens/s, average latency, and acceptance rate for each. The strong task dependence of the acceptance rate means you must look at the numbers category by category.
    2. Set up control groups: On the same hardware, with the same quantization precision and the same input length, compare the baseline of “drafting/speculation off” against “on with different draft lengths K,” and derive the speedup ratio per category.
    3. Watch composite metrics: Beyond tokens/s, also look at end-to-end latency and stability on long inputs. Latency improvements are limited for short-output tasks and amplified for long-output ones.
    4. Decide by threshold: Enable acceleration for tasks whose acceptance rate is stably above the breakeven point; disable it for tasks with low acceptance rates, or reduce the draft length K to cut wasted overhead.
    5. Keep the methodology rigorous: Fix the random seed, warm up thoroughly, and exclude the effects of first-run compilation and caching so that noise does not distort your conclusions.

    A simplified model-selection flow:

    1. for each task category:
    2. measure baseline throughput(base_tps) and post-enable throughput(spec_tps)
    3. speedup = spec_tps / base_tps
    4. if speedup > 1.05 and acceptance rate is stable: enable acceleration
    5. elif acceptance rate is near the threshold: reduce draft length, then retest
    6. else: disable acceleration

    8. Engineering Practice Recommendations

    • Layered configuration by scenario: Predefine separate inference configurations (whether acceleration is enabled, draft length, concurrency limits) for different business scenarios, rather than a one-size-fits-all global setting.
    • Dynamic fallback: When a persistently low acceptance rate is detected, automatically fall back to regular decoding to avoid slowing down high-entropy tasks.
    • Dual constraints on capacity and speed: In capacity-limited environments such as unified memory, first ensure the model “fits stably with headroom to spare,” then pick the model size and architecture with the best speed within that feasible set.
    • Continuous regression: After frameworks and models are iterated, both the acceptance rate and implementation overhead can change. Fold per-task stress testing into routine regression so that gains do not quietly disappear after a version upgrade.

    9. Summary

    Speculative decoding and multi-token prediction are acceleration techniques that use “draft first, verify later” to compress serial decoding into parallel verification. Their effectiveness is jointly determined by the acceptance rate and the breakeven point: predictable tasks with high acceptance rates see significant gains, while high-entropy, high-divergence tasks can end up slower rather than faster. Layer on the architectural rule that “activated parameters determine speed while total parameters determine capacity,” plus the “high bandwidth, tight capacity” nature of unified-memory devices, and model and configuration selection must be grounded in controlled, per-task benchmark data. By hardening the workflow of “per-task measurement → threshold-based decision → dynamic fallback → continuous regression” into your engineering process, you can reliably capture the dividends of inference acceleration in real business settings, instead of being misled by counterintuitive results in individual scenarios.