Tencent's DSpine draft model makes Qwen3.8-27B up to 3.8x faster
Tencent has released DSpine on Hugging Face, a small draft model for speculative decoding. It's meant to let Qwen3.8-27B generate roughly three to nearly four times as many tokens per second with the same output quality. Tencent says it also beats the previous method, DFlash2.

What this is about
Tencent has published an unusual model on Hugging Face: Qwen3.8-27B-DSpine-b16. It isn't a chatbot. It's a helper model built to make the language model Qwen3.8-27B answer much faster. The technique behind it is called DSpine. It's described in a paper posted as an arXiv preprint (arXiv:2609.36173) titled "Draft in Parallel, Condition Through Depth: Adjacent Causal Injection for Speculative Decoding" by Haohui Zhang and colleagues. You'll find the weights at huggingface.co/tencent/Qwen3.8-27B-DSpine-b16 and the code at github.com/Tencent/DSpine. The release quickly got picked up on r/LocalLLaMA, where people asked: "3x faster decoding for 27B models?"
What speculative decoding is
Normally a language model writes its answer one token, or word fragment, at a time. For every single token, the entire large model has to run once. This is called autoregressive decoding (AR). It's slow, mostly because the GPU has to keep loading all of the model's weights from memory.
Speculative decoding tackles exactly that. Think of an assistant who drafts sentences that the boss only has to sign off on. A small, fast draft model guesses several upcoming tokens in advance. The large model then checks these suggestions in a single pass. That step is called verification. Every token the large model would have produced itself is accepted. From the first mismatch onward, the large model takes over again. Because the large model always has the final say, answer quality stays the same in principle. It just gets faster.
How much you gain depends on how many draft tokens get accepted on average, and how little time the drafting itself takes.
What DSpine does differently
Classic draft models also guess token by token, just with a smaller network. Newer methods like DFlash instead draft a whole block at once, in parallel. That's fast. The catch: each position in the block doesn't really "know" what sits at the position before it. So the drafted tokens fit together less well.
DSpine tries to get the best of both. According to the model card, it drafts tokens in parallel, but each layer of the network passes its predicted predecessor features to the neighboring position. That way, causal dependencies ("token B follows token A") are carried layer by layer through the depth of the network. Hence the paper's title: draft in parallel, condition through depth.
Key specs of the released checkpoint:
- five layers as a draft model for Qwen3.8-27B
- block size 16: it proposes 16 tokens at once. For comparison, DFlash2 officially uses 8.
- sliding window of 8,192 tokens: the draft model only looks at the last roughly 8,000 tokens of the text.
- dynamic verification modeled on the DSpark method, plus ReplaySSM. Judging by the launch parameters, Qwen3.8-27B apparently uses linear attention or state space (SSM) layers in part. When drafts are rejected, their internal state has to be rolled back correctly.
The numbers
Tencent measured with SGLang 0.5.22, in BF16, with FlashAttention 3 and eight concurrent requests. The first table isn't clearly labeled in the model card. Most likely it shows the average number of accepted tokens per verification step, where higher is better. Runs used greedy sampling (T=0) and random sampling (T=1, top_p 0.95, top_k 20), with up to 4,096 new tokens and the highest reasoning level ("xhigh").
| Task | DFlash2 (T=0) | DSpine (T=0) | DFlash2 (T=1) | DSpine (T=1) |
|---|---|---|---|---|
| GSM8K | 5.69 | 7.20 | 5.45 | 6.31 |
| MATH-500 | 5.49 | 6.49 | 5.27 | 5.66 |
| HumanEval | 4.87 | 5.71 | 4.34 | 4.71 |
| MBPP | 5.04 | 6.14 | 4.79 | 5.41 |
| MT-Bench | 4.11 | 4.48 | 3.89 | 4.03 |
DSpine helps most with math and code, meaning text with a highly predictable structure. In open-ended conversation (MT-Bench), its lead is small.
The agent tests are closer to real-world use. For each category, 20 recorded conversations, including every tool decision, were replayed in sequence, with prefix caching and up to 32,768 new tokens per request. The metric is throughput in tokens per second. The speedup over standard decoding is in parentheses.
| Benchmark (reasoning level low) | AR | DFlash2 | DSpine |
|---|---|---|---|
| WorkBuddy Code | 253 | 590 (2.33×) | 686 (2.71×) |
| WorkBuddy Web | 247 | 640 (2.59×) | 773 (3.13×) |
| WorkBuddy Office | 210 | 665 (3.17×) | 806 (3.84×) |
| SWE-bench Pro | 242 | 658 (2.72×) | 713 (2.95×) |
| τ²-bench | 301 | 891 (2.96×) | 964 (3.20×) |
At the "xhigh" reasoning level, DSpine lands between 2.87× (τ²-bench) and 3.55× (WorkBuddy Office). DFlash2 reaches 2.56× to 3.08× there. On average, DSpine squeezes out roughly another 10 to 25 percent over DFlash2. The often-quoted "4x faster" isn't quite reached in any test. The peak is 3.84×.
What you need to try it
This isn't one for your gaming PC. The reference setup runs the full Qwen3.8-27B in BF16, meaning full 16-bit precision. The weights alone take up roughly 54 GB of VRAM (video memory). On top of that come the draft model and the cache for up to 131,072 tokens of context. In practice, you'll need an 80 GB datacenter card such as an H100. The launch command also uses FlashAttention 3, which is built for Nvidia's newer datacenter GPUs (Hopper). Macs, CPU-only setups and Ollama aren't supported. There's no GGUF version, and Tencent says nothing about combining it with 4-bit variants. Installation runs via git clone, pip install -e . and a long sglang serve command with --speculative-algorithm DSPINE.
The bigger picture
DSpine is mainly interesting for operators running Qwen3.8-27B on their own servers, for example for coding agents or office automation. Getting a good three times as many tokens per second on the same hardware means noticeably lower costs and shorter waits, without worse answers. That holds as long as verification works correctly, anyway. For home users it matters indirectly: if the method makes its way into llama.cpp or similar tools, local models could benefit too. For now, though, it's tied to SGLang.
Caveats: all measurements come from Tencent. The WorkBuddy benchmarks appear to be Tencent's own test suites. The only comparison is with DFlash2, not other well-known methods like EAGLE. The gain depends heavily on the task and is much smaller for free-form conversation than for math. And the draft model only works with exactly one target model, Qwen3.8-27B. Other models would need their own draft model trained. The model card doesn't state a license.
Sources
- Reddit: lokale Modelle & Bild-KI huggingface.co
Try it yourself: Qwen3.8-27B-DSpine-b16
Explained step by step, no prior knowledge needed – on your own computer or free in your browser.
What can I do with it?
DSpine isn't a standalone chatbot. It's an accelerator for Qwen3.8-27B. You launch the large model in SGLang as usual and attach the DSpine draft model as a helper. It proposes 16 tokens at a time, and the large model confirms them. According to Tencent, this boosts throughput to 2.7 to 3.8 times normal operation, depending on the task. Compared with the previous method, DFlash2, that's about 10 to 25 percent more. It helps most with math, code and agent tasks involving tool calls, and much less with casual chat. Answer quality is that of regular Qwen3.8-27B, because the large model checks every token. The limitation: it only works with this exact target model and only in SGLang.
Who is it worth it for?
It's worth it for anyone running Qwen3.8-27B on a server GPU with plenty of memory who wants more tokens per second, for example for coding agents or internal company assistants. If you only have a consumer graphics card, a Mac or Ollama, you can't realistically use it right now.
Ideas: What you can do with it
You run Qwen3.8-27B as the backend for a coding agent in your IDE. According to Tencent, DSpine brings back long code changes and test runs about three times as fast. That cuts the wait between agent steps considerably.
A team uses a self-hosted assistant for emails, spreadsheets and reports. In the office test, throughput was up to 3.84 times higher. So the same server can handle more colleagues at once.
For step-by-step solutions to math problems, the gain is especially large because that kind of text is very predictable. Long solutions show up with almost no delay.
If you're into inference optimization, you can compare DSpine with DFlash2 on your own prompts. That way you can check for yourself whether Tencent's numbers carry over to your use cases.
If you rent GPU hours, more tokens per hour means more work for the same money. That's handy if, say, you summarize large batches of documents overnight.
What your computer needs
Which variant is right for me?
Many models come in several sizes or "quantizations." These are compressed versions: smaller and faster, but slightly less accurate. Rule of thumb: pick the largest variant whose memory requirement fits in your VRAM (video memory). The scripts below choose this for you automatically.
| Variant | Download | Needs approx. | Compatible graphics cards |
|---|---|---|---|
Q4_K_M Default |
1.3 GB | 2.5 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
Q8_0 |
2.2 GB | 3.5 GB | almost any graphics card with 4 GB or more (e.g. GTX 1650, RTX 3050) |
BF16 |
4.1 GB | 6 GB | e.g. RTX 2060, RTX 3050 8 GB, RX 6600 |
There's only this one variant: block size 16, five layers, tested in BF16 alongside the full Qwen3.8-27B in BF16. Tencent measured exactly this combination. There's no information on quantized target models. A single 80 GB GPU such as an H100 is recommended.
- The target model Qwen3.8-27B in BF16 alone takes up roughly 54 GB of VRAM. With the draft model and cache, an 80 GB card is realistic.
- The reference command uses FlashAttention 3 (--attention-backend fa3), which is meant for Nvidia Hopper GPUs like the H100.
- Long contexts (the command uses 131,072 tokens) cost extra VRAM. If you run out of memory, reduce --context-length.
- --mem-fraction-static 0.80 reserves 80 percent of VRAM for the model and cache.
- Macs, CPU-only setups and Ollama aren't supported.
How do I find out what my computer has?
- Windows: Press Ctrl + Shift + Esc → Task Manager → Performance tab → click GPU on the left. At the bottom you'll see Dedicated GPU memory (that's your VRAM). You'll find system memory under Memory.
- Mac: Apple menu at the top left → About This Mac. You'll see your chip (e.g. M2) and memory (e.g. 16 GB). On Apple chips, graphics and processor share this memory.
- Linux: Type
nvidia-smiin the terminal (shows your graphics card and its memory) andfree -hfor system memory.
Guide
Google Colab (in your browser, no installation)
Google Colab is a free service from Google. It gives you a computer with a graphics card in your browser for a few hours. All you need is a Google account. For this model: runs for free – The free Tesla T4 GPU with 15 GB is enough.
- Download the notebook. Click the button and save the file.
- Open Colab. Go to colab.research.google.com and sign in with your Google account.
- Upload the notebook. In the window that appears, click Upload on the left (or choose File → Upload notebook at the top) and select the file
colab.ipynb. - Turn on the GPU. In the top menu, go to Runtime → Change runtime type → under Hardware accelerator, select T4 GPU → Save.
- Start everything. Runtime → Run all (keyboard shortcut Ctrl + F9). If you see the warning “This notebook was not authored by Google,” click Run anyway.
- Wait. The cells run one after another. A green checkmark appears to the left of each cell when it's done. Installation and download take about 4 minutes here.
- Try it out. The result appears below the last cell. To test something else, change the text in the cell and run it again with Shift + Enter. The last cell starts a proper chat with an input field.
- Clean up. When you're done: Runtime → Disconnect and delete runtime. This saves your free quota.
Good to know: The free GPU is limited (usually a few hours per day). After about 90 minutes of inactivity, Colab disconnects, and you'll have to start everything over.
Windows 10 / 11
The easiest way is Ollama, a free program that launches AI models with a single command.
- Update your graphics driver (NVIDIA cards only): Install the NVIDIA app or the latest driver. For AMD cards, use the latest Adrenalin driver.
- Install Ollama. Download the file OllamaSetup.exe from ollama.com/download/windows, double-click it, and choose Install. Afterward, a small llama icon appears in the taskbar at the bottom right.
- Open a terminal window. Press the Windows key, type PowerShell and press Enter. A blue or black window opens.
- Start the model. Copy this command ("Copy" button), paste it into the window with a right-click, and press Enter:
The first time, Ollama downloads the model (1.3 GB (about 2 min at 100 Mbit/s)). After that, it's instant.ollama run hf.co/aj9o9/Qwen3.8-27B-DSpine-b16-GGUF:Q4_K_M - Start typing. Once
>>> Send a messageappears, type your question and press Enter. Type/byeto end the chat.
Not enough memory? Pick a smaller variant from the table above, e.g. ollama run hf.co/aj9o9/Qwen3.8-27B-DSpine-b16-GGUF:Q4_K_M.
Prefer automatic? A script that picks the right variant for you
- Download both files into the same folder: try_windows.ps1 demo.py
- Open the folder in File Explorer, right-click an empty spot and choose Open in Terminal.
- Paste this command and press Enter:
powershell -ExecutionPolicy Bypass -File try_windows.ps1
If needed, the script installs Ollama via winget, measures your VRAM (video memory) and downloads the matching variant.
macOS
Macs with an Apple chip (M1 to M5) are ideal. Older Intel Macs are very slow.
- Install Ollama. Download it from ollama.com/download/mac, open the file, and drag Ollama into your Applications folder. Launch Ollama once – a llama appears in the menu bar at the top.
- Open Terminal. Press Cmd + Space, type Terminal, and press Enter.
- Start the model. Paste the command (Cmd + V) and press Enter:
The first time, the model is downloaded (1.3 GB (about 2 min at 100 Mbit/s)).ollama run hf.co/aj9o9/Qwen3.8-27B-DSpine-b16-GGUF:Q4_K_M - Start typing. Type your question and press Enter. Quit with
/bye.
Linux
- Check your GPU.
nvidia-smishould show your card. If it doesn't, install the driver on Ubuntu and restart:sudo ubuntu-drivers install - Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Start the model:
Exit withollama run hf.co/aj9o9/Qwen3.8-27B-DSpine-b16-GGUF:Q4_K_M/bye. Useollama psto check whether the model is running on the GPU. - Or let it pick the right variant automatically:
bash try_linux.sh # mit Python/transformers statt Ollama: MODE=hf bash try_linux.sh
Try it
Solve step by step: A train travels for 2.5 hours at 120 km/h and then for 45 minutes at 80 km/h. How far did it travel in total?Write a Python function that checks whether a string is a palindrome, and add suitable unit tests.Explain the difference between a list and a tuple in Python, with one example each.Here's a buggy JavaScript snippet: [paste code]. Find the bug, explain it and output the corrected version.Design a database schema for a small club management system with members, membership fees and events, and output the SQL CREATE statements.
Tips for better results
- The best way to gauge the gain is to measure it yourself: launch once without and once with --speculative-algorithm DSPINE, and compare tokens per second on the same requests.
- The speedup is largest for math and code tasks, and smaller for creative text at high temperature. Tencent used temperature=1.0, top_p=0.95, top_k=20.
- For agents with tool calls, keep the parsers --reasoning-parser qwen3 and --tool-call-parser qwen3_coder.
- If many users hit the server at once, adjust --max-running-requests and --cuda-graph-max-bs-decode together. Tencent measured with 8 concurrent requests.
If something goes wrong
Testing was done with SGLang 0.5.22. Older versions may not know the DSPINE algorithm, so install the Tencent repo with pip install -e . first.
The --speculative-draft-model-path parameter has to point to the locally downloaded DSpine folder, not the target model.
Without --enable-linear-replayssm-spec and the Mamba parameters (e.g. --mamba-ssm-dtype float32), verification can fail on Qwen3.8 with its linear attention layers.
--trust-remote-code is required so SGLang loads the model code.
The draft model only fits Qwen/Qwen3.8-27B. With other models or fine-tunes, the acceptance rate drops sharply or it doesn't work at all.
The model card doesn't clearly state a license. Check before any commercial use.
“out of memory,” a crash, or your computer freezes
The model is too big for your VRAM (video memory). Pick a smaller variant from the table above and close other programs, especially games and browsers with lots of tabs.
It runs, but extremely slowly
Your CPU is probably doing the work instead of your graphics card. In Ollama, the PROCESSOR column of ollama ps shows how much runs on the GPU. If it says "100% CPU", update your graphics driver or pick a smaller variant that fits entirely into VRAM (video memory).
“ollama” or “python” is not found
Close the terminal window and open it again so it recognizes the newly installed program. For Python on Windows: reinstall it and check Add python.exe to PATH.
Windows: "Running scripts is disabled on this system"
Run the script with exactly the command above: powershell -ExecutionPolicy Bypass -File try_windows.ps1. This allows execution for this one time only.
Error message when loading the model (version, "trust_remote_code", unknown architecture)
Brand-new models often need the latest software version. With Ollama: update Ollama. With Python: pip install -U transformers in the activated environment. The Model Card usually lists the exact version.
Tokenstrom generates the scripts and notebook automatically. Please take a quick look before running them – they're plain, readable text. Mind the model's license: apache-2.0.
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.