Hi there.
Last night on r/LocalLLaMA, u/ilintar announced that am17an’s MTP PR had gone into beta. 334 upvotes in a few hours, and this line to close it: “expect most performance gaps between llama.cpp and vLLM… to be erased.”
On my machine, plain llama.cpp runs at 35 t/s (tokens per second; a token is a piece of a word, about 3/4 of an English word). With PR #22673 and the right model file, I get 78 t/s, which is +123%. And I didn’t need any of the hacks I usually stack (Genesis, Lucebox, HAMi). Here’s how it went.
Background: MTP was in vLLM, not in llama.cpp
Two inference engines come up all the time on this blog. llama.cpp is a C++ engine that loads GGUF files and is very good for a single user; llama-server is its OpenAI-compatible HTTP server. vLLM is a Python/CUDA engine built to serve many users at once, heavier, and faster under concurrency.
MTP (Multi-Token Prediction) is a form of speculative decoding. The idea behind speculative decoding: a small, fast “drafter” guesses the next few tokens, the big model checks them all in one pass and keeps the ones it agrees with. The output is the same as normal generation, but there are fewer expensive steps. With MTP, the drafter isn’t a separate model: it’s a prediction head built into the model and trained to predict several tokens ahead. If a good share of the guessed tokens gets accepted (that share is the acceptance rate), you go roughly 2× faster.
Qwen trained Qwen3.6 with this MTP head. vLLM has been able to use it for a while (--speculative-config '{"method":"mtp","num_speculative_tokens":3}'). llama.cpp couldn’t, until Aman Gupta’s PR #22673, opened May 4, 2026. A PR is a proposed change on GitHub; until it’s “merged”, it isn’t in the main code.
The PR adds:
- an
mtpoption in the--spec-typemenu; - the pipeline that shares hidden states (the model’s internal representations) between the main model and the MTP head;
- support for Qwen3.6 27B and 35B-A3B.
Aman tests on a DGX Spark, and the Reddit community jumped in fast:
- alexandrupetraru: Strix Halo, Qwen3.6-35B-A3B at q8, from 40 to 70 tg/s (+75%);
- GloballyUniquePlaceholder: 3060 Laptop 6GB + 64GB RAM, with a real speedup;
- superjamie: 3× RTX 3060, tested OK with
RDson/Qwen3.6-27B-MTP-Q4_K_M-GGUF.
Nobody had tested it on a consumer Blackwell GPU yet. My Olares One is a good candidate: it’s a mini-PC running Olares (a self-hosted OS built on Kubernetes), with an RTX 5090 Laptop GPU (which I call the 5090M), 24 GB of VRAM, and the consumer Blackwell architecture, whose technical name is sm_120.
The build: am17an/mtp-clean + sm_120
PR #22673 lives on the mtp-clean branch of the am17an/llama.cpp fork. Five commits:
1a4fe4e llama: allow partial seq_rm for GDN models for spec decoding
589490f add enum for part sequence removal
c5e0227 rename rollback to rs_seq
10829db llama + spec: MTP support
f8c6b03 add qwen35moe_mtp
I usually run buun-llama-cpp, a llama.cpp fork that adds DFlash (more on that below). Rather than cherry-picking these commits into it, I built straight from am17an’s branch in minimal mode: just llama-server for Qwen3.6 27B, compiled natively for sm_120.
FROM nvidia/cuda:13.1.0-devel-ubuntu22.04 AS build
RUN git clone --depth 1 --branch mtp-clean \
https://github.com/am17an/llama.cpp /src/llama.cpp
WORKDIR /src/llama.cpp
RUN cmake -B build \
-DGGML_CUDA=ON -DGGML_CUDA_NO_VMM=ON \
-DCMAKE_CUDA_ARCHITECTURES=120 \
-DLLAMA_CURL=ON \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,/usr/local/cuda/lib64/stubs" \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build -j$(nproc) --target llama-server
2h of cross-compile on OrbStack on my Mac. The result is the image aamsellem/llamacpp-mtp:0.1.0, 2.62 GB. No Genesis patches, no DFlash custom kernels, no Lucebox: llama.cpp plus one PR, that’s all.
The GGUF: RDson/Qwen3.6-27B-MTP-Q4_K_M-GGUF
GGUF is the file format llama.cpp loads. To fit in 24 GB, you use a quantized version of the model: the weights are stored with fewer bits (Q4_K_M is about 4 bits per weight instead of 16).
To use MTP with llama.cpp, the GGUF has to contain the MTP head. The standard Qwen3.6-27B Q4_K_M from unsloth doesn’t, because standard quantization strips it out.
Luckily, RDson made a quant with ik_llama that keeps it:
- a single file,
Qwen3.6-27B-MTP-Q4_K_M.gguf, at 16.49 GB; - it fits on 24GB with a comfortable margin;
- it’s compatible with PR #22673.
am17an also published a Q8_0 on his repo, but at 28 GB it doesn’t fit in 24GB.
llama-server config
llama-server \
--model /models/Qwen3.6-27B-MTP-Q4_K_M.gguf \
--host 0.0.0.0 --port 8000 \
--n-gpu-layers 99 \
--ctx-size 32000 \
--threads 16 \
--batch-size 256 --ubatch-size 64 \
--parallel 1 \
--flash-attn on --jinja \
--spec-type mtp \
--spec-draft-n-max 4 \
--chat-template-kwargs '{"enable_thinking": false}'
What matters in that command:
--spec-type mtpis the new option from PR #22673.--spec-draft-n-max 4sets how many tokens get guessed per step. USBhost on Reddit found 4 to be the best setting, so I kept their number.- There’s no
--model-draft, because the MTP head is inside the model and there’s no separate drafter to load. enable_thinking: falseis recommended everywhere: the draft head never saw<think>tags during training.--ctx-size 32000is the context window, the number of tokens the model keeps in view.
The bench
Three Space Invaders prompts (I ask the model to write the game in HTML), max_tokens=800, temp=0.6, top_p=0.95:
Run 1: 800 tok in 10.68s = 74.91 t/s
Run 2: 800 tok in 9.93s = 80.60 t/s
Run 3: 800 tok in 10.15s = 78.78 t/s
Average: 78.1 t/s [74.9-80.6]. That’s generation (decode) speed, meaning how fast the answer gets written.
Same-machine comparison (Olares One, RTX 5090M 24GB sm_120)
In this table, the middle column is average generation speed and the last one says what you have to maintain to run the stack.
| Stack | t/s avg | Stack complexity |
|---|---|---|
| llama.cpp standard (no spec) | 33-36 | pure upstream |
| llama.cpp + MTP (PR #22673) | 78.1 | pure upstream + 1 PR |
| buun-llama-cpp DFlash + Q8_0 GGUF drafter | 80 | llama.cpp fork |
| vLLM Turbo (Genesis 28 patches + TurboQuant K8V4 + MTP n=3) | 88.0 | vLLM + 28 patches + custom image |
| Lucebox v1.6.0 (PR #94 + q4_0 KV + DDTree 22) | 88.7 | custom engine + libvgpu hot-swap + 4 workarounds |
Some pointers for the bottom rows. DFlash is another speculative decoding method, with a separate small drafter model that predicts a block of tokens; buun-llama-cpp is the llama.cpp fork that implements it. Genesis is a set of 28 patches I apply to vLLM to get it running on this card. Lucebox is a custom engine that, on Olares, needs a hot-swapped libvgpu.so (the library from HAMi, the layer that shares and limits the GPU between pods).
MTP in llama.cpp gives +123% over baseline. That’s more than alexandrupetraru’s +75% on Strix Halo. My guess: on the 5090M the baseline starts lower because it’s more bound by memory bandwidth (more than sm_122), so there’s more to gain.
Why 78 and not 88
MTP gives about 2× over baseline (around 75% acceptance on 4 guessed tokens). Well-tuned DFlash, with a dedicated drafter and custom kernels, gives more like 2.5 to 3×. Above MTP in llama.cpp, I have:
- buun DFlash at 80 t/s: a Q8_0 quantized GGUF drafter and a
spec-type dflashtuned for sm_120; - vLLM Turbo at 88 t/s: the 28 Genesis patches, which unlock the TurboQuant K8V4 KV cache and MTP n=3;
- Lucebox at 88.7 t/s: the custom test_dflash engine with tuned DDTree budget.
All three need a fork or patches. MTP in llama.cpp is the only one of these that will be merged into the official code, as soon as the PR review wraps up.
What changes once the PR is merged
Once PR #22673 lands in ggml-org/llama.cpp master, anyone can pull ghcr.io/ggml-org/llama.cpp:server-cudaXY-bNNNN, download a Qwen3.6 GGUF with the MTP head, and get around 78 t/s on a 24GB consumer mobile Blackwell, with no fork to maintain.
It’s not the record (Lucebox is at 88.7), but it’s reproducible with one docker pull and one huggingface-cli download. It’s also maintainable, because upstream llama.cpp won’t break under you the way a fork can. And it works with LM Studio, Open WebUI or Ollama, which consume official llama.cpp.
For end users, that’s what really matters. Forks stay the right answer for record benchmarks; upstream MTP will be the right answer for wide distribution.
May 6 update: pushing to 128K context, 65 t/s
I bumped the llamacppqwen36mtpone app to v1.0.3 with two changes:
- I switched the GGUF to
froggeric/Qwen3.6-27B-MTP-GGUF(instead of RDson). It became the community’s reference quant after the May 6 post that hit 678 upvotes (ex-arman68 relaying froggeric). - I pushed the context to 128K (from 32K), with
--cache-type-k q4_0 --cache-type-v q4_0and--spec-draft-n-max 5. 128K tokens is about a 300-page book.
The KV cache is the model’s memory of what it has already read in the conversation; it grows with the context and takes VRAM. The q4_0 options store it in 4 bits to fit more context, at a small cost in speed or quality.
Ouch: froggeric’s official table says “24 GB | Q4_K_M | q4_0 | 262K | 22.8 GB”, but it doesn’t count the MTP draft compute buffer, the working memory the MTP head needs. At 262K my pod crashes with graph_reserve: failed to allocate compute buffers / failed to create MTP context, and the server falls back to non-MTP mode at 37 t/s.
At 128K it holds:
prompt eval time = 94.28 ms / 22 tokens ( 4.29 ms per token, 233.36 tokens per second)
eval time = 44.86 s / 2921 tokens ( 15.36 ms per token, 65.11 tokens per second)
draft acceptance rate = 64.15% (2226/3470)
The eval time line gives generation speed and the last line gives the acceptance rate of the guessed tokens. Result: 65 t/s at 128K with 64% acceptance. That’s 17% slower than at 32K, but with 4× the context, which is a good trade for coding agents that read large codebases.
The real VRAM math on 24GB with Q4_K_M and MTP:
- the model takes 15.82 GiB, leaving 8 GB;
- the q4_0 KV cache on the 16 full-attention layers at 128K takes about 2 GB, leaving 6 GB;
- the MTP draft compute buffer takes about 2 GB, leaving 4 GB of headroom.
At 262K the KV cache eats 4.3 GB and there’s nothing left for the MTP draft buffer. To go further, you’d switch to IQ4_XS (-1.5 GB on the model) or IQ3_M (-3 GB), two slightly more compact quantizations.
To follow the merge
- The PR: https://github.com/ggml-org/llama.cpp/pull/22673
- Status as of May 6: OPEN, BLOCKED (in review). 59 comments, with lots of positive community tests on 4+ different hardware setups (3090, A5000, 5080, 5090M, V100 32GB, Strix Halo).
- Once merged, it will be in the next numbered llama.cpp build (probably b9040+).
- am17an will publish an official image; otherwise wait for
ghcr.io/ggml-org/llama.cpp:server-cuda13-bNNNNonce it ships.
Credits
- am17an (Aman Gupta) for PR #22673 and the Q8_0 GGUF
- u/ilintar for pushing the announcement on r/LocalLLaMA
- RDson for the MTP-enabled Q4_K_M quant that fits 24GB
- alexandrupetraru, USBhost, superjamie and GloballyUniquePlaceholder for the community benchmarks that validated the PR before I tested it
That’s it! If you run on a 5090M / 4080M / 3090 24GB and reproduce these 78 t/s (or beat them with a --spec-draft-n-max sweep), send me your numbers. See you next time!
Disclosure — All the benchmarks in this post run on my own Olares One. If the content was useful and you’re considering one, ordering through this referral link gets you $300 off ($4,699 instead of $4,999), stackable with the $300 Black Friday discount starting November 17: $600 off in total ($4,399). I’m mentioning this out of transparency — and yes, incidentally, it helps keep the blog alive (hosting, domain, and the time I spend writing here).