r/LocalLLM • u/JuanixVentures • Oct 10 '26
Tutorial GLM-5.3-Flash (320B) on an M5 Ultra Mac Studio with llama.cpp: 61 tok/s, 262K context
https://jvlewis.dev/glm-5-3-flash-320b-on-an-m5-ultra-mac-studio-with-llama-cpp-61-tok-s-262k-context-c184f21f6286Test machine: M5 ultra. 36/80. 256GB.
TL;DR
- ~61 tok/s generation with GLM’s built-in MTP head (probabilistic drafting, 3 draft tokens), up from 39.7 without it.
- Prompt reading is the weak spot: ~765 tok/s at 4K tokens and ~630 tok/s at 59K. A 29K-token prompt takes 45 s.
- The full 262K context fits with ~15 GiB to spare, and long-context recall was correct at 58.8K tokens.
- The catches: images and MTP can’t be on at the same time, and deep context on Metal needs a fix has yet to be merged.
60
Upvotes
14
u/ilarp Oct 10 '26
model supports 1M
10
u/ColoredTriangles Oct 10 '26
Damn I was expecting more prefill from the m5 ultra. I can get triple the prefill of this mac with the 5090 on this model with the same context and quant size.
1
u/thilog Oct 10 '26
Hm, TFA is inaccessible due to a Cloudflare error...
3
u/bakawolf123 Oct 10 '26
I have ~73tps with dflash on patched omlx, images working, 400k context, ram only (no ssd cache) - avg sesh data. Greedy bench is up to 141 tps at 128k context.
On a oQ4e, affine 4 bit is faster.
Long prefill is 2.4k for affine, ~2.35k for calibrated checkpoint (so restarting old sesh from hot-only isn't painful, I'm worried about ssd wear more).
MTP works out of the box already and is decently optimized. Should be around 65-70 for a long sesh. Getting much more perf out of 3-4 block verify is going to be hard.
The caveat with dflash is that you have to patch it, I did sneak 2 perf PRs in, but getting images and proper cache for dflash requires big rework, that patch is not getting merged.
3
u/bigsybiggins Oct 10 '26
Seems really poor compared to other reports like here https://www.reddit.com/r/LocalLLaMA/comments/1wy8k3m/m5_ultra_256_running_glm_53_flash_688_toks/ that thread also has someone else reporting 2k+ prefill with links to benchmarks here https://omlx.ai/benchmarks/performance/zozd30ox
2
u/thilog Oct 10 '26
Does prefix caching compensate slow prompt reading for interactive usage?
2
u/NaiRogers Oct 12 '26
Seems much slower than the oMLX results here GLM-5.3-Flash-oQ4e-mtp
2
u/Inchmine Oct 10 '26
Damn that is slow for sure. I rather spend a bit more and get a rtx 6000
1
u/nomorebuttsplz 3d ago
hope you got it faster than this by now. I am getting almost this fast on the m3u which lacks the neural cores on the gpu.
1
u/topgoysilky Oct 11 '26
Did none of yall dumb asses read the “catches” line? i swear humanity is cooked.
1
u/StardockEngineer 2x5090, 2xPro6000, 2xA6000, 4xSpark, M5 Pro, M4Pro Oct 11 '26
It can do better.
1
u/Southern_Sun_2106 Oct 10 '26
How did Apple claim "4X" prefill? Was there some small font that it was measured against the M1 or something?
0
u/tat_tvam_asshole Oct 10 '26
I get 100+ tok/s with k=5 (albeit I'm on proper nvidia)