r/LocalLLM • u/janishar • 5h ago
Discussion Qwen4-35B-A3B on an M5 Pro (64 GB) with Splash: MLX 4-bit + DFlash2 does 161 tok/s, GGUF 141, and the new "Looped Qwen4" adapter was 25–40% slower
I run Qwen4-35B-A3B locally as the model behind OpenCode on an M5 Pro with 64 GB. Splash 1.7.7 now takes both GGUF and MLX weights and added a loop adapter, so I benchmarked the options against each other, then wrote down everything else I learned moving the model between oMLX, Splash and LM Studio.
Benchmark
Same Mac, Splash 1.7.7, one setup loaded at a time, temperature 0, the same four prompts for each: a long write (3,000 tokens), two short answers with checkable results (a time sum and a list of primes), and summarising a 42K-token code prompt.
| Setup | Long write (tok/s) | Short answers (tok/s) | Reading 42K-token prompt |
|---|---|---|---|
| MLX 4-bit + DFlash2 | 161 | 264–289 | 18.6 s |
| GGUF UD-Q4_K_M + DFlash2 | 141 | 243–245 | 17.4 s |
| MLX + loop adapter, 2 passes | 107 | 186–218 | 26.9 s |
| MLX + loop adapter, 3 passes | 98 | 152–173 | 35.5 s |
MLX vs GGUF: MLX writes about 14% faster; GGUF reads prompts slightly faster. For an agent with long prompts and medium answers they're close, with MLX a little ahead. Sizes: MLX 4-bit 32.2 GB, unsloth's UD-Q4_K_M 35.2 GB + 0.9 GB vision file (UD keeps some layers at 5–8 bits, so it may be slightly better quality).
Loop adapter (Looped Qwen4, by Jason Titus): it runs the middle layers 2 or 3 times per token, so every step costs more. The 178 tok/s quoted for it was on an M5 Max; here it was 25–40% slower than plain MLX and read long prompts 1.5–2× slower.
Quality: all four got the time sum and the primes right and gave sound code summaries. On tests this simple, the adapter showed no quality gain.
Caveat: the long-write prompt spent all 3,000 tokens thinking, so it measures speed only.
SSD streaming: Splash streams Qwen4's ~11 GB n-gram table from SSD by default (
--ple-memory auto, ~200 MB RAM cache), so these numbers include that.
One real OpenCode request on the GGUF, cold cache: 121K prompt tokens read in 51 s (~2,400 tok/s), 5,960 tokens written at 101 tok/s, and the drafter averaged 2.8 tokens per step.
Other things I learned
oMLX's DFlash didn't cover Qwen4's MoE. On 0.8.5 its DFlash path didn't support the qwen4_moe architecture, so no speculative decoding for this model there.
Splash is its own engine, not llama.cpp or MLX underneath: its own Metal kernels on the GPU plus a Neural Engine path, and it always pairs the model with a DFlash2 drafter.
LM Studio ships a Splash engine, but it lags. Settings → Runtime → Additional engines shows "Splash (Metal)" v1.7.4. Its manifest accepts a fixed list of families (Qwen3.8-27B, Qwen3.6-35B-A3B, Qwen3.5-122B-A10B, Qwen3.8-Flash-Next, Flint, Inkling-2-Mini) and matches on architecture plus shape. Its only Qwen4 entry is another shape (2560 hidden, 48 layers, 512 experts; the 35B-A3B is 2048 / 41 / 256), so in LM Studio the Qwen4 GGUF falls back to llama.cpp with no DFlash2.
The drafter never shows in LM Studio's library. A DFlash2 drafter is a
DFlash2DraftModelwith no tokenizer; the engine picks it by family.The prompt cache is what makes agent use bearable. Splash keeps one prefix-matched cache per loaded model, shared across conversations. A brand-new OpenCode chat had 15,712 of 15,718 prompt tokens cached, because every chat starts with the same system prompt and tools. Subagents share the cache but mostly reuse each other's prefix, not the main chat's. It spills from RAM to SSD temp files (32 GB cap here) and is wiped on quit unless you use
--persistent-cache.One model name for every setup.
--served-model-name locallets you swap GGUF, MLX or adapter setups without touching the client config.Smaller window for subagents. In OpenCode, a second model entry with the same id and a 131K context for the general/explore subagents; ~327K for the main chat (Splash cap 335,872).
APFS clones save disk.
cp -cputs a 34 GB model in another app's folder with no extra space until a file changes.
What this isn't: a rigorous benchmark. One machine, one run per setup, short quality checks.
Has anyone seen the loop adapter win on an M5 Max or Ultra? And has anyone got DFlash2 working for Qwen4-35B-A3B in LM Studio or llama.cpp?
1
u/rxscissors 5m ago
Great write-up. Here's the same model on an M5 Max (40-core GPU, 128 GB), with three engines on one Mac. Same unsloth/Qwen4-35B-A3B-MLX-4bit pack for Splash and mlx-serve, plus DankAttn's own W4 pack. Another 74 GB model stayed loaded throughout.
Splash 1.7.7 + RadixArk DFlash2 (--max-context 128K):
- Decode 155-160 tok/s on a 512-token generation, 204-256 on other runs; 8,192-token arithmetic reasoning finished in ~21 s (~390 tok/s)
- Prefill 5,232 tok/s at 7.8K, 4,822 at 33K; TTFT 68 ms
- 116K-token prompt: 26.9 s first pass, 1.0-1.2 s on repeats
mlx-serve 26.12.2 (native MTP head): decode 112-115, prefill 5,264 at 7.8K / 5,086 at 33K, TTFT 124 ms.
DankAttn v2026.12.04 (W4-g64, MTP + DFlash2): decode 94-120, prefill 5,089 / 4,892, TTFT 60 ms.
So on the Max, prefill is a wash across all three (~5K tok/s) and Splash's DFlash2 is the clear decode winner, ~1.4x mlx-serve's MTP.
Quality on a self-grading suite (code run against hidden tests in a sandbox, multi-turn tool chains, generated 33K/116K-token two-hop lookups, exact arithmetic; temperature 1.0, effort high, 8,192-token cap, 3 runs of 12 hard tasks): Splash 30/36, mlx-serve 28/36, DankAttn W4 31/36, Qwen3.8-Flash-Next 30/36. Same misses on every engine (a CSV parser, DST datetime math, 18-digit multiplication at the cap), so it's the model, not the engine. Splash finished the hard tier in 4.5 min vs 12.3 on mlx-serve.
Didn't try the loop adapter, so no answer on whether it wins on a Max, sorry.
1
u/Zeeplankton 3h ago
I'm skeptical of the looping.. If it were better why didn't qwen release it like that