What unified memory is
In most PCs, the processor has its own RAM and the graphics card has its own VRAM. Data the GPU needs has to be copied across, and the GPU can only work with what fits in its VRAM. Apple silicon Macs put the CPU, GPU and memory on one package and give them a single shared pool, called unified memory.
For local AI, that means the model's weights can use most of the Mac's memory. A 64 GB Mac mini has roughly 60 GB available for a model after macOS takes its share.
Unified memory vs VRAM
| Hardware | Memory for the model | Bandwidth |
|---|---|---|
| Mac mini M5 Pro 64GB | ~60 GB (shared) | 307 GB/s |
| Mac Studio M5 Ultra 512GB | ~508 GB (shared) | 1200 GB/s |
| NVIDIA GeForce RTX 4090 | 24 GB (VRAM) | 1,008 GB/s |
| NVIDIA GeForce RTX 5090 | 32 GB (VRAM) | 1,792 GB/s |
The trade-off is clear in the table: discrete GPUs read memory faster, but hold less. Macs hold much more, at lower bandwidth (the M5 Ultra closes much of the gap).
Why it matters for LLMs
Two rules decide whether a model runs well:
- It has to fit. The model's weights (and its working memory for the conversation) must sit in memory. A 4-bit Llama 3.3 70B is about 43 GB: too big for a 24 or 32 GB card, but fine in 64 GB of unified memory.
- Speed follows bandwidth. Each generated token reads the active weights once, so tokens per second is roughly bandwidth ÷ model size, times how efficient the runtime is (about 75% for dense models).
For a model that fits both, the GPU wins on speed. Qwen3 32B (4-bit, 20 GB) is estimated at about 37.8 tok/s on an RTX 4090 and 67.2 tok/s on an RTX 5090, versus about 11.5 tok/s on the Mac mini M5 Pro 64GB. These are bandwidth-based estimates, not measurements.
The macOS GPU memory limit
There's one catch. By default, macOS lets the GPU use only part of unified memory, not all of it. Running a model close to the Mac's total memory usually means raising that limit (the iogpu.wired_limit_mb setting), which advanced users do with a terminal command.
For example, one published test on a Mac mini M5 Pro 64GB raised the limit to load gpt-oss 120B; when the model didn't fit in what the GPU could use, speed collapsed as work spilled to the CPU (source).
Choosing memory for a Mac
- 7B–14B models: 16–24 GB is enough.
- 27B–32B models: 32 GB minimum; 48 GB for headroom and longer contexts.
- 70B dense models: 64 GB minimum; 128 GB for comfort.
- 100B+ mixture-of-experts models (gpt-oss 120B, Llama 4 Scout): 96–128 GB.
- 200B+ models: 256–512 GB on an M5 Ultra.
Then pick bandwidth for speed. See M5 Pro vs M5 Max and Mac mini vs Mac Studio, or check a specific model on the models page.
FAQ
What is unified memory?
Is unified memory as good as VRAM for AI?
How much unified memory do I need for local LLMs?
See any model on the exact Mac you're considering.
- Apple: Mac mini tech specs
- Apple: Mac Studio tech specs
- NVIDIA: NVIDIA GeForce RTX 4090
- NVIDIA: NVIDIA GeForce RTX 5090
- rsec on note.com (Mac mini M5 Pro 18/20, 64GB, Ollama, single run)
Speeds come from published measurements (with source links) or labeled estimates. How we measure