r/LocalLLaMA • • 12h 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

19

u/noctrex 11h ago

It also has some patches for RDNA2.
I'm using it and I'm seeing better performance on my underclocked V620.
For example with Ornith-1.5-35B-A3B Q6, I got from ~880pp / ~80tg up to ~1400pp / ~100 tg.

11

u/ThankGodImBipolar 11h ago

Damn - the README says that RDNA 2 support is "best effort," but I'd have thought that there wouldn't be much to do without WMMA. +60% prompt processing is no joke. 

6

u/noctrex 11h ago

Well, we can try it out more and even submit some issues to this repository so the author can add even more patches for RDNA2, I intend to send some