Executive summary
On the same Mac and the same model, Ollama's MLX engine generated text up to 2.1× faster than GGUF (llama.cpp) and read prompts up to 62% faster. We measured three generations of Apple Silicon in November 2026: M2 Max, M4 Max and M5 Max.
- Larger models gain most. On Qwen3.8 27B, MLX was +45% (M2 Max), +104% (M4 Max) and +106% (M5 Max) faster at generating text. On Gemma 4 12B the gain was +1% to +25%.
- Part of that gain is multi-token decoding, not the file format. On Qwen3.8, MLX runs faster than memory bandwidth allows for one token at a time, and its speed varies with the text, while GGUF stays flat.
- The M5 changes prompt reading. MLX read prompts 45–62% faster than GGUF on the M5 Max, against 9–13% on the M2 Max and M4 Max. This is consistent with MLX using the M5 GPU's neural accelerators.
- Newer chips are much faster. On Qwen3.8 27B with MLX: 26 tok/s on the M2 Max, 51 tok/s on the M4 Max, 63 tok/s on the M5 Max.
Our advice: run MLX builds on Apple Silicon wherever one exists, especially for models of 20B parameters and up and on M5-generation Macs. M5 Ultra results (very large models, power, and many users at once) will be added when testing finishes.
Background
Ollama, the most widely used local LLM runner, has two engines on Apple Silicon. Which one runs a model depends on the model's file format.
| GGUF | MLX | |
|---|---|---|
| Engine | llama.cpp with Metal GPU kernels | Apple's MLX machine-learning framework |
| Model format | .gguf files, e.g. Q4_K_M 4-bit |
safetensors, e.g. nvfp4 or mxfp8 4/8-bit |
| Runs on | Mac, Windows, Linux, NVIDIA/AMD GPUs | Apple Silicon only |
| Ollama tags | most models, e.g. qwen3.8:27b-q4_K_M |
growing set, e.g. qwen3.8:27b-nvfp4, gemma4:12b |
Generating text on a Mac is usually limited by memory bandwidth, not compute. Each new token requires reading every weight of a dense model from memory once. That gives a simple ceiling:
Maximum tokens/sec ≈ memory bandwidth (GB/s) ÷ weights read per token (GB)
Reading the prompt (prefill) is the opposite: it processes many tokens at once and is limited by GPU compute. So a faster engine can win in two ways: by using bandwidth better or doing fewer weight reads per token (generation), and by using the GPU's matrix hardware better (prompt reading). Both show up in our results.
| Chip (top configuration) | Memory bandwidth |
|---|---|
| M2 Max | 400 GB/s |
| M4 Max | 546 GB/s |
| M5 Max | 614 GB/s |
| M5 Ultra | ~1,229 GB/s |
Test setup and method
Each model ran as an MLX build and a GGUF build of similar size (within 3%), on the same Mac, through Ollama 0.40.16, talking to Ollama's API directly.
| Machine | Memory | Date | Notes |
|---|---|---|---|
| Mac Studio M5 Max | 128 GB | 2026-11-19 | new machine, otherwise idle |
| Mac Studio M4 Max | 128 GB | 2026-11-18 | Ollama's default context |
| Mac M2 Max | 32 GB | 2026-11-19 | one model in memory at a time; a working Mac with background apps |
| Model | MLX build | GGUF build |
|---|---|---|
| Gemma 4 12B | gemma4:12b, 7.7 GB |
gemma4:12b-it-q4_K_M, 8.0 GB |
| Qwen3.8 27B (dense) | qwen3.8:27b-nvfp4, 18.2 GB |
qwen3.8:27b-q4_K_M, 17.7 GB |
- A warm-up request per model, then 3 rounds of 4 different prompts per model, alternating which build goes first.
- Generation: 300 output tokens per prompt, temperature 0. We report the median of the 12 runs.
- Prompt reading: about 1,600-token prompts that are unique from the first word, so no cached prefix can be reused. We report the median of 3 runs.
- Context window fixed at 4,096 tokens (from 2026-11-19). Ollama's default can be a model's full 262K, which overflows a 32 GB Mac.
- Model load time is never counted; only Ollama's own generation and prompt timings are used.
The benchmark script and raw JSON results are available on request.
Results
MLX was never slower than GGUF, and the gap widens with model size and chip generation.
On Qwen3.8 27B, the M5 Max with MLX (62.5 tok/s) is 3.5× faster than the M2 Max with GGUF (18.1 tok/s).
The M5 Max reads prompts 2.6–2.9× faster than the M4 Max with GGUF, and 3.7–3.8× faster with MLX.
M5 Ultra: results to be added.
Why MLX is faster
On Qwen3.8 27B, MLX beats the memory-bandwidth limit for one-token-at-a-time decoding, so its 2× gain must come partly from generating several tokens per weight read.
Qwen3.8 27B is a dense 27.8B-parameter model. Its 18.2 GB MLX file includes an image encoder that isn't used for text, so roughly 15.5 GB of weights are read per token.
| Chip | Bandwidth | Ceiling at 15.5 GB/token | GGUF measured | MLX measured |
|---|---|---|---|---|
| M2 Max | 400 GB/s | ~26 tok/s | 18.1 tok/s | 26.3 tok/s |
| M4 Max | 546 GB/s | ~35 tok/s | 25.1 tok/s | 51.1 tok/s |
| M5 Max | 614 GB/s | ~40 tok/s | 30.3 tok/s | 62.5 tok/s |
GGUF reaches about 70–75% of the ceiling, which is typical. MLX reaches about 100% on the M2 Max and 145–155% on the M4 Max and M5 Max.
The second clue is consistency. On the M5 Max, the twelve GGUF runs all fell between 30.2 and 30.3 tok/s. The MLX runs ranged from 57.8 to 69.4 tok/s, depending on the prompt. That pattern is the signature of speculative or multi-token decoding: the model drafts several tokens and checks them in one pass, so speed rises when the text is predictable. Qwen3.5-family models ship with multi-token prediction heads, and Ollama's MLX engine appears to use them. The library also lists explicit speculative variants such as qwen3.8:27b-dflash2-nvfp4.
Gemma 4 has no such feature, and its MLX gain is small: +1% (M2 Max), +25% (M4 Max), +4% (M5 Max).
Prompt reading tells a separate story. MLX's lead grew from +9–13% on the M2 Max and M4 Max to +45–62% on the M5 Max. The M5 generation adds neural accelerators to every GPU core, and MLX is built to use them; llama.cpp's Metal kernels gained much less. For long documents and long chat histories, that is time saved before the first word appears.
Very large models and many users
These tests run on the Mac Studio M5 Ultra 512GB and are not done yet. Planned:
- A 600B+ parameter model on one Mac, quantized, with generation and prompt-reading speed and a screen recording.
- 2, 4 and 8 users at once on the Ultra and the M5 Max: per-user speed and total throughput, to answer how many people can share one Mac.
- Models of 70B and up, and mixture-of-experts models (e.g. Qwen3.5 35B-A3B, Nemotron 3 Nano 30B-A3B), MLX against GGUF.
What to expect from clustering Macs over Thunderbolt 5: it adds memory, so larger models fit, but it doesn't make one user's tokens come faster.
Power and thermals
A Mac Studio M4 Max ran with its GPU at 98–100% for more than four hours under a sustained LLM workload. Its intake air was 23 °C and its exhaust 38 °C, measured with a thermal camera.
Still to measure on the M5 Ultra and M5 Max:
- Power draw at idle and under full LLM load (watts from
powermetrics), and tokens per watt-hour. - Intake and exhaust temperatures, idle and loaded, with matte tape on the aluminium for accurate readings.
- Noise at 1 m under full load.
Practical guidance
Use an MLX build whenever one exists. It was never slower in our tests, and it was up to 2× faster.
| Your situation | What to do |
|---|---|
| Model of 20B parameters or more | MLX: the biggest generation gains (+45% to +106%) |
| Small model (under ~12B) on an older Mac | Either engine; the difference is small (+1% on the M2 Max) |
| Long prompts, documents, RAG on an M5 Mac | MLX: +45–62% faster prompt reading |
| Model with no MLX build | GGUF is fine, and is the only option |
In Ollama: MLX builds are the tags ending in -nvfp4, -mxfp8 or -mlx, and some default tags (e.g. gemma4:12b). Check ollama show <model>: format safetensors means MLX, gguf means llama.cpp.
No MLX build in Ollama yet (November 2026): gpt-oss, DeepSeek R1, Ministral 3, Devstral, Qwen3-Coder. LM Studio and mlx-lm can run community MLX conversions of some of these.
Choosing a Mac by model size (4-bit, room for context):
| Memory | Largest comfortable model |
|---|---|
| 32 GB | ~27B dense (one model at a time) |
| 64 GB | ~32B dense, ~70B tight |
| 128 GB | ~70B dense, ~120B mixture-of-experts |
| 256 GB | ~235B mixture-of-experts |
| 512 GB | 600B+ mixture-of-experts |
Leave memory for context, too (measured 2026-11-23). A model's window and the number of people using it at once take memory on top of the weights. Qwen3-Coder 30B, serving 4 people at once on our Mac Studio M5 Max, used 21.9 GB with an 8K-token window and 45.0 GB with a 64K window: about 98 KB per token of context per user for this model. Coding agents need 64K or more, so budget for it; see our paper on coding agents on private hardware.
Limitations
These results come from two models, one Ollama version and one Mac per chip. Treat them as a well-controlled snapshot, not a universal law.
- Engine features differ by model. The large Qwen gain depends on multi-token decoding that not every model supports.
- M4 Max ran with Ollama's default context on 2026-11-18; the others used a fixed 4,096 tokens. On a 128 GB Mac this mainly affects memory, not speed, but it is a difference.
- The M2 Max is a working Mac, so background apps may have cost a few percent.
- Single user only. Throughput with many users at once is tested separately (pending).
- Software moves fast. Ollama, MLX and llama.cpp all change monthly. We will rerun these tests on new releases and update this paper.
To reproduce: run the same Ollama tags on any Mac with the method above. Our script and raw results are available on request.
Run these models on your own Mac
Dedicated Apple Silicon Macs in our datacenters, with MLX, Ollama and LM Studio preinstalled.