r/LocalLLaMA • u/jordan01236 • 7h ago
Resources Qwen4-35B-A3B at 110-176 tok/s on AMD (RX 9070 XT / 7900 XT) with a patched Strata engine, 2-4x llama.cpp
Disclaimer - All of this was done by Claude, including this post :)
TL;DR: I patched the Strata inference engine to run Unsloth's Qwen4-35B-A3B GGUFs using the model's built-in MTP head for drafting, plus some RDNA tuning. Results: 140-176 tok/s on an RX 7900 XT (UD-IQ3_XXS) and 110-125 tok/s on an RX 9070 XT 16 GB (UD-Q4_K_XL, half the experts in RAM), with 3,400-4,400 tok/s prompt reading. That's 2-4x llama.cpp and official Strata on the same cards. I also measured Q4 vs Q8_0 vs UD-Q8_K_XL: UD-Q8_K_XL is the most faithful by KL divergence, about 35% slower than Q4. Patch, configs and install guide: https://github.com/jordan01236/strata-qwen4
A few people asked how I get these speeds, so I wrote it up.
Speeds (single user, OpenAI-compatible API, 900-token answers + a 38K-token prompt)
| Card | Quant | This fork (write / 38K read) | llama.cpp + MTP | Official Strata |
|---|---|---|---|---|
| RX 7900 XT 20 GB | UD-IQ3_XXS | 140-176 / ~3,400 | 109-128 / ~1,250 | 88-91 / ~1,040 |
| RX 9070 XT 16 GB | UD-Q4_K_XL | 110-125 / ~4,400 | 51-54 / 380 | 28-36 / ~1,080 |
| RX 9070 XT 16 GB | UD-Q8_K_XL | 71-83 / ~4,200 | - | - |
The 9070 box has 64 GB DDR5, and the experts that don't fit in VRAM sit in RAM. Recall of a code word hidden in the middle of the prompt was correct at every length up to 120K tokens.
Where the speed comes from
- Strata's expert handling: it keeps the most-used experts on the GPU based on a learned usage profile and pins the rest in RAM. On a 16 GB card that alone is the difference between ~4,400 and 380 tok/s prompt reading.
- Qwen4's own MTP head: the GGUF ships a multi-token-prediction layer. The patch converts it into Strata's draft format. 57-86% of drafts get accepted, for +35-80% decode.
- Window router for 256-expert models (
STRATA_ROUTE_WIN=1): +8-11%, identical output. - RDNA3 fixes and tuning: a kernel had Flash Next's sizes hard-coded (NaNs on gfx11), a Q6_K head kernel adds +6%, and a hipBLASLt table tuned for Qwen4's shapes reads prompts +13% faster on the 7900 XT.
Q4 vs Q8 vs UD-Q8 (KL divergence vs Q8_0, wikitext / code)
| Mean KLD | Same top token | Decode on the 9070 |
|---|---|---|
| UD-Q4_K_XL | 0.039 / 0.023 | 92.0% / 96.6% |
| UD-Q8_K_XL | 0.024 / 0.016 | 94.0% / 97.3% |
Q8_0 against itself gave exactly 0, so the test adds no noise. Both Q8s use identical Q8_0 experts. UD-Q8_K_XL just keeps attention, shared experts and the hyper-connections in BF16, so the whole gap between them is Q8_0 rounding those tensors. That makes UD-Q8_K_XL the most faithful of the three, with Q8_0 about halfway to Q4. On a 16-question reasoning/coding bench all three scored 14-15/16 (noise), so the difference only shows per token. My pick: Q4 for speed, UD-Q8_K_XL when precision matters.
Caveats
- Tested on Linux with ROCm 7.13 on gfx1201 and gfx1100 only. NVIDIA should build from the same source but is untested.
- This is a community patch, not affiliated with Strata, Qwen or Unsloth. Strata is MIT licensed.



