LocalLLMBench

How much of a Mac's unified memory can a local LLM use?

By Local AI Math. Updated 1 December 2026.

Short answer. By default macOS lets the GPU use about two-thirds to three-quarters of a Mac's memory, not all of it. Apple's own figures: a 32 GB Mac gives the GPU 21 GB and a 64 GB Mac gives it 48 GB. A 16 GB Mac is likely to leave about 10.7 GB for a model. You can raise the limit with one Terminal command, sudo sysctl iogpu.wired_limit_mb=…, and it resets when the Mac restarts.

This limit is why a model that "should" fit in a Mac's memory fails to load or spills onto the CPU. The VRAM calculator handles Macs through its unified memory setting; this page explains which number to give it and when changing the system limit is worth it.

Where the limit comes from

Metal, Apple's GPU interface, gives every GPU a figure called recommendedMaxWorkingSetSize, which Apple's documentation describes as an approximation of how much memory the GPU "can allocate without affecting its runtime performance". Runtimes built on Metal, llama.cpp and MLX among them, use it as the GPU's memory budget, and the apps built on those runtimes inherit it.

Apple has published the default only in passing. In the 2021 tech talk Metal Compute on MacBook Pro, Apple's engineer says that with 32 GB of system memory the GPU can access 21 GB, and with 64 GB it can access 48 GB. That is two-thirds and three-quarters. Apple has not published a formula for other sizes. Owners of smaller Macs generally report the two-thirds figure and owners of larger ones three-quarters, but the safe course is to read your own.

Read your Mac's limit

Two ways, both free:

One unit trap. Mac memory sizes are binary: a "32 GB" Mac has 32 × 1,024³ bytes, which is 34.36 billion. Two-thirds of that is 22.91 GB in the decimal gigabytes most file sizes use. The table below converts the likely defaults so you can compare them with download sizes directly.

Default GPU limit in GB of 1,000,000,000 bytes. The 32 GB and 64 GB rows are Apple's figures; the others show the range from two-thirds to three-quarters, so check which applies to yours.
Mac memoryDefault GPU limit
16 GB11.45 to 12.88 GB
24 GB17.18 to 19.33 GB
32 GB22.91 GB (21 GiB)
36 GB25.77 to 28.99 GB
48 GB34.36 to 38.65 GB
64 GB51.54 GB (48 GiB)
128 GB91.63 to 103.08 GB

Put it into the calculator

Choose "Unified memory (Apple silicon)", type your GPU limit in GB as the memory, and set "Keep free" to 0, because macOS has already kept its share outside the limit. Then everything else works as for a graphics card.

The calculator's own default for Macs keeps 25% free, at least 4 GB. That is close to Apple's three-quarters on large Macs and a little generous on a 32 GB one (24 GB usable against a limit of about 22.9 GB), so use your measured figure when the result is near the line.

A 16 GB Mac

Assuming two-thirds, 11.45 GB. Llama 3.1 8B at Q4_K_M with 8,192 tokens of context needs 4.85 GB of weights, 1.07 GB of cache and 1 GB of runtime buffers: 6.92 GB, which fits with room for a longer context. Qwen2.5 14B at Q4_K_M needs 8.91 + 1.61 + 1 = 11.52 GB at 8,192 tokens, 70 MB over. At 4,096 tokens it drops to 10.72 GB: tight, but loadable. That is the ceiling for a 16 GB Mac, a 14B model with a short context.

A 32 GB Mac

Apple's limit is 21 GiB, 22.91 GB. Qwen2.5 32B at Q4_K_M with 8,192 tokens needs 19.70 GB of weights, 2.15 GB of cache and 1 GB of buffers: 22.85 GB. That fits by 60 MB, which in practice means it may load and then fail when the context fills. Two ways out:

A 64 GB Mac

The default 48 GiB is 51.54 GB. Llama 3.1 70B at Q4_K_M (42.52 GB file) with 8,192 tokens needs 46.20 GB: it fits, just. At 32,768 tokens the cache grows to 10.74 GB and the total to 54.26 GB, over the default. Raising the limit to 56 GiB (iogpu.wired_limit_mb=57344, 60.13 GB) makes it tight rather than impossible, with 8 GiB left for everything else. Those 70B figures are worked through for graphics cards in running Llama 70B on a 24 GB GPU.

Try it in the calculator: choose "Llama 3.1 70B" from the model list, Q4_K_M, 32,768 tokens, "Unified memory", memory 51.54 GB, and set "Keep free" to 0. It shows that the model does not fit. Change the memory to 60.13 GB and it shows tight.

Raising the limit safely

The command takes megabytes of 1,048,576 bytes, so multiply the GiB you want by 1,024:

sudo sysctl iogpu.wired_limit_mb=26624

MLX's documentation gives this command for raising the system limit. Apple does not document the setting itself, so treat it as unsupported. Community write-ups, such as this one, report that it takes effect at once, is lost at restart, returns to the default when set to 0, and was called debug.iogpu.wired_limit (in bytes) on macOS versions before Sonoma.

The memory you give the GPU comes out of what macOS and your apps can use; nothing is added. Set the limit too high and the system starts moving memory to the startup disk, which Activity Monitor shows as Swap Used. Reading model weights from disk instead of memory is far slower, so a model that "fits" this way can generate more slowly than a smaller one that fits properly. A reasonable approach:

  1. Close what you will not use while the model runs, browsers especially.
  2. Raise the limit only by what the model needs plus about 10%.
  3. Load the model, run a long prompt, and watch Swap Used in Activity Monitor. If it climbs, lower the limit or choose a smaller quantization.

Speed is a separate question

The limit decides whether a model fits. How fast it runs depends on memory bandwidth, because generating each token reads all the weights once. Apple lists 153 to 170 GB/s for the M6 MacBook Pro, 307 GB/s for the M5 Pro and up to 614 GB/s for the M5 Max (checked 30 November 2026). Divide bandwidth by the weights in GB for a ceiling: 307 ÷ 19.70 gives at most about 16 tokens per second for Qwen2.5 32B at Q4_K_M on an M5 Pro. Real speeds land below that. The same reasoning explains why a model that only partly fits slows down so much, covered in how much slower a local LLM runs with CPU offload.

All figures here are estimates from file sizes, published configurations and Apple's stated limits, not measurements of your Mac. When it is close, load the model, read the limit llama.cpp prints, and enter your real numbers in the calculator.