Transformers Brings 180B-Parameter MoE Inference to 32GB Macs
An experiment by Tarek Ziadé brought large mixture-of-experts inference to a MacBook M5 with 32GB of unified memory. The work streams only the experts selected by the router from an SSD, while keeping a bounded cache on the device. The approach was implemented in Transformers with Python and Metal kernels, without a C++ extension.
The target, Qwen3.8-Flash-Next, has 48 layers and 512 experts per layer, with 10 experts active at a time. Its experts were quantized to 3 bits and stored in 49GB, while dense weights used about 5.4GB in 8-bit form. A separate 51GB n-gram table also required disk-based access. After loading, the setup used about 18GiB, rising to 25.4GiB with a 6K-token prompt.
After optimization, Transformers generated 13.9 tokens per second, compared with 14.8 for Strata, a gap of about 6%. Prefill reached 228 tokens per second versus Strata’s 220. The author said the remaining difference largely came from host-device synchronization and limitations in PyTorch’s MPS support. The result was still considered too slow for the author’s coding-agent workflow.
Written by Sakhanda Wire AI from reporting by Hugging Face. Facts, quotes and full context are in the original article below.