Abstract
Mixture-of-Experts (MoE) architectures have become the standard for scaling Large Language Models (LLMs) efficiently. However, their massive parameter counts pose significant deployment challenges. While quantization is a common mitigation strategy, uniform precision often fails to account for the varying sensitivity and activation frequencies of individual experts. We present MxMoE, a framework that optimizes MoE models by assigning heterogeneous bit-widths to linear blocks through a hardware-aware bitwidth allocator and a specialized Group-GEMM kernel. MxMoE achieves up to a 3.4× speedup over full precision while maintaining superior accuracy compared to existing methods like GPTQ.
Introduction
State-of-the-art LLMs, such as Mixtral and DeepSeek, leverage MoE architectures to provide high model capacity with manageable inference costs. Despite these advantages, the sheer size of these models—often exceeding hundreds of billions of parameters—requires extreme compression for standard hardware deployment. Traditional quantization methods typically apply a uniform bit-width across the entire model, which ignores the unique structural characteristics of MoE models. MxMoE addresses this by treating quantization as a co-design problem between algorithmic sensitivity and hardware execution efficiency.
Problem Statement
Uniform quantization is a "blunt instrument" that overlooks two critical aspects of MoE models:
- Sensitivity Variance: Different components within a model exhibit varying levels of robustness to quantization noise.
- Expert Popularity: MoE models feature "hot" experts that are frequently activated and "cold" experts that are rarely used. Frequently used experts tend to be compute-bound, while rarely used ones are memory-bound.
Existing mixed-precision frameworks often fail to translate theoretical bit-savings into actual performance gains due to the high system overhead of managing multiple precisions on a GPU. MxMoE aims to bridge this gap by optimizing at a finer granularity and providing the necessary kernel support for heterogeneous execution.
Methodology
The MxMoE framework consists of two primary pillars: a hardware-aware allocator and an automated kernel generator.
Hardware-Aware Bitwidth Allocator
Unlike prior works that assign bit-widths at the expert level, MxMoE operates at the linear block level (Gate, Up, and Down projections). This finer granularity is essential because the three blocks within a single expert often have vastly different sensitivities. The allocator utilizes Integer Linear Programming (ILP) to minimize total model error while adhering to specific execution time and memory constraints. The optimization considers both the numerical sensitivity of parameters and the activation frequency of each expert.
Automated Mixed-Precision Kernel Generation
To eliminate the overhead of mixed-precision management, MxMoE introduces a specialized Group-GEMM kernel. Standard GPU kernels struggle when different experts in a single batch require different precisions. MxMoE automatically generates optimized CUDA kernels capable of executing these heterogeneous computations in parallel. A custom "tile scheduler" balances the load across the GPU’s Streaming Multiprocessors (SMs), ensuring that high-frequency experts do not become system bottlenecks.
To further stabilize low-bit quantization, the framework incorporates randomized Hadamard transformations. This technique, adapted from the QuaRot method, smooths out weights and activations to mitigate the impact of numerical outliers.
Experimental Setup
The researchers evaluated MxMoE across several prominent MoE architectures: DeepSeekV2-Lite, Qwen1.5-MoE, Qwen2-MoE, and Mixtral-8x7B. Performance was benchmarked using:
- Perplexity: Measured on the WikiText-2 dataset.
- Zero-shot Accuracy: Evaluated via a suite of standard benchmarks, including Arc-Challenge, HellaSwag, LAMBADA, PIQA, and WinoGrande.
Key Results
- Accuracy Improvements: At an average bit-width of 2.25, MxMoE achieved a 2.4 lower perplexity on WikiText-2 compared to the GPTQ method.
- Inference Speed: The framework demonstrated up to a 3.4× speedup over FP16 models. When compared to uniform 5-bit quantization, MxMoE provided a 29.4% speedup at equivalent accuracy levels by strategically reducing precision on compute-heavy, low-sensitivity blocks.
- Hardware Compatibility: The generated kernels are optimized for modern NVIDIA architectures, including the RTX 4090 and H100, making the framework suitable for real-world production environments.
Discussion and Limitations
The success of MxMoE highlights the importance of system-algorithm co-design. By exploiting the "Hot Expert" phenomenon, the framework effectively balances the trade-off between memory bandwidth and computational throughput.
However, some limitations remain. The current sensitivity metric is calculated on a layer-by-layer basis; incorporating cross-layer loss metrics could potentially reduce error amplification. Additionally, the benefits were less pronounced on the Mixtral-8x7B model compared to DeepSeek or Qwen. This is attributed to Mixtral's smaller expert count (8), which provides a more constrained design space for mixed-precision optimization than models with 64 or more experts. Finally, the allocation process requires an offline profiling step for sensitivity and timing, which adds to the initial deployment overhead.
Conclusion
MxMoE demonstrates that fine-grained, hardware-aware quantization is essential for the efficient deployment of massive MoE models. By aligning bit-width allocation with both numerical sensitivity and hardware execution patterns, MxMoE sets a new standard for high-performance, low-precision LLM inference.
Summary updated