Headroom
Colour theme

Running AI models on a Mac

How much memory your Mac really has for models, which ones to pick, and how to make them faster.

12-minute read

Last tested
Not yet Written from documentation; it will be timed on real machines.
With
Ollama (version to record), macOS (version to record)

Macs with Apple silicon share one pool of fast memory between the processor and the graphics chip, so a 24 GB Mac can hold a model that would need an expensive graphics card on a PC.

New to this? Do Start here first; this guide picks up where it ends.

What you need

  • A Mac with Apple silicon: any M1, M2, M3 or M4 chip. Intel Macs work, but only on the processor, which is many times slower.
  • A recent version of macOS. Ollama lists the versions it supports on its download page.
  • 16 GB of memory or more for a good experience. 8 GB works with small models.
  • Free disk space: about 2 to 20 GB per model, and more for the largest ones.

How much memory a model can use

The memory in About This Mac is shared by macOS, your apps and the graphics chip that runs the model. By default, macOS lets the graphics chip use only part of it.

  • 16 GB Mac10.7 GB for models
  • 24 GB Mac16.1 GB for models
  • 48 GB Mac36 GB for models
  • 64 GB Mac48 GB for models

How much of a Mac's memory models can use by default. The rest stays with macOS and your apps.

  • Estimate: Calculated from a stated rule of thumb. Real results vary.macOS default GPU memory limit, approximately two-thirds up to 36 GB and three-quarters aboveChecked: not yet verified

That’s the number that matters. A 16 GB Mac mini has about 10.7 GB for models, not 16, and everything you have open competes for it: forty browser tabs can push a model that fits on paper over the edge.

A model’s memory has two parts: the model itself, and its Conversation memoryAlso called the KV cache. The model’s notes on everything said so far in a chat. It grows with every message, so long conversations need more memory.Read the full entry, which grows as a chat gets longer. The checker on the home page shows both for any model.

Install Ollama

The app is the simplest route. It lives in the menu bar and updates itself.

  1. Download Ollama for macOS from ollama.com/download.
  2. Open the download and drag Ollama into Applications.
  3. Open it. A llama icon appears in the menu bar.

If you prefer Homebrew, install the command-line version and start it as a background service:

Terminal
brew install ollama
brew services start ollama

Either way, check that it works in Terminal:

Terminal
ollama --version
You should see
ollama version is 0.x.x

Pick a model for your Mac

Every model this site tracks, by what each Mac can handle. Start with the largest one that Runs well on yours; bigger models are smarter, but slower.

MacRuns wellFits, but slow or snug
Mac mini M4 with 16 GBLlama 3.2 3B, Gemma 4 E4B, Qwen3 8B, Llama 3.1 8B—
MacBook Air M4 with 24 GBLlama 3.2 3B, Gemma 4 E4B, Qwen3 8B, Llama 3.1 8B, gpt-oss 20BGemma 3 12B
MacBook Pro M4 Pro with 24 GBLlama 3.2 3B, Gemma 4 E4B, Qwen3 8B, Llama 3.1 8B, Gemma 3 12B, gpt-oss 20B—
MacBook Pro M4 Pro with 48 GBLlama 3.2 3B, Gemma 4 E4B, Qwen3 8B, Llama 3.1 8B, Gemma 3 12B, gpt-oss 20B, Mistral Small 3.2, Gemma 4 26B-A4B, Qwen 3.6 27B, Qwen 3.6 35B-A3BGemma 4 31B
MacBook Pro M4 Max with 64 GBLlama 3.2 3B, Gemma 4 E4B, Qwen3 8B, Llama 3.1 8B, Gemma 3 12B, gpt-oss 20B, Mistral Small 3.2, Gemma 4 26B-A4B, Qwen 3.6 27B, Gemma 4 31B, Qwen 3.6 35B-A3BLlama 3.3 70B

At 4-bit precision with 8K tokens of conversation. Runs well means it fits with room to spare and writes at least about 10 tokens a second.

  • Published: From the model's published architecture.Model sizes: published architecturesChecked: not yet verified
  • Estimate: Calculated from a stated rule of thumb. Real results vary.Speeds: estimated from memory bandwidth, until measuredChecked: not yet verified

Download and chat with any of them using its Ollama name, for example:

Terminal
ollama run gemma3:12b

The home page has the exact command, memory and estimated speed for every model on every Mac.

Check it is using the graphics chip

While a model is loaded, this shows what it is running on:

Terminal
ollama ps

The PROCESSOR column should read 100% GPU. If part of it says CPU, the model did not fit in the memory macOS allows, and it will be much slower. Pick a smaller model, shorten the conversation, or see the next section.

To measure your real speed, add --verbose and look for eval rate after each answer:

Terminal
ollama run gemma3:12b --verbose

Make it faster, or fit a bigger model

Close memory-hungry apps. Open Activity Monitor and choose the Memory tab. If the Memory Pressure graph is yellow or red, quit apps you are not using, browsers first.

Keep conversations shorter. Conversation memory grows with every message. You can set the limit for a chat from the >>> prompt; smaller numbers use less memory:

In the Ollama chat
/set parameter num_ctx 8192

Use a lower precision. Ollama’s default downloads are 4-bit, the right balance for most people. Higher precision needs about twice the memory for a small gain.

Advanced: let models use more memory. You can raise the limit macOS sets for the graphics chip. This example lets models use 12 GB on a 16 GB Mac:

Terminal
sudo sysctl iogpu.wired_limit_mb=12288

Look after disk space

Models are large files. To see what you have downloaded and how big each one is:

Terminal
ollama list

To delete one you no longer use:

Terminal
ollama rm llama3.2:3b

Ollama keeps models in a hidden folder in your home folder, ~/.ollama/models.

Use it from other apps

Ollama runs a small server at http://localhost:11434 that chat apps, writing tools and code editors can connect to.

To check the server is answering, ask it something directly:

Terminal
curl http://localhost:11434/api/generate -d '{"model": "gemma3:4b", "prompt": "Why is the sky blue?", "stream": false}'

You should get back a block of text with the answer in a response field.

Share your Mac’s models with other devices

A Mac mini makes a quiet, low-power model server for the house. Ollama only answers your own Mac by default; to open it to your network, run this, then quit and reopen Ollama:

Terminal
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"

To undo it, run launchctl unsetenv OLLAMA_HOST and reopen Ollama. For serving from a PC with a graphics card, see How I run it.

If something goes wrong

It is much slower than the estimate. Run ollama ps. If it is not 100% GPU, the model does not fit; see making it faster. Also check Activity Monitor for memory pressure.

ollama is not found in Terminal. Open the Ollama app once; it sets up the command. Then open a new Terminal window.

Your Mac becomes sluggish while a model runs. The model is using most of your memory. Quit other apps, use a smaller model, or undo any change to the memory limit by restarting.

A download fails partway. Run the same ollama run or ollama pull command again; it resumes.