Fiddler: CPU-GPU Orchestration for Fast Inference of Mixture-of-Experts Models
Keisuke Kamahori, Tian Tang, Yile Gu, Kan Zhu, Baris Kasikci
TL;DR
The paper tackles efficient inference for large Mixture-of-Experts (MoE) models under limited GPU memory by exploiting a heterogeneous CPU-GPU architecture. It introduces Fiddler, a latency-aware system that partitions non-expert and some expert parameters on the GPU and places the rest on CPU memory, then dynamically selects execution strategies for each input token based on per-expert activity and device characteristics. Key contributions include a latency model that captures CPU and GPU batching effects, offline expert-popularity profiling to maximize GPU availability, and a CPU-optimized AVX512_BF16 kernel, all enabling balanced performance across single-batch, long prefill, and beam-search workloads. Empirically, Fiddler outperforms state-of-the-art baselines across these scenarios on Mixtral-8x7B in two hardware setups, demonstrating robust applicability to resource-constrained MoE inference.
Abstract
Large Language Models (LLMs) with the Mixture-of-Experts (MoE) architectures have shown promising performance on various tasks. However, due to the huge model sizes, running them in resource-constrained environments where the GPU memory is not abundant is challenging. Some existing systems propose to use CPU resources to solve that, but they either suffer from the significant overhead of frequently moving data between CPU and GPU, or fail to consider distinct characteristics of CPUs and GPUs. This paper proposes Fiddler, a resource-efficient inference system for MoE models with limited GPU resources. Fiddler strategically utilizes CPU and GPU resources by determining the optimal execution strategy. Our evaluation shows that, unlike state-of-the-art systems that optimize for specific scenarios such as single batch inference or long prefill, Fiddler performs better in all scenarios. Compared against different baselines, Fiddler achieves 1.26 times speed up in single batch inference, 1.30 times in long prefill processing, and 11.57 times in beam search inference. The code of Fiddler is publicly available at https://github.com/efeslab/fiddler.
