MacBook AI Guide

Local LLM on MacBook — Run AI on Apple Silicon (M1-M4)

MacBooks with Apple Silicon are among the best local AI machines you can buy. Unified memory means your Mac's RAM doubles as VRAM, letting you run models that would need a $2000 GPU on a PC. This complete guide covers which models work, how fast they run, and exactly how much memory you need.

Why MacBooks are great for local AI

Apple Silicon Macs have three unique advantages for running local LLMs:

  1. Unified memory = VRAM. On a PC, you have separate system RAM (typically 32-64 GB) and GPU VRAM (8-24 GB). On a Mac, the same pool of memory is shared between CPU and GPU. A Mac with 64 GB unified memory can load a 50 GB model. A PC with 64 GB RAM + 24 GB VRAM can only load a ~22 GB model (limited by the 24 GB VRAM).
  2. Metal GPU acceleration. Apple's Metal API provides fast GPU inference through llama.cpp and Ollama. Performance is competitive with mid-range NVIDIA GPUs.
  3. Power efficiency. Running a 7B model on an M3 MacBook Pro draws ~15-25W. A desktop RTX 4090 draws 300-450W for similar work. You can run AI on battery for hours.

The trade-off vs. a desktop PC is absolute top speed. An RTX 4090 generates tokens faster than any Mac. But for most users, a MacBook Pro with sufficient memory offers the best balance of model capability, speed, and portability.

Best models for each Mac memory tier

Here is exactly which models you can run at each unified memory configuration. These numbers assume Q4_K_M quantization and 8K context.

Unified memoryBest modelsMax model sizeTypical tok/s
8 GBPhi-3 3.8B, Llama 3.2 3B, Qwen 2.5 1.5B3B Q410-20 tok/s
16 GBQwen 2.5 7B, Llama 3.1 8B, Mistral 7B8B Q420-40 tok/s
24 GBQwen 2.5 14B, Llama 3.1 8B Q8, CodeLlama 13B14B Q425-50 tok/s
36 GBQwen 2.5 32B, Yi 34B, Mixtral 8x7B34B Q415-35 tok/s
48 GBQwen 2.5 32B Q6, Llama 3.3 70B Q240B Q415-40 tok/s
64 GBLlama 3.3 70B Q4, Qwen 2.5 72B Q472B Q420-50 tok/s
96-128 GBLlama 3.3 70B Q8, DeepSeek V2, C4AI Command R+100B+ Q415-40 tok/s

Key insight: a MacBook Pro with 64 GB unified memory runs the same models as a dual-RTX 3090 PC setup (48 GB), but in a laptop form factor. This is the Mac's killer advantage for local AI.

Use our VRAM calculator to check specific model + quantization combinations.

Setting up Ollama on Mac

Ollama is the easiest way to run local LLMs on a Mac. It automatically uses Metal GPU acceleration and downloads optimally quantized models.

bash
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Download and run a 7B model
ollama run qwen2.5:7b

# For more context (16K instead of default 2K)
ollama run qwen2.5:7b --context-size 16384

# Run a 14B model (needs 24 GB+ unified memory)
ollama run qwen2.5:14b

Ollama automatically detects Apple Silicon and uses the Metal backend. You can verify acceleration by checking the log output — it should mention ggml_metal and show GPU layers being offloaded.

For advanced users, llama.cpp offers more control:

bash
# Clone and build llama.cpp with Metal support
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make clean && LLAMA_METAL=1 make -j

# Download a GGUF model and run it
./main -m qwen2.5-7b-q4_k_m.gguf -n 512 -ngl 99

The -ngl 99 flag offloads all layers to the GPU. Lower numbers offload fewer layers and use more CPU + system RAM.

Performance benchmarks

Real-world token generation speeds for a 7B Q4_K_M model on different Macs using Ollama with Metal acceleration:

Mac modelChipMemoryTokens/sec
MacBook Air (2020)M18 GB~12 tok/s
MacBook Pro 14"M1 Pro16 GB~25 tok/s
MacBook Pro 16"M1 Max32 GB~35 tok/s
MacBook Air (2022)M216 GB~22 tok/s
MacBook Pro 14"M3 Pro18 GB~35 tok/s
MacBook Pro 16"M3 Max48 GB~55 tok/s
MacBook Pro 14"M4 Pro24 GB~50 tok/s
MacBook Pro 16"M4 Max64 GB~70 tok/s
Mac StudioM2 Ultra128 GB~80 tok/s

For larger models, speeds decrease proportionally. A 70B Q4 model on an M4 Max 64 GB runs at ~15-25 tok/s — slower than 7B but still usable for reading and reasoning.

Thermal considerations

Running LLMs on a MacBook generates heat. Key facts:

  • MacBook Air (fanless) will throttle after 2-5 minutes of continuous inference. The M1/M2/M3 Air is fine for occasional queries but not sustained batch processing.
  • MacBook Pro (with fans) maintains peak performance indefinitely. The fans spin up during sustained use (you will hear them at ~3500-5000 RPM) but the chip stays cool.
  • Mac Mini / Mac Studio have excellent thermal performance due to the larger chassis and active cooling.
  • Battery impact: Running a 7B model continuously drains a MacBook Pro battery in 3-5 hours. Plug in for extended sessions.

If you plan to do serious local AI work, get a MacBook Pro (not Air) or a Mac Mini/Studio. The fanless Air design is fine for experimentation but not for daily driver use.

eGPU is not supported on Apple Silicon

A common question: can you add an external GPU to a MacBook for faster inference? No. Apple removed eGPU support starting with the M1 series. Thunderbolt eGPU enclosures that worked with Intel Macs do not work with Apple Silicon.

This means your Mac's unified memory is the only pool available. If you bought an 8 GB MacBook Air, you cannot upgrade later — you are capped at small 1-3B models. Choose your memory tier carefully at purchase time.

For users who need more capability later, consider a cloud fallback. Plugsky gives you access to 30+ models with no hardware requirements.

Tips and best practices

  • Buy as much memory as you can afford at purchase time. You cannot add more later. 16 GB is the minimum for useful work. 24-36 GB is the sweet spot. 64 GB+ is future-proof.
  • Use Q4_K_M quantization. It offers the best quality-to-size ratio for most models. Q8 is better for quality but needs 2x the memory. Q2 fits more models but the quality loss is noticeable.
  • Close other apps when running large models. macOS uses system memory too. A 64 GB Mac with 20 Chrome tabs open only has ~50 GB available for your model.
  • Use the Ollama API. Ollama exposes http://localhost:11434/v1 with an OpenAI-compatible API. Point any OpenAI client at it and enjoy local inference with your favourite frontend.
  • Monitor your swap. If your model does not fit in unified memory, macOS swaps to disk. Performance drops to 1-2 tok/s. Check Activity Monitor for "memory pressure" — if it is in the red zone, use a smaller model.

Need more power than your Mac?

Plugsky gives you 30+ models including Llama, Qwen, Mistral, and DeepSeek. No hardware, no setup, no rate limits. Use from any device.

Start Free → VRAM calculator

Frequently asked questions

Can a MacBook Air run local LLMs?

Yes, but only small models. An M1 MacBook Air with 8GB unified memory can run 1-3B parameter models at Q4 quantization at ~10-20 tok/s. For 7B models you need at least 16GB unified memory, which means MacBook Pro or Mac Mini.

How much unified memory do I need for local LLMs on Mac?

8GB runs 1-3B models. 16GB runs 7B models. 24GB runs 13B models. 36GB+ runs 30B+ models. For 70B models, you need 64GB+. Always buy as much unified memory as you can afford — you cannot upgrade later.

How do I run a local LLM on a MacBook?

The easiest way is Ollama. Install with 'curl -fsSL https://ollama.com/install.sh | sh', then run 'ollama run qwen2.5:7b'. Ollama automatically uses Metal GPU acceleration on Apple Silicon. For more control, use llama.cpp directly with the Metal build.

Is Apple Silicon faster than NVIDIA for local LLMs?

Apples to oranges. Apple Silicon's unified memory lets you run much larger models than the VRAM on a similarly priced GPU. For speed, an M4 Max matches an RTX 4070 (~50-90 tok/s on 7B Q4). A desktop RTX 4090 is faster, but costs more and uses 3x the power.

Can I use an external GPU with a Mac for local LLMs?

No. Apple Silicon Macs do not support external GPUs (eGPUs). Apple removed eGPU support starting with the M1 series. You are limited to the unified memory you bought at purchase time. Choose your memory tier carefully.