Hand-rolled C+Metal runtime pushes Qwen3.8-27B to 18 tok/s on a 36GB M3 Pro Mac

buryhuang · reddit · 2026-08-19

The author runs Qwen3.8-27B locally on a 36GB M3 Pro at 18 tok/s — daily-driver territory. After testing llama.cpp, mlx-lm, and oMLX, he went back to his own C + Metal runtime that compiles the model into a machine-specific image: Q4 weights (15GB) mmap'd into unified memory, fronted by a thin OpenAI-compatible API.

The weekend's focus was speculative decoding: replay, verification kernels, and draft vocabulary. Results:

He notes the M3 Pro's 120GB/s bandwidth means 18 tok/s at 27B Q4 is close to the bandwidth wall, and his runtime is currently clearly faster than llama.cpp on the same machine. One layer-fusion kernel remains. The project is open source (MIT).

Original post →

More from coding & agent

coding & agent channel →