Ollama On Your Mac Can Run Local AI Twice As Fast
Every figure this video puts on screen, with the page it came from. Nothing here is our own
benchmark: each number is someone else’s published test, and the video says whose.
Fix one: the app it runs in
- Ollama’s own test, 58 to 112 tokens a second decode (prefill 1,154 to 1,810), Qwen 3.5
35B-A3B, NVFP4 on Ollama 0.19 against Q4_K_M on 0.18; the preview needed a Mac with more than
32GB. Ollama blog: MLX
- Models run on MLX on Apple Silicon by default from Ollama v0.40.0.
Release notes ·
all releases
- Ollama 0.18 slower than llama.cpp, about 32.5 against 53.5 tokens a second (the issue’s
table reads 32.54 and 53.53), fixed in 0.31.2 per the maintainer.
ollama/ollama#14861
- M1 Max 64GB, LM Studio 0.4.5: MLX 57, GGUF 29, Ollama 18 tokens a second as the UI reports
them; prefill 6.9 s against 2.9 s at 655 tokens and 49.4 s at 8.5K.
famstack: MLX vs GGUF ·
part 2
- M4 Max 128GB, Qwen 3.5 35B-A3B: mlx-lm 130.2, llama.cpp 71.0, Ollama 43.5 tokens a second.
Antek Apetanovic
- M3 Ultra, Qwen 3.5 9B: Ollama GGUF 77.7, Ollama MLX 90.5, mlx-lm 107.5 tokens a second.
terminalbytes
- “About 10~20% speed gain” from GGUF to MLX, a reply on r/LocalLLaMA.
Reddit thread
- Long context can flip it: MLX 5.95 against llama.cpp with flash attention 12.12 tokens a
second at 146K on an M3 Ultra. ml-explore/mlx-lm#763
- The M1 Max launched in October 2021.
Apple Newsroom
Fix two: the memory macOS gives the GPU
- The GPU’s share is capped by default and raised with
sudo sysctl iogpu.wired_limit_mb;
the setting does not survive a reboot, and going past the default can mean slow, swapping
loads. llama.cpp discussion #2182
- Setting it to 0 restores the default; leave 8 to 16GB for the system.
InsiderLLM
- The wired limit must stay strictly below total memory.
MLX docs ·
mlx-lm README
- Checking where a model runs: the PROCESSOR column of
ollama ps (100% GPU, or a CPU/GPU
split). Ollama FAQ
Fix three: the context length setting
- Ollama’s default context by memory: 4K under 24GB, 32K from 24 to 48GB, 256K above; 64,000
for agents and coding tools. Ollama docs: context length
- A 16GB M4 Mac mini at 128K context: qwen3:4b needed 23GB, 51% ran on the CPU, 32 fell to
19.4 tokens a second. creatos
- The MLX runner does not reserve the whole context up front.
ollama/ollama#16219
- M2 Ultra, Qwen3 30B-A3B: 79.0 tokens a second falls to 45.3 at 32K depth (the table
reads 78.97 and 45.26). llama.cpp M2 Ultra benchmarks
- KV cache size worked from Llama 3.1 8B’s config (32 layers, 8 KV heads, head dim 128).
config.json
- The KV cache in 8 bits (
q8_0) is an Ollama option; some report slower generation with it
on Macs. Ollama FAQ ·
InsiderLLM
- Plain M4, LLaMA 7B: Q4_0 24.11, Q8_0 13.54, F16 7.43 tokens a second at 120GB/s.
llama.cpp discussion #4167