4-bit Hy4-flash at 960+ tok/s prefill on an M5 Max with Kapitsa, open source

Reddit r/LocalLLaMA Tools

Summary

Kapitsa, an open-source inference engine for Macs, adds 4-bit Hy4-flash support achieving 960+ tok/s prefill and ~35 tok/s decode on an M5 Max, significantly outpacing default MLX at long contexts.

I added Hy4-flash support to the Kapitsa inference engine for macs, and here are the numbers on an M5 Max with a 40-core GPU (128 GB RAM, macOS 26.4). Same prompts for both engines, each prompt cold, thinking off, temperature 0.6. Decode, tok/s: Context Kapitsa 4-bit, default MLX 3.1-bit short 36.4 20.8 4K 35.2 13.2 16K 35.1 7.0 32K 34.6 4.4 Prefill, tok/s / seconds spent processing the prompt: Prompt Kapitsa, default Kapitsa, fast mlx-lm (3.1-bit MLX) short, ~50 tokens 209 / 0.24 s 225 / 0.23 s 125 / 0.39 s 4K 657 / 6.2 s 968 / 4.2 s 228 / 17.7 s 16K 699 / 23 s 971 / 16.5 s 300 / 53.5 s 32K 677 / 47.5 s 971 / 33.1 s 304 / 105.3 s mlx-lm used the 3.1-bit pack because the same 4-bit pack ran out of memory on this Mac. Peak memory was 88.3 GB. Whole model fits, no expert streaming, only the Engram was in SSD. We are talking high-quality quants here, not the looping unusable demos. The 4-bit pack has 8-bit main network weights, with 4-bit routed experts. Try it: brew install nace-ai/tap/kapitsa hf download nace-ai/Hy4-flash-MLX-4bit --local-dir Hy4-flash-MLX-4bit kapitsa serve --model ./Hy4-flash-MLX-4bit --profile fast Code and raw benchmark files. I know some decode speeds are a bit higher, but prefill is king these days. Let me know how it goes for you.
Original Article

Similar Articles

KFlash: Benchmarks of newly released versions of Apple Silicon optimized engines: 1.4.0 Splash (DFlash2 ~ 50 tok/s) vs 0.2 Kapitsa (KFlash ~65 tok/s), MLX(MTP) & more on Qwen 3.8 27b/4b/35b 4Q on Macbook Pro M4 Pro 48 GB 2024, 48GB & Macbook Pro M1 Pro 16GB 2021

Reddit r/LocalLLaMA

Nace.AI's Kapitsa 0.2 ships KFlash, a best-first tree-based speculative decoding method for Apple Silicon, benchmarked against Splash 1.4.0's DFlash2, mlx-serve, Ollama, llama.cpp and others on Qwen models across M4 Pro and M1 Pro MacBooks, showing top decode throughput (~65-201 tok/s).

Qwen3.8-Flash-Next (125B) at 12-15 tok/s on a 2021 32GB M1 Max

Reddit r/LocalLLaMA

MoEspresso 3, an inference engine, achieves 12-15 decode tokens per second for the Qwen3.8-Flash-Next model on a 2021 M1 Max with 32GB RAM, using techniques like Cache-Prior to optimize performance and outperforming some hosted solutions in benchmarks.