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

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.

DaAnalyst

DaAnalyst

Please continue to post any updates you might have on the matter. I too am looking to find most bang for the buck.

AstonJ

AstonJ

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

Where Next?

Popular in Dev Env & Tools Top

dimitarvp
It would also be the reason for me to seriously hurt myself. :003: I’ve spent way too much time tinkering. I’ll be the first to agree th...
New
mveytsman
If you use vim, upgrade alchemist.vim to 2.8.0 as soon as possible!! There’s a bug that allows any website to take over your computer. ...
New
AstonJ
I’ve been reinstalling macOS after trying out Tahoe, and when I went to migrate from a Time Machine backup I got an error I’ve not see be...
New
renews
Hello everyone, today I created a simple Neovim plugin to check for new versions of packages used in the project, not sure if it is usefu...
New
AstonJ
Welcome to our thread for Windows users :smiley: Mac users please use this thread Linux users please use this thread For those who dis...
New
AstonJ
Just noticed mine has gotten quite unwieldy and should probably be split into multiple files - but curious how big everyone else’s is! (...
New
AstonJ
How fast is your internet connection? (And how much do you pay?) You can test via www.speedtest.net and to embed results into your post...
New
AndyL
For development and prototyping, I’d like to retain a basic ability to perform LLM inference on my own hardware, using open source models...
#ai
New
law
/an-aside Why is it not completing the module name too? Atom’s does. Also why does it not fill in the arguments with defaults that yo...
New
sodapopcan
I get the impression that the Elixir community at large is using nvim, though it occurred to me that I don’t actually know this so I thou...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement