Speculative Decoding for Open-Source LLMs: Why the Acceptance Rate Determines the Speedup
Speculative decoding promises to accelerate LLM inference, but its real benefit hinges on a single metric: the acceptance rate. This article explains how speculative decoding and multi-token prediction (MTP) work, why longer drafts don't guarantee speedups, and why the technique can sometimes slow inference down. It presents a reproducible evaluation method built on control baselines, per-task breakdowns, decode speed and end-to-end latency, and acceptance-rate tracking, and shows how predictability varies across tasks such as code, math, and creative writing. It also covers model-selection trade-offs on bandwidth-constrained unified memory devices and offers engineering practices for deploying and tuning speculative decoding reliably.
Introduction: The “Tiered” Trend in Open-Source Model Families
Over the past two years, open-source LLM families have evolved along a clear trajectory: vendors no longer ship a single flagship but instead build a “tiered” model matrix spanning different compute tiers. A typical three-layer structure includes:
- Ultra-small models for end-user and edge devices
- Medium-parameter models for a single GPU or workstation
- Server-side mixture-of-experts (MoE) models with sparse activation
This tiered layout solves a real engineering pain point: different deployment scenarios impose vastly different constraints on memory, bandwidth, latency, and power. A newly added medium-parameter dense model that fills a family gap usually sits in a sweet spot: more capable than edge small models, and more resource-efficient than large MoE models. Around such a model, developers care less about “how many parameters” and more about “how fast it runs on my hardware and whether it’s worth using.” This is precisely the backdrop against which inference-acceleration techniques like speculative decoding are widely discussed.
Speculative Decoding and Multi-Token Prediction: How the Acceleration Works
Autoregressive generation is fundamentally “token-by-token decoding”: each token requires a full forward pass, and during decoding this computation is typically memory-bandwidth-bound. The GPU/NPU’s compute capacity is largely idle, and the bottleneck lies in repeatedly moving weights.
The core idea of speculative decoding is “punch above your weight and verify in batch”:
- Draft phase: A lightweight mechanism (either an independent small model or a built-in “multi-token prediction” head inside the large model, i.e., MTP) predicts several candidate tokens at once.
- Verification phase: The target large model runs a parallel forward pass over the candidate tokens, determining in one shot which can be accepted and from which position rollback and recomputation are needed.
Because verification is a single parallel computation rather than multiple serial decodes, as long as the draft is accurate enough, one forward pass can produce multiple tokens, spreading out the memory-bandwidth pressure. MTP (Multi-Token Prediction), as a capability introduced during training, gives the model a built-in “self-speculation” draft ability without an external small model, making deployment simpler.
The Core Variable of Acceleration: Acceptance Rate
Whether speculative decoding can accelerate hinges almost entirely on one metric: the acceptance rate, the proportion of draft tokens accepted by the target model.
Think of it as a bet:
- High acceptance rate → most draft tokens are correct → one verification delivers multiple tokens → clear speedup
- Low acceptance rate → drafts are frequently rejected → much speculative computation is wasted, plus extra verification and rollback overhead → net gain can be negative
This is also why “increasing draft length” is no cure-all. If a model’s acceptance rate is only around 0.6, longer drafts mean more wasted rejected tokens at the tail, dragging down overall throughput. What determines the speedup ratio is not the number of draft tokens, but the interplay between the acceptance rate and verification overhead.
Why Does Speculative Decoding Sometimes Get Slower? — Bottleneck Analysis
Many teams are puzzled after testing: enabling speculative decoding actually reduces speed. The reasons usually come down to a few points:
- Low acceptance rate: When the task itself is inherently hard to predict, the draft hit rate is naturally insufficient.
- Underestimated verification and rollback costs: Parallel verification saves serial passes but is not zero-cost; once drafts are rejected en masse, the waste from rollback recomputation plus speculative overhead outweighs the gains.
- The burden of the draft mechanism itself: An external small model consumes extra memory and bandwidth; even a built-in MTP head adds computation and memory access to each forward pass.
- Mismatch between memory access and compute: In scenarios already memory-bandwidth-bound during decoding, speculative decoding’s value comes from “trading surplus compute for bandwidth.” But if the hardware bottleneck isn’t bandwidth, or if draft overhead consumes that surplus compute, speedup becomes impossible.
One point worth emphasizing: speculative decoding partially converts a memory-bound decode into a compute-bound verification. Whether it pays off depends on which stage your hardware bottleneck actually lies in.
How to Scientifically Evaluate the Real Benefits of Speculative Decoding
To avoid drawing conclusions by gut feeling, you need a reproducible evaluation method. The core principles are:
- Set a control baseline: On the same model, hardware, and set of tasks, compare “speculation off (draft length = 0)” against “speculation on (different draft lengths).”
- Break down by task rather than testing only the overall average: An overall average masks huge differences between tasks, so you must report separately by category such as code, math, Q&A, writing, multilingual, and roleplay.
- Focus on two core metrics: decode speed (tokens/s) and end-to-end latency (time per request); the two sometimes lead to different conclusions.
- Always record the acceptance rate: Looking at the acceptance rate alongside the speedup ratio is the only way to pinpoint “why it’s slow.”
A conceptual evaluation result usually looks like this (illustrative, to demonstrate the method rather than specific product data):
Category Baseline t/s Speculative t/s Speedup Acceptance RateCode 36.2 42.8 1.18x 0.76Math 38.1 33.0 0.87x 0.61Roleplay 34.3 29.4 0.86x 0.61Overall 36.4 31.7 0.87x 0.64
Two conclusions follow from this typical distribution: first, only high-acceptance tasks (like code, with roughly 0.76 acceptance) truly accelerate; second, tasks with acceptance rates generally around 0.6 slow down across the board, as speculative overhead eats up the time that should have been saved. This confirms the earlier judgment: the acceptance rate is the crux.
Task Differences: Why Code and Creative Work Accelerate Differently
The same speculative configuration performs wildly differently across tasks, and the root cause is the task’s predictability:
- Code, structured output: Strong syntactic constraints and highly regular patterns make drafts easy to hit, yielding high acceptance and clear speedup.
- Math, reasoning, Q&A: Many logical branches, with correct answers converging to a few tokens, lead to medium-to-low acceptance.
- Writing, roleplay, creative generation: Divergent expression and uncertain direction cause drafts to be frequently rejected, so speculation often isn’t worth it.
Therefore, speculative decoding is better suited to high-determinism workloads and poorly suited to high-divergence workloads. Before going live, sampling the acceptance rate against your actual task distribution is the first step in deciding whether to enable it.
Model Selection Considerations on Unified Memory Devices
On platforms with unified memory (CPU and GPU sharing the same physical memory), memory and memory bandwidth are often hard constraints. Here is a counterintuitive but important piece of experience:
A MoE model that activates far fewer parameters than its total often runs faster than a dense model of equivalent “total size.” Because MoE activates only a small subset of experts per forward pass, the weights that actually need to be moved are fewer, easing the bandwidth pressure; a dense model reads all parameters every time.
This yields a selection insight: on bandwidth-constrained unified memory devices, “total parameters” is not the only metric; “the parameters actually activated or moved per forward pass” matters more. A sparsely activated medium-scale MoE may balance capability density and inference speed, making it more cost-effective than blindly chasing larger models or stacking on speculative decoding.
Engineering Implementation Recommendations
Overall, for inference optimization around open-source LLMs, a practical path works as follows:
- Measure the acceptance rate before talking about acceleration: Sample acceptance rates on real business corpora, and disable speculation outright for scenarios below the threshold.
- Configure per task tier: Enable speculation for high-determinism scenarios like code, and fall back to conventional decoding for creative scenarios.
- Watch memory-access bottlenecks and model form: On bandwidth-constrained devices, favor sparsely activated architectures over simply stacking parameters.
- Build a sustainable evaluation pipeline: Fold the control baseline, per-category metrics, and acceptance rate into routine regression, avoiding a “one change, one lucky shot” approach.
At the infrastructure level, mature cloud platforms typically offer a general set of capabilities to support this kind of work: using a container platform to quickly spin up reproducible inference environments, object storage to archive model weights and evaluation datasets, monitoring and alerting to continuously track throughput and latency, and a log service to accumulate each experiment’s parameters and conclusions. General product categories like these, offered by Baidu AI Cloud, are exactly the key foundation for turning “speculative decoding tuning” from a one-off experiment into a long-term operational capability.
Summary
Speculative decoding and multi-token prediction are no free lunch; their acceleration is essentially a three-way interplay between the acceptance rate, verification overhead, and hardware bottlenecks. What truly determines success is not draft length, but whether task predictability matches the hardware’s memory-access characteristics. Developers should abandon the “enable it and it’s faster” intuition and adopt a systematic engineering approach centered on the acceptance rate, per-task evaluation, and model-architecture selection. Only then can the rich choices brought by the tiered layout of open-source LLMs be converted into real, stable, and measurable inference performance gains.
