AndyL

AndyL

APU for LLM Inference?

For development and prototyping, I’d like to retain a basic ability to perform LLM inference on my own hardware, using open source models. My go-to LLM runner is Ollama.

Currently I run an Nvidia eGPU connected by Thunderbolt to an Ubuntu server. I absolutely hate the setup, mostly because the Nvidia driver configuration is terrible, secondarily because the GPU memory is limited (12GB for $375 RTX3060, 16GB for $1300 RTX4080).

Here and there I read about APU (Accelerated Processing Unit), which is a processor that combines GPU and CPU. Examples include: AMD Ryzen AI Max+ Pro 395, Intel Core Ultra 9 275HX, Apple M4 Pro.

Example APU machines include the Framework Desktop and the Mac M3 Ultra.

In theory, an APU can support on the order of ~190GB of unified memory, of which a large portion (like maybe ~120GB) can be allocated to the ‘GPU’ for large models and big context windows.

Does anyone have experience running APU machine with unified memory for LLM inference? I’m curious about costs, performance, driver configuration, and Ollama compatibility.

#ai

First Post!

AstonJ

AstonJ

What about a cluster of M4 Minis? (or Mac Studios)

Most Liked

garrison

garrison

Keep in mind that current autoregressive LLMs are heavily bottlenecked by memory bandwidth with low batch sizes (e.g. local inference). If you divide the memory bandwidth by the size of the model you get a reasonably accurate inference speed estimate.

So e.g. if you have a chip with 300GB/s bandwidth and you run a q4 70B model, about 35GB, you will get around 8 t/s. If you look at benchmarks for M chips that’s about right. Frankly 8 t/s feels pretty slow but it’s not unusuable.

However, if you were to jump to, say, a 100GB model, now you’re at 3 t/s. So even if you spend big on 128GB RAM there is not enough bandwidth to move those weights in and out of the registers and the performance is not good.

However, MoE models are designed to only load a subset of weights into the cores for each token. So if you have a 100GB model which only uses 10GB of weights for each token, now you have 30 t/s (pretty good) for your 100GB of RAM. This is why MoE models exist. Deepseek R1 (the real one) or LLama4 are in this category.

Anyway, the point being: these chips with 2-300 GB/s bandwidth might look nice, but keep in mind a 5090 is delivering 1800 GB/s memory bandwidth for its 32 GB of VRAM, i.e. generations will be 6-9 times faster flops notwithstanding (and it has plenty of flops too). The amount of RAM is not the only variable.

Also diffusion models might become a thing at any time and render this entire equation irrelevant, so who knows.

AstonJ

AstonJ

If you can wait 6 months or so, when the Mini M5’s come out (or a bit later for the Studios) you might be able to pick some up on the second hand market and build a cluster.

Worth keeping an eye on the AI portal on DT too, as it’ll usually show the most interesting threads in the trending lists: https://devtalk.com/ai

AndyL

AndyL

What about a cluster of M4 Minis?

Yes - clustering seems like an emerging thing for local inference. The NVIDIA DGX Spark is built to cluster. So is the Framework Desktop.

A popular framework for clustering is an open source tool EXO.

Last Post!

garrison

garrison

I fully agree with you. If I ever do ship those LLM features I will run my own inference. It’s not something I’m planning for in the near term, but that’s why I keep up with it as I said.

For personal use, well, that’s part of why I’m not using LLMs at all :slight_smile: It does seem like llamacpp plus their neovim plugin on an M series mac might be a decent “better autocomplete” type setup, though. I have considered trying that out.

Where Next?

Popular in AI / LLMs Top

ricksonoliveira
Hey folks, I have been looking for an alternative to good old VsCode for a while. Have tried some vim and emacs editors with their plugi...
New
DaAnalyst
Exactly. A bit off topic, but I think the issue with the machines is they don’t bear any consequences. And even if they did one day, the...
New
AstonJ
Inspired by @jdiago’s post containing this slide: I thought it would be interesting discussing what independent languages like Elixir...
#ai
New
AstonJ
Watched this earlier and thought it was worth sharing. For those not aware Geoffrey Hinton is considered one of the godfathers of AI, yet...
New
Cheezy
I spent the month of January building and refining a tool to help with Team / AI collaboration. Several friends have provided feedback an...
New
Vidar
This morning I set out to make an Elixir library for internal use of some specific statistical method that only seemed to exist in some P...
#ai
New
DaAnalyst
How much would you really be willing to spend (more) to keep it going with Claude should Anthropic go berserk with the rates, or put diff...
New

Other popular topics Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement