Repository navigation
Replies: 6 comments 10 replies
|
Thank you for this, PPL with the paired chunks is much more useful than one number. I'm on M2 Max 38-core, 64 GB, and use One thing from my agent replays (coding agent, 32K to 125K context, temperature 0) which may help with the choice: the decode gap between formats gets smaller at long context, because attention over the history costs the same for every format. There UD-Q4_K_M is ~6-7% behind MLX 4-bit per cycle instead of ~10% on short prompts, and prefill is only ~2% slower. So for long agent sessions UD-Q4_K_M costs less than the short numbers suggest. Your PPL numbers make me want to try it, and GSQ IQ3_S too. I also tried Bonsai ( |
|
@ghisguth thanks, the long-context point is a good one, my decode numbers are short prompts only, so at 32K+ the gap to UD-Q4_K_M is smaller than in my table. Same probably for IQ3_S, it was ~25% slower per cycle on short prompts here, would be interesting to see how much of it is left in your replays. Small follow-up with two more things. 1. Q4_0. I added
Paired per chunk:
So Q4_0 is the weakest one here, even behind UD-IQ3_S which is 4 GB smaller. On chat it's ~10% worse than MLX 4-bit, and this is significant even with the noisy chat corpus. I guess the symmetric grid (only a scale per 32, no min) costs more than imatrix gives back on this model. So "Q4_0 is almost as fast as MLX 4-bit" is true, but quality-wise it's not a replacement for it. 2. Splash computes the same as llama.cpp. In the first post I had a caveat that PPL was measured outside Splash. Thanks to jianc99's pointer in incoai#540 I used
Within 0.3% everywhere, and the per-chunk Q4_0 vs MLX 4-bit gap correlates 0.99 between Splash and the other engines. So the numbers above hold for Splash too, the caveat can be dropped. Inside Splash directly, Q4_0 vs MLX 4-bit: top-1 agreement 90.2% on wiki and 86.4% on chat, mean KL 0.060 / 0.192. One run per window takes ~53 s on M1 Pro (model load ~15 s, prefill ~15 s, 127 verify cycles ~23 s), so 30 windows per text is about half an hour per quant. Full logits are 1 GB per window, so I reduce each to per-position NLL, top-1 and every 8th row of log-probs right after it's written. |
|
@sady4850 thanks, the Q4_0 result is useful. In speed it is the closest GGUF to MLX 4-bit on my M2 Max too, so good to know it is not a free replacement. GSQ IQ3_S in my replay (M2 Max, Splash 1.4.0-m1, the same 78 agent turns sent twice, temperature 0), next to MLX 4-bit:
(The 32k row is only 5 requests. tok/s depends on the text, cycles/s is the engine itself.) Prefill on the same 120 requests is the same as MLX 4-bit (-1%). Whole replay: 2489 s against 2324 s. So the gap gets a bit smaller with context, but IQ3_S stays clearly slower. UD-Q4_K_M in the same replay is -6 to -7%. |
|
@sady4850 a follow-up on GSQ-RCO IQ3_S speed. It was slow because of how the IQ3 kernels decode each weight on M1/M2, not the bandwidth. I made a PR for it: #35. Same outputs, bit for bit. bench-all on my M2 Max, decode tok/s at 1 / 2 / 4 lanes (A = 1.4.0-m1, B = with the PR):
So against MLX 4-bit it is now -16 / -10 / -6% instead of -21 / -13 / -7%. One more change for the IQ3 coefficient decode is in testing, I will post when it is ready. |
|
@sady4850 thanks for putting it all in one place in #43. I was playing with Flash Next quants on my M2 Max 64 GB, trying to find the one which works best for me:
BTW the Coder "IQ1_M" is not IQ1_M at all. it is ~3.3 bpw. It is smaller only because half of experts are gone. Splash 1.5.0-m1 and
Q2_0 works great at 46G next to my dev apps. IQ3_XXS needs at least 52G for all experts with 256K context, so only when the Mac is just the LLM server. And in agent work it was even slower than the table: in one of my tests it took 2.6x the time of Q2_0, because the ~48 GB fixed part leaves no room for the prefix cache and it kept re-prefilling (479K prompt tokens vs 97K). With 46G and part of experts on SSD decode is ~9% slower than all resident, and short prompt prefill is ~2x slower, every new prompt pulls experts from SSD. Coder fits in 40G with 256K + 128K for a subagent, decode is ~10-14% slower than Q2_0. But in a real coding task it thinks a lot more, 2x output tokens, so the task took 5h40 vs 3h47 for Q2_0. It also loops on prompts with Russian language every time, I guess languages were in the experts that were cut. Now the quality. I tried to find a difference: a reasoning and tool-use agent loop in one of my projects; real coding tasks with tests in my project, same task on each model. Neither IQ3_XXS nor Coder was better in reasoning, precision or tool calls. The reasoning and tool-use agent loop was failing different cases for Q2_0 and IQ3_XXS, same pass rate. On the coding task Coder wrote the same code and made the same decision as Q2_0, but made more tool errors and lost track of things after compactions. So same quality, just slower. I know KLD matters, and the Coder card shows LiveCodeBench 81 -> 87 which should be significant. But I can't see it in day to day use. Same card also shows SWE-bench Verified 79.2 vs 82.8 for BF16, which is closer to what I do. It was n = 1 per task though, so a small gain could still be there. |
|
i was using the swift1.5 27b 4 bit mlx..but it did show up the low quant issues with long running tasks with lots of compression and UI setups... Then i switched to Swift-1.5-Qwen3.8-27b-oQ6e-bf16-mtp-MLX . this is essentially 6bit, and i have to say the quality is noticable, especially at long running tasks, multiple issues getting solved in one prompt/go.. the speed did take a small hit compared to 4 bit, but its workable for me... I did ask for the gguf vs mlx speed once in the issues and dev replied that mlx still has the edge in terms of speed. I suspected ggufs would have better quant quality, which your tests show... |
Uh oh!
There was an error while loading. Please reload this page.
I was choosing a quant for my 32 GB M1 Pro and was curious how they differ in quality, not only in speed. So I ran perplexity on 4 quants of Qwen3.8-27B and measured them in Splash on the same machine. Sharing the numbers in case it's useful for somebody.
Setup
incoai/Qwen3.8-27B-DFlash2)--language-only --max-context 64K --max-memory 21G --idle-release off --ane-ffn-share 0.68 --ane-ffn-minimum-rows 256, default int8 KVmlx-community/Qwen3.8-27B-4bitunsloth/Qwen3.8-27B-GGUF:UD-Q4_K_Munsloth/Qwen3.8-27B-GGUF:UD-IQ3_SISTA-DASLab/Qwen3.8-27B-GSQ-RCO-GGUF:IQ3_SQuality: perplexity
llama-perplexity method: 30 chunks of 2048 tokens, scoring the second half of every chunk (30 x 1023 tokens). GGUF with
llama-perplexity(llama.cpp dd7f73b, Metal). MLX 4-bit with a small mlx-lm script which does exactly the same chunking and scoring. I checked that HF tokenizer and llama.cpp give identical tokens on the text (297,193 tokens on wikitext-2 test), no BOS for both.Texts: wikitext-2 raw test, and first 300 conversations of ultrachat test as plain text ("chat").
Final PPL alone hides how noisy it is, so here are paired per-chunk ratios (same chunks for both quants; < 1 means first quant is better; interval is mean ± 2 se over 30 chunks; last column is in how many chunks the first one wins):
On chat every pair is inside ± 7-15%, so chat corpus is too noisy to separate anything with 30 chunks, I don't read anything from it.
What I read from wiki:
Speed in Splash
TTFT: real first request of omp (oh-my-pi), 7.9K tokens (system prompt + 11 tools), cache busted with a nonce, 2 runs. Decode: 3 short prompts (Python function, B-tree explanation, a text in Russian), temperature 0, thinking off, up to 512 tokens. One request at a time.
tok/s jumps with draft acceptance (on prompt 2 UD-Q4_K_M looks faster only because draft accepted 3.4 vs 3.1 per cycle), so cycles/s is the cleaner number for the target itself:
Takeaways (for M1 Pro 32 GB)
mlx-community/Qwen3.8-27B-4bitis still the one, as paperniuk said in NOT AN ISSUE. just wanna know gguf vs mlx performance #4.Caveats
Scripts (perplexity on MLX matching llama-perplexity, Splash bench) I can share if somebody wants to repeat on other chips or other quants.
And question to everybody: which quants do you run in Splash day to day, and why this one? Did you notice difference in quality between them in real work (coding, agents, long thinking), or you choose only by speed and memory? Would be nice to collect your chip, quant and tok/s here, and any quality numbers if you have.
All reactions