A 32B coding model quantised to Q4 weighs in at roughly 20GB on disk, and on paper a 32GB MacBook looks like it has room to spare. It does not. macOS hands only about 70 to 75 percent of unified memory to the GPU, so a 32GB machine offers the model engine somewhere near 22 to 24GB. The weights swallow almost all of that, leaving nothing for the context window, and the result is an out-of-memory crash or inference so slow it is unusable.

Quick Answer

No, a 32GB MacBook cannot comfortably run a 32B Q4 coding model. The 20GB of weights plus the KV cache for any real context overshoots the roughly 22 to 24GB the GPU is actually allowed to use, forcing memory swapping or an OOM. Drop to a 14B model, or step up to 48GB or 64GB of unified memory.

Where the memory actually goes

Unified memory on Apple Silicon is shared between the CPU and GPU, but the GPU does not get all of it. macOS reserves a slice for the operating system and apps, and tools like Ollama default to treating about 70 percent of total RAM as the usable GPU budget. On a 32GB Mac that is roughly 22 to 24GB before your editor, browser tabs and the OS itself take their cut.

Now stack the model on top. A 32B model at Q4 lands near 20GB of weights alone. That leaves only a couple of gigabytes for the KV cache, the running memory that holds your prompt and the model's working context. Feed it a few files of code to reason over and that cache balloons past what is left, and the system either errors out or starts swapping to SSD, which collapses tokens-per-second to a crawl.

What runs well on 32GB instead

A 32GB Mac is genuinely capable, just not at 32B. A 14B model at Q4 sits comfortably with room for a large context, and many of the strong mixture-of-experts coding models in the 30B class only activate a few billion parameters at a time, which keeps them responsive even though the full weights are large. For everyday code completion and refactoring, a well-chosen 14B beats a 32B model that is constantly swapping.

The fix if you want true 32B locally

If running a full 32B coding model on-device is the goal, the real answer is more unified memory, not clever flags. A 48GB machine gives the GPU enough headroom for the weights and a usable context, and 64GB makes it relaxed. That is the same logic behind dedicated local-AI desktops, where high memory capacity matters more than raw clock speed. The AI PC range at Evetech is the desktop side of this trade-off for SA buyers who want to run larger models without fighting a laptop's memory ceiling, and the PC best sellers list shows which higher-memory machines are moving fastest.

Frequently Asked Questions

Why does a 20GB model not fit in 32GB of RAM?

Because the GPU only gets about 70 to 75 percent of unified memory, so roughly 22 to 24GB is usable. The weights take 20GB and the context cache needs several more, which pushes total demand past the limit.

Can I raise the GPU memory limit on macOS?

You can nudge the allocation higher with a system command, but it is risky. Starving the OS of memory causes instability, and you still will not free up enough to fit a 32B model plus a real context, so it is not a genuine fix.

What model size is safe on a 32GB MacBook?

A 14B model at Q4 is the comfortable ceiling for coding with plenty of context. Some 30B-class mixture-of-experts models can also work because they activate only a fraction of their parameters at once.

Would a 64GB MacBook solve this?

Yes. At 64GB the GPU budget is roughly 45GB or more, which fits a 32B Q4 model and a generous context with headroom to spare. A 48GB machine is the realistic minimum for full 32B work.

Matching model size to memory is the whole game for local AI. If you want to run larger coding models without the swap penalty, compare higher-memory machines in the AI PC range at Evetech and pick the capacity your workload actually needs.