{"slug": "amd-specific-patches-for-llama-cpp", "title": "AMD Specific Patches for Llama.cpp", "summary": "A set of AMD-specific patches applied to a pinned llama.cpp commit, published as llama-cpp-rdna-boosts, raised token generation from roughly 35 to 55 tokens per second and prefill from roughly 700 to 1,300 tokens per second on an AMD R9700 GPU connected via eGPU, according to the author's testing with ukisai/Swift-1.5-Qwen3.8-27B-GGUF at Q6_K_L quantization with MTP enabled. The author recommends the project over newer bespoke inference engines such as Strata, which he says prefer experts loaded in VRAM even when other experts pushed to system RAM or disk would normally be chosen, trading model behavior for speed. The patches are distributed as pre-built Podman images, including ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-10.1, and are continually re-applied to newer llama.cpp versions.", "body_md": "tl;dr\n — I recommend using \nllama-cpp-rdna-boosts\n if you have an AMD graphics card. It’s lean, and increased my token generation from 35 to 55 tokens/second, and my prefill from 700 to 1300 tokens per second. YMMV.\n\nAs of November 2026, an explosion in the number of bespoke inference engines has taken place. Many of them take inspiration from the engines that enabled much of the LLM inference up 'til now: llama.cpp, SGLang, vLLM, etc.\n\nThe rationale isn’t that those options are bad, but merely that they are \ngeneralist\n engines, optimized for no particular hardware and with a focus on broad compatibility. Others feel the development pace of those engines have slowed down, and with the help of LLMs, they can move faster on their own.\n\nSome examples of these new inference engines* are Strata, Basalt, RustingStrata, etc…\n\nThese new forks generally all have a few things in common:\n\nThey focus on a specific subset of models and/or hardware\n\nThey use a frontier model to vibe-code the entire thing\n\nThey chase ever-higher token generation speeds\n\n… and the results are stunning! Strata is able to run a heavily-quantized model of Qwen 3.8 Flash Next, a \n180B parameter model\n, on a 16GB VRAM graphics card, and 16GB system RAM, and have it generate tokens at a surprisingly high rate.\n\nIn and of itself those three things are not red flags (the second is concerning, of course, but it may be SOP in a year’s time — who knows!), but as these projects have evolved, that relentless chase toward higher token generation speeds has taken an unfortunate turn, in that the optimizations are less about hardware-specific changes, but more about changing how the model \nthinks\n so that it goes \nbrrr\n faster.\n\nStrata specifically has taken to preferring to poll experts loaded \nin VRAM\n even if other experts (pushed to system RAM/disk) would have been normally chosen. This is just one example, but certainly not the last.\n\nThat said, I was fortunate to stumble upon yet another project that promised improvements, delivered, and was more aligned with my software development philosophy.\n\nEnter \nllama-cpp-rdna-boosts\n. It is a repository that contains a minimal set of changes that you apply against a pinned commit of llama.cpp. It is in essence a fork, but one whose changeset is continually re-applied to newer versions of llama.cpp. It contains AMD-specific improvements that drastically improve prefill and token-generation speeds.\n\nI appreciate llama.cpp’s approach to software development. They are a stable base to branch off from. Contributions are vetted throughly and applied judiciously. ✅\n\nThe \nrdna-boosts\n repo is a set of small patches that are applied to base llama.cpp. Fewer moving parts mean fewer things to maintain ✅\n\nThe changes are (somewhat opaquely, it’s all straight Claudish 😬) outlined in the documentation, ensuring some degree of transparency. ✅\n\nThe setup\n\nIf you have ROCm libraries installed on your system, you can build the image yourself. I didn’t want to mess with that, so I used the pre-built images published.\n\npodman pull ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-10.1\n\nThis sets up an image that you can run sandboxed via podman to launch the inference server:\n\n```\npodman run --rm -it \\\n    --network=host \\\n    --device /dev/kfd \\\n    --device /dev/dri \\\n    --group-add video \\\n    -v \"$HOME/models:/models\" \\\n    \"ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-10.1\" \\\n```\n\nMy actual launch script passes a few additional flags, but those are the important lines.\n\nI imagine upgrading would be pulling a new image down, though I have not tried this yet.\n\nThe numbers\n\nOn my setup, an AMD R9700 connected to my laptop via an eGPU interface, this improved prefill and token generation rates when running \nukisai/Swift-1.5-Qwen3.8-27B-GGUF (Q6_K_L)\n with MTP enabled:\n\nBefore\n\nAfter\n\nPrefill\n\n~700 t/s\n\n~1300 t/s\n\nToken Generation\n\n~35 t/s\n\n~55 t/s\n\nStrata and its ilk were always promising the moon and it was never clear what steps they took to make that happen. I’m very much looking forward to what the rdna-boosts community come up with next.\n\n* It’s worth noting that between these two groups, \nvllm-radiance\n made an appearance, which was a fork of vLLM with AMD-specific patches. I tried this too, but the build steps were so onerous and vLLM so overbuilt for my specific use case (1 machine, 1 developer), that I abandoned it and went back to vanilla llama.cpp\n\n← Back to all posts", "url": "https://wpnews.pro/news/amd-specific-patches-for-llama-cpp", "canonical_source": "https://devnull.land/amd-specific-llama-cpp", "published_at": "2026-11-26 17:11:29+00:00", "updated_at": "2026-11-26 17:44:03.958602+00:00", "lang": "en", "topics": ["ai-infrastructure", "large-language-models", "ai-tools", "mlops"], "entities": ["llama.cpp", "llama-cpp-rdna-boosts", "AMD", "R9700", "Strata", "Qwen", "ukisai/Swift-1.5-Qwen3.8-27B-GGUF", "ROCm"], "also_reported_by": [], "takeaway": "Applying the llama-cpp-rdna-boosts patches to a pinned llama.cpp commit on an AMD R9700 raised prefill from ~700 to ~1,300 tokens/second and generation from ~35 to ~55 tokens/second on a Q6_K_L Qwen3.8-27B GGUF with MTP enabled.", "recommendation": {"advice": "On AMD RDNA GPUs, run the pre-built llama-cpp-rdna-boosts ROCm image instead of stock llama.cpp to roughly double prefill and lift generation from 35 to 55 tokens/second, and avoid forks that skew expert selection to VRAM-resident experts.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/amd-specific-patches-for-llama-cpp", "markdown": "https://wpnews.pro/news/amd-specific-patches-for-llama-cpp.md", "text": "https://wpnews.pro/news/amd-specific-patches-for-llama-cpp.txt", "jsonld": "https://wpnews.pro/news/amd-specific-patches-for-llama-cpp.jsonld"}}