Will a local AI model fit in your Mac's memory?
A rule of thumb for how much memory a local model needs, why context length matters, and what limits the GPU on an Apple Silicon Mac.
Running a language model on your own Mac depends mostly on one thing: whether it fits in memory. If it does not, it will either not load or it will swap and crawl. You can estimate this before you download several gigabytes.
The honest answer
A model’s memory comes from three parts:
- Weights. The model’s size in parameters, times the bits per parameter, divided by 8. An 8-billion-parameter model at 4 bits is about 4 GB. A 70-billion-parameter one at 4 bits is about 35 GB. At 16 bits, double and quadruple those.
- Context. While it reads and writes, the model keeps a cache that grows with the length of the conversation. A short context adds little. A very long one can add several gigabytes.
- Runtime. The app that runs the model needs some memory of its own.
Add them up, and then compare with two numbers, not one:
- What the GPU can use. On an Apple Silicon Mac the GPU shares memory with everything else, but macOS caps how much of it the GPU can hold. Apple does not publish the rule. Our reading is about two-thirds of memory up to 36 GB, and three-quarters above that. So a 16 GB Mac has less for a model than its label suggests.
- What is free right now. Your browser, editor and chat apps hold memory too.
A model can fit under the GPU cap and still not load well because your other apps are using the memory. Or it can be well under what is free and over the cap.
Any estimate here is rough. The layer and head numbers differ between models of the same size, and nobody should promise speed from memory alone.
How to check yourself
- Work out weights from the model’s size and bits. Add a gigabyte or two for the runtime and a context allowance.
- Open Activity Monitor › Memory and read memory pressure and swap before you load anything. If the pressure is already yellow, close things first.
- To see the GPU limit, run
sysctl iogpu.wired_limit_mbin Terminal. A 0 means macOS is using its default. Reading it changes nothing.
People raise that limit with sudo sysctl iogpu.wired_limit_mb=<megabytes>. It lasts until you restart. Raising it leaves less for macOS, and if you leave too little, your Mac can slow down badly or become unstable.
How Hedroom does it
Tools › Local AI headroom takes a model family and size, bits per parameter and a context length, and estimates the memory it needs. It compares that with the GPU’s share and what is free now, and answers Fits, Tight, Make room or Won’t fit, with the line that decided it. The estimate can be off by about 15%. Hedroom does not download, load or run a model, and it does not estimate speed.
If apps are holding the memory, Make room suggests relaunching or quitting the ones that can give some back, using the usual Hedroom actions. It also notices Ollama, LM Studio, Jan and GPT4All when they are running, and says what they use.
Hedroom can raise the GPU limit until you restart, after a confirmation that says how little is left for macOS. It requires the same helper as fan control, approved in System Settings. It never offers a limit that leaves macOS under 8 GB. On Macs with 16 GB or 24 GB it offers no higher limit at all, because the most it would allow is no more than macOS already gives the GPU. When Hedroom quits it puts the limit back to what it was before, unless you changed it yourself.
The check is free. Raising the limit is part of Pro, and resetting it is never locked.
Want Hedroom to do the checking? It reads memory pressure and swap for you, names the app that matters, and gives every fix a receipt. See how the free trial works or join the waitlist.