test stringclasses 8
values | model stringclasses 2
values | architecture stringclasses 2
values | quant stringclasses 5
values | file_gib float64 7.82 20.2 | engine stringclasses 4
values | config stringlengths 6 59 | metric stringclasses 6
values | value float64 0.28 685 | unit stringclasses 2
values | runs int64 1 5 |
|---|---|---|---|---|---|---|---|---|---|---|
arch_compare | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | llama.cpp | default | pp4096 | 671.4 | tok/s | 3 |
arch_compare | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | llama.cpp | default | tg128 | 58.56 | tok/s | 3 |
arch_compare | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | default | pp4096 | 106.78 | tok/s | 3 |
arch_compare | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | default | tg128 | 10.82 | tok/s | 3 |
quant_sweep | Qwen3.8-27B | dense | IQ4_XS | 13.32 | ollama | 32k ctx q8_0 kv | generation | 10.5 | tok/s | 2 |
quant_sweep | Qwen3.8-27B | dense | IQ2_S | 7.82 | ollama | 32k ctx q8_0 kv | generation | 11.9 | tok/s | 2 |
mtp_cost | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | 32k ctx q8_0 kv draft-mtp n=2 | generation | 34.6 | tok/s | 3 |
mtp_cost | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | 32k ctx q8_0 kv no draft | generation | 46.2 | tok/s | 3 |
mtp_depth | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | draft-mtp n=2 | generation | 42 | tok/s | 2 |
mtp_depth | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | draft-mtp n=4 | generation | 29.4 | tok/s | 2 |
mtp_depth | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | draft-mtp n=6 | generation | 20.1 | tok/s | 2 |
mtp_depth | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | draft-mtp n=8 | generation | 17.1 | tok/s | 2 |
kv_cache | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | llama.cpp | f16 kv | tg128 | 58.55 | tok/s | 3 |
kv_cache | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | llama.cpp | q8_0 kv | tg128 | 57.25 | tok/s | 3 |
engine_compare | Qwen3.6-35B-A3B | moe_3b_active | 4bit | 20.22 | mlx-lm | alone on gpu | prefill | 296 | tok/s | 1 |
engine_compare | Qwen3.6-35B-A3B | moe_3b_active | 4bit | 20.22 | mlx-lm | alone on gpu | generation | 86.9 | tok/s | 1 |
engine_compare | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | llama.cpp | alone on gpu | prefill | 685 | tok/s | 3 |
engine_compare | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | llama.cpp | alone on gpu | generation | 57.8 | tok/s | 3 |
sample_length | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | 24-token sample | generation | 56.5 | tok/s | 3 |
sample_length | Qwen3.6-35B-A3B | moe_3b_active | Q4_K_M | 20.22 | ollama | 700-token sample | generation | 41 | tok/s | 3 |
quant_sweep | Qwen3.8-27B | dense | 4bit | 15.34 | oMLX | 8k ctx, MLX affine (not GGUF), balanced guard, ssd cache on | pp8192 | 84 | tok/s | 5 |
quant_sweep | Qwen3.8-27B | dense | 4bit | 15.34 | oMLX | 8k ctx, MLX affine (not GGUF), balanced guard, ssd cache on | generation | 13.7 | tok/s | 5 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | code prompt, 256 tok, no spec decoding | generation | 10.53 | tok/s | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | code prompt, 256 tok, draft-dflash n-max 7 | generation | 10.18 | tok/s | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | math prompt, 256 tok, no spec decoding | generation | 10.3 | tok/s | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | math prompt, 256 tok, draft-dflash n-max 7 | generation | 9.81 | tok/s | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | prose prompt, 256 tok, no spec decoding | generation | 10.29 | tok/s | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | prose prompt, 256 tok, draft-dflash n-max 7 | generation | 6.13 | tok/s | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | code prompt, draft-dflash n-max 7 | draft_acceptance | 0.76 | ratio | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | math prompt, draft-dflash n-max 7 | draft_acceptance | 0.72 | ratio | 2 |
dflash2 | Qwen3.8-27B | dense | IQ3_S | 11.2 | llama.cpp | prose prompt, draft-dflash n-max 7 | draft_acceptance | 0.35 | ratio | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | code prompt 256 tok no spec | generation | 55.28 | tok/s | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | code prompt 256 tok draft-dflash n-max 7 | generation | 49.26 | tok/s | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | math prompt 256 tok no spec | generation | 52.09 | tok/s | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | math prompt 256 tok draft-dflash n-max 7 | generation | 48.5 | tok/s | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | prose prompt 256 tok no spec | generation | 51.02 | tok/s | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | prose prompt 256 tok draft-dflash n-max 7 | generation | 30.79 | tok/s | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | code prompt draft-dflash n-max 7 | draft_acceptance | 0.6 | ratio | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | math prompt draft-dflash n-max 7 | draft_acceptance | 0.59 | ratio | 2 |
dflash2 | Qwen3.6-35B-A3B | moe_3b_active | IQ3_S | 12.74 | llama.cpp | prose prompt draft-dflash n-max 7 | draft_acceptance | 0.28 | ratio | 2 |
- Hardware and software
- 1. MoE beats dense by more than quantization ever could
- 2. Aggressive quantization bought almost nothing (dense model)
- 3. MTP speculative decoding is a net loss on Metal
- 4. q8_0 KV cache is free
- 5. MLX vs llama.cpp: fast at generation, slow at prefill
- 6. Short samples inflate tok/s by ~40%
- 7. Not measured here: SSD expert streaming (Edge0)
- Caveats
- 8. A fourth engine: oMLX (paged SSD KV cache) on the same dense 27B
- 9. DFlash2 speculative decoding also loses on Metal — even at 76% acceptance
Apple Silicon Local LLM Benchmarks — M2 Max 32GB
Measurements taken while trying to get Qwen3.8-27B usable locally on a 32GB M2 Max. Most of the popular speedup advice did not transfer from CUDA, so these are mostly negative results.
Everything here was measured on one machine. Treat it as a datapoint, not a law.
Hardware and software
| Chip | Apple M2 Max |
| Unified memory | 32 GB (~21.8 GB wireable to the GPU) |
| macOS | 26.5.2 |
| llama.cpp | build c1d0e7a00 (10621), Metal backend |
| MLX | 0.32.2, mlx-lm 0.31.3 |
| ollama | 0.33.0 |
1. MoE beats dense by more than quantization ever could
llama-bench, GPU otherwise idle:
| model | quant | file | pp4096 | tg128 |
|---|---|---|---|---|
| Qwen3.6-35B-A3B (MoE, 3B active) | Q4_K_M | 20.22 GiB | 671.40 ± 11.20 | 58.56 ± 0.82 |
| Qwen3.8-27B (dense) | IQ3_S | 11.20 GiB | 106.78 ± 0.34 | 10.82 ± 0.06 |
6.3x prefill and 5.4x generation — and the MoE is the larger file. File size measures what is stored; speed depends on what is read per token.
2. Aggressive quantization bought almost nothing (dense model)
| quant | file | tok/s |
|---|---|---|
| IQ4_XS | 14.3 GB | 10.5 |
| IQ2_S | 8.4 GB | 11.9 |
41% less data to read, 13% faster. If generation were bandwidth-bound, cutting 41% should have given close to 41%. On Metal a dense model appears to be compute-bound — fewer bits do not reduce the arithmetic.
3. MTP speculative decoding is a net loss on Metal
Same weights, same 32k window, same q8_0 KV cache, draft head present vs absent (ollama):
| config | tok/s |
|---|---|
with --spec-type draft-mtp (n=2) |
34.6 |
| no draft head | 46.2 |
Deeper drafting is monotonically worse on the MoE:
| draft depth | tok/s |
|---|---|
| n=2 | 42.0 |
| n=4 | 29.4 |
| n=6 | 20.1 |
| n=8 | 17.1 |
This is already documented upstream in llama.cpp issues #23752 and #23011; the stated cause is per-step Metal kernel dispatch overhead exceeding the speculative gain. These numbers are an M2 Max datapoint for it.
4. q8_0 KV cache is free
| KV cache | tg128 |
|---|---|
| f16 | 58.55 ± 0.48 |
| q8_0 | 57.25 ± 2.07 |
Error bars overlap. On a memory-constrained Mac the context headroom q8_0 buys costs no measurable generation speed.
5. MLX vs llama.cpp: fast at generation, slow at prefill
Each engine run with the other fully stopped (Qwen3.6-35B-A3B 4-bit):
| engine | prefill | generation |
|---|---|---|
| MLX (mlx-lm) | 296 tok/s | 86.9 tok/s |
| llama.cpp | 685 tok/s | 57.8 tok/s |
MLX wins generation 1.5x, loses prefill 2.3x. Prefill lengths were not matched (2531 vs 4096 tokens) and llama.cpp's own prefill rate falls with length, so the real prefill gap is probably wider.
This matters for agentic work, where every tool call re-reads a growing conversation and then emits a handful of tokens. Benchmarks that only report generation will point you at the wrong engine for that workload.
6. Short samples inflate tok/s by ~40%
A 24-token generation measured 53-60 tok/s on the same model that sustains 41 over 700 tokens. The opening tokens are fast and dominate a short sample. A tok/s figure without a stated sample length is probably the flattering one.
7. Not measured here: SSD expert streaming (Edge0)
Worth knowing about because it changes what "fits" means, though these are the project's numbers on an M4 Pro, not mine on this M2 Max.
Edge0 keeps a sparse-MoE checkpoint on disk and pulls only the experts a token needs into RAM. On Apple Silicon via MLX, the same Qwen3.6-35B-A3B measured above runs in ~2.9 GB of peak memory at 14.9-17.7 tok/s on a Mac mini M4 Pro, against ~20 GB resident and 58.6 tok/s the conventional way here.
So the trade is roughly 3.5x slower and ~3.9 accuracy points (their figure, Recover-LoRA + prerouter) in exchange for 7x less RAM. That is a bad deal on a 32 GB machine where the model already fits, and a very good one on 16 GB or a phone.
The ceiling matters too: as of now Edge0 supports nothing above 35B. If it ever reaches the 100B+ MoE class, a 32 GB Mac would run models that currently need 96 GB, which would change the hardware calculus for everyone reading this.
Caveats
- One machine, one chip, Qwen family, ollama/llama.cpp/MLX. Whether this is Metal in general or specific to these backends is untested.
- Several figures are 2-3 run averages. Repeat runs of the same model varied 35-46 tok/s across a week depending on machine load and swap pressure.
- Each comparison uses figures measured in the same session as whatever it is compared against.
If you have an M3/M4/M5 machine, the MTP result is the one worth checking — if it holds there
8. A fourth engine: oMLX (paged SSD KV cache) on the same dense 27B
oMLX 0.6.4, Qwen3.8-27B-MLX-4bit (lmstudio-community, affine 4bit, group_size 64 — not GGUF). Single-request, 8,192-token prompt / 128-token generation, unique prompt prefix each run so nothing was served from cache. GPU confirmed idle before each run (ollama ps empty).
| config | pp8192 | generation |
|---|---|---|
| balanced guard (default), ssd cache on | 84 tok/s | 13.7 tok/s |
5 runs across 2 sessions on different days (83.0/81.5/83.1, then 86/86), consistent regardless of unrelated background app load — closing other GPU-adjacent apps between sessions changed nothing measurable.
For scale: this is a bigger, coarser quant (4bit dense, 15.3 GiB) than the IQ2_S row above (7.8 GiB, generation 11.9 tok/s) and still generates faster — another data point for finding #2 (quantization buys less than the file-size delta suggests).
Two real bugs found getting this measurement, filed upstream rather than folded into the table above (both would have silently changed these numbers if I hadn't caught them): --memory-guard/--no-cache CLI flags persist into settings.json instead of being run-scoped (jundot/omlx#3828), and the default ssd_cache_max_size: "auto" wrote 6.5GB to disk for these 4 requests with no warning (jundot/omlx#3829).
9. DFlash2 speculative decoding also loses on Metal — even at 76% acceptance
Finding #3 showed MTP was a net loss here. The obvious counter-argument is that MTP is just a weak drafter. DFlash2 is a much stronger one — a block-diffusion drafter from the Splash team that drafts a whole block per pass — so it is a fair test of whether the drafter was the problem.
Built from llama.cpp branch xsn/dflash2 (commit 4e2f54f, Metal) — not the c1d0e7a00 build
used elsewhere in this dataset, because the released build's DFlash loader rejects the published
drafter GGUF (wrong number of tensors; expected 81, got 58). Target
Qwen3.8-27B UD-IQ3_S, drafter z-lab/Qwen3.8-27B-DFlash2-Q4_K_M (1.1 GB), --spec-draft-n-max 7,
256-token generations, 2 runs each, GPU otherwise idle, same binary on both sides.
| prompt | no spec | draft-dflash | change | acceptance | mean accepted len |
|---|---|---|---|---|---|
| code | 10.53 | 10.18 | 0.97x | 76% | 6.22 |
| math | 10.30 | 9.81 | 0.95x | 72% | 5.80 |
| prose | 10.29 | 6.13 | 0.60x | 35% | 3.45 |
The drafter works and it still loses. On code it accepted 6.22 tokens per verification step out of a maximum of 7, beating the 5.1-5.4 acceptance length z-lab publishes for this drafter. Speculation is landing near its ceiling and throughput still goes backwards.
That points the blame away from the drafter and back at finding #2. Speculative decoding spends compute to save memory bandwidth, so it only pays when decode is bandwidth-starved and compute sits idle. Finding #2 measured the opposite on this chip: cutting IQ4_XS to IQ2_S removed 41% of the bytes and bought 13%, so a dense model decoding on Metal is compute-bound. There is no idle compute to spend, and drafting plus verification costs more than the reads it avoids.
So the rule generalizes past MTP: on a compute-bound dense model on Metal, speculative decoding is a net loss regardless of how good the drafter is. Prose at 0.60x is the same mechanism at its worst — acceptance halves, and you pay full drafting cost for a third of the tokens.
Tested on the MoE, and the prediction above was wrong. Same harness, same drafter family,
Qwen3.6-35B-A3B UD-IQ3_S (13.7 GB) with the DFlash2 drafter converted from incoai/Qwen3.6-35B-A3B-DFlash2
(no GGUF is published for the MoE, so this one is a local conversion — the dense test used Inco's
official GGUF, so the two runs differ in drafter provenance):
| prompt | no spec | draft-dflash | change | acceptance | dense was |
|---|---|---|---|---|---|
| code | 55.28 | 49.26 | 0.89x | 60% | 0.97x |
| math | 52.09 | 48.50 | 0.93x | 59% | 0.95x |
| prose | 51.02 | 30.79 | 0.60x | 28% | 0.60x |
The MoE loses harder than the dense model on code and math, not less. The reasoning above — that 3B active params leave spare compute for drafting — had it backwards. What matters is not absolute spare compute but the ratio of draft cost to target-step cost. On the MoE the target step is cheap precisely because only 3B are active, so a ~1B drafter consumes a large fraction of what it is trying to save. On the dense 27B the target step is expensive, so the same drafter is proportionally cheaper, which is why dense lands nearer break-even (0.97x) than the MoE (0.89x).
So the property that makes an MoE fast is the same property that makes speculation unprofitable on it. Corrected rule: on this chip, speculative decoding's payoff scales with target-step cost relative to draft cost, and neither model class here is expensive enough per step to pay for a drafter. Prose stays at 0.60x in both, where acceptance collapses and the draft cost is pure loss.
- Downloads last month
- 133