NOC THOUGHTS
2026 SPECLocal AI & Agents

Testing Speculative Decoding on Qwen3.8-27B: Stock vs. Built-In MTP vs. DFlash2

Comparing stock decode, built-in MTP, and DFlash2 Q8_0 on Unsloth's Qwen3.8-27B UD-IQ4_XS split across an RX 6900 XT and GTX 1070 FE.

On This Signal (9 sections)
  1. Why Speculative Decoding Makes Sense Here
  2. The Model, Draft Heads, and Test Rig
  3. Test Fixtures and Controls
  4. The Numbers
  5. Decode Speed and Draft Acceptance
  6. Prefill, End-to-End Wall Time, Load Time, and Memory
  7. Where Speculative Decoding Helped and Where It Didn’t
  8. Why Built-In draft-mtp Won for My Setup
  9. Lessons Learned

A dense 27B model split across a 16 GB Radeon RX 6900 XT and an 8 GB GTX 1070 FE is useful right up until you are waiting on a 17 tok/s reply. That ceiling is the normal cost of reading ~13.3 GiB of weights across two GPUs for every generated token. Speculative decoding is supposed to buy back some of that time by letting a smaller drafter guess several tokens ahead and having the 27B model verify the batch in a single forward pass.

After updating my local llama.cpp build to b12927-ee46715, I tried the external Qwen3.8-27B-DFlash2-Q8_0.gguf drafter on the GTX 1070 FE with --spec-draft-n-max 7. On my first sweep, decode came back slower than what I remembered from the built-in Multi-Token Prediction (MTP) head. Rather than guessing at flags, I pulled the model out of llama-swap onto an isolated port and ran a five-way comparison: stock decode (no_spec), DFlash2 at depths 7, 3, and 2, and built-in draft-mtp.

Why Speculative Decoding Makes Sense Here

Autoregressive decode on consumer cards is mostly memory-bandwidth bound, not compute bound. Reading 13.27 GiB of UD-IQ4_XS weights across an RX 6900 XT (Vulkan0) and a GTX 1070 FE (CUDA0) to emit one token leaves plenty of shader and CUDA compute sitting idle. Verifying 3 or 4 candidate tokens in parallel costs almost the same memory read as generating 1 token.

When the drafter guesses right, you get several tokens out of a single pass over the weights. When it misses, you still pay for generating the rejected draft tokens plus the extra verification work. Push draft depth too far, or run a heavy external drafter on a GTX 1070 FE (Pascal, no Tensor Cores), and that overhead wipes out the gain.

The Model, Draft Heads, and Test Rig

Everything ran on the same workstation from my November 16 local LLM baseline:

  • Host: AMD Ryzen 7 5800X (8C/16T), 64 GiB DDR4-3800.
  • GPUs: Radeon RX 6900 XT (Navi 21, RDNA 2, 16,368 MiB VRAM, Vulkan0, LACT 255 W / −50 mV) + GeForce GTX 1070 FE (Pascal SM61, 8,192 MiB VRAM, CUDA0).
  • Runtime: llama.cpp b12927-ee46715 (local v1.1.0-dev build 25, mixed Vulkan + CUDA SM61).
  • Target model: Unsloth’s Qwen3.8-27B-UD-IQ4_XS.gguf (14,252,845,984 bytes / 13.27 GiB, SHA-256 40fac405...). From the GGUF v3 header (general.architecture = qwen35, general.quantized_by = Unsloth), it carries 65 blocks total (64 main transformer blocks plus 1 native MTP block, qwen35.nextn_predict_layers = 1), 5120 embedding dim, 24 attention heads / 4 KV heads, and a 262,144-token native context.

All five runs shared the same base serving flags (32,768 context, q8_0 K/V cache, Flash Attention enabled, 1024/512 batch/microbatch, thinking disabled, single slot), changing only the speculative options:

Terminal window
# Shared dual-GPU baseline (no_spec)
llama-server \
--model Qwen3.8-27B-UD-IQ4_XS.gguf \
--device Vulkan0,CUDA0 \
--split-mode layer \
--gpu-layers all \
--tensor-split 88,12 \
--override-tensor '^token_embd[.]weight$=Vulkan0' \
--ctx-size 32768 \
--cache-type-k q8_0 --cache-type-v q8_0 \
--flash-attn on \
--batch-size 1024 --ubatch-size 512 \
--reasoning off \
--parallel 1
# Built-in MTP (add to baseline; --spec-draft-n-max defaults to 3)
--spec-type draft-mtp
# External DFlash2 on GTX 1070 FE (add to baseline; tested with n-max 7, 3, and 2)
--model-draft Qwen3.8-27B-DFlash2-Q8_0.gguf \
--spec-type draft-dflash2 \
--spec-draft-device CUDA0 \
--spec-draft-n-max 3

That left two speculative paths to compare against stock decode:

  1. Built-in MTP (--spec-type draft-mtp): Uses the single MTP head already baked into Unsloth’s Qwen3.8-27B-UD-IQ4_XS.gguf, drafting at llama.cpp’s default depth of 3 (--spec-draft-n-max 3). There is no extra GGUF file to download, pin, or keep in sync across runtime updates.
  2. External DFlash2 (Qwen3.8-27B-DFlash2-Q8_0.gguf): A separate 1.92 GiB (2,056,414,816 bytes) Q8_0 draft model loaded on CUDA0 and tested at --spec-draft-n-max values of 7, 3, and 2. Because Vulkan0 already holds ~12.3 GiB of the 27B weights (leaving ~0.9–1.5 GiB free alongside a live Wayland desktop), the GTX 1070 FE is the only card with room for an extra ~2 GiB drafter.

Test Fixtures and Controls

To keep the comparison clean, I unloaded GPU models from llama-swap and started my local llama-server build directly on an isolated port for each of the five conditions, letting each process exit cleanly before starting the next. Every run used temperature: 0.0, seed: 20261202, and cache_prompt: false after a 4-token warmup, across three workloads:

  1. Short prose (~515–520 prompt tokens → 256 output tokens): A structured six-bullet infrastructure risk and resilience assessment over eight homelab records.
  2. Python code (90 prompt tokens → 320 output tokens): A self-contained Python 3.12 stdlib script to parse Cisco IOS CUBE debug ccsip messages logs and correlate SIP transactions.
  3. Long context synthesis (~13,680 prompt tokens → 256 output tokens): 144 varied chronological telemetry lines across ten infrastructure subsystems, asking for a structured bottleneck and remediation summary.

Per-process VRAM was sampled directly from AMD drm-memory-vram (/proc/<pid>/fdinfo) and nvidia-smi --query-compute-apps, alongside llama.cpp’s native timings counters (prompt_per_second, predicted_per_second, draft_n, draft_n_accepted) and total request wall time.

The Numbers

Decode Speed and Draft Acceptance

Condition Short Prose Decode (Accept) Python Code Decode (Accept) 13.7K Long Decode (Accept) Gain vs. Stock (Prose / Code / Long)
no_spec (stock baseline) 17.96 tok/s (—) 18.38 tok/s (—) 17.19 tok/s (—) baseline
dflash2 n=7 (CUDA0) 17.82 tok/s (22.7%) 28.01 tok/s (45.8%) 23.86 tok/s (39.4%) −0.8% / +52.4% / +38.8%
dflash2 n=3 (CUDA0) 23.91 tok/s (47.6%) 30.81 tok/s (71.4%) 24.77 tok/s (57.1%) +33.1% / +67.6% / +44.1%
dflash2 n=2 (CUDA0) 24.31 tok/s (59.5%) 28.46 tok/s (78.6%) 24.25 tok/s (69.5%) +35.4% / +54.8% / +41.1%
draft-mtp (built-in) 24.32 tok/s (52.2%) 29.80 tok/s (71.6%) 25.41 tok/s (65.1%) +35.4% / +62.1% / +47.8%

Prefill, End-to-End Wall Time, Load Time, and Memory

Condition Cold Load AMD Proc VRAM NV Proc VRAM Long Prefill (13.7K tok) Short Wall Code Wall Long Wall
no_spec 10.02s 12.31 GiB 2.35 GiB 440.09 tok/s 15.41s 17.69s 45.92s
dflash2 n=7 13.23s 12.34 GiB 4.94 GiB 376.97 tok/s 15.58s 11.73s 46.99s
dflash2 n=3 13.23s 12.32 GiB 4.94 GiB 377.32 tok/s 11.94s 10.70s 46.56s
dflash2 n=2 13.23s 12.32 GiB 4.94 GiB 377.79 tok/s 11.77s 11.55s 46.74s
draft-mtp 10.82s 12.32 GiB 2.96 GiB 371.75 tok/s 11.80s 11.05s 46.84s

Peak temperatures stayed tame across all five runs (57–61 °C AMD junction, 45–58 °C on the GTX 1070 FE). Process RSS stayed around 0.79–0.83 GiB in every condition.

Where Speculative Decoding Helped and Where It Didn’t

Looking at decode tok/s by itself hides two things that only show up once you put acceptance rate and wall time next to each other:

  1. Structured code is the clear sweet spot. On the Python CUBE log parser, predictable syntax, type hints, and standard-library boilerplate pushed draft acceptance past 71% for both draft-mtp (217/303 accepted) and dflash2 n=3 (217/304 accepted). Total wall time dropped from 17.69s down to 11.05s (draft-mtp, −37.5%) and 10.70s (dflash2 n=3, −39.5%).
  2. Short prose punishes over-drafting. At n=7, DFlash2 proposed 686 tokens to produce 256 and only landed 156 of them (22.7% acceptance). Running that many speculative steps on a GTX 1070 FE made dflash2 n=7 finish slightly slower than turning speculative decoding off completely (15.58s at 17.82 tok/s vs. 15.41s at 17.96 tok/s). Clamping DFlash2 to n=2 or n=3 brought short prose back to ~24 tok/s and cut wall time to ~11.8s.
  3. Cold long-context prefill takes a real hit. On the 13,680-token prompt, no_spec ran prefill at 440.09 tok/s (~31.1s), while every speculative mode dropped prefill to 371.8–377.8 tok/s (~36.2–36.8s). On a single-shot cold prompt with a short 256-token answer, the ~5.5 seconds lost in prefill offset the ~4.8 seconds saved during decode (45.92s stock vs. 46.56–46.84s speculative). At 13K+ context, speculative decoding pays off on multi-turn sessions with KV prefix caching or longer generations (500–2,000+ output tokens), where prefill is paid once and the +48% decode jump (17.19 → 25.41 tok/s) repeats on every turn.

Why Built-In draft-mtp Won for My Setup

DFlash2 at n=3 beat draft-mtp on pure Python code by 1.0 tok/s (30.81 vs. 29.80 tok/s, 0.35 seconds faster wall time). Everywhere else, built-in --spec-type draft-mtp either tied or came out ahead, and it is much easier to live with in day-to-day routing:

  • Consistent across workloads: Fastest on short prose (24.32 tok/s) and 13.7K long synthesis (25.41 tok/s), and practically tied on code (29.80 tok/s), without tuning n-max per task.
  • ~2.0 GiB less GTX 1070 FE VRAM: draft-mtp used 2.96 GiB on CUDA0 (leaving ~5.0 GiB free on the 8 GiB card) versus 4.94 GiB with DFlash2 Q8_0.
  • 2.4 seconds faster cold load: 10.82s vs. 13.23s every time llama-swap spins up the dual-GPU route on demand.
  • One fewer file to track: Because the MTP layer already lives inside Unsloth’s Qwen3.8-27B-UD-IQ4_XS.gguf, I do not have to keep a separate 1.92 GiB drafter on disk or chase draft-head compatibility across llama.cpp upgrades.

After the sweep finished, I switched qwen3.8-27b in llama-swap.yaml back to --spec-type draft-mtp, validated the config, and deleted Qwen3.8-27B-DFlash2-Q8_0.gguf.

Lessons Learned

  • Always keep no_spec in a speculative benchmark. Without the stock baseline, dflash2 n=7 hitting 28 tok/s on code would have looked like a win while quietly slowing short prose below stock speed.
  • Draft-depth defaults don’t travel cleanly across GPU generations. n-max 7 might pay off when an Ampere or Ada card runs the drafter, but on a GTX 1070 FE (Pascal) paired with an 88:12 Vulkan/CUDA split, n=2 to n=3 (or built-in MTP) is where acceptance stays high enough to beat verification overhead.
  • Watch wall time alongside decode tok/s. A +48% decode jump looks great on paper, but if a workload is one-shot long-document summarization with short answers and cold prefill, the prefill hit can eat the entire gain.
  • When a model already ships a working native MTP head, an external drafter has to earn its VRAM. An extra 2 GiB on the secondary GPU and another GGUF to maintain need to beat built-in MTP by more than 1 tok/s on one fixture to stay in the router.

ADJACENT SIGNALS // CONTINUE READING

Related field notes