The M4 chip made running serious LLMs on a MacBook genuinely practical. Unified memory means the GPU and CPU share the same pool — no copying data back and forth between VRAM and system RAM — and the memory bandwidth on even the base M4 is fast enough to make 7B and 13B models feel snappy. Add Ollama to the mix and you’ve got a clean install experience with zero CUDA drama, no driver headaches, and models running in minutes.
This guide covers installing Ollama on any Mac with Apple Silicon — M4, M3, M2, or M1 — getting your first model running, picking the right models for your chip’s memory configuration, and a few tweaks worth knowing about. The experience is slightly different from Linux or Windows, mostly in pleasant ways.
Installing Ollama on Mac
Head to ollama.com and click Download. The site serves the macOS installer directly — a standard .dmg file. Open it, drag Ollama to your Applications folder, and launch it.
First launch asks for permission to install a command-line tool. Allow it — this adds the ollama command to your PATH so you can use it from any terminal. Ollama then sits in your menu bar as a small icon, running quietly in the background.
Verify it’s working:
ollama --version
If you see a version number, you’re set. Ollama is now running as a background service and will restart automatically when you reboot.
Alternatively, if you prefer installing via Homebrew:
brew install ollama
ollama serve & # start the server manually, or use the app
The Homebrew install doesn’t include the menu bar app — you’d manage Ollama from the terminal. Most people find the .dmg install more convenient, but either works fine.
Running Your First Model
Open Terminal (or iTerm2, Warp, whatever you use) and run:
ollama run llama3.2
Ollama downloads the Llama 3.2 3B model — about 2GB — and starts an interactive chat session. Type a prompt at the >>> prompt and you’ll see the response stream back in real time. On an M4 MacBook Pro, a 3B model runs at 60–80 tokens per second. That’s fast enough that you often don’t notice the generation happening.
Exit with /bye or Ctrl+D.
Some other models worth trying straight away:
ollama run mistral # excellent general purpose 7B model
ollama run phi4 # surprisingly capable, small footprint
ollama run qwen2.5-coder # strong for code tasks
ollama run llava # multimodal — can analyse images
Choosing the Right Model Size for Your Mac
On Apple Silicon, “VRAM” is unified memory — the same pool your whole system uses. This is both liberating (models aren’t limited to a dedicated GPU’s VRAM) and worth planning around (the model competes with macOS and your other apps for the same memory).
The practical rules:
8GB unified memory — run 3B models confidently, 7B models with quantization (Q4). Leave headroom for macOS itself (~4–5GB baseline). Don’t try 13B+ models here.
16GB unified memory — the sweet spot for most people. 7B models run comfortably, 13B models work well with Q4 quantization. This is what most M4 MacBook Pro base configurations ship with.
24GB unified memory — 13B models feel snappy, 30B models are viable. Available on M4 Pro MacBook Pro.
32GB+ — 30B–70B models become usable. On an M4 Max or M4 Ultra with 64–128GB, you can run 70B models at reasonable speed.
When in doubt, use Q4 quantized models. They’re roughly half the size of the full-precision version with minimal quality loss for most tasks. Ollama pulls the recommended quantization by default, but you can be explicit:
ollama pull llama3.1:8b-q4_0 # specific Q4 variant
ollama pull llama3.1:8b-q8_0 # higher quality, larger
Figure 1 — Recommended Models by Mac Unified Memory
How Ollama Uses Apple Silicon (Metal GPU)
Unlike NVIDIA-based systems where you need CUDA, Ollama on Apple Silicon uses Apple’s Metal framework for GPU acceleration automatically — no configuration needed. Every model you run is already using the GPU cores built into your M-series chip.
The memory bandwidth is what really matters here. The M4 base chip has 120 GB/s memory bandwidth. M4 Pro bumps that to 273 GB/s. M4 Max hits 546 GB/s. Higher bandwidth means the GPU can feed data to its cores faster, which translates directly to higher tokens per second. This is why an M4 Max running a 30B model can feel faster than a Windows PC with a mid-range NVIDIA card running a 7B model.
You can watch your GPU utilisation during inference using Activity Monitor — open it, go to the GPU History tab, and you’ll see the graph spike when the model is generating. Alternatively, use ollama ps in another terminal to see what’s loaded and how much memory it’s occupying.
Configuring Ollama on Mac
On macOS, Ollama reads environment variables from a launch agent plist. The easiest way to set them is via Terminal using launchctl:
# Change where models are stored
launchctl setenv OLLAMA_MODELS /Volumes/ExternalDrive/ollama-models
# Open API to local network
launchctl setenv OLLAMA_HOST 0.0.0.0:11434
# Keep model loaded indefinitely
launchctl setenv OLLAMA_KEEP_ALIVE -1
After setting variables this way, restart Ollama from the menu bar (click the icon → Quit, then relaunch). The new settings take effect on restart.
For permanent settings that survive reboots, create a LaunchAgent plist. This is more involved but ensures your config persists across restarts:
cat > ~/Library/LaunchAgents/com.ollama.env.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.ollama.env</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>setenv</string>
<string>OLLAMA_MODELS</string>
<string>/Volumes/ExternalDrive/ollama-models</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
launchctl load ~/Library/LaunchAgents/com.ollama.env.plist
If this feels like overkill, it is for most use cases. The launchctl setenv approach is fine for personal machines where you don't mind re-running the commands after a restart.
Using the API and Connecting Other Tools
Ollama runs a local REST API at http://localhost:11434 — the same on Mac as on any other platform. You can hit it directly from Python, connect Open WebUI, or use any tool that supports Ollama as a backend.
Quick Python test:
import ollama
response = ollama.chat(
model='llama3.2',
messages=[{'role': 'user', 'content': 'What makes Apple Silicon fast for ML?'}]
)
print(response['message']['content'])
For a browser-based chat UI, Open WebUI is the go-to option. With Docker Desktop installed on your Mac:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -e OLLAMA_BASE_URL=http://host.docker.internal:11434 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
Then open http://localhost:3000 in your browser. You get a full ChatGPT-style interface backed by your local Ollama models.
If you use Cursor or VS Code, the Continue extension connects directly to Ollama for AI-assisted coding. Install Continue, point it at http://localhost:11434, select your model, and you have local AI code completion with no API costs and nothing leaving your machine.
Useful Mac-Specific Tips
Models are stored at ~/.ollama/models by default. On a MacBook with a smaller internal SSD, this fills up fast. Point OLLAMA_MODELS at an external SSD for model storage — NVMe over USB-C works well and the bandwidth is more than enough for loading models.
Menu bar management: Click the Ollama icon in your menu bar to see which model is currently loaded, quit the app, or check for updates. Right-click gives you the same options. If Ollama isn't responding, quitting and relaunching from the menu bar is usually the fastest fix.
Thermal throttling: On longer inference runs — especially with larger models on MacBooks — the chip will throttle when it gets hot. This is normal. If you notice tokens per second dropping significantly over time, give the machine a few minutes to cool or use a laptop stand that improves airflow underneath. Mac Mini and Mac Studio handle sustained loads much better than laptops for this reason.
Background memory pressure: macOS is aggressive about memory compression, which helps when running models that are slightly too large for comfortable fit. Keep an eye on memory pressure in Activity Monitor (the bar at the bottom of the Memory tab) — yellow is fine, red means the system is struggling and you'll notice slowdowns.
Figure 2 — Ollama Mac: Key Commands Reference
Troubleshooting Common Mac Issues
Ollama command not found. If you installed via the .dmg, make sure you launched the app at least once — the CLI tool is installed on first launch. If you're using Zsh (the default on modern Macs), the PATH update should be automatic. Try opening a new terminal window. If it still fails, check that /usr/local/bin/ollama exists and that /usr/local/bin is in your PATH.
Model runs slowly or freezes. Check memory pressure in Activity Monitor. If it's red, your model is too large for your available memory — close other apps or switch to a smaller model. A 7B Q4 model needs roughly 5–6GB of free unified memory to run smoothly.
Ollama not responding after wake from sleep. This happens occasionally. Click the menu bar icon and quit Ollama, then relaunch it. The background service sometimes doesn't recover cleanly from sleep. If it happens frequently, there's an open issue on the Ollama GitHub — worth checking for the latest status.
Can't connect from another device. Set OLLAMA_HOST=0.0.0.0:11434 via launchctl setenv and restart Ollama. Also check System Settings → Privacy & Security → Firewall — if the firewall is on, you may need to explicitly allow Ollama incoming connections. macOS Firewall prompts you when an app first tries to accept network connections; if you dismissed that prompt, go to Firewall settings and add Ollama manually.
What to Try Next
The obvious next step is finding a model that fits your actual workflow. If you write code, ollama run qwen2.5-coder or ollama run deepseek-coder-v2 are worth trying — both punch above their weight on coding tasks. If you want reasoning-style outputs, the DeepSeek R1 distilled models run on Mac and produce noticeably more thorough answers on complex questions.
For a proper UI, Open WebUI via Docker is the most polished option. If Docker feels like too much overhead, Msty and Enchanted are native Mac apps built on top of Ollama that give you a clean interface without containers. Both are free.
The main advantage of running models locally on Mac is that once you've downloaded them, everything works offline — no API costs, no rate limits, no data leaving your machine. On an M4 chip with 16GB or more, that's a genuinely capable local AI setup that covers most day-to-day use cases without compromise.