Install from this card, not from generic snippets. This is a draft model for speculative decoding, not a standalone model, and vLLM has no native DSpine support yet: it needs the small plugin in
plugin/. Follow Requirements & install and Quick start.
Unofficial community quantizations of Tencent's DSpine speculative-decoding draft model
tencent/Qwen3.8-27B-DSpine-b16, plus a vLLM plugin that runs it. DSpine is a
5-layer block drafter (DFlash family) for the Qwen3.8-27B architecture; on top of the parallel block draft it adds a "code bridge"
(each row receives a gated message from the previous row's code) and a short serial refinement of the last write over the 16 best head
candidates. The upstream release only ships an SGLang implementation; plugin/ runs it on vLLM's DFlash path.
It is not a standalone model: it drafts tokens that the target model verifies, so the target model's output distribution does not change. Quantization can only change how many drafted tokens are accepted, and at 4 bits it does not change it measurably (below). The bridge, its codebook, the norms and the version tensors stay in BF16 in every branch.
Headline (vLLM 0.33.0, plugin 0.1.1, RTX PRO 6000): with a draft-token schedule (7 draft tokens for 1–2 concurrent requests, 3 from 3 requests on) DSpine is +21 % to +49 % faster than the target's MTP 3 head with 1–2 requests (mean of 5 runs per point), about the same with 3–4 (−8 % to +4 %) and up to 10 % slower with 8, up to the native 262,144-token context. The A40 shows the same pattern (+25 % to +48 % with 1–2 requests, −4 % to −11 % from 3 on). Plugin 0.1.1 also fixes a long-context failure of 5–7 draft tokens on vLLM 0.33 (see vLLM 0.33).
Why it is faster with 1–2 users and not with many: plain-language explainer with charts.
Earlier headline (vLLM 0.31.0, plugin 0.1.0, 3 draft tokens, main = W4A16 draft, against MTP 2 on the same GPU):
+12 % to +18 % decode speed with one request and +10 % to +14 % with eight on an A40 and an RTX PRO 6000, with a 1.7 GB draft.
More draft tokens (5–7) are faster for a single request (up to +57 %) but slower with eight. On two RTX 3090 with tensor parallelism it
gives no gain (−2 % to −7 %): use MTP there.
License: Apache-2.0, inherited from tencent/Qwen3.8-27B-DSpine-b16 (the Qwen3.8-27B base is also Apache-2.0). This is a community quantization, not an official release of Tencent or Qwen.
Tested setup, vLLM 0.33 (2026-11-09): vLLM 0.33.0 (V2 model runner, FlashInfer attention with the XQA decode kernel) with this repo's plugin
vllm-dspine0.1.1 and an exllamav3 1.6.6 EXL3 plugin, on one RTX PRO 6000 Blackwell Server Edition and one A40; same target, fp8 KV cache, 262,144-token context. vllm-quantpack was not tested on vLLM 0.33.Tested setup, vLLM 0.31 (2026-11-08/09): vLLM 0.31.0 with this repo's plugin (
vllm-dspine0.1.0, kept inplugin-0.1.0/), fp8 KV cache, 262,144-token context, prefix caching, up to 8 sequences, on: one NVIDIA A40 (48 GB, Ampere); one RTX PRO 6000 Blackwell Server Edition (96 GB, power limit 300 W, clock capped at 2,270 MHz); one L40S (48 GB, Ada); two RTX 3090 (24 GB each, tensor parallel 2). Targets: the 3.85 bpw EXL3 weights of JRamirez-UAB/Swift-1.5-Qwen3.8-27B-EXL3-3.85bpw-24GB (EXL3 loaded with an exllamav3 1.5.1 plugin or with vllm-quantpack 0.1.4 + exllamav3 1.6.5) and a GPTQ W4A16 quantization of Swift 1.5 (group 128, INT8 embeddings andlm_head; not published). Draft weights from local copies of the files in this repo (same SHA-256). Only these setups have been tested.
EXPERIMENTAL: not loadable by stock vLLM. The draft architecture (
DSpineDraftModel) is registered by the plugin inplugin/(pip installit into the vLLM environment); it reuses vLLM's DFlash proposer ("method": "dflash").
fp8 draft is the same within noise. Two RTX 3090 (tensor
parallel): no clear gain. The clear gain is with 1–2 requests; with 8 sampled requests it is small (−1 % to +12 % depending on
the GPU), and the smaller KV pool makes 8 long sessions finish later than with MTP 2 (see Capacity).Our focus. We quantize and evaluate models for one use case: a local Linux system-administration agent (opencode with tool calling) for a university IT department, used in Spanish. Our calibration traces include real sysadmin/agent conversations in Spanish, and our quality checks (tool calls with the real opencode request, agent tasks with real command execution, long-context retrieval, long answers in Spanish) reflect that use. KL divergence is also reported on turboderp's public trace, so it can be compared and reproduced. Numbers for other domains or languages may differ.
| Your setup | Branch | Draft tokens | Why |
|---|---|---|---|
| vLLM 0.33, RTX PRO 6000 or A40, mostly 1–2 requests at a time | exl3-4.0bpw or main |
schedule 7 → 3 | +21–49 % vs MTP 3 with 1–2 requests (A40: +25–48 %); about the same with 3–4 on the RTX PRO 6000 (tables in vLLM 0.33) |
| vLLM 0.33, usually 3 or more concurrent requests, or 8 long sessions | — | — | MTP 3: equal or up to 11 % faster from 3 requests on, and its KV pool is larger (on the A40 DSpine's pool does not hold 8 sessions at 32k+) |
| One A40, L40S or Blackwell GPU, 1–4 requests at a time, stock compressed-tensors kernels | main (W4A16) |
3 | +7–18 % with one request vs MTP 2; no EXL3 dependency. On the L40S about the same as MTP 3. fp8 measured the same as main on the RTX PRO 6000 (two runs each) |
| Many long concurrent sessions (8 × 64k+) | — | — | Use the target's MTP head: DSpine's pool holds 16–17 % fewer tokens, so fewer sessions fit at once and the batch finishes 9–13 % later |
| You already run EXL3 (vllm-quantpack or an exllamav3 plugin) | exl3-4.0bpw |
3 | Smallest (1.46 GB); within a few % of main |
| Mostly one request at a time (a single agent) | main |
5–7 | +35 % to +57 % with one request, but slower than MTP with 8 |
| Two RTX 3090 (tensor parallel) | — | — | No gain measured: use the target's MTP head |
| Branch | Format | Quantized layers | Size | Relative weight error (mean) | Runtime-tested |
|---|---|---|---|---|---|
main |
W4A16, INT4 g128, MSE clipping | fc, o_proj, gate/up/down_proj |
1.72 GB | 10.35 % | yes |
w8a16 |
W8A16, INT8 g128, MSE clipping | same | 2.50 GB | 0.66 % | yes |
fp8 |
FP8 E4M3, per-channel scales, dynamic per-token FP8 activations | same | 2.48 GB | 2.62 % | yes |
nvfp4 |
NVFP4A16 (FP4 E2M1, group 16, FP8 scales + FP32 global scale) | same | 1.79 GB | 8.83 % | yes |
exl3-4.0bpw |
EXL3 4.0 bpw (exllamav3 trellis, mul1 codebook) | all linear layers incl. q/k/v |
1.46 GB | 6.69 % | yes |
exl3-6.0bpw |
EXL3 6.0 bpw | all linear layers | 1.89 GB | 1.75 % | yes (two RTX 3090) |
exl3-8.0bpw |
EXL3 8.0 bpw | all linear layers | 2.32 GB | 0.48 % | yes (two RTX 3090) |
| (original) | BF16 | — | 4.05 GB | — | yes |
Download a branch with hf download JRamirez-UAB/Qwen3.8-27B-DSpine-vLLM-quants --revision <branch> --local-dir <dir>, or pass
"revision": "<branch>" in the speculative config.
| File | What it is |
|---|---|
model.safetensors |
Draft weights (this branch's format) |
config.json |
Draft config (DSpineDraftModel); compressed-tensors branches include quantization_config |
quantization_config.json |
EXL3 branches only: per-tensor manifest read by the EXL3 plugin |
plugin/ |
vllm-dspine 0.1.1: vLLM general plugin (pip install ./plugin), tested with vLLM 0.33.0 |
plugin-0.1.0/ |
vllm-dspine 0.1.0, the version behind the vLLM 0.31.0 tables |
scripts/drafter_quant.py |
Quantizer for the compressed-tensors branches (INT4/INT8/FP8/NVFP4) |
scripts/drafter_exl3.py |
Quantizer for the EXL3 branches (exllamav3, layer by layer) |
LICENSE |
Apache-2.0 (from the original draft) |
SHA256SUMS |
SHA-256 of every file in the branch |
Not included: the BF16 draft (download it from tencent/Qwen3.8-27B-DSpine-b16), the target model, vLLM and the EXL3 plugin.
vLLM 0.33 can change the number of draft tokens with the batch size (num_speculative_tokens_per_batch_size, entries
[min_batch, max_batch, tokens]) and sample the draft (draft_sample_method: probabilistic); plugin 0.1.1 supports both. Target: the
same Swift 1.5 3.85 bpw EXL3 target; fp8 KV cache, 262,144-token context; 24 GB KV cache on the RTX PRO 6000 and 16 GB on the A40;
exl3-4.0bpw draft unless stated.
By context and concurrency (one shared log-like prompt of the given length plus a different task per request, temperature 1.0,
512 tokens, tok/s while all requests decode; mean of 5 runs per point, the task list rotated between runs). Schedule
[[1,2,7],[3,8,3]] + probabilistic drafting against MTP 3 on the same GPU and vLLM:
| GPU | Requests | DSpine 2k / 32k / 100k | MTP 3 2k / 32k / 100k | DSpine vs MTP 3 |
|---|---|---|---|---|
| RTX PRO 6000 | 1 | 212.2 / 186.9 / 155.6 | 142.8 / 135.2 / 121.4 | +49 % / +38 % / +28 % |
| RTX PRO 6000 | 2 | 387.1 / 338.0 / 285.3 | 286.5 / 261.2 / 236.4 | +35 % / +29 % / +21 % |
| RTX PRO 6000 | 3 | 373.6 / 352.3 / 307.0 | 405.0 / 346.9 / 294.9 | −8 % / +2 % / +4 % |
| RTX PRO 6000 | 4 | 493.0 / 453.8 / 387.0 | 508.7 / 460.6 / 388.3 | −3 % / −1 % / 0 % |
| RTX PRO 6000 | 8 | 653.3 / 577.7 / 479.2 | 728.4 / 614.4 / 476.1 | −10 % / −6 % / +1 % |
| A40 | 1 | 118.8 / 103.5 / 92.6 | 80.5 / 74.6 / 68.1 | +48 % / +39 % / +36 % |
| A40 | 2 | 206.9 / 181.2 / 143.5 | 155.5 / 143.5 / 114.5 | +33 % / +26 % / +25 % |
| A40 | 3 | 188.1 / 164.7 / 137.1 | 209.6 / 184.3 / 142.6 | −10 % / −11 % / −4 % |
| A40 | 4 | 246.9 / 210.7 / 159.0 | 270.0 / 229.0 / 167.3 | −9 % / −8 % / −5 % |
| A40 | 8 | 298.0 / — / — | 333.9 / 267.9 / 183.9 | −11 % at 2k; at 32k and 100k DSpine's smaller pool does not hold 8 sessions at once |
With one request the spread between runs is large for DSpine (coefficient of variation 20–32 %, against 8–14 % for MTP 3): its acceptance depends more on the text being written. An earlier version of this table used one run per point and showed DSpine losing on the A40 with one request at 2k (−23 %); repeated, it wins there as well.
Why it wins with few requests and not with many (per-step GPU time measured inside vLLM, 2k context, fixed draft lengths):
| Step | RTX PRO 6000 | A40 |
|---|---|---|
| Target, 1 token (no draft) | 13.7 ms | 26.8 ms |
| Target verifying 8 tokens (1 request, 7 draft tokens) | 18.4 ms (×1.34) | 33.5 ms (×1.25) |
| Whole step: DSpine 7 / MTP 3 (1 request) | 22.6 / 22.0 ms | 42.3 / 41.8 ms |
| Target, 4 requests: 16 tokens / 32 tokens per step | 20.1 / 27.7 ms | 38.5 / 58.8 ms |
Decoding one request mostly reads weights and KV cache from memory and leaves compute idle, so the target verifies 8 tokens for about the price of 1–4, and DSpine's draft costs about the same as MTP's (3.3 vs 2.8 ms; 7.0 vs 7.8 ms on the A40). With one request both steps cost the same and the longer accepted run (about 3.9–4.8 tokens against 3.0–3.1) is the whole gain. With several requests the batch already uses that idle compute: 4 requests × 8 tokens = 32 tokens per step costs ×1.5 (RTX PRO 6000) and ×1.9 (A40), which is why the schedule drops to 3 draft tokens from 3 requests on, where DSpine and MTP 3 verify the same number of tokens.
With a fixed 5 draft tokens for 3–4 requests (schedule [[1,2,7],[3,4,5],[5,8,3]]) DSpine lost 10–29 % against MTP 3 at 4 requests;
3 tokens from 3 requests on closes that gap. One request at the native context (257,507 prompt tokens, temperature 1.0): 104.0 tok/s
on the RTX PRO 6000 and 51.2 tok/s on the A40, 3.15 and 3.05 tokens accepted per step, no errors.
All branches (schedule [[1,2,7],[3,4,5],[5,8,3]], probabilistic drafting; the 16-prompt method below, 1 request t=0 / 8 requests
t=0 / 8 requests t=1, plus one request with a 200k-token prompt). References on the same vLLM 0.33: MTP 2 113.9 / 494.4 / 510.4 and
MTP 3 132.0 / 581.5 / 566.8 tok/s on the RTX PRO 6000; MTP 2 69.9 / 261.3 / 253.9 and MTP 3 76.1 / 285.3 / 263.3 on the A40.
| Branch | RTX PRO 6000: 1 / 8 t=0 / 8 t=1 | 200k | A40: 1 / 8 t=0 / 8 t=1 | 200k | Accepted per step (1 / 8 t=0 / 8 t=1) |
|---|---|---|---|---|---|
exl3-4.0bpw |
182.6 / 606.2 / 557.8 | 108.2 | 105.8 / 279.9 / 250.4 | 67.4 | 4.26 / 3.28 / 2.96 |
main W4A16 |
191.0 / 614.6 / 558.4 | 107.8 | 96.2 / 262.8 / 250.4 | 57.6 | 4.40 / 3.21 / 3.01 |
w8a16 |
185.8 / 588.2 / 528.0 | 105.9 | 95.6 / 263.2 / 256.5 | 57.0 | 4.36 / 3.18 / 2.98 |
fp8 |
182.7 / 579.2 / 523.7 | 110.7 | 92.1 / 273.0 / 231.3 | 57.8 | 4.30 / 3.20 / 2.96 |
nvfp4 |
191.2 / 570.5 / 560.5 | 128.5 | 92.8 / 280.8 / 249.2 | 49.4 | 4.40 / 3.18 / 3.05 |
exl3-6.0bpw |
182.7 / 602.8 / 548.6 | 123.9 | 95.1 / 259.3 / 230.6 | 56.8 | 4.30 / 3.22 / 3.05 |
exl3-8.0bpw |
185.1 / 590.9 / 521.1 | 113.1 | 93.1 / 243.3 / 208.2 | 49.9 | 4.32 / 3.23 / 2.97 |
Acceptance is RTX PRO 6000. The branches are within a few % of each other; the 200k column is one request measured over about 10 s
(noise around ±10 %). On the A40 exl3-4.0bpw is the fastest with one request.
Long-context fix in plugin 0.1.1. On vLLM 0.33 with CUDA graphs, 5–7 draft tokens lost most of their acceptance beyond about 64k
tokens of context (7 tokens at 100k: 2.26 accepted per step instead of about 5; eager mode was fine). Cause: the CUDA-graph capture
runs leave NaN in the draft's null KV block (block 0); vLLM masks the draft's out-of-window blocks (sliding window of 8,192 tokens) to
that block, and FlashInfer's XQA kernel loads whole KV tiles, so the tile across the window start reads it and NaN × 0 = NaN. The
plugin zeroes the draft's null block before every draft step (one small memset per draft layer); greedy acceptance with 7 tokens is
then 4.76 / 5.17 / 3.47 at 32k / 100k / 200k. Set VLLM_DSPINE_ZERO_NULL_BLOCK=0 to disable it.
Method (16-prompt speed tables; all tables below this point are vLLM 0.31.0 with plugin 0.1.0): 16 mixed prompts (code, sysadmin, reasoning, text; Spanish and English) with the target's default
reasoning, max_tokens 1024; "1 request" = one at a time, "8 requests" = 8 concurrent; t=0 greedy, t=1 temperature 1.0 with top-p 0.95 /
top-k 20. tok/s = generated tokens ÷ wall time. Accepted per step = 1 + accepted draft tokens ÷ verification steps (vLLM /metrics).
Every server was started with --max-model-len 262144, fp8 KV cache and prefix caching (the prompts themselves are short). Percentages are against MTP 2 on the same GPU.
| Speculation | Draft | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|---|
| MTP 2 (reference) | — | 117.0 tok/s | 431.1 tok/s | 400.0 tok/s | 2.48 |
| DSpine, 3 tokens | BF16 (original) | 131.0 (+12 %) | 470.1 (+9 %) | 425.6 (+6 %) | 3.15 |
| DSpine, 3 tokens | main W4A16 |
137.8 (+18 %) | 487.7 (+13 %) | 455.3 (+14 %) | 3.09 |
| DSpine, 3 tokens | nvfp4 |
141.1 (+21 %) | 475.0 (+10 %) | 433.5 (+8 %) | 3.19 |
| DSpine, 3 tokens | exl3-4.0bpw |
138.3 (+18 %) | 506.3 (+17 %) | 450.1 (+13 %) | 3.16 |
| DSpine, 3 tokens | w8a16 |
137.8 (+18 %) | 472.2 (+10 %) | 458.0 (+15 %) | 3.17 |
| DSpine, 3 tokens | fp8 |
137.5 (+18 %) | 519.7 (+21 %) | 487.7 (+22 %) | 3.17 |
| DSpine, 4 tokens | exl3-4.0bpw |
158.0 (+35 %) | 415.5 (−4 %) | 367.9 (−8 %) | 3.54 |
| DSpine, 5 tokens | BF16 | 164.5 (+41 %) | 416.2 (−3 %) | 391.2 (−2 %) | 3.94 |
| DSpine, 5 tokens | exl3-4.0bpw |
174.1 (+49 %) | 439.5 (+2 %) | 409.5 (+2 %) | 3.96 |
| DSpine, 7 tokens | BF16 | 178.1 (+52 %) | 425.2 (−1 %) | 362.8 (−9 %) | 4.38 |
| DSpine, 7 tokens | exl3-4.0bpw |
183.2 (+57 %) | 408.8 (−5 %) | 366.8 (−8 %) | 4.31 |
Repeat runs (same GPU, same day): MTP 2 gave 120.1 / 446.1 / 434.3 the second time (+3 % / +3 % / +9 %), so differences of a
few percent are noise. Mean of two runs each against the MTP 2 mean (118.6 / 438.6 / 417.2): main 139.4 / 500.7 / 465.4 (+18 % /
+14 % / +12 %), fp8 136.8 / 520.6 / 464.2 (+15 % / +19 % / +11 %). fp8 and main are the same within noise.
| Speculation | Draft | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|---|
| MTP 2 (reference) | — | 65.0 tok/s | 219.3 tok/s | 209.0 tok/s | 2.48 |
| DSpine, 3 tokens | BF16 | 69.6 (+7 %) | 221.3 (+1 %) | 215.8 (+3 %) | 3.22 |
| DSpine, 3 tokens | main W4A16 |
72.9 (+12 %) | 240.6 (+10 %) | 219.4 (+5 %) | 3.19 |
| DSpine, 3 tokens | nvfp4 |
73.6 (+13 %) | 233.1 (+6 %) | 224.5 (+7 %) | 3.20 |
| DSpine, 3 tokens | w8a16 |
71.7 (+10 %) | 237.4 (+8 %) | 230.6 (+10 %) | 3.12 |
| DSpine, 3 tokens | fp8 (W8A16 kernels on Ampere) |
74.0 (+14 %) | 237.3 (+8 %) | 222.1 (+6 %) | 3.23 |
| DSpine, 3 tokens | exl3-4.0bpw |
69.7 (+7 %) | 235.8 (+8 %) | 207.5 (−1 %) | 3.09 |
| DSpine, 4 tokens | exl3-4.0bpw |
80.1 (+23 %) | 218.2 (−1 %) | 194.1 (−7 %) | 3.49 |
| DSpine, 5 tokens | exl3-4.0bpw |
86.3 (+33 %) | 211.2 (−4 %) | 186.0 (−11 %) | 3.80 |
| DSpine, 7 tokens | BF16 | 90.7 (+40 %) | 187.9 (−14 %) | 163.5 (−22 %) | 4.29 |
| DSpine, 7 tokens | main W4A16 |
96.0 (+48 %) | 192.3 (−12 %) | 163.2 (−22 %) | 4.32 |
| DSpine, 7 tokens | nvfp4 |
94.9 (+46 %) | 196.6 (−10 %) | 169.0 (−19 %) | 4.27 |
| Speculation | Draft | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|---|
| MTP 2 (reference) | — | 64.1 tok/s | 309.6 tok/s | 271.0 tok/s | 2.51 |
| DSpine, 3 tokens | BF16 | 66.5 (+4 %) | 338.9 (+9 %) | 278.3 (+3 %) | 3.07 |
| DSpine, 3 tokens | main W4A16 |
73.6 (+15 %) | 352.8 (+14 %) | 345.0 (+27 %) | 3.14 |
| DSpine, 3 tokens | nvfp4 |
72.1 (+12 %) | 336.7 (+9 %) | 292.1 (+8 %) | 3.14 |
| Speculation | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|
| MTP 2 (reference) | 62.2 tok/s | 235.4 tok/s | 230.2 tok/s | 2.47 |
| MTP 3 | 68.3 (+10 %) | 270.2 (+15 %) | 245.1 (+6 %) | 2.94 |
| DSpine, 2 tokens | 54.6 (−12 %) | 216.0 (−8 %) | 197.1 (−14 %) | 2.55 |
| DSpine, 3 tokens | 66.3 (+7 %) | 260.3 (+11 %) | 228.5 (−1 %) | 3.10 |
| DSpine, 4 tokens | 78.0 (+25 %) | 288.1 (+22 %) | 234.3 (+2 %) | 3.57 |
| DSpine, 5 tokens | 83.8 (+35 %) | 299.3 (+27 %) | 245.9 (+7 %) | 3.92 |
With this stack (vllm-quantpack) 4–5 draft tokens beat 3 on the A40; with the exllamav3 1.5.1 plugin (tables above) and on the RTX PRO 6000, 3 tokens are the best compromise. Measure on your own stack if you run many requests.
| Speculation | Draft | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|---|
| None | — | 46.0 tok/s | 227.1 tok/s | 217.5 tok/s | — |
| MTP 2 (reference) | — | 77.7 | 314.1 | 288.0 | 2.49 |
| MTP 3 | — | 83.4 (+7 %) | 325.1 (+4 %) | 311.7 (+8 %) | 2.93 |
| DSpine, 3 tokens | BF16 | 83.1 (+7 %) | 325.3 (+4 %) | 311.3 (+8 %) | 3.14 |
| DSpine, 3 tokens | main W4A16 |
84.3 (+8 %) | 335.2 (+7 %) | 306.0 (+6 %) | 3.15 |
| DSpine, 3 tokens | fp8 |
83.5 (+7 %) | 335.7 (+7 %) | 314.0 (+9 %) | 3.12 |
| DSpine, 3 tokens | exl3-4.0bpw |
82.0 (+6 %) | 336.0 (+7 %) | 320.9 (+11 %) | 3.13 |
| DSpine, 7 tokens | BF16 | 113.8 (+46 %) | 296.0 (−6 %) | 257.6 (−11 %) | 4.28 |
| DSpine, 15 tokens | BF16 | 112.8 (+45 %) | 191.2 (−39 %) | 146.0 (−49 %) | 4.93 |
On the L40S, 3 draft tokens are about as fast as MTP 3, and fp8 brings no gain over main (unlike on the RTX PRO 6000). The 3-token
rows were measured a few hours after the MTP rows, same node and settings.
| Speculation | Draft | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|---|
| MTP 2 (reference) | — | 101.7 tok/s | 362.0 tok/s | 334.5 tok/s | 2.54 |
| MTP 3 | — | 105.7 (+4 %) | 361.6 (0 %) | 330.9 (−1 %) | 3.03 |
| DSpine, 3 tokens | BF16 | 97.8 (−4 %) | 369.7 (+2 %) | 318.8 (−5 %) | 3.13 |
| DSpine, 3 tokens | main W4A16 |
94.5 (−7 %) | 355.5 (−2 %) | 316.3 (−5 %) | 3.09 |
| DSpine, 3 tokens | exl3-4.0bpw |
87.4 (−14 %) | 326.0 (−10 %) | 286.9 (−14 %) | 3.07 |
| Speculation | Draft | 1 request, t=0 | 8 requests, t=0 | 8 requests, t=1 | Accepted per step |
|---|---|---|---|---|---|
| MTP 2 (reference) | — | 86.1 tok/s | 297.6 tok/s | 278.4 tok/s | 2.49 |
| DSpine, 3 tokens | w8a16 |
87.5 (+2 %) | 325.1 (+9 %) | 277.3 (0 %) | 3.21 |
| DSpine, 3 tokens | fp8 (W8A16 kernels on Ampere) |
85.8 (0 %) | 313.2 (+5 %) | 288.8 (+4 %) | 3.14 |
| DSpine, 3 tokens | exl3-6.0bpw |
82.0 (−5 %) | 304.7 (+2 %) | 285.3 (+2 %) | 3.11 |
| DSpine, 3 tokens | exl3-8.0bpw |
83.9 (−3 %) | 299.0 (0 %) | 284.4 (+2 %) | 3.20 |
exl3-4.0bpw draft and 3 tokens; the server stayed up after each request.exl3-4.0bpw draft: MTP 2 40.6 % (token 73), DSpine with 3
tokens 25.0 % (token 99); with 32 prompts that gap (13 vs 8 answers) is not statistically significant. Speculative verification runs
the target on several tokens per step, with other kernels than one-token decoding, so near-ties flip, with MTP as with DSpine.exl3-4.0bpw draft, 3 tokens, against MTP 2 on the same GPU)Our sysadmin battery, one run per configuration:
| Check | RTX PRO 6000: DSpine | RTX PRO 6000: MTP 2 | A40: DSpine | A40: MTP 2 |
|---|---|---|---|---|
| Tool calls, real opencode request | 29/30 | 30/30 | 30/30 | 30/30 |
| Reasoning | 18/18 | 18/18 | 18/18 | 18/18 |
| Needle at 64k / 128k / 241k | 8/8 each | 8/8 each | 8/8 each | 8/8 each |
| 8 concurrent sessions of 30k tokens | 8/8 | 8/8 | 8/8 | 8/8 |
| Agent tasks with real command execution | 10/10 (172 s) | 10/10 (180 s) | 10/10 (337 s) | 10/10 (327 s) |
| Games | 46/48 | 42/48 | 44/48 | 47/48 |
| Battery speed, 1 / 2 / 4 / 8 requests (tok/s) | 140 / 237 / 445 / 516 | 124 / 236 / 416 / 529 | 72 / 116 / 191 / 243 | 69 / 122 / 212 / 252 |
Same quality. The battery's speed check (no reasoning, the model's own sampling, 1,200 tokens, one short run) shows the gain only with one request; acceptance there matches the t=1 benchmark (2.82 vs 2.43 tokens per step with 8 requests), so the difference comes from the short, noisy measurement and the sampled, non-reasoning answers. The smoke test flags 3 answers that reach the 8,000-token limit in all four runs: this comes from the target, not the draft.
vLLM's GPU KV cache size at start-up (same KV bytes, full 262,144-token context). The draft's five layers take their share: the pool
holds about 17 % fewer tokens than with MTP 2 with 3 draft tokens, and about 37 % fewer with 7.
| GPU, KV cache | No speculation | MTP 2 | DSpine, 3 tokens | DSpine, 7 tokens |
|---|---|---|---|---|
| L40S, 20 GB | 586,057 | 534,714 | 447,294 | 336,555 |
| RTX PRO 6000, 24 GB | — | 640,465 | 530,814 | 334,321 |
| A40, 16 GB (same on two RTX 3090 with 8 GB each) | — | 427,473 | 357,835 | 269,244 |
Real sessions (A40, 16 GB, vllm-quantpack, 3 draft tokens): one 45,174-token prompt fills 15.4 % of the pool with MTP 2 and 18.6 % with
DSpine (about 294k vs 243k tokens of such sessions). Eight of them at once, generating 4,096 tokens each: 7 run at the same time with
MTP 2 (no preemption), 6 with DSpine (2 preemptions); same result on two RTX 3090. With a 24 GB pool on the A40 and the main draft
(pool 536,753 vs 640,465 tokens, −16 %): eight 72k-token sessions run 6 at a time vs 7 with MTP 2 and the batch takes 794 s vs 701 s
(+13 %); eight 113k-token sessions run 4 at a time vs 5 and take 1,231 s vs 1,126 s (+9 %). No saving from the draft's sliding window
(8,192 tokens) was visible.
Not applicable to the draft itself: speculative decoding does not change what the main model generates, so loops depend on the main model and its sampling (see the target's card).
The draft only sees token ids and target hidden states, so image requests work with it unchanged (vLLM 0.33 sends no image inputs to
the DFlash draft path). Checked on the RTX PRO 6000 with images enabled (--limit-mm-per-prompt '{"image":4,"video":0}'), schedule
7 → 3 against MTP 3: our 4-screenshot test (a systemd error, a chart, firewall rules, a process list) answered fully right with both, the
second turn of a conversation about an image reused the prefix cache, and an image with a 188,513-token prompt was answered right; 4.0
tokens accepted per step with DSpine and 3.0 with MTP 3, no errors.
Before you install: an NVIDIA driver with CUDA 13.x (tested), uv, python3.12-dev and a C compiler
(Triton compiles a C helper at every vLLM start), and a working vLLM environment for your target model (follow the target's card).
plugin/ (0.1.1) was tested with vLLM 0.33.0; with vLLM 0.31.0 use plugin-0.1.0/ (replace plugin with plugin-0.1.0 below).
Then add the plugin from this repo to that environment:
venv/bin/hf download JRamirez-UAB/Qwen3.8-27B-DSpine-vLLM-quants --include "plugin/*" --local-dir dspine
uv pip install --python venv/bin/python --no-deps ./dspine/plugin
venv/bin/python -c "from importlib.metadata import entry_points; print([e.name for e in entry_points(group='vllm.general_plugins')])" # must list 'dspine'
For the exl3-* branches the vLLM environment also needs an EXL3 plugin (vLLM 0.33: we used an exllamav3 1.6.6 plugin; vLLM 0.31:
vllm-quantpack 0.1.4 or an exllamav3 1.5.1 plugin); the
compressed-tensors branches (main, w8a16, fp8, nvfp4) use vLLM's own kernels.
Validated configuration (one 48 GB GPU, EXL3 Swift 1.5 target, 262,144-token context, 8 sequences, 3 draft tokens; run on the A40 with local copies of both models):
vllm serve JRamirez-UAB/Swift-1.5-Qwen3.8-27B-EXL3-3.85bpw-24GB \
--max-model-len 262144 --kv-cache-memory-bytes 16000000000 --kv-cache-dtype fp8 \
--max-num-seqs 8 --limit-mm-per-prompt '{"image":0,"video":0}' \
--enable-prefix-caching --trust-remote-code --reasoning-parser qwen3 \
--enable-auto-tool-choice --tool-call-parser qwen3_coder \
--speculative-config '{"method":"dflash","model":"JRamirez-UAB/Qwen3.8-27B-DSpine-vLLM-quants","num_speculative_tokens":3}'
--speculative-config '{"method":"dflash","model":"JRamirez-UAB/Qwen3.8-27B-DSpine-vLLM-quants","revision":"exl3-4.0bpw","num_speculative_tokens":7,"num_speculative_tokens_per_batch_size":[[1,2,7],[3,8,3]],"draft_sample_method":"probabilistic"}'
(num_speculative_tokens must be the largest count in the schedule)."revision":"<branch>" to the speculative config.--kv-cache-memory-bytes 24000000000; on Blackwell the 262,144-token context needed 17.5 GiB of KV cache
with 7 draft tokens, more than on Ampere.num_speculative_tokens): 3 for mixed load, 5–7 for a single user. vLLM 0.33 can
switch it with the batch size (above).This repository is a draft model for speculative decoding: configure opencode for the main model it accelerates (see that model's card); nothing changes on the opencode side. The tool-call check above used the real opencode request replayed against this server.
--kv-cache-memory-bytes, not --gpu-memory-utilization; the --max-model-len must stay below the
GPU KV cache size printed at start-up.lm_head: Marlin heads (GPTQ / compressed-tensors) require a row
stride divisible by 8 (fixed in 0.1.0; earlier development versions failed with marlin_gemm ... A.stride(0) must divisible by 8).VLLM_DSPINE_ZERO_NULL_BLOCK=0 disables it.fp8 branch: W8A8 needs FP8 hardware (Ada / Hopper / Blackwell); on Ampere vLLM falls back to W8A16 Marlin.generation_config.json here, as in the original draft: the draft runs inside the target's server,
which uses the target's.| Step | Treatment |
|---|---|
| Linear layers (compressed-tensors branches) | fc, layers.*.self_attn.o_proj, layers.*.mlp.{gate,up,down}_proj (21 layers); symmetric; scales rounded to their stored dtype (BF16 / FP8) before rounding the weights; per-group (per-channel for FP8) MSE clipping search over 16 shrink factors (1.00 to 0.70); no calibration data |
q/k/v_proj (compressed-tensors branches) |
BF16 |
| NVFP4 | group 16, FP8 E4M3 group scales; one FP32 global scale shared by the fused shards (q/k/v, gate/up), because vLLM uses the maximum for the fused layer |
| EXL3 branches | every linear layer (36), exllamav3 1.5.1 quantize_exl3 called layer by layer (exllamav3's converter does not know the draft architecture), uncalibrated (exllamav3's own fallback path), mul1 codebook, output scales always |
| Kept in BF16 | code bridge (codebook, gates, read/write projections), norms, version tensors |
| Validation | w8a16, fp8, nvfp4: every packed layer decompressed with compressed-tensors' own decompressor and compared with our reconstruction (max difference 2.0e-3, BF16 rounding). main comes from the previous version of the same script (same recipe, no cross-check) and is validated by its runtime measurements |
| Tools | compressed-tensors 0.17.0, exllamav3 1.5.1, PyTorch on one RTX PRO 6000 |
Scripts: scripts/drafter_quant.py, scripts/drafter_exl3.py. The draft has no
embeddings or lm_head of its own: it uses the target's.
SHA256SUMS in every branch. A fresh load of this repo from HF with the Quick start is still pending.main, fp8 and exl3-4.0bpw on all four GPU
types; nvfp4 on the RTX PRO 6000, A40 and two RTX 3090; w8a16 on the RTX PRO 6000, A40 and two RTX 3090; exl3-6.0bpw and
exl3-8.0bpw on two RTX 3090.exl3-4.0bpw branch up to 257,507 prompt tokens.sudo, and give the agent a non-privileged account and a test machine where you can.I would be grateful for reports of installations of this checkpoint, both working and failed ones. Please open a discussion in the Community tab with your GPU(s), driver, vLLM version, the full command line and the result (speed, context, or the error message). Failed attempts are just as useful as successful ones.
plugin/, scripts/): Apache-2.0.tencent/Qwen3.8-27B-DSpine-b16