r/ROCm • u/evp-cloud • 16h ago
Paiton | Qwen4-35B-A3B | 1 x R9700: 285.7 tok/s @ c1, 668.6 tok/s @ 8, ~9,000 tok/s prefill, up to 500K context (3-bit and 4-bit)
Qwen4 is finally here!
We didn't get early access, so we jumped on it the moment it landed.
Well, more like 12 hours too late, because it was bedtime here :)
Anyhow, here we go for our first Paiton Qwen4 release.
Setup:
- As usual, a single R9700, default settings, no undervolt/overvolt, etc...
- Still vLLM 0.29 on ROCm 10 with our Paiton plugin
- Native HIP kernels and our own drafter.
- BetterBench 0.6.0 standard profile, temperature 0.7 / top-p 0.95 / top-k 20, fresh server per run, thinking off.
| 3-bit | 4-bit | |
|---|---|---|
| Decode, 1 request (weighted median) | 285.7 tok/s | 230.0 tok/s |
| Decode, 8 requests (total) | 668.6 tok/s | 618.8 tok/s |
| Prefill, 1,528 / 11,813 / 23,560-token prompt | 9,617 / 9,129 / 8,940 tok/s | 9,343 / 9,021 / 8,914 tok/s |
| Context per request (8-bit KV pages) | 499,712 tokens | 262,144 tokens |
| KL vs bf16 (bf16 vs itself: 0.014) | 0.059 | 0.035 |
Decode at 1 request by prompt category, from the same bench pass as the 285.7 / 230.0 above (median of 20 runs per category). Tokens per update is how many tokens arrive together in one stream update with the drafter on.
| Category | 3-bit tok/s | 4-bit tok/s | Tokens per update, 3-bit / 4-bit |
|---|---|---|---|
| json | 433.9 | 305.5 | 3.89 / 3.25 |
| math | 365.7 | 282.7 | 4.51 / 3.43 |
| file_edit | 321.4 | 235.4 | 3.66 / 2.93 |
| code | 315.8 | 254.8 | 3.94 / 3.17 |
| summarization | 282.9 | 216.0 | 3.04 / 2.46 |
| chat | 248.8 | 229.7 | 2.77 / 2.58 |
| reasoning | 217.2 | 202.9 | 2.47 / 2.29 |
| prose | 146.9 | 147.1 | 1.85 / 1.83 |
| Weighted (code 0.3, reasoning 0.2, prose 0.15, json 0.15, file_edit 0.1, summarization 0.1) | 285.7 | 230.0 |
The drafter keeps the model's output distribution, but replies can differ token by token from a run without it.
So we ran task scores with it on and off (thinking on for these):
- GSM8K: 94.2 vs 94.1 % (3-bit), 93.3 vs 94.0 % (4-bit)
- HumanEval: 98.8 vs 97.0 %, 95.7 vs 95.7 %
- MMLU-Pro (paired subset): 84.5 vs 84.5 %, 84.2 vs 83.8 %
No difference is significant; every 95 % interval contains zero.
Let's also list a few things we did for this one:
- Trained our block drafter further on our MI355X box, on replies the model itself generated on our own prompt sets. It proposes 5 tokens per step on 3-bit (3 above 4 requests) and 3 on 4-bit. Its output head runs in 2 bits now (+7.8 % at 1 request).
- Native HIP prefill for the GDN layers and the experts: +25 % at a 23,560-token prompt.
- 8-bit (fp8) KV pages by default: 499,712 tokens per request on 3-bit, 262,144 on 4-bit. We checked them against 16-bit pages at 32K and 128K tokens.
- int8 LM head, and a GDN state path the drafter's checks read without extra copies (+9 % at 8 requests).
- The compile caches ship in the image, so a first start takes about 3.5 minutes instead of 5 to 6.
- Two bugs caught by our KL gates before release: a state-slot mixup when several prompts share a prefill step, and a stale table inside the GPU graphs that shifted the n-gram embedding on short prompts. Both fixed.
Run it:
git clone https://github.com/Eliovp-BV/paiton-vllm-plugin.git
cd paiton-vllm-plugin
bash models/Qwen4-35B-A3B/run-qwen4-35b.sh # 3-bit
bash models/Qwen4-35B-A3B/run-qwen4-35b.sh --weights 4bit # 4-bitOpenAI API on port 8000, model qwen4.
Thinking is off by default; send "chat_template_kwargs": {"enable_thinking": true} or start with --thinking on.
Text only for now, prefix caching off.
And don't worry, we have a lot planned:
- an opt-in flag for up to 1M tokens of context on one card (older KV in host RAM, later disk),
- faster decode (adaptive draft count) and prefill,
- more context per user, session hibernation (resume from RAM or NVMe) and exact prefix caching.
- Release notes and guide: https://github.com/Eliovp-BV/paiton-vllm-plugin/releases/tag/qwen4-35b-a3b-rocm10-vllm029-20261205-r1
- Weights: https://huggingface.co/EliovpAI/Qwen4-35B-A3B-W3A8-Paiton-RDNA4 and https://huggingface.co/EliovpAI/Qwen4-35B-A3B-W4A8-Paiton-RDNA4
- Image:
ghcr.io/eliovp/paiton-vllm-plugin:qwen4-35b-a3b-rocm10-vllm029-20261205-r1
Numbers from your own R9700 (or other host setups) are very welcome.
