MTP on a 12B Open-Source Model: Why Speculative Decoding Ran Slower

    Multi-token prediction (MTP) is often treated as free speedup, but its real gains depend heavily on the model, the device, and the task. Drawing on public benchmarks of a ~12B open-source model running on unified-memory hardware, this article shows that enabling MTP with a draft length of 2 slowed overall decoding by about 13%: only coding improved (1.18x), while most tasks regressed. It explains how speculative decoding and self-speculation work, walks through a rough speedup model and a break-even estimate, analyzes why task types behave differently, contrasts the result with a ~26B MoE model that suits unified memory better, and offers practical A/B testing and tuning guidance.

    MTP on a 12B Open-Source Model: Why Speculative Decoding Ran Slower

    A recent open-source model family released a mid-size model with roughly 12 billion parameters. Sitting between small on-device models and large sparse Mixture-of-Experts (MoE) models, it drew plenty of discussion in the local-deployment community. One of the most talked-about topics was speculative decoding built on multi-token prediction (MTP). A developer testing it on a unified-memory device found that enabling MTP actually slowed overall decoding by about 13%, with gains holding only for coding tasks.

    The result is representative. Speculative decoding is often treated as “free speedup,” yet its performance varies widely across models, devices, and tasks. This article first reviews the principles and the conditions for speedup, then interprets a set of public benchmark data, and finally offers selection and tuning recommendations.

    1. Background: Where Mid-Size Models Sit and Where the Bottleneck Is

    By parameter scale, open-source models fall into roughly three tiers:

    • On-device small models: generally under a few billion parameters, suited to resource-constrained devices, with limited capability;
    • Mid-size dense models: from a few billion to tens of billions of parameters, with a clear jump in capability, but every generated token requires reading all weights;
    • Large MoE models: high total parameter counts, but each token activates only a few experts, suited to devices with ample memory capacity.

    In local inference, the bottleneck during token-by-token generation is often memory bandwidth rather than compute. Take a 4-bit quantized, ~12B model: the weights alone take about 7 GB, and each output token requires reading all of them at least once. By comparison, the matrix-multiply workload is modest, leaving much of the inference hardware’s compute idle. That is why “producing several tokens per step” has become one of the most valuable directions, and speculative decoding is a general approach to it. MTP is a self-speculative variant in which the model itself acts as the draft source.

    2. Principles: Speculative Decoding and MTP

    1. Core mechanism: draft, then verify

    Standard autoregressive decoding generates one token per step and must wait for the previous result. Speculative decoding splits single-step generation into two phases:

    1. Draft: a lightweight source (a small model, retrieval results, or the model’s built-in MTP prediction head) proposes several candidate tokens in a row;
    2. Verify: the target model runs a single forward pass to check these candidates in parallel. Positions accepted under the current sampling distribution are kept; at the first rejected position, a token is resampled from the corrected distribution, and the remaining candidates are discarded.

    As long as enough tokens are accepted per verification step on average, single-token decoding speed improves. The verification and correction stages preserve the output distribution, keeping it consistent with standard decoding. Note that many tools report a token-level acceptance rate, which is not the same as “tokens accepted per step”—the two have different meanings.

    2. Self-speculation: what MTP saves

    Draft sources fall into three broad categories:

    • Independent small model: uses an extra copy of memory, and differs in distribution from the target model;
    • Existing fragments from the prompt or retrieved context: mainly useful for copying and quoting tasks;
    • An MTP prediction head learned during the model’s own pretraining: adds few extra weights and is naturally aligned with the target model.

    MTP belongs to the third category: beyond the standard “predict the next token” objective, it trains an auxiliary head that predicts subsequent tokens. At inference, it takes the target model’s current state as input and autoregressively produces a candidate sequence, avoiding the overhead of a separate model.

    3. A rough estimate of the speedup conditions

    Let the per-position acceptance rate be p, the draft length be n, the extra per-step cost of the draft source be about c, and the target model’s single step take 1 unit of time. The decoding speedup can be approximated as:

    1. E(n) = p + p^2 + ... + p^n = p * (1 - p^n) / (1 - p)
    2. S(n) ≈ E(n) / (1 + n * c)

    Here E(n) is the average number of tokens produced per verification step. Taking n=2 and c≈0.1 as an example (two extra draft computations per step, roughly 0.2 of a target-model step):

    • p=0.5, S≈0.94;
    • p=0.6, S≈1.02;
    • p=0.7, S≈1.09;
    • p=0.8, S≈1.15.

    A longer draft is not always better. When p ≤ 0.5, E(2) = 0.75 stays below 2 × E(1) = 1.0, so extending the draft only adds wasted computation.

    Takeaway: speedup is only likely when p is high and c is low. When the acceptance rate is similar to typical text tasks (~0.6–0.7), even an optimistic estimate shows only a 10–20% gain; once c approaches 0.2–0.3, S drops below 1—a “negative speedup.”

    4. Illustrative code

    1. # Pseudocode: main loop for MTP self-speculative decoding
    2. draft_head.reset()
    3. for _ in range(step_budget):
    4. # 1. Roll out draft candidates from the model's current state
    5. candidates = [draft_head.predict(ctx) for _ in range(n)]
    6. # 2. One forward pass of the target model verifies all candidates in parallel
    7. accepted, next_state = target_model.verify(ctx, candidates)
    8. # 3. Roll back the cache used by rejected candidates and append the accepted ones
    9. cache.rollback_and_append(accepted)
    10. yield from accepted # yields 0 to n+1 tokens on average

    3. Reading the Benchmarks: A 12B Model Ran ~13% Slower Overall with MTP

    The public benchmark data below comes from an on/off comparison of MTP on a unified-memory device, with a draft length of 2. The table uses 10 standard evaluation tasks, and latency is the total time for each task from start to finish:

    Task category MTP off (t/s) MTP on (t/s) Decode speedup Acceptance
    coding 36.15 42.83 1.18x 0.76
    rag (retrieval-augmented) 37.08 36.26 0.98x 0.81
    qa (question answering) 37.45 32.68 0.87x 0.65
    math 38.11 33.01 0.87x 0.61
    roleplay 34.26 29.41 0.86x 0.61
    humanities 37.45 31.43 0.84x 0.58
    multilingual 36.65 30.47 0.83x 0.72
    reasoning 36.91 29.46 0.80x 0.61
    summarization 35.70 28.41 0.80x 0.64
    stem 36.18 28.66 0.79x 0.61
    writing 34.66 25.75 0.74x 0.58
    Overall 36.42 31.67 0.87x 0.64

    Three conclusions follow from the table:

    1. Coding is the only clear beneficiary. Its acceptance rate reaches 0.76 for a 1.18x speedup—the only result above 1.1x among all 11 rows.
    2. Most other tasks got slower. Overall it is 0.87x, with latency rising from 31.5s to 36.6s (~1.16x); writing drops to 0.74x, with latency climbing from 35.3s to 47.4s.
    3. Acceptance rate shows a counterintuitive pattern. Retrieval-augmented tasks have the highest acceptance (0.81) yet only reach 0.98x—essentially a wash; multilingual tasks (0.72) also failed to beat the baseline.

    1. A rough comparison against the model

    Using the overall data, p=0.64 and n=2 give E≈1.05. Even with c=0.1, the theoretical ceiling is only 1.05/1.2≈0.88. This explains the overall 0.87x result and suggests the draft stage likely costs more than expected. Look at coding: E≈1.34 but the actual result is 1.18x, which implies a cost well above 0.2—possibly tied to a known flaw in the speculation stage. Extrapolating, if draft cost dropped to around 0.2, the overall figure could recover to roughly 1.05x, and coding could reach about 1.34x.

    2. A rough break-even estimate

    Using a roofline-style rough calculation—where the draft consumes compute and verification raises parallelism—let the target model’s utilization during verification be about k times that of standard decoding (so the matrix computations from extra candidates are amortized):

    1. S ≈ E(n) / (n / k + 1)

    With k=2, the break-even point corresponds to E≈1.5, or an average acceptance rate of about 0.62. The overall acceptance rate of 0.64 sits just above this line, while coding’s 0.76 is clearly above it. This formula is a drastic simplification; real values are also affected by cache management, the sampler, and hardware implementation. It is used only to illustrate that “acceptance rate and draft cost together determine success or failure.”

    3. Why task types differ

    • Coding: code indentation, bracket matching, and fixed API usage are highly structured. Once a draft hits, the predictability of subsequent tokens increases further.
    • Writing and humanities: wording is varied and expression is divergent, so p is lowest (0.58) and the negative speedup is most pronounced.
    • Retrieval-augmented: the input already contains source text that can be copied, so draft and verification distributions align, giving the highest acceptance. But these tasks usually have long inputs, where prefill and KV-cache reads dominate; under long contexts, the target model’s per-step cost rises, diluting the relative gain from speculation.
    • Multilingual: with fewer interaction turns and short outputs, acceptance decays as the draft chain advances, and the share of fixed overhead is amplified.

    4. Inherent weaknesses of self-speculation

    • Error accumulation: MTP drafts are generated autoregressively from the model’s own state. Once an earlier candidate drifts, acceptance for subsequent candidates drops quickly.
    • Backbone capacity coupling: the prediction head shares the backbone’s representation. The longer and more semantically complex the context, the less stable draft quality becomes—yielding “high acceptance at simple repetition, low acceptance at complex reasoning.” The complex tasks users care about most are precisely the low-acceptance ones.

    5. Engineering implementation decides the outcome

    On unified-memory terminals, common engineering risks for speculative decoding include:

    • inconsistencies in cache, positional encoding, or sampler between the prediction head and the backbone;
    • frequent memory-layout switching;
    • lack of batching or parallel-graph optimization.

    All of these inflate c. In this case, the prediction stage is suspected of a known issue, which only shows that MTP is not yet practical under this particular implementation—it does not rule out the technique as a whole.

    4. Why a 26B MoE Model Fits Unified-Memory Devices Better

    Another dataset in the same report shows: on a MoE model with about 26 billion total parameters and roughly 4 billion activated per token, with a draft length of 3, coding speed rose only slightly from 79.82 t/s to 80.10 t/s (1.00x), while latency dropped from 13.5s to 13.0s (1.03x), at an acceptance rate of 0.71. For unified-memory devices, this type of model offers:

    1. Fewer weights read per pass. Output speed is mainly constrained by how many weights must be read. At 4-bit quantization, ~4B activated parameters correspond to only about 2 GB—roughly a third of the 12B dense model above (~7 GB). MoE uses more memory overall but reads far less per step, which explains the observed gap between ~80 t/s and ~36 t/s.
    2. Natural alignment between backbone and draft. The prediction head shares the same sparse routing and activation path as the backbone, so draft quality stays more stable on patterned tasks such as coding and code completion. Acceptance holds around 0.71, delivering about a 10% latency improvement with n=3.
    3. The cost is memory usage. All experts stay resident in memory, multiplying the device’s capacity requirements and making expert scheduling more complex.

    This leads to a practical selection principle:

    • Ample device memory: prioritize MoE models with fewer activated parameters;
    • Limited device memory: lower the quantization bit width and control context length rather than counting on MTP;
    • Neither option is ideal: consider pairing a smaller, more “aligned” draft model with the target model instead of relying on a prediction head.

    5. Deployment Recommendations

    1. Run an A/B benchmark before going live

    With fixed sampling parameters, run an on/off comparison and record decode speed, end-to-end latency, acceptance rate, and power draw per scenario:

    1. # Illustrative command (tool-agnostic)
    2. bench_compare.py --baseline no_draft.json --speculative mtp_n2.json

    Cover at least four scenarios: code generation, long-form writing, multi-turn Q&A, and retrieval augmentation. Use time per output token (TPOT) rather than time to first token (TTFT) alone as the core metric, since speculation mainly affects the output stage.

    2. Tune parameters by scenario

    • For long-form generation, where acceptance decays as the sequence progresses, shorten the draft length;
    • For structured-output scenarios, increase the draft length moderately;
    • For low-acceptance scenarios such as writing and humanities, turn speculation off directly;
    • If the inference engine supports it, configure adaptive draft length.

    3. Separate the two kinds of “length” bottleneck

    • Short input, long output: the decode stage dominates, and both speculation and KV-cache optimization pay off clearly;
    • Long input, short output: prefill and KV reads dominate, so prioritize context management, cache reuse, and scheduling.

    4. Choose by deployment form

    • Low concurrency, low latency: suited to single-request speculative decoding;
    • High concurrency: continuous batching already keeps the compute units saturated, so the marginal gain from speculation diminishes while adding memory and cache-management overhead—prioritize scaling instances and optimizing batch scheduling;
    • Cloud deployment: store the model and draft head together in object storage, deliver inference as a service via containers, and continuously monitor throughput and latency metrics with logging and alerting services.

    5. Keep observability and a rollback switch

    Monitor acceptance rate, tokens produced per step, and TPOT. Give speculative decoding its own toggle so it can be turned off quickly if quality or speed regresses.

    6. Conclusion

    This discussion shows that speculative decoding is not “free speedup” but a conditional optimization with real costs. Only two things decide its value: whether the draft stage is cheap enough, and whether the draft is aligned enough with the target model. That a 12B dense model slowed down overall on a unified-memory terminal is a reminder that a single optimization cannot be transplanted across scenarios. Only by evaluating model architecture, memory architecture, task type, and inference-engine implementation together can you arrive at a solution that actually works in practice.