On a Mac, the CPU and GPU share one pool of unified memory, so a model that is bigger than that pool cannot load properly — and one that only just fits will be slow. Check the numbers before you load a model, not after it stalls.
Check the machine first
Find the Mac’s total memory in Apple menu > About This Mac, or in a terminal:
system_profiler SPHardwareDataType | grep Memory
Then check the model’s size on its Hugging Face Hub page before downloading: a 4-bit 3B model is a few gigabytes, a 4-bit 7B model is roughly twice that, and a full-precision model is several times larger than its 4-bit version. As a rule of thumb, leave several gigabytes free for macOS and the key-value cache on top of the model size — the README’s Long Prompts section notes that a larger key-value cache uses more RAM for better quality.
Read mlx-lm’s own warning
The README’s Large Models section says that when a model is large relative to the machine’s RAM, mlx-lm prints a warning along the lines of [WARNING] Generating with a model that requires ..., and the model will likely be slow. If you see that warning and the model fits in RAM, the README gives one fix: raise the wired memory limit so it is larger than the model size in megabytes but smaller than the machine’s memory:
sudo sysctl iogpu.wired_limit_mb=N
This requires macOS 15.0 or higher. If the model does not fit in RAM at all, do not force it — pick a smaller model or a stronger quantization instead. For a practical first run, see the guide on running an MLX model across two Macs only when a single machine genuinely cannot hold the model.
| Check | What you should see | If you do not see it |
|---|---|---|
| Memory known | You know the Mac’s total unified memory | About This Mac was not checked — guesswork leads to a stalled load |
| Model fits | Model size plus a few GB for the system is under total memory | The model is close to or larger than total memory — pick a smaller quant |
| No warning | No large-model warning prints on generation | The warning means the model is too large for comfortable speed on this Mac |
Expected result. We checked the mlx-lm README Large Models section for the RAM warning, the wired-memory optimisation needing macOS 15.0 or higher, and the sysctl iogpu.wired_limit_mb=N fix, and the Long Prompts section for key-value cache memory use. We did not run mlx-lm, so the memory figures above are guidance, UNTESTED on this machine.
Limits
Model size on the Hub page is the download size, not the full runtime memory: the key-value cache adds more while generating. The sysctl fix only helps when the model fits in RAM. This applies to Apple silicon Macs only.
Sources
Sources checked 2026-11-28.
