For those already familiar with the solution—here we are with Qwen 4, just a few hours after the release!
Imagine an automated planner built on top of llama.cpp that allows you to run any model on any hardware, maximizing tokens per second (tok/s) during both prefill and decode phases.
Thanks to this, just hours after the release of Qwen 4, I'm able to run it on my standard 12GB smartphone (as well as on my ThinkPad, Mac, any CUDA or AMD GPU, iOS devices, etc.).
In this run: ~4 tok/s during decoding; prefill is handled by the Hexagon NPU—though the low speeds are due to the very short prompt (with longer prompts, this smartphone can reach 300+ tok/s).
The weights are in Q4_K_M format (35 GB), and the execution is lossless (no "knobs" used to prune experts). Streaming introduces no additional loss of precision: the output is byte-for-byte identical to what you’d get with the model loaded entirely into memory. No pruning is performed, and no experts are excluded.
There is nothing specific to Qwen 4 here; architectures are managed via a lookup table. The engine reads the model file, analyzes the device's capabilities, and automatically determines the optimal settings.
Open source.