Ollama with MLX on Apple Silicon: What Changes, How to Check It, What to Measure
By the end of this post you will know whether your Mac qualifies for Ollama’s MLX backend, how to check which runner a model is using, and you will have a repeatable measurement of your own tokens per second before and after. A note of honesty first: our lab has no Mac. Everything below that is a Mac number carries a link to whoever measured it, and the procedure is written so you can produce your own.
What you need
- Any Apple Silicon Mac. The MLX preview needs more than 32 GB of unified memory; smaller Macs still run Ollama on the Metal path and the procedure still gives you a baseline.
- Ollama 0.19 or newer (
ollama --version). MLX shipped as a preview in 0.19 on 30 March 2026 (Ollama blog). - 20 to 25 GB of free disk for two copies of one model.
- Ten minutes and a terminal.
What MLX changes, in plain terms
Apple Silicon has one pool of memory shared by the CPU and the GPU. There is no graphics card with its own memory and no copying across a bus; a model that fits in the pool is available to both. MLX is Apple’s machine learning framework built for that layout. Ollama’s Metal path came from llama.cpp and treats the GPU more like a discrete card.
Ollama’s announcement reports, for the Qwen3.5-35B-A3B model, prefill going from 1,154 to 1,810 tokens per second and generation from 58 to 112 tokens per second between 0.18 and 0.19, and 1,851 / 134 with the NVFP4 4-bit format, tested on 29 March 2026 on Apple’s M5 family, which adds GPU neural accelerators that MLX uses. An independent test on an M4 Max with 64 GB reports Qwen3.5 going from 57.8 to 111.4 tokens per second (dev.to, alanwest). A longer review of the preview lists the caveats: only the Qwen3.5-35B-A3B family was fully accelerated at launch, and there is up to 30 percent overhead versus running MLX directly (andrew.ooo).
The unified-memory arithmetic is the same on our NVIDIA GB10 workstation, which also has one shared 128 GB pool. On 2026-09-09 ollama ps showed qwen3.6:35b (23 GB file) resident at 23 GB with a 32k context and 29 GB with a 262k context. Context costs real memory; on a 36 GB Mac that difference decides whether the model fits.
Step 1: Find out which runner you are on
MLX models are separate tags in the Ollama library, with an -mlx suffix: qwen3.5:27b-mlx (20 GB), qwen3.5:35b-mlx (22 GB), gemma4:26b-mlx (18 GB), gemma4:12b-mlx (7.7 GB), listed on the qwen3.5 and gemma4 library pages. The tags without the suffix are the GGUF files that run on the Metal path.
ollama --version # 0.19 or newer
ollama show qwen3.5:27b | head -12 # architecture, context, quantization
grep -i mlx ~/.ollama/logs/server.log | tail -5
The server log lives at ~/.ollama/logs/server.log per the macOS docs. If an -mlx tag fails with MLX not available: failed to load MLX dynamic library, the MLX runner is not installed correctly; that exact message was reported for a Homebrew build in ollama issue #15433, and the fix there was reinstalling Ollama.
Third-party guides disagree on whether an environment variable is needed: one reports OLLAMA_MLX=1 ollama serve, another that 0.19 uses MLX with no flag. Ollama’s own post documents no variable. Trust the log and the tag, not the blog posts. If you must set a variable for the menu-bar app, the FAQ method is launchctl setenv NAME value followed by restarting Ollama.
Step 2: Pull the same model in both formats
Pick the pair that fits your memory with room for macOS and your editor:
| Mac memory | Metal tag | MLX tag | Download |
|---|---|---|---|
| 16 or 24 GB | qwen3.5:9b | not applicable (below the 32 GB threshold) | 6.6 GB |
| 36 or 48 GB | qwen3.5:27b | qwen3.5:27b-mlx | 17 + 20 GB |
| 64 GB and up | qwen3.5:35b | qwen3.5:35b-mlx | 24 + 22 GB |
ollama pull qwen3.5:27b
ollama pull qwen3.5:27b-mlx
Step 3: Run the before-and-after
Same prompt, three runs each, and read the statistics --verbose prints to stderr.
#!/bin/bash
# mlx-bench.sh — identical prompt, both tags, three runs each
PROMPT="Explain in 300 words how unified memory changes running a language model."
for tag in qwen3.5:27b qwen3.5:27b-mlx; do
echo "== $tag"
for i in 1 2 3; do
ollama run "$tag" --verbose "$PROMPT" 2>&1 >/dev/null \
| grep -E "load duration|prompt eval rate|eval rate"
done
ollama ps # SIZE column = memory actually resident
done
Run it with bash mlx-bench.sh. Discard the first run of each tag (that is the cold load) and average the other two. Paste the output into your assistant and ask: “Build a table with load time, prompt tokens per second and generation tokens per second for each tag, and the ratio between them.”
If you prefer numbers from the API, the twelve-line Python timer in our cloud vs local post reads eval_count and eval_duration from /api/generate and works unchanged on a Mac.
What we measured, and what you should record
We ran the procedure on our own machine to prove the script, not to produce Mac numbers. The table is the template to fill in; the last two rows are ours.
| Machine | Model | Runner | Generation tokens/s | Resident memory | Date |
|---|---|---|---|---|---|
| your Mac | qwen3.5:27b | Metal (GGUF) | fill in | fill in | |
| your Mac | qwen3.5:27b-mlx | MLX | fill in | fill in | |
| NVIDIA GB10, 128 GB | qwen3.6:35b | CUDA | 51.4 | 23 GB at 32k context | 2026-09-09 |
| NVIDIA GB10, 128 GB | gemma4:26b | CUDA | 51.2 | 17 GB at 32k context | 2026-09-09 |
What to expect, based on the published numbers above: roughly double the generation speed on a qualifying Mac for the Qwen3.5 family, a smaller gain on prompt processing, and no change on a 16 or 24 GB machine.
Where this fits, and the limits
If your team already runs a Mac Studio or a MacBook Pro with 36 GB or more, MLX is a free speed-up for the local assistant, the coding agent and batch summarisation. Ollama’s post pairs it with ollama launch claude --model qwen3.5:35b-a3b-coding-nvfp4 for coding.
Limits worth planning for. The Mac mini M4 with 24 GB, at about EUR 920 (Compute Market), is below the threshold, so today it gains nothing from MLX; it remains a good box for 7B to 14B models at around 35 tokens per second on the Metal path. The preview accelerates a short list of model families, so check the library for an -mlx tag before assuming a gain. And a 2x on generation does not make a 27B model reason like a frontier model; it makes the same answers arrive sooner.
Next steps
- Decide between a Mac, a Jetson or a GPU box: Edge AI hardware guide 2026.
- Choose the model family before you benchmark it: Best local LLMs, Q2 2026 comparison.
- Put the machine to work on a real task: How to deploy AI locally in your business.
Work with us
We size machines from measured tokens per second, not from marketing pages, and when we do not own the hardware we say so and hand you the procedure. If you want a second opinion on a Mac purchase or an existing fleet, get in touch or see how our consulting works.