CPU vs. GPU vs. Apple Silicon: the VRAM math behind local AI
A 7B model needs about 5 GB and a 70B needs about 42 GB, and speed follows memory bandwidth: 90 GB/s on a desktop CPU, 1,008 GB/s on a 4090, 546 GB/s on an M4 Max. Buy the bus, not the cores.

On this page
In brief
- Every token reads the whole model from memory, so generation speed tracks memory bandwidth: about 90 GB/s on desktop DDR5, 1,008 GB/s on an RTX 4090.
- A Q4_K_M model needs roughly 0.6 GB per billion parameters: about 5 GB for 7B, 19 GB for 32B, 42 GB for 70B, plus the KV cache.
- Ollama loads a model on one GPU if it fits and only spreads it across cards when it must; a partial load spills the rest to slow system RAM.
- Apple Silicon has no separate VRAM: a 128 GB M4 Max can hold a 70B model whole, at 546 GB/s, slower than a 4090 but roomier than any consumer card.
- Check what actually happened with ollama ps: the Processor column shows 100% GPU, 100% CPU, or the split between them.
Pick a model to run locally and the next question is where to run it. That choice decides whether the model loads at all, and how fast it answers. Both come down to memory: how much of it the fast kind holds, and how quickly it can be read. The chip's name matters less than those two numbers.
Generating one token means reading the model's weights out of memory, doing a small amount of arithmetic, and writing one token, then repeating it for the next. The arithmetic is small; the reading is the work. So generation speed tracks memory bandwidth, the rate at which weights move from memory to the chip.
How much memory a model needs
Start with the weights. At Q4_K_M, the quantization most people download first, a model needs roughly 0.6 GB per billion parameters, the arithmetic behind what Q4_K_M actually costs: about 5 GB for 7B, 19 GB for 32B, 42 GB for 70B. Those are weights only.
Then add the KV cache, the working memory for the conversation so far. It grows with every token of context, and at long context can rival the weights: a Llama 3.1 8B at 131,072 tokens needs 16 GB of cache at full precision, as the KV cache explains. The cache can be quantized separately: Ollama's OLLAMA_KV_CACHE_TYPE offers q8_0 at about half the memory of the f16 default, and q4_0 at about a quarter. The setting is global, and high grouped-query attention models such as Qwen2 lose more precision from it.
Weights plus cache plus a little overhead is the memory the machine must hold in its fast pool.
The bandwidth ladder
A desktop CPU reads system memory over a DDR5 bus: two channels of DDR5-5600 top out at about 90 GB/s in theory, less in practice. Compare that with the other options:
- RTX 4090: 24 GB of GDDR6X at 1,008 GB/s
- RTX 5090: 32 GB of GDDR7 at 1,792 GB/s
- RX 7900 XTX: 24 GB of GDDR6 at 960 GB/s
- Mac Studio M4 Max: up to 128 GB of unified memory at 546 GB/s
- Mac Studio M3 Ultra: up to 512 GB of unified memory at 819 GB/s
A 4090 moves weights about 11 times faster than a desktop DDR5 bus, which is why the same model feels like a different machine on a GPU. It is also why core counts mislead: adding CPU cores does not widen the bus.
The CPU: the slow lane with the biggest parking lot
Any modern CPU runs local models: llama.cpp builds on the ggml library with SIMD-optimized kernels for x86 and ARM, and Ollama falls back to the CPU when it finds no GPU. The CPU's advantage is capacity: system RAM is cheap and plentiful, so a 64 GB desktop holds a 70B model at Q4 whole, which no single consumer graphics card can do. The cost is speed, set by the roughly 90 GB/s bus.
If you run on CPU, mind the thread count. llama.cpp takes a -t flag, and its own performance guide warns that too many threads oversaturates the CPU: start at 1 and double until speed stops improving, then scale back.
CPU inference suits small models, trying things out, and batch jobs that run overnight. It is a poor fit for interactive chat with a 32B model or larger.
A discrete GPU: fast, with a hard ceiling
A graphics card is the fast lane, and its limit is a hard one: the VRAM printed on the box. Ollama supports NVIDIA cards back to compute capability 5.0, which reaches the GTX 750 Ti, with driver version 550 or newer. The current consumer picks are the RTX 4090 with 24 GB and the RTX 5090 with 32 GB, launched at $1,599 and $1,999.
AMD's flagship from the same generation, the RX 7900 XTX, has nearly identical memory numbers to the 4090: 24 GB at 960 GB/s, launched at $999. The difference is software. Ollama supports AMD cards through ROCm v7 on Linux, with a narrower supported list than NVIDIA's, and Vulkan as a fallback for cards ROCm does not cover. On Windows, Ollama notes Radeon cards currently default to one loaded model at a time because of a VRAM-reporting limitation in ROCm v5.7.
What happens when a model does not fit matters before buying. Ollama checks the VRAM a model needs against what is available. If it fits on one GPU it stays there, because spreading it would push data across the PCIe bus during inference; only if it does not fit does Ollama spread it across all available GPUs. With llama.cpp directly, the -ngl flag offloads a chosen number of layers to the GPU and the rest runs on the CPU.
You can see the result with ollama ps: its Processor column shows 100% GPU, 100% CPU, or a split such as 48% CPU and 52% GPU. A split means the model is bigger than the card. And VRAM does not degrade gracefully. Ollama requires a model to fit completely in VRAM before loading a second model alongside it, and new requests queue until a model can load.
Apple Silicon: one pool of memory
Apple Silicon removes the ceiling in a different way: there is no separate VRAM, the CPU and GPU share one pool of unified memory, so a model either fits in the machine's memory or it does not. A Mac Studio with the M4 Max tops out at 128 GB of unified memory at up to 546 GB/s, and one with the M3 Ultra reaches 512 GB at 819 GB/s. A 128 GB M4 Max holds a 70B model whole, with room for a long context.
The trade is speed and flexibility: at 546 GB/s the M4 Max moves weights at about half the rate of a 4090, and memory size is fixed at purchase, with no card to swap later. Ollama accelerates Apple Silicon through the Metal API. Its hardware documentation names no specific chips, so the machine's memory figure is the number that matters.
The decision, in order
Work it out in this sequence and the hardware mostly picks itself.
First, choose the model size: 7B or 8B for everyday chat and coding help, 32B for noticeably better answers, 70B for the best local quality. Then add weights and cache at the context length you actually use. That total is the memory you must have in the fast pool. Then buy the machine with that much fast memory and the most bandwidth your budget allows.
As a rough guide: a 7B or 8B model runs on anything, including a laptop CPU; a 32B model wants a 24 GB graphics card, a 64 GB Mac, or a PC with 64 GB of RAM; a 70B model wants a 128 GB Mac, two graphics cards, or a CPU with lots of RAM and no hurry.
Before spending anything, check what you already have: run ollama ps and look at the Processor column. If it does not read 100% GPU, the model is bigger than the card, and the fix is a smaller model, a tighter quantization, a shorter context, or a quantized KV cache.


