180B Parameters, 32GB of RAM: Pushing MoE Inference to the Limit with Transformers
Web page · https://huggingface.co/blog/moe-expert-streaming
First seen by Oriel on .
AI summary
This article describes an experimental Transformers implementation that streams routed MoE experts from SSD on a 32 GB Mac, reaching 13.9 tok/s and roughly 6% behind Strata.
- A bounded, shared device slot pool remaps routed expert IDs so existing grouped_mm kernels process cached experts without custom expert matmul.
- Qwen3.8-Flash-Next's 121 GB FP8 experts were quantized to 3 bits, occupying 49 GB on disk, with 12 GiB cached and n-gram rows streamed separately.
- Eight I/O threads read cache misses contiguously, while routers for upcoming layers prefetch predicted experts.
- After optimizations, 4K prefill reached 228 tok/s versus Strata's 220, while 6K-document decode reached 12.4 versus 13.7.
- The project remains too slow for the author's coding agents, and closing the remaining gap requires per-layer synchronization control unavailable in PyTorch's MPS stack.
#transformers #mixture of experts #apple silicon #model inference
Generated by gpt-5.6-sol. Check the original for details.
Aliases
| Source | External ID | URL |
|---|---|---|
| Hugging Face Blog | https://huggingface.co/blog/moe-expert-streaming | https://huggingface.co/blog/moe-expert-streaming Read discussion |