OllamaBeginner15 min6 sections

Install Ollama on macOS with Apple Silicon

Apple Silicon is shockingly good at LLM inference. Get Ollama running with unified memory acceleration on any M-series Mac in 15 minutes.

MyAIHardware EditorialUpdated May 22, 2026
Install Ollama on macOS with Apple Silicon

Before you start

  • macOS Sonoma (14) or newer
  • Apple Silicon Mac (M1, M2, M3, or M4)
  • 16 GB unified memory minimum, 32 GB+ strongly recommended
  • 15 GB free disk for a typical model

Required hardware

  • MacBook Pro 14 M4 Pro

    Amazon
  • MacBook Air 15 M3 optional

    Cheaper M-series Macs work too.

    Amazon
Step 01

Why Apple Silicon punches above its weight

Apple's M-series chips integrate the CPU, GPU, and Neural Engine on the same die and share a single pool of memory. For LLM inference this is huge: a 70B parameter model that needs 40 GB of weights can run on a 64 GB M-series Mac with no quantization tricks at all, because the GPU sees the same memory the CPU does. On an x86 system you would need a $30,000 H100 or two RTX 4090s in tensor-parallel to do the same job.

The tradeoff is bandwidth. The M4 Max tops out around 540 GB/s memory bandwidth, while an RTX 4090 has 1 TB/s. So Apple Silicon is great at fitting big models in memory, and merely good at running them fast. For most home users, chat, RAG, agentic workflows, that ratio is correct.

Step 02

Step 1: Install Ollama

Ollama ships a native macOS .dmg with a menu-bar icon. You can install via Homebrew if you prefer, but the .dmg auto-updates itself in the background and includes the menu bar UI for stop/start. Either path is fine. Apple Silicon support is the default, there is no separate Intel build to worry about.

bash
# Option A: Homebrew (preferred for terminal users)
brew install --cask ollama

# Option B: Direct download
# https://ollama.com/download/mac, drag Ollama.app to /Applications

ollama --version
ollama serve  # only needed if you skipped opening the .app
Step 03

Step 2: Pick a model that fits your RAM

Apple's unified memory model means Ollama and macOS compete for the same RAM. As a rough rule, leave 8 GB free for macOS, then use the rest. So a 16 GB Mac can run a Q4 7B comfortably (4-5 GB), a 24 GB Mac handles a 13B (8 GB), and a 64 GB Mac runs 70B Q4 (~40 GB). Going over your budget is bad, macOS will start swapping to SSD and tokens-per-second collapses.

bash
# 16 GB Mac
ollama pull llama3.1:8b           # ~4.7 GB

# 24 GB Mac
ollama pull llama3.1:8b
ollama pull qwen2.5:14b           # ~9 GB

# 36+ GB Mac
ollama pull qwen2.5:32b           # ~20 GB

# 64+ GB Mac
ollama pull llama3.1:70b          # ~40 GB
Tip

Activity Monitor → Memory tab. If 'Memory Pressure' goes yellow, you are oversubscribed, pick a smaller model.

Step 04

Step 3: Tune for Apple Silicon

Out of the box Ollama uses the Metal Performance Shaders backend. For most users that is fine. Two knobs are worth knowing: OLLAMA_FLASH_ATTENTION=1 enables flash attention (~15% throughput gain on M3/M4) and OLLAMA_KV_CACHE_TYPE=q8_0 quantizes the KV cache to save memory on long contexts. Set them in launchctl so they persist across reboots.

bash
launchctl setenv OLLAMA_FLASH_ATTENTION 1
launchctl setenv OLLAMA_KV_CACHE_TYPE q8_0
launchctl setenv OLLAMA_NUM_PARALLEL 2

# Restart Ollama from the menu bar, or:
pkill -x ollama
open -a Ollama

OLLAMA_NUM_PARALLEL controls how many simultaneous requests it accepts.

Step 05

Step 4: Run a benchmark

An M2 Max at full bore on a 7B model will give you around 35-45 tokens/sec. An M3 Max climbs to 50-60. M4 Max with the new Neural Engine flops sits closer to 70. If you are well below these numbers, something is wrong, most likely you ran out of memory and hit swap, or you forgot to enable flash attention.

bash
ollama run llama3.1:8b --verbose "Write a 200 word essay about the impact of unified memory on LLM inference."

# Verbose mode prints stats at the end:
# total duration
# prompt eval rate (input)
# eval rate (output) <-- this is your tokens/sec
Step 06

Bonus: low-power background inference

macOS has a hidden gem: setting OLLAMA_KEEP_ALIVE to a long duration plus enabling Power Mode → Low Power keeps a model resident in memory while throttling clocks. For chat workloads that means the first token comes back in milliseconds (no reload) at the cost of a few extra watts. On a desktop Mac Studio this is the right default.

bash
launchctl setenv OLLAMA_KEEP_ALIVE 24h

# System Settings → Battery → Low Power Mode on plugged-in power

Tags

#ollama#macos#apple-silicon#m1#m2#m3#m4

Stuck? Share your build?

Hundreds of homelabbers are working through these same tutorials in our community. Drop your config, ask the hard question, or show off what you built.

Join the discussion

Stay Ahead of the AI Curve

Get weekly AI hardware news, benchmark updates, and deals in your inbox. Founding-subscriber list, be one of the first.

&check; No spam&check; Weekly digest&check; Unsubscribe anytime