DeltaMoE: Memory-Efficient Inference for Merged Mixture of Experts with Delta Compression

Boyko Borisov, Xiaozhe Yao, Nezihe Merve Gürel, Ana KlimovicSLLM @ ICLR 2025

TL;DR

This paper introduces DeltaMoE, a novel training-free compression technique for merged Mixture of Experts (SMoE) models. By exploiting the small weight differences between experts in merged models, DeltaMoE achieves significant memory reduction (up to 2.34x) and inference speedup (up to 2.57x) without sacrificing model accuracy, making large SMoE deployments more feasible.

What Problem Does This Paper Address?

Large Language Models (LLMs) are incredibly powerful but also computationally expensive, requiring massive amounts of memory and processing power. Sparse Mixture of Experts (SMoEs) offer a more efficient architecture by activating only a subset of "experts" (smaller neural networks) for each input. However, a recent trend involves merging multiple fine-tuned dense models into a single SMoE. While this creates powerful models, deploying these merged SMoEs is challenging due to their substantial memory requirements, as all experts must be loaded into GPU memory for fast inference. This paper tackles the problem of efficiently serving these memory-intensive merged SMoE models.

Methods

DeltaMoE employs a three-step pipeline for compressing merged SMoE models:

  1. Extracting Deltas: The core idea is that in merged SMoEs, the weights of individual experts are often very similar to each other. DeltaMoE leverages this by selecting one expert's weights as a "base weight" for each SMoE block. The differences (deltas) between this base weight and all other experts' weights are then computed. The base weights are stored in their original FP16 precision, while the deltas are targeted for compression.
  2. Expert Delta Compression: The computed deltas undergo aggressive compression using a combination of techniques optimized for hardware:
  3. Structured Sparsity (2:4 Pruning): This technique ensures that for every four contiguous elements in the delta matrix, at least two are set to zero. This structured sparsity is crucial for leveraging specialized hardware like sparse tensor cores, which accelerate matrix multiplications.
  4. Quantization: The non-zero delta values are quantized to a lower precision (2 or 4 bits). This significantly reduces the memory footprint of the deltas.
  5. Model Saving: The compressed model is saved by storing the base weights and attention layer weights in FP16. The compressed deltas are stored in a packed, sparse format, where only the indices of non-zero elements and their quantized values are retained. This approach allows for efficient storage and retrieval of the compressed expert weights.

Crucially, DeltaMoE is a training-free method, meaning it can be applied to existing merged SMoE models without requiring any further training or fine-tuning.

Datasets

The paper evaluates DeltaMoE on benchmark datasets for model quality assessment, specifically:

  • BoolQ
  • LogiQA
  • MMLU

The models used for evaluation are merged SMoEs created by averaging attention weights and using feedforward layers from fine-tuned Llama 3.1-8B-Instruct models. The routing function is trained on a combined subset of these fine-tuning datasets.

Key Insights and Ideas

  • Small Deltas are Key: The fundamental insight is that merged SMoEs exhibit small weight differences between experts. This similarity is the primary enabler for aggressive compression without significant accuracy loss.
  • Decoupling Base and Delta Computations: By separating the base weight computation from the delta computations during inference, the paper allows the deltas to remain compressed. This drastically reduces memory bandwidth requirements and enables larger batch sizes.
  • Scalability with Experts: The compression ratio and performance gains of DeltaMoE increase with the number of experts. This makes it particularly well-suited for the very large SMoE models that are becoming increasingly common.
  • Training-Free Advantage: Applying compression without retraining is a significant practical advantage, as it allows for immediate deployment of existing models with improved efficiency.

Key Results

  • Compression Ratio: DeltaMoE achieves up to a 2.34x compression ratio for a 6-expert MoE.
  • Throughput Improvement: The method leads to up to a 2.57x increase in output throughput.
  • Accuracy Preservation: Despite significant compression, the paper reports that the accuracies on BoolQ, LogiQA, and MMLU remain comparable to the original uncompressed FP16 models. For example, with 6 experts, the accuracy drop is minimal across these benchmarks.
  • Latency Reduction: E2E latency is reduced, with a 1.91x reduction observed at 6 experts.
  • Scalability: The compression ratio increases with the number of experts, as shown in Figure 3.

Limitations and Future Work

  • Focus on Merged SMoEs: The current work specifically targets merged SMoE models. While the authors suggest the approach could benefit any scenario with small expert weight variations, further exploration on non-merged SMoEs might be needed.
  • Future Work: The authors plan to explore extending and studying similar techniques on general SMoE models, indicating a potential for broader applicability beyond just merged models. They also suggest exploring the impact of these techniques on general SMoE models.

Summary updated

BibTeX
@inproceedings{borisov2025deltamoe,
  author = {Boyko Borisov and Xiaozhe Yao and Nezihe Merve Gürel and Ana Klimovic},
  title = {{DeltaMoE: Memory-Efficient Inference for Merged Mixture of Experts with Delta Compression}},
  booktitle = {SLLM @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=FJ7Z8H6elV},
}
Figure