Ollama on Apple Silicon needs enough unified memory for the model weights, context cache and runtime buffers, plus headroom for macOS and your other apps. On a 24 or 32 GB Mac, budget from that shared pool and check GPU placement with ollama ps. Once the model and context fit, compare how much data each chip can move per second using its memory bandwidth.
Unified memory is not all yours
Apple Silicon gives the CPU and GPU access to the same physical memory. macOS and your other apps draw from that pool too, even when Ollama reports the model is entirely on the GPU. Apple Developer’s unified memory walkthrough.
Choosing a configuration
For a Mac you own, open Apple menu → About This Mac and read Memory. For a Mac you plan to buy, use the installed memory of the exact configuration. Apple’s About This Mac guide.
Estimate the weights for the exact model tag and quantization. The download size is a starting estimate for weights, and you still need to budget for the key-value (KV) cache and runtime buffers. Ollama’s model tag sizes.
A longer context increases memory use. Cache needs vary with the model and cache precision, and parallel requests can add to the allocation. Use the Ollama VRAM sizing guide to estimate your model’s weights and cache. Ollama Context Length, Ollama Local FAQ.
For system headroom, check Activity Monitor → Memory → Memory Used before loading the model, with your usual apps open. Use that as a starting point and allow room for the apps’ usage to grow. Apple’s Activity Monitor guide.
Suppose one model uses 15 GB for weights and 1 GB for runtime buffers, and you reserve 5 GB for macOS and other apps. Assume the KV cache uses 2 GB at your shorter context and 6 GB at your longer context. These are worksheet assumptions.
| Installed memory | Shorter context, 2 GB cache | Longer context, 6 GB cache |
|---|---|---|
| 24 GB | 24 − 15 − 2 − 1 − 5 = 1 GB left | 24 − 15 − 6 − 1 − 5 = 3 GB short |
| 32 GB | 32 − 15 − 2 − 1 − 5 = 9 GB left | 32 − 15 − 6 − 1 − 5 = 5 GB left |
On paper, the shorter context is tight at 24 GB and the longer one exceeds that budget. The 32 GB configuration has room in both cases under these assumptions. A small surplus can disappear if the runtime allocation is larger than estimated or another app needs more RAM.
Use the matching row for a 24 GB or 32 GB M5 MacBook Pro. On a base M4 Mac mini with 16 GB, the shorter-context example is already 7 GB short. For that Mac, start with a smaller model or lower-memory quantization, then check the loaded model at your target context. Apple’s 14-inch M5 MacBook Pro specs, Apple’s M4 Mac mini announcement.
What bandwidth tells you once the model fits
Memory bandwidth is the rate at which the chip can move data to and from memory. When the same model and context fit on the GPU in both Macs, greater bandwidth can help if moving that data is what limits generation. Apple Developer’s discussion of model memory and bandwidth.
Apple lists these two M5 Max options for the 14-inch MacBook Pro. Apple’s MacBook Pro technical specifications.
| M5 Max configuration | Unified memory options | Memory bandwidth |
|---|---|---|
| 32-core GPU | 36 GB | 460 GB/s |
| 40-core GPU | 48 GB, 64 GB or 128 GB | 614 GB/s |
Use the memory options to find configurations that fit your budget for weights, context and apps. Then use bandwidth to compare how much memory traffic the qualifying chips can handle. Ollama generation speed depends on the workload.
Practical notes for a Mac
Ollama’s context guide lists defaults by VRAM. They are 4K below 24 GiB, 32K from 24 GiB to under 48 GiB, and 256K at 48 GiB and up. On a Mac, check the active context directly in ollama ps. Ollama Context Length.
-
Set context. In the Ollama app, open Settings and move the context length slider to the window your task needs. Start a chat with your chosen local model and send a representative prompt. Ollama’s context settings, Ollama’s chat app.
-
Check the running model. While the model is loaded, run this in Terminal. Ollama Context Length.
ollama psOllama’s documentation shows this example.
NAME ID SIZE PROCESSOR CONTEXT UNTIL gemma4:latest c6eb396dbd59 9.6 GB 100% GPU 131072 2 minutes from nowCONTEXTis the allocated window in tokens,131072in this example.PROCESSORshows where Ollama loaded the model.100% GPUmeans it was loaded entirely on the GPU, a CPU/GPU split means partial offload to the CPU, and100% CPUmeans CPU-only placement. Ollama Local FAQ. -
Check headroom with your workload running. Look at Memory Pressure and Swap Used in Activity Monitor → Memory. If pressure stays high or placement shows a CPU split, try a shorter context or a smaller model and check again. Apple’s Activity Monitor guide, Ollama Context Length.
For a CPU split that persists, follow Ollama not using GPU. For MLX and other runtime differences on Apple Silicon, see Ollama vs LM Studio.
Evidence note. The steps were documented from Ollama’s online guides and Apple’s Activity Monitor documentation. Hardware figures are from Apple’s M4 and M5 documentation. The walkthrough steps were not run for this article.