180B Parameters, 32GB of RAM: Pushing MoE Inference to the Limit with Transformers
AI-generated summary of reporting by Huggingface Blog. Read the original for the full story.
Why it matters
A Hugging Face PR lets huge mixture-of-experts models stream experts from disk, so a 180B-parameter model can run on a 32GB Mac within 6% of the fastest engine.
A Hugging Face engineer figured out how to run a very large AI model (Qwen3.8-Flash-Next, 180 billion parameters) on an ordinary laptop with only 32GB of memory. Large 'mixture-of-experts' models are mostly made of pieces called experts, and only a few are needed per word generated. Instead of keeping everything in memory, his code fetches just the needed experts from the laptop's disk as required. It reaches about 14 tokens per second, only 6% slower than the best specialized tool, and the work is being added to the popular Transformers library.
Running large open models locally usually means buying expensive hardware or accepting slow speeds. This engineer's work, submitted as a Transformers pull request (huggingface/transformers#50717), streams a 180B model's experts from a 32GB Mac's disk at ~14 tok/s, within 6% of the Strata inference engine. It needed model-specific 3-bit expert quantization (~5 hours conversion) and Metal kernels, so it is not turnkey yet. Teams wanting local AI on consumer hardware should watch the API discussion, but Strata and MLX remain faster or simpler options today.
The author benchmarked MoE offloading in llama.cpp (mmap, CPU compute, page-cache thrash when experts exceed RAM), vLLM (--cpu-offload-gb, 2x faster when offloading experts only), and Transformers' per-module Accelerate hooks, then built expert streaming: a preallocated slot-pool tensor keyed by a per-layer expert-id-to-slot table so grouped_mm runs unmodified, plus 8 I/O threads, next-layer router prefetch, 3-bit quantized experts (49GB on disk, 12GiB cached), 8-bit dense weights, and Metal kernels for Gated DeltaNet and hyper-connections. Result on M5: ~14 tok/s decode, 228 tok/s prefill, ~6% behind Strata; bottleneck is ~10ms/token host round trips PyTorch MPS cannot hide.
Questions this answers
The article above answers these:
- How do I run a 180B MoE model on a 32GB Mac?
- How much slower is Transformers expert streaming than Strata?
- How do llama.cpp, vLLM and Transformers handle MoE offloading differently?
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Hugging Face Strata Transformers llama.cpp vLLM PyTorch Apple M5
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
A self-hosted file manager fork with OIDC, LDAP, and real-time search
FileBrowser Quantum lets teams manage multiple storage sources with enterprise authentication and real-time search without complex setup, saving admin time and reducing security risk.
An open-source screen recorder that lets AI agents watch videos and see your screen
Enables AI agents to view and analyze screen content, cutting time spent crafting bug reports and improving debugging accuracy.
A Go implementation of MCP for connecting LLM apps to tools and data
Go developers can expose LLM tools without writing MCP plumbing, saving time on integration.
An open-source Canva alternative you can self-host, with video export
Self-hosted design tools let teams avoid subscription fees and keep data on their own servers, while adding video export unlocks new content formats for social media creators.
Samsung is testing a feature that changes the angle of photos you’ve already taken
Samsung’s new Recompose lets users change photo angles after shooting, potentially reducing the need for multiple shots and improving post-capture editing workflows for photographers and casual users alike.