# llama-cpp-rdna-boosts

> AMD RDNA speed patches for llama.cpp, applied to a pinned upstream commit

- Category: Models & Inference / Local Runtimes
- Language: Shell
- Licence: MIT
- Repository: https://github.com/stew675/llama-cpp-rdna-boosts
- Canonical page: https://ai-tldr.dev/tools/llama-cpp-rdna-boosts/
- Updated: 2026-11-26

## In short

llama-cpp-rdna-boosts is a collection of patches that adds AMD-specific performance work to llama.cpp. It sits in the Local Runtimes category of the Models & Inference tools and is open-source, written in Shell and licensed MIT. To get started: apply the patches to llama.cpp.

## Overview

llama-cpp-rdna-boosts is a collection of patches that adds AMD-specific performance work to llama.cpp. It is not a separate engine: each release is a linear series of git am commits that you apply to a clean llama.cpp checkout at a pinned upstream commit, the fork point, which is re-based onto newer upstream code over time. Everything in the default set is on without setting any environment variable.

The patches add MTP decode, chunked gated-delta-net prefill, BF16 KV and WMMA flash attention, fused MoE and k-quant decode paths, a hybrid all-reduce for multi-GPU setups, and memory savings in attention that free several GiB of VRAM. Later blocks add a prompt admission policy for llama-server and, on integrated GPUs such as Ryzen AI APUs, a memory tier that lets MoE models larger than RAM stream their experts. Arch selection happens at runtime, so one multi-arch build picks the right path on each card.

The set targets RDNA3 (RX 7900 class), RDNA3.5 (Strix Point and Strix Halo APUs) and RDNA4 (RX 9060 and 9070 class) GPUs; RDNA2 is best-effort and externally validated on a Radeon Pro V620. The README says RDNA4 sees the most benefit. Prebuilt ROCm server, light and full container images are published to GitHub Container Registry for each release, and the project is MIT-licensed.

## What it does

- A linear series of default patches for a clean llama.cpp checkout at a pinned fork point, applied with one script
- MTP decode, chunked gated-delta-net prefill, and BF16 KV plus WMMA flash attention
- Fused MoE and k-quant decode paths, plus an expert cache for running MoE models bigger than VRAM on one card
- Attention memory savings that free several GiB of VRAM
- Runtime arch selection across RDNA2, RDNA3, RDNA3.5 and RDNA4 in one build
- Prebuilt ROCm containers on ghcr.io for server, light and full builds

## Getting started

You need an AMD RDNA GPU with ROCm. The current fork point and release identity are in the repo's release.json.

1. Apply the patches to llama.cpp

   Clone upstream llama.cpp, check out the fork point the release names, and run the repo's apply script. It creates a branch called rdna-boosts; then build llama.cpp as usual.

```bash
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
git checkout 919794500
bash <path-to-this-repo>/scripts/apply-all.sh .
```

2. Or use a prebuilt container

   Each release publishes ROCm images such as ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-<version>, plus light and full variants and a latest tag. CONTAINERS.md lists the tags and run options.

3. Opt in to extras only if needed

   Optional and beta artifacts are not part of the default delivery. Add them with --include-optional or --include-beta when you run apply-all.sh.

## When to use it

- Get faster prefill and token generation from llama.cpp on a Radeon RX 7000 or 9000 series card
- Run large MoE GGUF models on a Strix Halo APU or a single card with less VRAM than the model needs
- Serve local models with llama-server from a ready-made ROCm container
- Skip it on NVIDIA or Apple hardware — the work is specific to AMD RDNA GPUs

## Version history

- 2026-11-26 v18-919794500-r366: Release r366 ships 19 default patches on llama.cpp fork point 919794500, with ROCm 7.14.1 and 10.2 container images. It landed the same day a devnull.land post recommending the patch set reached the Hacker News front page.
