DIVE into MoE: Diversity-Enhanced Reconstruction of Large Language Models from Dense into Mixture-of-Experts

Yuchen Feng, Bowen Shen, Naibin Gu, Jiaxuan Zhao, Peng Fu, Zheng Lin, Weiping Wang

TL;DR

DIVE (Diversity-Enhanced Reconstruction) is a novel method that converts pre-trained dense Large Language Models (LLMs) into highly efficient sparse Mixture-of-Experts (MoE) models. By utilizing structured pruning across diverse calibration datasets, DIVE extracts specialized, heterogeneous experts from a single dense model, outperforming existing pruning and MoE conversion techniques at a fraction of the training cost.

What Problem Does This Paper Address?

While dense LLMs achieve state-of-the-art performance, activating all their parameters during inference incurs massive computational and memory overhead. Sparse Mixture-of-Experts (MoE) architectures solve this by only activating a subset of parameters (experts) per token. However, training an MoE model from scratch is computationally prohibitive and often unstable.

An alternative is "up-cycling" or reconstructing an existing dense model into an MoE. Unfortunately, current reconstruction methods (like simply duplicating or randomly splitting the feed-forward networks) tend to create homogeneous, redundant experts. This lack of diversity means the model requires extensive, expensive retraining to specialize the experts. DIVE addresses this gap by uncovering and leveraging the latent, domain-specific diversity already residing within a dense model's weights.

Methods

The DIVE framework consists of three main phases:

  1. Domain Affinity Mining: The authors discover that when a dense model is pruned using different domain-specific calibration datasets, it exhibits distinct capabilities and performance variations across tasks. To formalize this, they prune a dense model using 24 different datasets and measure the normalized perplexity (PPL) across various evaluation tasks to map out domain correlations. They then use hierarchical clustering to group these datasets into distinct domain clusters.
  2. Pruning-Based Expert Reconstruction: For each discovered domain cluster, the intermediate dimensions of the dense model's Feed-Forward Networks (FFNs) are pruned using a fluctuation-based structural pruning method (FLAP). These uniquely pruned FFNs are then reassembled as individual, specialized experts within an MoE layer, governed by a randomly initialized router.
  3. Efficient Retraining: To restore general capabilities without destroying expert specialization, DIVE uses a parameter-efficient two-stage retraining pipeline using LoRA:
  4. Stage 1 (Dense Training): Routers are trained on a tiny dataset (0.5B tokens) with all experts active. A temperature coefficient is introduced to sharpen routing logits and smoothly bridge the gap between dense training and sparse inference.
  5. Stage 2 (Sparse Training): Experts and normalization modules are fine-tuned on a larger dataset (5B to 15B tokens) with sparse activation, keeping the Multi-Head Attention (MHA) and embedding layers frozen.
Figure 3: Demonstration of diversity-enhanced reconstruction of LLMs from dense to MoE. In each lane, the upper part exhibits the expert division with the domain affinity heatmap. The reconstruction of FFNs is concretely illustrated in the middle part. And, the modifications to the overall LLM architecture are depicted in the lower part.

Datasets

  • Calibration & Affinity Mining: 24 diverse datasets spanning language modeling (C4, WikiText2), natural language inference (ANLI, MNLI, QNLI, RTE), question answering (SQuAD2, BoolQ, PIQA, DROP, CoQA), mathematics (GSM8K, MathQA), and specialized knowledge (SciQ, PubMedQA, etc.).
  • Retraining: SlimPajama (a cleaned, deduplicated version of RedPajama).
  • Downstream Evaluation: 11 standard benchmarks including SciQ, PIQA, WinoGrande, ARC-e, ARC-c, MathQA, HellaSwag, LogiQA, BoolQ, OBQA, and MMLU.

Key Insights and Ideas

  • Pruning as a Diversity Unveiler: Instead of viewing a pruning algorithm's sensitivity to calibration data as a drawback, DIVE turns it into a feature. Pruning on different datasets effectively "carves out" different latent expertise hidden within the same dense weight matrix.
  • Data Structure > Task Type: Domain affinity mining revealed that task categorization isn't always the best indicator of model behavior. For example, QNLI (an NLI task) showed a stronger affinity to SQuAD2 (a QA task) than to other NLI tasks because both QNLI and SQuAD2 share a underlying data structure derived from SQuAD1.1.
  • Attention Layers Can Stay Frozen: Ablation studies showed that omitting Multi-Head Attention (MHA) modules from the retraining phase caused negligible performance degradation (and sometimes even improved it). This allows DIVE to tune less than 1% of the total parameters during retraining.
Figure 2: The heatmap shows normalized perplexity (PPL) with a 75% FFN pruning ratio on LLaMA2-7B. According to the definition of normalized PPL in Eq. 5, the redder the color, the better the performance. Subfigure (a) presents the evaluation results across different calibration sets. In (b), we highlight calibration sets from (a) that lead to strong performance on other evaluation tasks, and (c) correspondingly shows that certain evaluation tasks benefit significantly from specific calibration sets. (d) isolates these tasks for a clearer view of the emerging patterns.

Key Results

The authors evaluated DIVE on TinyLlama-1.1B and LLaMA2-7B backbones.

  • Language Modeling: DIVE 1/8 (1 active expert out of 8, maintaining 50% of the original FFN size during inference) significantly outperformed baseline pruning methods (LLM-Pruner, FLAP) and previous MoE conversion methods (LLaMA-MoE). On the LAMBADA dataset, DIVE 1/8 reduced perplexity by 8.38 compared to the next-best reconstruction method.
  • Downstream Tasks: DIVE 1/8 achieved the highest average accuracy (42.17%) across 11 downstream tasks compared to other 50% active-parameter models.
  • Data Efficiency: Remarkably, DIVE 1/8 trained on just 1 Billion tokens surpassed the performance of standard structural pruning (FLAP) trained on 5 Billion tokens, demonstrating massive data efficiency.
Figure 4: Perplexity curves of DIVE and the baselines, consisting of perplexity on WikiText2 (left) and training loss for DIVE and LLaMA-MoE (right). Loss curves are smoothed with a 0.05B token window.

Limitations and Future Work

The primary limitation acknowledged by the authors is scale. Due to resource constraints, the experiments were restricted to models up to 7B parameters. While the algorithmic foundations are solid, future work is required to validate DIVE on larger LLMs (e.g., 13B, 70B+) and to explore an even broader array of specialized calibration domains to further amplify expert diversity.

Summary updated

BibTeX
@inproceedings{feng2025dive,
  author = {Yuchen Feng and Bowen Shen and Naibin Gu and Jiaxuan Zhao and Peng Fu and Zheng Lin and Weiping Wang},
  title = {{DIVE into MoE: Diversity-Enhanced Reconstruction of Large Language Models from Dense into Mixture-of-Experts}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure