[Paper Review] Fast Inference of Mixture-of-Experts Language Models with Offloading
This paper proposes a MoE-specific offloading strategy that accelerates inference of large Mixture-of-Experts (MoE) language models on consumer hardware by leveraging expert access patterns and predictive pre-loading. By combining mixed quantization (2–3-bit for experts, 4–16-bit for attention layers) with LRU caching and speculative expert loading, the method enables interactive inference of Mixtral-8x7B-Instruct at 2–3 tokens per second on desktop-grade GPUs and free-tier Google Colab instances.
With the widespread adoption of Large Language Models (LLMs), many deep learning practitioners are looking for strategies of running these models more efficiently. One such strategy is to use sparse Mixture-of-Experts (MoE) - a type of model architectures where only a fraction of model layers are active for any given input. This property allows MoE-based language models to generate tokens faster than their dense counterparts, but it also increases model size due to having multiple experts. Unfortunately, this makes state-of-the-art MoE language models difficult to run without high-end GPUs. In this work, we study the problem of running large MoE language models on consumer hardware with limited accelerator memory. We build upon parameter offloading algorithms and propose a novel strategy that accelerates offloading by taking advantage of innate properties of MoE LLMs. Using this strategy, we build can run Mixtral-8x7B with mixed quantization on desktop hardware and free-tier Google Colab instances.
Motivation & Objective
- Enable interactive inference of large MoE language models like Mixtral-8x7B-Instruct on consumer-grade hardware with limited GPU memory.
- Address the inefficiency of naive parameter offloading in MoE models due to irregular expert access patterns and high memory bandwidth demands.
- Optimize offloading for MoE architectures by exploiting intrinsic access regularities such as expert reuse and early gating prediction.
- Achieve practical performance on low-end hardware, including free-tier Google Colab with T4 GPUs, through a combination of quantization and intelligent offloading.
- Provide a deployable, open-source solution for running state-of-the-art MoE models locally without requiring high-end datacenter GPUs.
Proposed method
- Design a MoE-aware offloading pipeline that uses LRU caching to reduce repeated GPU-RAM transfers of frequently used experts.
- Implement speculative expert pre-loading based on the gating function's output to overlap expert loading with computation, reducing idle time.
- Integrate mixed quantization: 2–3-bit HQQ quantization for MoE experts and 4–16-bit precision for attention layers, embeddings, and normalization.
- Use a hybrid inference engine that dynamically offloads expert weights from GPU to CPU RAM, with efficient memory management via pinned memory and asynchronous transfers.
- Leverage the fact that early-layer hidden states predict which experts will be needed in later layers, enabling predictive loading strategies.
- Optimize for PCIe-bottlenecked systems by minimizing offloading frequency and maximizing data reuse through caching and pre-loading.

Experimental results
Research questions
- RQ1How can expert access patterns in MoE models be exploited to reduce offloading overhead and improve inference speed on memory-constrained hardware?
- RQ2What is the optimal trade-off between quantization precision and model performance for MoE layers when running on consumer GPUs?
- RQ3To what extent can LRU caching and speculative pre-loading reduce GPU-RAM communication in MoE inference compared to naive offloading?
- RQ4Can Mixtral-8x7B-Instruct be run interactively (2–3 tokens/sec) on free-tier Colab or desktop-grade GPUs using only offloading and quantization?
- RQ5How does the performance of MoE-specific offloading compare to standard offloading frameworks like Hugging Face Accelerate in low-memory settings?
Key findings
- The proposed MoE-specific offloading strategy achieves 2–3 tokens per second inference speed for Mixtral-8x7B-Instruct on RTX 3060 (12GB), RTX 3080 Mobile (16GB), and T4 (16GB) GPUs.
- On free-tier Google Colab with T4, the model generates 2.092 tokens per second using 2-bit quantized experts and full offloading with pre-loading and LRU caching.
- The combination of LRU caching and speculative pre-loading reduces inference time by up to 15% compared to naive offloading on the RTX 3060.
- Using 3-bit HQQ quantization for experts and 4-bit for attention layers yields a favorable performance-accuracy trade-off, with minimal perplexity degradation.
- The method outperforms naive offloading (e.g., via Hugging Face Accelerate) by up to 2.5× in speed on low-end hardware, especially on PCIe-limited systems.
- Despite lower VRAM, the RTX 3060 desktop performs nearly as well as the higher-end RTX 3080 Mobile, indicating that host-to-device bandwidth is a key bottleneck.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.