AMD-specific fork of llama.cpp

tl;dr — I recommend using llama-cpp-rdna-boosts 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.

简而言之,如果你使用 AMD 显卡,我推荐使用 llama-cpp-rdna-boosts。它非常精简,将我的令牌生成速度从每秒 35 个提升到了 55 个,预填充速度从每秒 700 个提升到了 1300 个。效果因人而异。

As 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.

截至 2026 年 11 月,定制化推理引擎的数量出现了爆炸式增长。其中许多引擎的灵感来源于迄今为止支撑了大部分大语言模型推理的引擎:llama.cpp、SGLang、vLLM 等。

The rationale isn’t that those options are bad, but merely that they are generalist 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.

其理由并非这些选项不好,而仅仅是因为它们属于通用引擎,没有针对特定硬件进行优化,且侧重于广泛的兼容性。另一些人则认为这些引擎的开发进度已经放缓,而在大语言模型的帮助下,他们可以自行实现更快的迭代。

Some examples of these new inference engines* are Strata, Basalt, RustingStrata, etc…

这些新型推理引擎*的一些例子包括 Strata、Basalt、RustingStrata 等……

These new forks generally all have a few things in common:

这些新的分支通常都有一些共同点:

… and the results are stunning! Strata is able to run a heavily-quantized model of Qwen 3.8 Flash Next, a 180B parameter model, on a 16GB VRAM graphics card, and 16GB system RAM, and have it generate tokens at a surprisingly high rate.

……结果令人震惊!Strata 能够在拥有 16GB 显存的显卡和 16GB 系统内存的设备上运行经过深度量化的 Qwen 3.8 Flash Next(一个 180B 参数的模型),并以惊人的高速度生成令牌。

In 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 thinks so that it goes brrr faster.

就其本身而言,这三点并不算危险信号(当然,第二点令人担忧,但一年后这可能成为标准操作——谁知道呢!),但随着这些项目的发展,对更高令牌生成速度的无情追求出现了一个不幸的转折:优化不再侧重于硬件层面的改进,而是更多地改变模型的思考方式,从而使其运行得更快。

Strata specifically has taken to preferring to poll experts loaded in VRAM even if other experts (pushed to system RAM/disk) would have been normally chosen. This is just one example, but certainly not the last.

具体来说,Strata 倾向于优先轮询加载在显存中的专家模型,即使在正常情况下本应选择其他专家模型(被推送到系统内存/磁盘中)。这只是一个例子,但绝非最后一个。

That said, I was fortunate to stumble upon yet another project that promised improvements, delivered, and was more aligned with my software development philosophy.

话虽如此,我很幸运地发现了另一个项目,它不仅承诺了改进,而且确实做到了,并且更符合我的软件开发理念。

Enter llama-cpp-rdna-boosts. 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.

隆重介绍 llama-cpp-rdna-boosts。这是一个代码库,包含了一组最小化的更改,你可以将其应用于 llama.cpp 的特定提交版本。它本质上是一个分支,但其变更集会持续重新应用于 llama.cpp 的新版本。它包含针对 AMD 的改进,能显著提高预填充和令牌生成速度。

If 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.

如果你的系统安装了 ROCm 库,你可以自行构建镜像。我不想折腾这些,所以我使用了已发布的预构建镜像。

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

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

This sets up an image that you can run sandboxed via podman to launch the inference server:

这会设置一个镜像,你可以通过 podman 在沙盒中运行它来启动推理服务器:

My actual launch script passes a few additional flags, but those are the important lines.

我实际的启动脚本传递了一些额外的标志,但上述是关键行。

I imagine upgrading would be pulling a new image down, though I have not tried this yet.

我想升级应该就是拉取一个新的镜像,尽管我还没有尝试过。

On my setup, an AMD R9700 connected to my laptop via an eGPU interface, this improved prefill and token generation rates when running ukisai/Swift-1.5-Qwen3.8-27B-GGUF (Q6_K_L) with MTP enabled:

在我的配置中(通过 eGPU 接口连接到笔记本电脑的 AMD R9700),当启用 MTP 运行 ukisai/Swift-1.5-Qwen3.8-27B-GGUF (Q6_K_L) 时,预填充和令牌生成速率得到了提升:

Strata 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.

Strata 之类的项目总是承诺得天花乱坠,但从未明确说明他们采取了哪些步骤来实现这些目标。我非常期待 rdna-boosts 社区接下来会带来什么。

  • It’s worth noting that between these two groups, vllm-radiance 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

  • 值得注意的是,在这两个群体之间,vllm-radiance 曾经出现过,它是 vLLM 的一个分支,带有 AMD 特定的补丁。我也尝试过这个,但构建步骤太繁琐,而且对于我的特定用例(1 台机器,1 名开发者)来说,vLLM 显得过于臃肿,所以我放弃了它,回到了原版的 llama.cpp。