HardwareComparisons

Mac mini M4: 16 GB vs 24 GB vs 32 GB for AI agents and local LLMs

The Mac mini M4 comes with 16 GB of unified memory, or 24 or 32 GB if you choose it when you order. There is no slot to add more later, so this is the one decision you cannot fix afterwards. Here is what each size loads, from Ollama's own model sizes.

In short: With a cloud model, 16 GB is plenty for any agent we follow. With a local model, 24 GB is the size that makes sense: a 7-8B model with a long context next to the agent, or a 14B model. 32 GB is for 27B to 32B models at 4-bit. All three run a model at the same speed: the M4's bandwidth is 120 GB/s whatever the memory size.

For an agent with a 7-8B local model: the Mac mini M4 with 24 GB.
Buy the Mac Mini M4 on Amazon
At a glance
M4 memory options16 GB (standard), 24 GB or 32 GB, chosen at order
Memory bandwidth120 GB/s for every M4 configuration
7B speed (llama.cpp, Q4_0)24.11 tokens per second on the 10-core GPU M4
Power at the wall (Apple)4 W idle, 65 W maximum (M4, 16 GB)
More than 32 GBonly with the M4 Pro: 24, 48 or 64 GB

What each memory size loads

The download sizes below are the default 4-bit tags of the Ollama library. A model needs its file size in memory, plus room for its context, plus the agent itself and macOS. The fit column is our estimate from those sizes, not a measurement.

Model (Ollama tag)Download16 GB24 GB32 GB
llama3.2:3b2.0 GBFitsFitsFits
mistral:7b4.4 GBFits, short contextFitsFits
llama3.1:8b4.9 GBFits, short contextFitsFits
qwen3:8b5.2 GBFits, short contextFitsFits
gemma3:12b8.2 GBTightFitsFits
qwen3:14b9.3 GBTightFitsFits
gpt-oss:20b14 GBNoTightFits
gemma3:27b17 GBNoNoFits
qwen3:32b20 GBNoNoTight
llama3.3:70b43 GBNoNoNo

Estimate. macOS lets the GPU use only part of the unified memory by default: about two thirds to three quarters, per reports in llama.cpp's discussions (Apple documents no figure). A model that does not fit in that share runs partly on the CPU, much slower. ollama ps shows the split.

Context is where 16 GB runs out

Ollama sets the default context from the memory it sees: 4k tokens below 24 GiB, 32k from 24 to 48 GiB. Its docs add that agents and coding tools "should be set to at least 64000 tokens", and that a larger context needs more memory. An agent sends long prompts (the tool list, the history, the files it reads), so the 16 GB Mac that loads an 8B model happily will struggle once the context is set where an agent needs it. Cutting the cache to half with OLLAMA_KV_CACHE_TYPE=q8_0 helps (the settings); 24 GB is the simpler answer.

Speed does not change with memory

Generation speed follows memory bandwidth, and every M4 Mac mini has 120 GB/s. On llama.cpp's Apple Silicon scoreboard, a 7B model at Q4_0 writes 24.11 tokens per second on the M4. A 14B model reads twice the weights per token, so expect roughly half that. If you want speed, the step is the M4 Pro at 273 GB/s (50.74 tokens per second on the same test), covered in M4 vs M4 Pro.

With a cloud model, keep the 16 GB

If the agent calls Claude, GPT or OpenRouter, the Mac only runs the agent: OpenClaw or Hermes Agent with a Docker sandbox fits in 8 GB by our sizing, NanoClaw with a few agent groups in 16 GB. The extra memory only pays if you add a local model later; since you cannot add it later, decide now. Our per-agent figures are on how much RAM an agent needs.

What to buy

  • Mac mini M4: check the memory on the listing: 16, 24 or 32 GB; the 24 and 32 GB builds are often sold by Apple only.
  • Mac mini M4 Pro: for 48 or 64 GB and 273 GB/s.
  • Small UPS: for a Mac that stays on; set it to start up after a power failure as well.
The machine for this setup: the Mac Mini M4 / M4 Pro.
Buy the Mac Mini M4 on Amazon

Shop links go through /go/ and open Amazon (amazon.fr in the EU and Switzerland, amazon.com elsewhere). As an Amazon Associate we earn from qualifying purchases. Your price does not change and no brand pays for a place on this page (disclosure). We write no price down: it moves, the shop shows today's.

Questions

Is 16 GB enough on a Mac mini M4 for an AI agent?
Yes with a cloud model, for every agent we follow. With a local model, 16 GB carries a 7-8B model at 4-bit with a short context; an agent's long prompts push it to the limit.
Can I add memory to a Mac mini later?
No. Apple sells the memory as a configure-to-order option and the Mac mini has no memory slot.
Is the 24 GB Mac mini faster than the 16 GB one?
Not per token: both have 120 GB/s of memory bandwidth. The 24 GB one loads larger models and longer contexts without spilling onto the CPU.
Can a 32 GB Mac mini M4 run a 70B model?
No. Llama 3.3 70B at 4-bit is a 43 GB download in the Ollama library. That needs the M4 Pro with 48 GB at least, and 64 GB to leave room for the context.

Sources