Technologies · Artificial intelligence

Local LLMs on the AMD Radeon AI PRO R9700 GPU

We run our own language model server on a GPU at our company headquarters. We tune it for working with Claude Code and AI agents — source code and data never leave our infrastructure.

Why a local model

We use Claude Code for requirements analysis, design and implementation of our systems. To keep source code and data inside the company, we connect it to our own llama.cpp LLM server in our infrastructure — the server provides an Anthropic API compatible interface, so Claude Code works with it just as it does with a cloud model. We switch the model Claude Code works with simply via a launch script.

The same server also serves autonomous AI agents (Hermes Agent) on our internal network.

  • confidentiality — source code and data stay in the company
  • cost — no fees for processed tokens
  • independence — operation regardless of cloud availability
  • control — we can measure, tune and fix the whole chain

Hardware and software

One workstation, one graphics card.

GPU

AMD Radeon AI PRO R9700 — RDNA4 architecture, 32 GB VRAM.

Operating system and runtime

Windows 11 Pro, AMD ROCm 10.1 (HIP runtime from the TheRock project) — no Linux or WSL.

llama.cpp

The stew675 “llama-cpp-rdna-boosts” fork with optimisations for RDNA GPUs, extended with our own changes on top of the current llama.cpp version.

Our own build

Our repository and CI build for ROCm on Windows on GitHub — every new version goes through performance measurements and an output-identity check. Since 6 November 2026 the r220 build (rdna-boosts r220 + 10 of our changes) runs in production, since 7 November with the HIP runtime from ROCm 10.1 instead of the one shipped with the driver; we keep the previous combination ready for a quick rollback.

Models in use

Production model: Qwen3.8-27B

  • Unsloth UD-Q5_K_XL quantisation (about 21 GB)
  • hybrid SSM + attention architecture, support for images and reasoning
  • context of 262,144 tokens — the model's maximum — in two parallel slots
  • KV cache quantised to q8_0
  • MTP speculative decoding (multi-token prediction)

Alternative and earlier models

  • Swift-1.5-Qwen3.8-27B (Q5_K_M, Q6_K_S)
  • Qwen3.6-35B-A3B (Mixture of Experts), Qwen3.6-27B
  • Qwen3.8-Flash-Next (Mixture of Experts, ~125B) — tested in November 2026

Our latest results

As of early November 2026 (build r220), measured on real prompts from our agents and in day-to-day operation.

262,144 tokens of context on a single GPU
~780 t/s prompt processing at 100k tokens
~47 t/s median generation in production, at up to 112k tokens of context
+73,728 tokens of context thanks to our memory allocation change
Performance over time with a prompt of ~100k tokens
Period Change Prompt processing Generation
August 2026 switch to ROCm and port of the rdna-boosts optimisations 312 → 574 t/s (+84%) —
September 2026 WMMA flash attention kernels for RDNA4 660 → 752 t/s (+14%) −12.5% time per token
September 2026 further decoding improvements 743 t/s −5.4% time per token
October 2026 Qwen3.8-27B V2, MTP, 262k context 780–835 t/s 45–47 t/s
October 2026 q8_0 KV cache for the MTP draft too, fix of the flash attention staging memory (we reported it to the rdna-boosts author) 780–790 t/s unchanged, 480 MiB less VRAM
November 2026 rdna-boosts r220, HIP runtime from ROCm 10.1 780–790 t/s ~51 t/s

At the start (August 2026, Vulkan backend, Qwen3.6-27B model) we reached about 530 t/s in prompt processing and 21 t/s in generation. The rows are not strictly comparable — the model, quantisation and decoding method changed along the way.

Quality with a quantised KV cache

At a context of 126k tokens with a q8_0 KV cache, the model correctly retrieved all 120 of 120 test facts, and its output was token-for-token identical to the output at full precision — with considerably lower VRAM use.

What helped and what did not

We measure every change on real tasks and deploy only what holds up.

Helped

  • port of the rdna-boosts optimisations (+84% in prompt processing)
  • skipping masked blocks in flash attention (+8 to 24%)
  • WMMA kernels for RDNA4
  • q8_0 KV cache (about 2 GB less VRAM)
  • one-time allocation of the flash attention staging buffer — our change, +73k tokens of context
  • MTP speculative decoding (+56% in generation)
  • prompt cache fixes — returning to a conversation in 1.2 s instead of 41 s
  • q8_0 KV cache for the MTP draft too, after a fix of the flash attention staging buffer that we reported to the rdna-boosts author — 480 MiB less VRAM, and shared memory no longer grows during operation

Did not help

  • larger micro-batch — VRAM overflow
  • HIP graphs — no gain, unstable with long prompts
  • native bf16 prefill — 47% slower
  • hipBLASLt library — non-deterministic kernel selection, so disabled
  • vocabulary subset for the MTP draft — 6–7% faster steps, but +560 MiB VRAM and memory overflow at full context
  • port of the chunked Gated Delta Net (MMA) kernel to RDNA4 — 6% slower prompt processing

Lessons from operation

  • after a long server uptime, VRAM measurements are unreliable — we restart before measuring
  • the Adrenalin 26.7 driver was unstable; we use the OEM driver branch
  • most repeated prompt processing comes from the client, not the server
  • when VRAM runs short on Windows, the driver moves data to shared system memory and prompt processing slows down by up to 73% — so we size the context and buffers with headroom
  • even a changed summation order in a single kernel (rms_norm) lowered MTP draft acceptance and generation by 7–9% — we reported it to the authors
  • the HIP runtime shipped with the GPU driver and the one from ROCm 10.1 give bit-identical results with Qwen3.8-27B, but for models with experts in system memory the newer runtime is far better (see Flash-Next below)

Experience with Qwen3.8-Flash-Next

In November 2026 we tested whether a much larger Mixture of Experts model would also run on our setup — and whether it could replace the production Qwen3.8-27B.

Qwen3.8-Flash-Next has about 125 billion parameters, of which only about 6 billion are active per token. We used the ISTA-DASLab quantisations IQ3_XXS (weights ~47 GB) and Q2_0 (~38 GB), plus an n-gram embedding table (~29 GB) that stays on disk. The model does not fit into 32 GB of VRAM: the graphics card holds only a cache of the most-used experts (~23 GB), and the remaining experts are loaded from system memory.

Flash-Next speed with a ~5k-token prompt (one R9700)
State Prompt processing Generation
first attempt on Windows, 48 GB RAM not working corrupted output
after fixes by the rdna-boosts author, 48 GB RAM ~22 t/s ~5 t/s
IQ3_XXS, 64 GB RAM, driver HIP runtime ~40 t/s ~6–8 t/s
IQ3_XXS, 64 GB RAM, HIP runtime from ROCm 10.1 ~390 t/s ~22 t/s, with MTP ~27 t/s
Q2_0, 64 GB RAM 460–505 t/s ~24 t/s, with MTP ~29 t/s

For comparison: the production Qwen3.8-27B processes a 100k-token prompt on the same card at ~780 t/s and generates ~51 t/s.

What we learned

  • on Windows we hit bugs that do not show up on Linux; we reported them to the rdna-boosts author with measurements and fixes arrived within hours to days
  • with 48 GB of RAM the model was disk-bound — the experts were read from disk again and again during prompt processing; upgrading to 64 GB helped only partly
  • the HIP runtime was decisive: with the library shipped in the GPU driver, pinned memory was capped at ~9.3 GB and the MTP draft hung; with the ROCm 10.1 runtime (TheRock) the whole expert memory got pinned, the hang went away and prompt processing went from ~40 to ~370–390 t/s
  • on Windows ROCm, allocated VRAM is counted 1:1 into the process's memory commit — real RAM pressure has to be measured differently (working set, available memory)
  • during generation most of the CPU load is threads busy-waiting; the --poll 0 option made generation 9 % faster and cut CPU load by 75 %

Quality on our tasks

  • agentic suite of 22 C#/.NET tasks (WPF, Blazor, Entity Framework) with production settings (short reasoning, 8 rounds): Flash-Next fixed 64 % (IQ3_XXS) and 45 % (Q2_0), Qwen3.8-27B 81 %
  • with maximum reasoning and 30 rounds Flash-Next fixed 86 % of the tasks, but needed 110–224 s per task
  • Qwen3.8-27B with short reasoning and 30 rounds fixed 95 % of the tasks in 71 s per task

Conclusion

A 125-billion-parameter model runs reliably and produces correct output on a single 32 GB card with 64 GB of RAM. On our tasks, however, it is slower and not better than the dense Qwen3.8-27B, which therefore stays in production. Flash-Next is interesting for setups with several GPUs or more system memory.

Comparison of the tested models (November 2026)

In November 2026 we measured two quantizations of the production Qwen3.8-27B side by side with two quantizations of Flash-Next, including the new Unsloth UD-Q2_K_XL. Agentic suite: 22 C#/.NET tasks (WPF, Blazor, Entity Framework), short reasoning, the same settings as in everyday work with Claude Code.

Qwen3.8-27B and Qwen3.8-Flash-Next on one R9700 (32 GB VRAM, 64 GB RAM)
Parameter Qwen3.8-27B
UD-Q5_K_XL (production)
Qwen3.8-27B
UD-Q5_K_XL Dynamic 3.1
Flash-Next
IQ3_XXS (ISTA-DASLab)
Flash-Next
UD-Q2_K_XL (Unsloth)
Architecture dense, 27B dense, 27B MoE, ~125B / 6B active MoE, ~125B / 6B active
Weights ~21 GB ~21 GB ~47 GB + 29 GB embeddings ~51 GB + 29 GB embeddings
Placement fully in VRAM fully in VRAM experts in RAM (~40 GiB) experts in RAM (~43 GiB)
Context 262,144 262,144 131,072 131,072
Generation ~53 t/s (with MTP) ~50 t/s (with MTP) ~23 t/s ~21 t/s
Prompt processing ~460 t/s at 245k ~460 t/s at 245k ~400 t/s at 5k ~400 t/s at 5k
Tasks fixed 44/44 (100 %) 44/44 (100 %) 21/22 (95 %) 41/44 (93 %)
Fixed within 8 rounds 77 % 75 % 68 % 75 %
Average rounds to fix 7.4 8.6 8.3 6.2
Time per task ~156 s — ~138 s ~116 s

We only replace the dense model when a new version is measurably better — Dynamic 3.1 matched it in quality and was 5 % slower, so the original quantization stays in production. Flash-Next UD-Q2_K_XL needs a larger share of RAM for the expert pool (80 % instead of 75 %); otherwise part of the experts is read from disk and prompt processing drops by ~58 %. The dense model was tested with a limit of 100 rounds, Flash-Next with 30; with one run over 22 tasks, differences of a few percent are within the spread of the suite. We do not list the time per task for Dynamic 3.1 because a VRAM overflow distorted that measurement.

Interested in deploying local LLMs?

We are glad to share our experience of running language models on our own hardware.