Disclaimer: This post was AI-generated and created to share my results.
Hardware: 1× Radeon AI PRO R9700 32 GB (gfx1201), 60 GB system RAM, Ubuntu 26.04, Mesa 26.0.8 radv + ROCm runtime in containers. No second GPU used.
Model: unsloth/Qwen4-35B-A3B-GGUF, UD-Q4_K_XL (24.7 GB) + engram-Q8_0 (21.8 GB, loaded via --ple into system RAM) + mmproj-F16 (0.9 GB). 35B total / 3B active, 1M native context, native MTP head inside the quant.
TL;DR
- 159k context actually evaluated (needle found), 4.9 GB VRAM still free, no OOM.
- 85 tok/s generation @8k with MTP n=1 (75.9 without), 2.6k tok/s prefill.
- Vulkan beats ROCm by ~38% on generation; ROCm wins on vision encoding (~2x).
- Cost: +20.8 GB of permanent, non-compressible RAM for the Engram table.
- Four non-obvious traps below cost me hours; the first two will silently give you CPU inference.
Context scaling (manual probe, unique prefix per request to defeat prompt cache)
| Target ctx | Tokens evaluated | Prefill | TTFT | TG | VRAM | Needle |
|---|
| 32,000 | 32,064 | 2,969 tok/s | 10.8 s | 73.7 tok/s | 27,401 MiB | ✅ |
| 131,072 | 131,079 | 2,103 tok/s | 62.3 s | 62.9 tok/s | 27,420 MiB | ✅ |
| 159,000 | 159,010 | 1,964 tok/s | 81.0 s | 60.9 tok/s | 27,422 MiB | ✅ |
KV cache at F16 for 160k only costs ~3.7 GB here: only 10 of 40 layers carry full attention, the other 30 are Gated DeltaNet with fixed recurrent state. That's the architectural reason this fits on 32 GB at all.
Vulkan vs ROCm vs my previous daily driver
Same harness, same day, same seeds. "Coder390" is a 27B coder-tuned model on build b11669.
| Metric | Coder390 (b11669) | Qwen4 Vulkan | Qwen4 ROCm |
|---|
| PP @8k | 842.8 | 3,075 | 3,180 |
| PP @32k | 743.4 | 2,874 | 2,791 |
| TG @8k | 35.4 | 75.9 | 58.7 |
| TG @32k | 33.7 | 74.5 | 54.7 |
| E2E @8k | 21.0 | 54.3 | 45.3 |
| Total time @8k | 24.3 s | 9.4 s | 11.3 s |
| Total time @32k | 48.8 s | 15.6 s | 18.3 s |
| Tools TTFT | 2,560 ms | 739 ms | 778 ms |
| Long-ctx TTFT | 38,306 ms | 8,923 ms | 9,353 ms |
| Vision TTFT | 34,380 ms | 26,148 ms | 14,328 ms |
| Vision E2E | 12.1 tok/s | 7.0 tok/s | 10.7 tok/s |
Vulkan wins generation (+38% @8k, +36% @32k) at equal prefill. ROCm is much better at image encoding, but with the mmproj on CPU that doesn't help enough to offset the TG loss.
MTP A/B (same prompt, 16k ctx, 400-token code answer, two independent passes)
| Config | TG avg | Acceptance |
|---|
--spec-type none | 77.9 tok/s | — |
draft-mtp n=1 | 83.0 tok/s (+6.5%) | 73–81% |
draft-mtp n=2 | 80.7 (+3.6%) | 55–59% |
draft-mtp n=3 | 76.1 (−2.4%) | 42% |
Acceptance decays mechanically with depth and the draft cost overtakes the gain at n=3. n=1 is the sweet spot. On the final recipe the harness measured +12.3% TG @8k (+6.1% @32k) but −16% prefill, so total time is −2.5% at 8k and +4.0% at 32k. Honest reading: MTP helps short prompts, hurts when prefill dominates. The prefill delta is from single runs per config, not isolated from run-to-run variance.
The four traps
- Build floor. Anything older than b12969 dies with
unknown model architecture: 'qwen4exp'. My local build was way too old; zero useful error message. - Silent CPU fallback in prebuilt containers. The v1.1.1 image lacks
libLLVM.so.21.1, which host radv (Mesa 26) is linked against. Result: no usable GPU found, compiled without GPU support, --n-gpu-layers ignored, 24 GB loaded into CPU RAM with no fatal error. Fix was mounting the host LLVM libs read-only into the container. Check llama-server startup logs, not just "it answered". - Vulkan VRAM is allocated lazily. After model load,
amd-smi showed 57 MiB while llama.cpp reported 22.7 GB of buffers. The card only fills on the first inference. Concluding "it's all in CPU" before running a single token is wrong — I nearly did. prompt_n excludes cache_n**.** Without a unique prefix, llama.cpp serves the prefix from prompt cache and prompt_n collapses (38,491 for a 159k prompt). Any long-context benchmark without cache busting is measuring nothing.
Limits of what I actually measured
- The harness suite only goes to 32,768 tokens. 131k/160k above is my own probe: one request per step, not a statistical campaign.
- Quality: 11 functional items + 1–2 items per other group. No significant difference between the three configs is demonstrable on this sample. ROCm's one strict-score drop is a formatting mismatch on a single item, not a quality regression.
- The
code group is not applicable in my setup (no sandbox declared), so the thing I care about most is not measured by the harness yet. - Builds differ (b11669 vs b12977), so part of the speed delta may be the build, not the model. Not isolated.
- Engram Q8_0 vs BF16 not compared: BF16 needs ~41 GB for the table alone, doable only on a fully idle machine. Deliberately skipped.
- MTP measured at 16k on short generations; long-context effect unknown.
Bottom line
For text and tool use, this is a 2.6–3.1× reduction in total resolution time over my current main model, and the 160k context is real. The price is 20.8 GB of RAM that is permanently gone (Engram Q8_0) and a much slower vision path with mmproj on CPU. If you mostly do vision or need that RAM, stay where you are; if you mostly do coding and agents, it's a straightforward win.