180B Parameters, 32GB of RAM: Pushing MoE Inference to the Limit with Transformers

Hugging Face · 2026-11-18 · Models

Tarek Ziadé describes his effort to run large mixture-of-experts (MoE) models locally, with the 180B-parameter Qwen3.8-Flash-Next on a 32 GB Mac as the target. He compares how llama.cpp, vLLM and Transformers offload expert weights when a model does not fit in memory. He finds that Transformers' Accelerate path copies every expert of an offloaded layer for each token and has no cache, and that CPU offload gains nothing on a Mac because CPU and GPU share memory.

His fix replaces the cache with a preallocated device "slot pool" that lets Transformers' existing grouped matmul run unchanged. On OLMoE with all experts cached, it reached 34.6 tokens per second against 38.1 for vanilla Transformers. The work is offered as an experts_offload option for from_pretrained in a pull request, and the author says AI wrote most of the code while he chose, profiled and reviewed it.

Why it matters: It suggests that local inference of very large MoE models on memory-limited consumer hardware could become practical within the mainstream Transformers library.

Summary written by AI from the source. Check the original before relying on it.

Read the full story at Hugging Face

More in Models

Open the live interactive page

Apiron Intelligence. Headlines link to their original publishers.