APIRON // Intel
Back to the feed
Hugging FaceModels

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

The brief

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.

  • Target is running the 180B Qwen3.8-Flash-Next MoE model on a 32 GB Mac using Transformers.
  • Transformers' Accelerate offloading copies whole expert banks per token with no caching, which is too slow for this use.
  • A slot-pool cache keeps existing expert kernels working and reached 34.6 tok/s on OLMoE versus 38.1 for vanilla.

Why it mattersIt 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 original article. It may miss nuance, so check the source before relying on it.

Continue at Hugging FaceRead the full story