Independent AI intelligence Two editions daily · ET
Fervor AI

Analysis · November 26, 2026 · repo

llama-cpp-rdna-boostsllama.cpplocal-aifrontier-modelsagent-infrastructure

llama-cpp-rdna-boosts: Faster AMD Local AI, Checked for Model Drift

Every local inference engine now promises more tokens per second. This AMD patch set is built around the question the charts skip: did the model change?

Local AI has a speed race going, and the scoreboard is a single number: tokens per second. Every new inference engine (the software that actually runs a model) posts a bigger one. Almost none of them show you the other number, the one that tells you whether the model still gives the same answers after the speed-up.

That missing number is not academic. A November 26 post on devnull.land describes engines that get faster by "changing how the model thinks." Its example is Strata, which the author says prefers to consult the parts of a model already sitting in GPU memory, even when the model would normally have picked different ones. Faster, yes. Same model, not quite.

The same post recommends a different kind of project: llama-cpp-rdna-boosts, a set of AMD-specific patches for llama.cpp. The author's own speed-up is real, and we'll get to it. But the part worth copying is how the project decides a speed-up is allowed to ship. It measures whether the model's output drifted, with a test you can run on your own machine in under an hour.

Here's what the repo is, how its drift check works in plain terms, and how to run that check on any llama.cpp build you care about.

What llama-cpp-rdna-boosts actually is

llama.cpp is an open-source engine that runs quantized (compressed) models on ordinary GPUs and CPUs. It is a generalist. It aims to work everywhere, which means it is not tuned for any one chip.

llama-cpp-rdna-boosts tunes it for AMD's RDNA graphics cards. Per its README, it targets RDNA3 cards like the RX 7900 XTX, RDNA3.5 laptop chips (Strix Point and Strix Halo), and RDNA4 cards like the RX 9070 XT, with older RDNA2 cards as best-effort.

The important design choice is that it is not a rewrite. It is a stack of patches applied on top of one exact llama.cpp commit. As of release v18-919794500-r366, published at 12:52 UTC on November 26, that is 19 default patches (18 official blocks plus one temporary block) applied to upstream commit 919794500. The project's release.json records that base commit and a SHA-256 fingerprint for every patch file.

Why that matters, in everyday terms: you can always answer "what exactly am I running?" It is llama.cpp at a known commit, plus these files, with these fingerprints. If something looks off, you can drop the patches and compare against plain llama.cpp at the same commit. A from-scratch engine gives you nothing to compare against.

The license is MIT like llama.cpp, with one exception the README spells out: block 03's Gated DeltaNet kernels are ports of Apache-2.0 code from another project and stay Apache-2.0. That matters if you redistribute a patched build.

The speed claim, and whose it is

The devnull.land author ran the prebuilt container on an AMD R9700 connected to a laptop over an external GPU enclosure, with a 27B Qwen-based model at Q6_K_L quantization and multi-token prediction on. Their self-reported numbers:

  • Prefill (reading your prompt): about 700 to about 1,300 tokens per second
  • Generation (writing the answer): about 35 to about 55 tokens per second

That is one person, one card, one model. Treat it as a reason to test, not a promise. It also comes with a twist I found while checking the repo: the post pulls the server-rocm-10.1 image, and the project's container notes say the ROCm 10.1 line was retired on November 23, with the warning "do not pull it for a result you intend to quote." The maintainers retired it because its math library could pick a different kernel per process, which made outputs vary between runs. Use server-rocm-10.2 instead.

Why tokens per second is not enough

Here is the story that shaped this project, and it is the best argument I've seen for testing outputs and not just speed.

On October 8, the project hit what it calls issue #113. A faster default kernel (a small routine that runs on the GPU) for one part of the model (a lower-precision BF16 path for the chunked Gated DeltaNet layers) was shipping. The generated text looked normal. Every per-operation unit test passed, 46 out of 46. And the model's numbers had moved.

The project only caught it by comparing the model's raw predictions against a known-good build. That comparison showed a real shift on two different cards, while every check that looked at text said everything was fine.

How can text look fine while the model has changed? The usual "same seed, same text" check reads the model's answer after it has already processed your prompt. If the prompt-reading step (prefill) shifts every prediction a little, the project's notes say that check simply cannot see it. The text keeps looking normal while the model underneath has drifted.

So the project added a third check that looks at the predictions themselves.

The drift check, in plain terms

At every step, a language model scores every possible next token, and those scores turn into probabilities: 61% "the," 12% "a," and so on down a long list. The raw scores, before they become percentages, are called logits.

Kullback-Leibler divergence (KLD) is a standard way to measure how different two of those probability lists are. Identical lists score zero. The more one build's predictions differ from another's, the higher the score.

The check works like a before-and-after photo:

  1. Run a known-good build over a fixed text file and save every prediction it makes. That's the base.
  2. Run the candidate build over the same text with the same settings and compare its predictions to the saved base, token by token.
  3. Report the average divergence and how often the top choice stayed the same.

The project's acceptance thresholds are a mean KLD of 0.005 or less and the same top token at least 98% of the time. For calibration, the clean version of the issue #113 kernel scored 0.00054 with the top token matching 98.8% of the time on an RDNA4 card. The rejected BF16 version scored 0.0324 and 93.6%. The threshold sits roughly ten times above clean and well below the failure.

The project wraps this in a script, gate-prefill-logits.sh, and calls it mandatory before any release that touches a prefill kernel. Its purity rulebook puts the principle bluntly: "A prefill-logit shift is a purity failure even when decode is clean."

Put this into practice

You can use this two ways: try the AMD patches, or borrow the drift check for whatever local setup you already run. The drift check needs nothing but llama.cpp's own llama-perplexity tool.

Try the patches (AMD RDNA3, 3.5 or 4)

The quickest path is the prebuilt container, which skips building ROCm (AMD's GPU computing stack) code yourself but still needs AMD's GPU kernel driver on the host (that's what the /dev/kfd and /dev/dri devices below are). Adapted from the devnull.land post with the current image tag, plus your usual server flags after the image name:

podman pull ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-10.2

podman run --rm -it \
  --network=host \
  --device /dev/kfd --device /dev/dri \
  --group-add video \
  -v "$HOME/models:/models" \
  ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-10.2 \
  -m /models/your-model.gguf

To build from source instead, the README's flow is:

git clone https://github.com/stew675/llama-cpp-rdna-boosts
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
git checkout 919794500
bash ../llama-cpp-rdna-boosts/scripts/apply-all.sh .

Then build llama.cpp for HIP as you normally would. Everything the patches add is on by default, so you don't need to set any environment variables.

One reproducibility note: server-rocm-10.2 is a moving tag. The project also tags each image with its release name, so for a result you plan to quote, pull the release-tagged image and write down the image digest.

Run the drift check on any llama.cpp build

This is the part worth stealing even if you never touch an AMD card. Use it before you adopt any patch, fork, new quantization or new flag that promises speed.

You need a model, a plain-text corpus (the project uses the WikiText-2 test file, wiki.test.raw), and two builds: your current known-good one and the candidate. Keep everything else identical between runs: model file, corpus, GPU, cache type and flags.

Step 0, which the project learned the hard way: compare the base build against itself first (record a base, then run step 2 with the same build). Some model and quantization combinations are noisy on their own. The methodology records one 35B mixture-of-experts model at a low-bit quantization whose run-to-run self-comparison already scored around 0.0046, right at the threshold. On a model like that, the test can't see a real regression, and a clean build can fail. If your self-check isn't near zero, pick a steadier model for testing.

Step 1, record the base with the known-good build:

HIP_VISIBLE_DEVICES=0 ./build/bin/llama-perplexity -m model.gguf -f wiki.test.raw \
  -c 512 --chunks 40 -ngl 99 -fa on -t 8 \
  --kl-divergence-base /tmp/base.kld

Step 2, compare the candidate build against it:

HIP_VISIBLE_DEVICES=0 ./build/bin/llama-perplexity -m model.gguf -f wiki.test.raw \
  -c 512 --chunks 40 -ngl 99 -fa on -t 8 \
  --kl-divergence-base /tmp/base.kld --kl-divergence

These are the project's own pinned settings, including HIP_VISIBLE_DEVICES=0 to keep both runs on the same AMD GPU (on NVIDIA, CUDA_VISIBLE_DEVICES does the same job). Its methodology says 40 chunks of 512 tokens is enough to tell 0.03 from 0.0005 "in well under a minute of compute per arm" on its hardware. Expect the base file to be large, several gigabytes, so put it somewhere with space.

What to expect: the output reports mean KLD and the same-top-token percentage. If your self-check was near zero, a mean KLD of 0.005 or less with the top token matching at least 98% of the time means the candidate behaves like your base at that test point. A result well past those limits means something moved, and it's worth finding out what before you decide whether the speed is worth it. The project treats some cases, like multi-GPU splits, quantized caches and whole kernel-family switches, as separate test points with their own bases, so don't stretch one pass to cover everything.

Honest limitations

It is AMD only. NVIDIA and Apple users get nothing from the patches themselves, though the drift check works on any llama.cpp build.

It moves fast. Two releases landed within about eight hours on November 26 (r365 and r366), and the README still named release r355 when I read it. The project says release.json is the source of truth, and it means it. Pin the tag you tested.

The docs are dense and, per the devnull.land author, largely model-written. Expect to read a lot to find the one setting you want.

Everything is default-on, which is convenient until something breaks. The project ships a separate diagnostics file of kill switches for bisecting, and you may need it.

Stay off the beta lane for now. The README warns that the beta two-arm server patches have a known open defect that "corrupts under heavy concurrent load."

The drift check only covers llama.cpp builds. It needs logits from llama-perplexity, so it can't directly audit an engine like Strata that doesn't share that tool. For those, the fallback is weaker: fixed prompts, greedy decoding and a diff of the text, which the issue #113 story shows can miss real drift.

And a passing score is not a quality guarantee. It means "behaves like the base you recorded." If your base was already a lossy quantization, you've confirmed you kept that loss, not that you avoided it.

Fast is easy to measure

The speed numbers in this space will keep climbing, and most of them will be real. The open question with every one is what it cost.

llama-cpp-rdna-boosts is useful twice over. If you own a recent AMD card, it is a credible way to get more out of it while keeping a clear line back to upstream llama.cpp. If you don't, it is a working template for a habit most local AI setups skip: record a base, compare the candidate, and only then look at the tokens per second. The next time a fork promises double the speed, you'll have a forty-chunk test that tells you whether you're still running the model you chose.

Sources: devnull.land, "AMD-specific fork of llama.cpp" (November 26, 2026); llama-cpp-rdna-boosts README, release.json, CONTAINERS.md, prefill-logit methodology, gate-prefill-logits.sh and GREEDY-PURITY.md, all reviewed at tag v18-919794500-r366 on November 26, 2026; llama.cpp.