← All guides

MLX vs llama.cpp on Apple Silicon: Which Is Faster in 2026?

Ollama itself switched to MLX on Apple Silicon in v0.19.0. That is the strongest signal yet: on newer Macs, MLX is now the fast path, and llama.cpp Metal is the compatibility path.

Short answer

Use MLX if:

Ready to buy? See the tested hardware list with current prices.

  • you run a Mac with more than 32GB unified memory
  • you run an M4 or M5 series chip
  • your model is 14B or larger
  • your model exists in MLX/safetensors format

Use llama.cpp (Metal) if:

  • you run an M1 or M2 Mac
  • your model only exists as GGUF
  • you need CPU offload or fine-grained quant control
  • your Mac has 32GB unified memory or less

This is no longer a niche debate. Ollama itself now runs MLX on Apple Silicon.

Ollama switched to MLX in v0.19.0

In late March 2026, Ollama released v0.19.0 with this line: “Ollama is now powered by MLX on Apple Silicon in preview.” That is the project that popularized llama.cpp choosing Apple’s own framework for new Macs.

Ollama’s own preview numbers for Qwen3.5-35B-A3B (NVFP4):

MetricOllama 0.18 (llama.cpp)Ollama 0.19 (MLX)Change
Decode58 tok/s112 tok/s+93%
Prefill1,154 tok/s1,810 tok/s+57%

The int4 build reaches 134 tok/s decode. The preview launched with Qwen3.5-35B-A3B; Ollama says it will expand the supported list. Secondary reporting (yage.ai) lists about 6 architectures in the preview, including Gemma 3, GLM-4 MoE Lite, Llama, and Qwen 3/3.5 — that list is yage.ai’s, not Ollama’s.

Two hard limits from Ollama’s announcement:

  1. The MLX preview requires a Mac with more than 32GB unified memory. Below that, Ollama falls back to llama.cpp Metal.
  2. Model format decides the engine: safetensors models route to MLX, GGUF models route to llama.cpp (yage.ai’s analysis of the routing; Ollama v0.30.0 notes describe llama.cpp as augmenting the MLX engine).

Benchmarks: how big is the MLX edge?

Independent benchmarks from yage.ai on M4-class hardware:

ComparisonResult
MLX vs default Ollama (pre-0.19)~3x (130 tok/s vs ~43 tok/s)
MLX vs raw llama.cpp Metal~1.4–1.8x
Raw llama.cpp Metal, tuned89.4 tok/s on the same class of model

So most of the famous “3x” gap was Ollama overhead, not llama.cpp itself. Tuned llama.cpp Metal is closer than the headlines suggest. MLX still wins at decode on modern chips.

Memory is the quieter win. Measured by yage.ai:

Model classMLXGGUF (llama.cpp)
30B34.7GB40GB
235B124GB133GB

On unified memory, 5GB can be the difference between a model that fits and a model that swaps. See KV cache quantization: Q8 vs Q4 VRAM for the other big memory lever.

Where llama.cpp still wins

llama.cpp is not obsolete on Macs. It wins when:

  • Old chips, long prompts. On an M1 Max with a 650-token prompt, GGUF via llama.cpp delivered 20 tok/s effective versus 13 tok/s for MLX (yage.ai). MLX’s advantage is tuned toward newer silicon.
  • GGUF-only models. Most quantized community models ship as GGUF first. If there is no MLX conversion, llama.cpp is the only path.
  • 32GB or less. The Ollama MLX preview excludes these Macs entirely.
  • CPU offload. llama.cpp can split layers between GPU and CPU. See llama.cpp MoE offload flags explained.

M5 changes the math again

MLX’s gains grow on M5. yage.ai measured M5 vs M4 on Qwen3-14B-4bit under MLX:

  • Time to first token: 4.06x faster
  • Generation: 1.19x faster

Ollama states the MLX path is tuned for the GPU Neural Accelerators in M5, M5 Pro, and M5 Max. The prefill gap is the one that matters for coding agents — long project prompts hit time-to-first-token hardest. If you are choosing a Mac for this, see best local LLM for M4 Max.

 THE MLX MEMORY FLOOR

Ollama's MLX engine requires more than 32 GB unified memory. A 48 GB+ Mac clears that floor and fits 30B-class MLX models (34.7 GB measured) with room for context.

48GB+Premium Mac 48 GB+ ↗

Decision table

Your situationBetter default
M4/M5, 48GB+, model has MLX buildMLX
M5 + coding agent (long prompts)MLX
M1/M2 Macllama.cpp Metal
32GB unified memory or lessllama.cpp Metal
Model only exists as GGUFllama.cpp
Model barely fits in memoryMLX (smaller footprint)
You need CPU offloadllama.cpp

If you just use Ollama v0.19.0+, it makes most of this choice for you: safetensors goes to MLX, GGUF goes to llama.cpp, and small-memory Macs stay on llama.cpp.

How to test on your own Mac

  1. Pull the same model in both formats (MLX safetensors and GGUF).
  2. Run a long prompt (16K+ tokens) and record time to first token.
  3. Run a short prompt with a 500-token answer and record decode tok/s.
  4. Watch memory in Activity Monitor — swap kills both runtimes equally.
  5. Keep the winner. The answer differs by chip generation and model size.

Final recommendation

On an M4 or M5 Mac with more than 32GB of memory, MLX is the correct default in 2026 — Ollama’s own switch settled the argument. On M1/M2 Macs, small-memory Macs, and GGUF-only models, llama.cpp Metal remains the right tool.

Sources:

Before you order parts, check the tested hardware list for current prices by tier.

Need OpenClaw fixed live?

Remote rescue sessions for gateway, auth, tunnel, VPS, and model access problems.

See Rescue Session

Read next

Ollama Is 2x Faster on Mac: The Version and Settings That Do It
Ollama 0.19 moved Apple Silicon to MLX and roughly doubled decode speed. Here is the release, the measured numbers, and the four settings that finish the job.
M5 Max MacBook Pro for Local LLMs: What 614 GB/s Actually Buys You
M5 Max MacBook Pro local LLM guide (Aug 2026): 614 GB/s bandwidth, gpt-oss 120B Q8 at 64-88 tok/s, Qwen3.5-122B at 55-66 tok/s, why M5 Pro is half the machine, and whether M4 Max owners should upgrade.
Best Models to Run on a MacBook Pro M4 Max 128GB
Best local LLMs for a MacBook Pro M4 Max 128GB in 2026. gpt-oss 120B Q6 (~93GB, 14-20 tok/s), Laguna XS 2.1 at Q8 for agentic coding, Llama 4 Scout at 10M context, Llama 4 Maverick barely fitting at Q4. Plus MLX vs Ollama and where laptop thermals bite.
Local LLM Coding Setup on Windows + NVIDIA: The Guide Mac Tutorials Skip (2026)
A Windows-native path to a local coding agent on an NVIDIA GPU. No WSL, no Docker required. Runtime choice, verifying GPU offload actually engaged, MoE offload for 12-16GB cards, and wiring a coding agent to a local endpoint.