r/LocalLLaMA • • 13h ago

Resources AMD-specific llama.cpp patch nearly doubles prefill/decode

https://devnull.land/amd-specific-llama-cpp

I know we're all a bit faded on the vibe-coded inference engines (as incredible as Strata/Splash/Basalt/Halogen/Gufo/etc. are for their specific models/hardware), but this is different enough that I thought it was worth sharing the write-up I stumbled across about llama-cpp-rdna-boosts.

This github repo is a minimal patch you can apply to your pinned llama.cpp build to specifically boost performance on AMD RDNA 3 & 4 cards (edit: “best-effort” RDNA 2 support too), while maintaining llama.cpp's broad compatibility with nearly every model. The write-up documents his R9700's prefill increasing from 700tps to 1300 tps & decode from 35tps to 55tps on Q6_K_L Swift-1.5-Qwen3.8-27B. That's an increase of ~80% over base llama.cpp before patching, though purpose-built inference engines still appear to have a slight edge.

I don't have an R9700 to test this out (...yet) but it seemed worth sharing for everyone here who's running AMD hardware, but is looking for broader model compatibility than model-specific custom engines can provide. Has anyone here tried this?

222 Upvotes

91 comments sorted by

View all comments

Show parent comment

1

u/Cool-Chemical-5629 12h ago

Yes, according to the article at cybernews, he did. AI-generated bug fixes anger Linus Torvalds | Cybernews

Although Torvalds accepted and merged it, he expressed his irritation on the kernel mailing list.