MxMoE: Mixed-precision Quantization for MoE with Accuracy and Performance Co-Design
Haojie Duanmu, Xiuhong Li, Zhihang Yuan, Size Zheng, Jiangfei Duan, Xingcheng Zhang, Dahua Lin
TL;DR
This work addresses the deployment challenges of large Mixtr-Experts (MoE) models by introducing MxMoE, a framework for hardware-aware, mixed-precision quantization that accounts for both algorithmic sensitivity and dynamic expert activation. It discovers that quantization sensitivity varies across linear blocks and experts, motivating a linear-block level bitwidth allocation and a hardware-aware optimization that jointly considers accuracy and execution time. The approach combines an ILP-based bitwidth allocation with automatic generation of mixed-precision Group-GEMM kernels and a tile scheduler to achieve substantial speedups while preserving accuracy, outperforming GPTQ and uniform-precision baselines across multiple MoE models and settings. Overall, MxMoE demonstrates practical, scalable gains for deploying MoE-based LLMs on GPUs, enabling lower memory footprints and faster inference through principled co-design and automated kernel generation.
Abstract
Mixture-of-Experts (MoE) models face deployment challenges due to their large parameter counts and computational demands. We explore quantization for MoE models and highlight two key insights: 1) linear blocks exhibit varying quantization sensitivity, and 2) divergent expert activation frequencies create heterogeneous computational characteristics. Based on these observations, we introduce MxMoE, a mixed-precision optimization framework for MoE models that considers both algorithmic and system perspectives. MxMoE navigates the design space defined by parameter sensitivity, expert activation dynamics, and hardware resources to derive efficient mixed-precision configurations. Additionally, MxMoE automatically generates optimized mixed-precision GroupGEMM kernels, enabling parallel execution of GEMMs with different precisions. Evaluations show that MxMoE outperforms existing methods, achieving 2.4 lower Wikitext-2 perplexity than GPTQ at 2.25-bit and delivering up to 3.4x speedup over full precision, as well as up to 29.4% speedup over uniform quantization at equivalent accuracy with 5-bit weight-activation quantization. Our code is available at https://github.com/cat538/MxMoE.
