Qwen3-30B-A3B-Instruct-2507 (IQ3_XXS GGUF) with a Multi-Token Prediction (MTP / nextn) head backported and trained from scratch, merged into a single GGUF as block 48.
Upstream llama.cpp has no MTP support for the qwen3moe architecture. This release
contains everything needed to run it:
| File | What it is |
|---|---|
Qwen3-30B-A3B-Instruct-2507-IQ3_XXS-MTP.gguf |
Base IQ3_XXS (579 tensors, untouched) + trained MTP block (15 tensors). SHA-256: c76bd7eadbeffad37506d3ac8cca876f32cbba5fd736124aa34fa7a832d9b8c3 |
qwen3moe-mtp.patch |
llama.cpp patch (2 files: src/models/qwen3moe.cpp, src/models/models.h) adding the MTP loader + draft graph for qwen3moe |
A stock llama.cpp build cannot load this GGUF — the loader rejects it with
wrong number of tensors; expected 594, got 579, because the stock qwen3moe loader
does not consume the MTP block. Apply the patch first:
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
git apply qwen3moe-mtp.patch
cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build -j --target llama-server llama-cli
(The patch was developed against llama.cpp git 1ab7e5ad2, 2026-09-25.)
./build/bin/llama-server \
-m Qwen3-30B-A3B-Instruct-2507-IQ3_XXS-MTP.gguf \
-ngl 99 -c 4096 \
--spec-type draft-mtp --spec-draft-n-max 1
concat[RMSNorm(h), RMSNorm(Emb(x_{t+1}))] → linear 4096→2048 → one Qwen3 block
(attention weights initialised from layer 47; dense FFN, intermediate 6144,
down-projection zero-initialised) → shared head norm → the model's own LM head.
65M trainable parameters. The backbone is completely frozen and untouched.[h, emb] — the patch's draft graph matches the trained
weights (this is the reverse of qwen35moe's order; do not "fix" it).Acceptance rate α (probability the drafted token matches the model's own greedy choice):
| Setting | α |
|---|---|
| Ground truth (teacher forcing, fp16 backbone) | 0.354 |
| True acceptance vs own outputs, Python speculative loop (fp16 + CPU offload) | 0.485 |
| llama.cpp, this GGUF, first draft position | 0.36 – 0.43 |
Speed (llama-server, greedy, 256 tokens, prompt: Japanese AI-history text):
| Regime | Base | MTP n_max=1 | MTP n_max=3 |
|---|---|---|---|
| GPU-resident (Tesla V100 32GB) | 116.8 tok/s | 119.0 tok/s (1.02×) | 78.2 tok/s (0.67×) |
CPU-MoE offload (-ncmoe 40, V100 + Ryzen 7 5700X) |
33.6 tok/s | 27.4 tok/s (0.81×) | 16.0 tok/s (0.47×) |
| Python harness (fp16, HF offload streaming) | — | 1.47× vs plain | — |
Under CPU-MoE offload, MTP makes generation slower, structurally. A verification forward over k tokens touches the union of the tokens' experts, so its cost grows almost linearly with k, while accepted tokens per forward grow sub-linearly. Even a perfect head (α = 1.0) would cap out around ~1.05× in this regime with n_max=1. Speculative decoding pays off when weight movement is charged per forward, not per token (weight-streaming offload, or GPU-resident compute-bound serving) — and even GPU-resident, the gain here is ≈1.02× because the acceptance against the IQ3_XXS-quantised backbone (0.36–0.43) is lower than against the fp16 backbone it was trained on (0.485). A quantisation-aware retrain of the head is the remaining lever for the GPU-resident case.
This release is published as a working, measured mechanism transplant — including the negative result — rather than as a speed product.