Why Speculative Decoding Underperforms for Mid-Sized Dense Models on Unified Memory Devices
Speculative decoding often delivers significant speedups on server-class GPUs, but real-world tests on unified memory devices tell a different story. This article examines why a ~12B dense model with Multi-Token Prediction (MTP) showed negative acceleration (0.87x) despite healthy draft acceptance rates, while a larger MoE model ran faster than its baseline. It covers the memory-bandwidth bottlenecks behind the results, the relationship between task entropy and acceptance rates, framework implementation pitfalls, and practical recommendations for deploying speculative decoding on bandwidth-constrained hardware.
Why Speculative Decoding Underperforms for Mid-Sized Dense Models on Unified Memory Devices
1. Background: An Unexpected Benchmark Result
An open-source LLM family recently released a dense model in the ~12B range, filling the gap between its small edge models and larger mixture-of-experts (MoE) variants. Community developers added Multi-Token Prediction (MTP) support for this model in local inference frameworks, but benchmark testing on unified memory devices produced a counterintuitive result: the draft acceptance rate of speculative decoding typically fell between 0.6 and 0.8, yet overall decoding throughput was actually slower than the pure autoregressive baseline, with an overall speedup ratio of only about 0.87x — a negative speedup.
The contrast is striking: on the same device, a larger MoE model (~26B total parameters, ~4B activated per step) matched or slightly exceeded its baseline throughput when speculative decoding was enabled — and its baseline throughput (roughly 80 token/s) was already more than double that of the dense 12B model (around 36 token/s).
This raises a deeper question: why does speculative decoding — theoretically guaranteed to speed things up — become a negative optimization for dense models on unified memory devices?
2. How Speculative Decoding Works — and Its Hidden Assumptions
The core idea of speculative decoding is to use a lightweight draft mechanism (either a separate small model or the main model’s own MTP head) to guess multiple candidate tokens at once, then have the main model verify them in parallel, accepting all verified tokens in a single pass. Its benefit can be simplified as:
- The expected number of tokens accepted per step depends on the acceptance rate α, approximately (1-α^(k+1))/(1-α), where k is the draft length;
- The precondition for speedup is that the marginal cost of verification is low enough — i.e., a single forward pass verifying k+1 tokens should cost nearly the same as verifying one token.
On server-class GPUs with abundant memory bandwidth, compute utilization is often well below capacity, so verifying multiple tokens indeed carries low marginal cost. That’s why speculative decoding typically yields 1.5x to 2.5x speedups there. But on unified memory devices, this assumption does not hold.
3. Why Speculative Decoding Fails for Dense Models on Unified Memory Devices
3.1 Memory Bandwidth Is the Only Hard Constraint
Under a unified memory architecture, CPU and GPU share physical memory, and inference speed is almost entirely determined by memory bandwidth. For a dense 12B model, generating each token requires reading the full set of weights (roughly 6–8 GB after quantization). While weight reads can be reused when verifying k candidate tokens, attention computation, KV cache access, and the MTP head’s own overhead all increase in parallel. Once device bandwidth is already saturated, the marginal cost of verification no longer approaches zero, and the mathematical benefit of speculative decoding erodes.
3.2 Acceptance Rates Fail to Offset the Extra Overhead
Measured data shows acceptance rates vary significantly by task type:
| Task Category | Acceptance Rate | Decoding Speed Ratio |
|---|---|---|
| Coding | 0.76 | 1.18x |
| Retrieval-augmented | 0.81 | 0.98x |
| Multilingual | 0.72 | 0.83x |
| Humanities / Math / Reasoning | 0.58–0.61 | 0.79–0.87x |
| Creative writing | 0.58 | 0.74x |
Only highly structured coding tasks achieved positive acceleration (1.18x), because code contains many predictable, templated tokens. For open-ended, high-entropy writing, humanities, and reasoning tasks, draft hit rates dropped sharply — the compute wasted on verification could not be recovered, and overall speed fell more than 20% below baseline. This shows that the benefit of speculative decoding is fundamentally negatively correlated with the entropy of the generated content, not just dependent on the model itself.
3.3 Framework Implementation Flaws Amplify the Problem
Testing also exposed compatibility issues between the MTP implementation in the inference framework and this model architecture: acceptance rates were abnormally low and unstable, suggesting potential defects in draft token position alignment, sampling temperature handling, or cache state synchronization. The takeaway: when adapting speculative decoding to new model architectures at the framework level, always verify the theoretical acceptance rate floor with unit tests first — for a same-source MTP head, the acceptance rate should generally not fall below 0.7.
4. Why MoE Models Perform Better
The MoE model’s advantage lies in decoupling activated parameters from total parameters. With 26B total parameters but only ~4B activated per step, generating each token requires reading weights corresponding to only ~4B parameters (2–3 GB after quantization), placing far less pressure on bandwidth. This yields two benefits:
- Baseline throughput is already more than twice as high (~80 token/s vs. ~36 token/s);
- When verifying multiple candidate tokens, weight reads can be reused and compute units still have headroom, so the marginal cost of speculative decoding remains low — allowing it to match or slightly beat the baseline.
This reveals an important selection rule for unified memory devices: in bandwidth-constrained scenarios, sparsely activated MoE architectures are better suited for local inference than dense architectures of comparable total parameter count.
5. Practical Recommendations
- Measure acceptance rates before enabling speculation: Evaluate draft acceptance rates separately across task categories. If it falls below 0.65, disable speculative decoding for that workload.
- Use dynamic draft lengths: Adapt the number of draft tokens based on recent acceptance rates. For high-entropy outputs, shorten drafts or fall back to pure autoregressive decoding.
- Prefer MoE architectures: When deploying on unified memory devices, prioritize MoE models with small activated parameter counts over mid-sized dense models.
- Validate framework implementations: After integrating a new model, verify acceptance rates against a fixed test set to stay within a reasonable range, and watch for silent correctness and performance defects.
- Pay attention to quantization and caching: Speculative decoding is more sensitive to KV cache layout and quantization formats. Confirm your framework introduces no hidden overhead in that combination.
6. Conclusion
The value of this testing lies not in drawing conclusions about any specific model, but in dispelling a widespread misconception: speculative decoding is not a free lunch — its benefits depend heavily on hardware bandwidth headroom, task entropy, and implementation quality. On unified memory devices, MoE architectures, thanks to the bandwidth advantage of sparse activation, are often better suited than dense models as the primary choice for local inference. When making deployment decisions, developers should rely on measured data rather than theoretical speedup ratios, and where necessary, use general-purpose compute and inference services from cloud platforms such as Baidu AI Cloud to run larger-scale performance stress tests and comparative validation.
