AI ShortsOpen the app
Tools & Dev ยท

A tweaked llama.cpp speeds up AI on AMD graphics cards

A developer shared small changes to llama.cpp, a free tool for running AI models on your own computer, that speed it up on AMD graphics cards. On one card, the author says, reading a prompt got nearly twice as fast and answers went from about 35 to 55 small chunks of text per second.

llama.cpp is a free program that runs AI language models locally. Many new forks chase speed, but this one, llama-cpp-rdna-boosts, takes a different path. It applies a small, documented set of AMD-specific patches on a pinned llama.cpp version, then reapplies them as llama.cpp updates.

The author wanted a hardware-focused engine with fewer moving parts. The post says the patches are largely written by an AI model, so treat the code with the usual care.

On an AMD R9700 GPU connected through an external enclosure, running a 27-billion-parameter Qwen-based model with MTP (a speed-up method) turned on, the author reports prompt processing rising from about 700 to about 1300 tokens per second. Text generation rose from about 35 to about 55 tokens per second.

These are one person's numbers on one setup, so your results will vary. The post is dated November 26.

Building it yourself needs ROCm, AMD's GPU software, though the author used a prebuilt container image instead.

New to this? The key idea

Running an AI model locally means your own graphics card does the work, and the speed depends on how well the software is tuned for that card. Prompt reading and answer writing are two separate steps, and each can be sped up separately. Software built for many kinds of hardware often leaves speed unused on any one kind.

Use it at work

Use it for: running local language models faster on AMD graphics cards. Developers and hobbyists with Radeon or similar cards, and teams keeping data on their own machines, should care.

Try it: the author used the prebuilt image with Podman:

podman pull ghcr.io/stew675/llama-cpp-rdna-boosts:server-rocm-10.1
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.1"

The author's own launch script adds more flags that the post does not show.

Before you roll it out: it needs an AMD graphics card, Podman, access to /dev/kfd and /dev/dri, and video group membership. Building it yourself needs ROCm. The reported gains (prompt reading about 700 to 1300 tokens per second, generation about 35 to 55) come from one R9700 card in an external enclosure with one model, so results will vary. The post says the patches are largely written by an AI model. Upgrading by pulling a newer image is untested. Licence: not stated in the post, check the repository. Models run on your machine, so no data leaves it.

Summaries are written by AI from the linked source. Always check the original.

Get AI Shorts by email

Every morning, the day's stories in one short email. Unsubscribe in one tap.