An unofficial, read-only Hacker News reader. Join the beta →

AMD-specific fork of llama.cpp (opens external site)

438 points by julianlam 1 day ago | devnull.land | 106 comments on HN

View full thread · View on Hacker News

Comment thread (26)

  1. Early in 2025 a bunch of folks realized that AMD made a bunch of cards with mediocre compute but incredibly fast HBM2 memory in their circa 2018 gfx906 datacenter series, so you could get 32GB VRAM capable of incredible 1 TB / s bandwidth for $200 (the closest in today’s cards is north of $3000)

    There has been a rich little ecosystem of folks optimizing llama.cpp for these odd cards (no tensor cores, no native bf16 etc.) including my little personal repo https://github.com/kinchahoy/llama-of-vega.cpp. Stuff like this focused on more modern RDNA doesn’t help us at all.

    It’s been interesting to see how much each new frontier model can figure out in terms of optimizing for these GPUs and what they can’t!

    Fable and Astra will regularly run out of ideas until I point them to someone’s actually thoughtful repo and then they’ll diligently incorporate ideas.

    The optimization wins are huge (I was initially skeptical that per model kernel optimizations would be worth much). 27B at a pristine Q8 quant goes from base llama.cpp at some 250 pp / 25 tg to 600 pp / 40 tg even before speculative decoding.

    Replies (6)
    1. Yeah these cards are great, I have one too. There's the Radeon VII Pro 16GB and the Instinct MI50 with 16 or 32GB. For the latter you need to come up with your own cooling though.

      Unfortunately they lack the right matrix processor to accelerate prefill so time to first token can be slow. And software support is getting bad. ROCm dropped them already so there's only Vulkan

      Ps I don't think this architecture is supported by the port in this link. It seems to be specific to RDNA.

      Replies (6)
      1. alignment and introspection call for standardization, homogenization. science calls for evolution: iteration, exploration, divergence.
        Replies (1)
        1. also biology (and business, and technology, and every other type of replicator)

          (both mutation and standardization, oddly enough)

      2. Checkout the repo - you can get surprisingly good prefill with kernel optimization (not the 3K / s that a 5090 will do but competitive with a modern 9700 XTX or Intel Arc etc)
        Replies (1)
        1. Hm I'll try it thanks! If I can manage to wrap it into a docker.
          Replies (1)
          1. I used to have a dockerized build of an older version - will add one to the repo over the weekend
      3. > ROCm dropped them already...

        I think this kind of thing matters less nowadays. The codebase contains enough information that if you throw these things at AI they can do the backporting. It works well because there's a straightforward feedback loop ("does it work?" and "measure performance of <X> and <Y>").

      4. ROCm supports gfx906 (MI50/Radeon VII) in their nightly builds, just not official stable releases.

        They even support the older gfx900 (MI25/WX9100).

        llama.cpp compiled against ROCm 10.x works well on my 2 MI25s.

        Replies (1)
        1. Ah ok I didn't know. But I heard Vulkan works better anyway in terms of performance.

          Personally I don't really want to mess around with builds, I'm not a software dev. I'd just like to deploy a docker and run the AI for other stuff.

      5. In case you're not aware, you might be interested to know that TheRock builds have picked gfx906 back up, kinda [0]. It's not tehcnically 'supported', but they've done some work to fix the broken bits, and it builds. It's in the list.

        I gave up on my mi60 a year or two ago too (got a strix halo now), so I missed most of this. Was a pleasant surprise to find out they'd decided to do the work to at least kinda bring them back to life.

        [0]:https://github.com/ROCm/TheRock/blob/main/RELEASES.md

      6. I actually have a fun franken-build with a Radeon VII Pro hooked up to a Raspberry Pi 5 and a mini gallium-nitride power supply. It's mostly GPU by volume. I have titled it "The Modern Computer".

        I just ran it for 5 days straight computing embeddings for all of English Wikipedia. But what I really want is to get it running a nice LLM. The card is overclockable thanks to being a gaming card, so the memory bandwidth is now 1.1 TB/s. But the PCIe gen 3x1 interface to the Pi 5 means MoE offloading/streaming is not viable.

        Replies (1)
        1. Yeah if you put it in a full computer you can run Strata on it. There's a proper build for it.

          You can also run qwen 9b of course and keep it in memory. Then the PCIe speed hardly matters.

          Replies (1)
          1. Yeah I’m hoping to cram both a smaller LLM and an embedding model and get it to be a local copy of Wikipedia I can ask questions in natural language.
    2. 2 MI50 32 GBs in my rig I got for $300 a piece about 6 months ago. There is also a great discord for people tinkering and optimizing with these cards. I get like 70 t/s with my setup right now running QFN using Strata.
      Replies (1)
      1. Woah 70 t/s on IQ3 on long context?? Need to test again. I find strata tricky because it’s super willing to degrade quality for tps - I really want as close to the OG model as possible for agentic work.
        Replies (1)
        1. On my benchmarks it performs equally as well quality wise as q8 3.8 27B, tool calls are marginally worse though. It also runs way way cooler on my cards which is important to me because the blowers for the cards are super loud at high speed. Max context is 200k right now for ref.
    3. The same just happened with nvidia’s crypto mining cards

      Turns out they are 80gb A100s but were advertised as 8gb with only 8gb addressable until a mod

      They were a couple hundred just 6 months ago, now $5000 and getting closer in parity to normal A100s

      Replies (2)
      1. Did people just not notice the extra order of magnitude of chips literally soldered onto the board?
        Replies (2)
        1. More so that the specific mod was agentically coded and there were two series of mods

          I think the timeline is rational

          They’re just getting nv link reenabled

        2. Its HBM so its on the chip itself
      2. All this does is feed the GPU lord's unearned increment.
    4. Do you think Fable and Astra are acting dumb on purpose as some anti-competitive measure?
    5. I discovered my minisforum with 32gb RAM and only IGPU because it is AMD I could just allow the IGPU to use up 24GB RAM for the model, which both improved performance, but also caused way less electricity usage and heat development compared to CPU. Quite underrated. I guess getting a 64GB version you would actually have a large enough context window to do proper coding tasks as background tasks. Because it is still not fast, but with latest QWEN 27B the quality is very good.
      Replies (1)
      1. What kind of token rates do you get?
    6. I’ve yet to see a gfx906 card that can actually saturate 1 TB/s with ECC active