December 1, 2026
cover_final_1-en
  • Channel: GeekLab AI (Single-GPU Local LLM Benchmarking)
  • Focus: Parallel Speculative Decoding · Local AI Coding · 128K Long-Context VRAM Tuning
  • Bottom Line: Without upgrading the GPU or dropping main-model weight precision, Tencent’s open-source DSpine parallel speculative decoding accelerates Qwen3.8-27B (UD-IQ4_XS) on a single 24GB AMD Radeon RX 7900 XTX (Windows 11) from 66.97 s down to 17.15 s on an identical interactive webpage coding task (41.71 → 161.18 tok/s, 3.87x faster), reaches 186.10 tok/s on a 6,673-token long-code UI run, and cuts a 120,931-token 128K document run from ~17 minutes down to 3m 45s by switching only the main model’s KV cache from q8_0 to q4_0.

1. Why Local 27B Coding Feels Sluggish (and How DSpine Fixes It)

Running a 27B–32B open-weight coding model locally gives you strong code quality, yet generating a complete interactive HTML, React, or Python module often leaves you staring at the terminal for over a minute.

The bottleneck is standard autoregressive decoding: for every single output token, the GPU must stream the entire 27B weight set through memory bandwidth. On consumer 24GB GPUs, generation speed is memory-bandwidth bound rather than compute bound.

Traditional speculative decoding (such as MTP) takes a first step by having a small draft model guess a few tokens ahead for batch verification, yet the draft model itself still predicts sequentially.

Tencent’s open-source DSpine (Draft in Parallel, Condition Through Depth) introduces parallel draft blocks (tested here with b16 block structure and n-max = 15). In a single forward pass, the draft model proposes an entire block of candidate tokens in parallel, and the 27B main model verifies them together—accepting the longest matching prefix and discarding any mismatch. Main-model weights and output distribution remain completely lossless.

Crucially, DSpine is not locked to one GPU vendor: upstream ecosystems already support llama.cpp, vLLM, SGLang, and MLX across NVIDIA CUDA, AMD ROCm/HIP, and Apple Silicon.


2. Test Bench & Controlled Methodology

To avoid misleading short-prompt burst charts, all controlled benchmarks below ran cold on the exact same machine, weights, and greedy decoding settings (temperature=0, top_k=1, top_p=1, seed=42, cache_prompt=false, single slot):

Component Verified Spec
Host & OS AMD Ryzen 7 3700X · 96GB DDR4-3200 · Windows 11
GPU Single AMD Radeon RX 7900 XTX 24GB (24,560 MiB dedicated VRAM, gfx1100, driver 32.0.32015.7029)
Inference Engine llama-server.exe (based on Ajay9o9/llama.cpp dspine branch, Clang 24.0.0 Windows AMD64 build)
Main Model (Locked) Qwen3.8-27B-UD-IQ4_XS.gguf (14.25 GB)
Mode A (Plain) No draft model: -np 1 -ngl 999 -fa on --cache-type-k q8_0 --cache-type-v q8_0
Mode B (MTP) mtp-Qwen3.8-27B-Q4_0.gguf (--spec-type draft-mtp --spec-draft-n-max 2)
Mode C (DSpine) Qwen3.8-27B-DSpine-b16-Q4_K_M.gguf (--spec-type draft-dflash --spec-draft-n-max 15 --spec-draft-n-ubatch 16)

3. Core Benchmarks: 66.97 Seconds Down to 17.15 Seconds

3.1 Controlled Long-Code Benchmark (T06 · 32K Context · Interactive Web Dashboard)

All three modes received the exact same 300-token coding prompt (max_tokens=4096, thinking off): build a single-file dark-mode data-center IT energy & PUE SVG dashboard with a month-range slider, an annual average PUE reference toggle, and hover tooltips.

Mode Output Tokens TTFT Total Wall Time Sustained Decode Speedup vs Plain Peak Dedicated VRAM
Mode A · Plain 2,745 1.178 s 66.97 s 41.71 tok/s 1.00x (Baseline) 14,879 MiB
Mode B · MTP 2,652 1.238 s 35.34 s 77.74 tok/s 1.86x 16,983 MiB
Mode C · DSpine 2,647 0.734 s 17.15 s 161.18 tok/s 3.87x (-74.4% time) 18,950 MiB

Every generated HTML page was opened and tested interactively in Chrome: dual-axis bar/line rendering, range-slider filtering, average reference line toggle, and bar hover tooltips all worked properly across all three runs.

3.2 Sustained UI Peak, Thinking Math (T07), and Short Tool Calls

  • 6,673-Token UI Coding Run: In a separate 128K-capacity UI run generating 6,673 continuous code tokens, throughput reached 186.10 tok/s (note: 128K here was the server startup capacity setting, not a filled 128K input prompt, so this is kept strictly separate from T06).
  • Thinking-ON Math Reasoning (T07): Solving for the smallest positive integer n such that n! ends in exactly 2,026 trailing zeros (correct answer n = 8120):
  • Plain: 91.82 s total (78.50 s to first content), 41.78 tok/s — correct.
  • MTP: 70.37 tok/s, hit the 4,096-token limit (finish=length) before outputting the final answer.
  • DSpine: 29.91 s total (25.44 s to first content, 3.07x faster end-to-end), 101.62 tok/s — correct.
  • Short Simulated Tool Call: A 105-token simulated tool call hit 212.65 tok/s. Short-output spikes like this must not be confused with sustained multi-thousand-token coding speed.

3.3 Reality Check: Where DSpine Actually Slows Down

Code, JSON, and structured reasoning have predictable syntax and recurring patterns, giving DSpine a high draft acceptance rate (58.7% on T06). On free-form Chinese prose (~277–279 output tokens), however, the ranking flipped:

Workload Plain MTP DSpine Recommendation
Long Code / Interactive Web (T06) 41.71 tok/s 77.74 tok/s 161.18 tok/s Use DSpine
Free-Form Prose Sample 42.50 tok/s 54.69 tok/s 39.33 tok/s Switch to MTP or Plain

When generation entropy is high and draft acceptance drops, the parallel draft block overhead outweighs its savings. Save DSpine for coding and structured generation.


4. 128K Long-Context Fix: Cutting ~17 Minutes Down to 3m 45s

Pushing -c 131072 (128K) with a real 120,931-token document and three needle-retrieval questions (T08, 25 output tokens) exposed a severe VRAM bottleneck under default q8_0 KV settings.

4.1 Why 128K Stalled at ~17 Minutes

With --cache-type-k q8_0 --cache-type-v q8_0, the 128K main KV cache alone consumed 4,352 MiB on top of the 14.25 GB main model, draft weights, and ~2.39 GB of DSpine recurrent state/compute buffers—exceeding the 24 GB physical VRAM budget and spilling 1,284 MiB into Windows shared system memory.

At 120,931 input tokens, TTFT exploded to 1,014.5 s (~17 minutes) and decode collapsed to 5.95 tok/s.

4.2 The One-Flag Fix: Main KV q4_0, Draft KV q8_0

Without touching the 27B main weights and while keeping the draft KV at q8_0 (preserving draft acceptance), switching only the main model’s --cache-type-k and --cache-type-v to q4_0 halved main KV memory (4,352 → 2,304 MiB, freeing ~2 GB):

128K Benchmark (120,931 in / 25 out) Before (Main KV q8_0) After (Main KV q4_0 / Draft q8_0) Change
Prefill Speed 119.22 tok/s 538.63 tok/s 4.52x faster
Decode Speed 5.95 tok/s 62.20 tok/s 10.45x faster
TTFT 1,014.5 s 224.66 s 4.51x faster
Total Turn Time 1,018.55 s (~17 min) 225.05 s (3m 45s) 4.53x faster
Shared VRAM Spill 1,284 MiB 489 MiB -795 MiB
Needle Retrieval 3 / 3 (2846 / 1.19 / 37) 3 / 3 (2846 / 1.19 / 37) Accurate, no truncation

4.3 Copy-Paste llama-server Launch Commands

Daily AI Coding (64K Context + Lossless Main KV q8_0):

llama-server -m Qwen3.8-27B-UD-IQ4_XS.gguf `
  -np 1 -ngl 999 -fa on `
  --cache-type-k q8_0 --cache-type-v q8_0 -c 65536 --jinja `
  -md Qwen3.8-27B-DSpine-b16-Q4_K_M.gguf `
  --spec-draft-ngl 999 --spec-type draft-dflash --spec-draft-n-max 15 `
  --spec-draft-n-ubatch 16 --spec-draft-type-k q8_0 --spec-draft-type-v q8_0 `
  --host 127.0.0.1 --port 8080

Massive Document Mode (128K Context + Main KV q4_0 + Draft KV q8_0):

llama-server -m Qwen3.8-27B-UD-IQ4_XS.gguf `
  -np 1 -ngl 999 -fa on --reasoning off `
  --cache-type-k q4_0 --cache-type-v q4_0 -c 131072 --jinja `
  -md Qwen3.8-27B-DSpine-b16-Q4_K_M.gguf `
  --spec-draft-ngl 999 --spec-type draft-dflash --spec-draft-n-max 15 `
  --spec-draft-n-ubatch 16 --spec-draft-type-k q8_0 --spec-draft-type-v q8_0 `
  --host 127.0.0.1 --port 8080

Honest Disclosure: q4_0 KV cache is lossy quantization. Passing 3/3 needle checks on one 120K document does not prove full perplexity equivalence with q8_0. Use 64K + q8_0 as your daily default, and keep 128K + q4_0 for massive documents. 256K started on this 24GB card, but speed dropped sharply (~42–55 tok/s) and output truncated at 8,192 tokens—not recommended.


5. 24GB GPU Configuration Tiers & Windows Portable Launcher

Based on these single-card measurements, here is the practical tier split for 24GB GPUs:

  1. Daily Coding (Default): 64K + Main KV q8_0 + DSpine — full precision KV, ~20 GB VRAM, 162.58 tok/s on the T06 prompt inside the portable package and 147.29 tok/s in an independent Snake game coding demo.
  2. Long-Document Emergency: 128K + Main KV q4_0 + Draft KV q8_0 + DSpine — ~4.5x prefill recovery and 153.50 tok/s on the independent Snake demo.
  3. Free-Form Prose: Disable DSpine and use Plain or MTP.

About the English Windows Portable Launcher (DSpine-AMD-Portable-v1.0-EN)

To eliminate half a day of Windows HIP compilation and launch-flag debugging, we packaged the validated engine, runtime libraries, and five presets (DSpine 64K default, DSpine 32K, DSpine 128K, MTP 32K, Plain 32K) into a tool-only Windows package (~51 MB decimal / 51,069,428 bytes without the ~16.8 GB of GGUF weights).

  • Built-in Endpoints: Local web UI at http://127.0.0.1:8080/ and OpenAI-compatible API at http://127.0.0.1:8080/v1 (loopback only).
  • VC++ Runtime Requirement: The package intentionally ships no Microsoft DLLs; it checks for the official Microsoft Visual C++ 2015–2022 x64 Redistributable (https://aka.ms/vc14/vc_redist.x64.exe) before launching.
  • Official Download (Experimental Release — Live Now): https://github.com/yang2020chen/GeekLab-AI-Resources/releases/tag/dspine-amd-v1.0-en
  • File: DSpine-AMD-Portable-v1.0-EN.zip (51,069,428 bytes / ~51 MB tool-only, excludes ~16.8 GB GGUF weights)
  • SHA-256: 0D1ABF88EDB3484A707801C0DB36BA77E8A2ECBC5AD877150E194D07919F9B0B
  • Recommended Requirements: Windows 11 (x64) · 24GB AMD RDNA 3 GPU (RX 7900 XTX) · 32GB+ System RAM (peak process RAM observed at ~14.5 GB, so 32GB is sufficient; our benchmark rig happened to have 96GB installed) · Microsoft Visual C++ 2015–2022 x64 Redistributable (https://aka.ms/vc14/vc_redist.x64.exe).
  • Experimental Release Scope: Verified on Windows 11 + RX 7900 XTX 24GB; not yet tested on a second independent clean AMD machine or other AMD GPU models. If you run into any issue, please open a GitHub Issue with your GPU model, driver version, RAM size, and the tail of logs\.

6. Upstream Projects & Model References


FAQ

1. Does DSpine work on NVIDIA RTX GPUs or Apple Silicon Macs?

Yes. DSpine is a decoding-algorithm optimization, not an AMD-exclusive feature. Upstream already supports vLLM, SGLang, MLX, and llama.cpp across NVIDIA CUDA, AMD ROCm/HIP, and Apple Silicon (exact tok/s depends on your GPU’s memory bandwidth).

2. Does DSpine degrade code quality?

No. Every candidate token proposed by the parallel draft block is verified by the 27B main model. As long as you keep lossless q8_0 KV cache (the 64K default), output quality matches plain decoding.

3. Why do some posts quote 200+ tok/s while long coding runs around 161–186 tok/s?

Check output token length. Our own rig reached 212.65 tok/s on a 105-token simulated tool call, versus 161.18–186.10 tok/s on 2,647–6,673-token real coding runs. Always benchmark sustained multi-thousand-token output for coding workloads.

4. Can a 16GB GPU run this exact 27B + DSpine setup?

Qwen3.8-27B IQ4_XS alone takes ~14.25 GB, and 32K DSpine peaks at ~18.9 GB dedicated VRAM. On a 16GB card, this setup will spill to system RAM and slow down; consider smaller 9B–14B models or heavier quantization instead.

About The Author

4 thoughts on “Tencent DSpine Benchmark: 3.87x Faster Local 27B Coding Without a New GPU | GeekLab AI”

  1. Hi, i have recently came across some of your work and its good, was wondering if you could help to update the script to work with uncensored model on the Qwen27B.

      1. Thank for trying to help, ive tried searching LINE: wankebiji on Line ID, it says user not found. I’ll tested out this again on your model, then i’ll try and see if i can modify it myself, for uncensored models.

        Keep up the great work, very hard to find good and useful tutorial for LOCAL AI.

Leave a Reply

Your email address will not be published. Required fields are marked *