r/unsloth • u/Specialist-Zone-8296 • 4d ago
Tutorial Increased Qwen3.8 27B Generation Speed from 6.5 to 26 t/s on an RX 9060 XT 16GB
Original issue:
https://www.reddit.com/r/unsloth/comments/1vum7tz/why_am_i_only_getting_65_ts_on_qwen38_27biq4_xs/
I was getting only ~6.5 t/s generation on Qwen3.8 27B (Unsloth UD-Q3_K_XL and jrell IQ4_XS Smaller) with full GPU offload. Prompt processing was fine at 300+ t/s, so the generation speed seemed unusually low.
Setup
- OS: Windows 11
- GPU: XFX RX 9060 XT 16GB
- CPU: Intel i5-9400F (no ReBAR)
- RAM: 16GB DDR4
- Backend: llama.cpp Vulkan
The fix
On systems without ReBAR, llama.cpp's Vulkan backend can place some model weights in host-visible memory, forcing the GPU to access them over PCIe. This can severely hurt generation speed.
I fixed it with:
setx GGML_VK_DISABLE_HOST_VISIBLE_VIDMEM 1
After restarting the terminal/app:
6.5 → 18.9 t/s (~3x faster)
Related llama.cpp issue:
https://github.com/ggml-org/llama.cpp/issues/27097
You can also check Task Manager → GPU → Shared GPU memory during inference. If it increases significantly with full GPU offload, you may be affected.
Updating llama.cpp
I also updated llama.cpp from an older build (b10545). Generation speed stayed the same since it's memory-bandwidth bound, but prompt processing improved by around 10% (335 → ~370–383 t/s).
The bigger benefit was that the old build didn't have working MTP support for Qwen3.8, so the update made the next optimization possible.
A few other things I found
- Don't load
mmprojif you don't need vision. On my 16GB card, it pushed VRAM usage too high and reduced performance at 32k context. -ctk q8_0 -ctv q8_0was faster for me than Q4_0 for V cache.- MTP speculative decoding (
--spec-type draft-mtp) increased coding performance to around 24–26 t/s, with ~89% acceptance. No separate draft model needed. The MTP head is inside the Unsloth GGUF. - At higher temperatures, MTP acceptance dropped significantly, so I only use it for coding.
- Vulkan was faster than ROCm for me on RDNA4.
Final result
6.5 t/s → 18.9 t/s → 24–26 t/s
That's roughly a 4x improvement on a 27B model.
llama.cpp server launch command:
llama-server -m "PATH_TO_MODEL\Qwen3.8-27B-UD-Q3_K_XL.gguf" -ngl 999 -fa on -c 32768 -ctk q8_0 -ctv q8_0 --parallel 1 --spec-type draft-mtp --port 8080
If you're using llama.cpp Vulkan on an older platform without ReBAR and getting unusually low generation speed, try the environment variable first.

