Abstract
Sparse Mixture-of-Experts (MoE) is a neural architecture design that can be utilized to add learnable parameters to Large Language Models (LLMs) without increasing inference cost. Instruction tuning is a technique for training LLMs to follow instructions. We advocate combining these two approaches, as we find that MoE models benefit more from instruction tuning than dense models. In particular, we conduct empirical studies across three experimental setups: (i) Direct finetuning on individual downstream tasks devoid of instruction tuning; (ii) Instruction tuning followed by in-context few-shot or zero-shot generalization on downstream tasks; and (iii) Instruction tuning supplemented by further finetuning on individual downstream tasks. In the first scenario, MoE models overall underperform dense models of identical computational capacity. This narrative, however, dramatically changes with the introduction of instruction tuning (second and third scenario), used independently or in conjunction with task-specific finetuning. Our most powerful model, FLAN-MOE-32B, surpasses the performance of FLAN-PALM-62B on four benchmark tasks, while using only a third of the FLOPs. The advancements embodied by FLAN-MOE inspire a reevaluation of the design principles of large-scale, high-performance language models in the framework of task-agnostic learning.
Introduction
As Large Language Models (LLMs) continue to scale, the associated computational and environmental costs have become a critical bottleneck. Sparse Mixture-of-Experts (MoE) architectures offer a promising path forward by adding billions of parameters to a model without increasing the per-token inference cost. By activating only a small subset of "experts" for any given input, MoE models maintain efficiency while increasing capacity.
Despite their potential, MoE models have historically suffered from a "finetuning tax." When pretrained MoE models are finetuned on narrow, task-specific datasets, they often fail to outperform dense models of equivalent computational budget. This research investigates whether instruction tuning—training models on a massive, diverse collection of tasks formatted as instructions—can bridge this performance gap.
Methods and Experimental Setup
The researchers combined the MoE architecture with the Flan (Finetuning Language Models) instruction-tuning methodology. The study utilized a Transformer-based MoE where every other feed-forward layer is replaced by an MoE layer.
Instruction Tuning Recipe
The models were trained using the Flan recipe, which includes a mixture of 1,836 tasks from four major collections: Muffin (80 tasks), T0-SF (193 tasks), NIV2 (1,554 tasks), and CoT (9 reasoning tasks).
Evaluation Benchmarks
Performance was evaluated across several challenging benchmarks:
- MMLU (Massive Multitask Language Understanding): 57 tasks covering STEM, humanities, and social sciences.
- BBH (Big-Bench Hard): 23 tasks identified as particularly difficult for previous LLMs.
- Reasoning and QA: Tasks including GSM8K, StrategyQA, BoolQ, and ARC.
Key Insights: MoE is "Instruction-Hungry"
A central finding of this work is that MoE models are significantly more sensitive to the diversity and volume of instruction-tuning data than their dense counterparts. While dense models often reach a point of diminishing returns as the number of tasks increases, MoE models continue to show substantial performance gains.
As illustrated in Figure 2, the performance discrepancy between MoE and dense models (T5) is reversed as the number of instruction-tuning tasks grows. Without instruction tuning, MoE models underperform; however, with a sufficiently diverse task mixture, they consistently leapfrog dense models of the same FLOP capacity. This suggests that the diversity inherent in instruction tuning prevents the "expert collapse" often seen in single-task finetuning, allowing for better expert specialization and "division of labor."
Results and Efficiency Breakthroughs
The combination of MoE and instruction tuning yields a "winning combination" for model efficiency. The flagship model, FLAN-ST32B, outperformed the much larger FLAN-PaLM62B across four major benchmarks. Crucially, the 32B MoE model achieved this while using less than 30% of the FLOPs per token required by the 62B dense model.
Figure 5 demonstrates that across various model scales (from small to xxl), the Flan-MoE architecture (triangles) consistently defines a superior Pareto frontier compared to the dense Flan-T5 models (circles) on both MMLU and BBH benchmarks. On MMLU specifically, instruction tuning provided an average absolute accuracy boost of 7.1% for MoE models over dense models at the same scale.
Limitations and Future Directions
While highly effective for English-centric tasks, the authors identified a significant limitation in multilingual performance. The MoE experts specialized so deeply in English patterns during the Flan instruction-tuning phase that performance on non-English benchmarks, such as TyDiQA, lagged behind vanilla dense models.
Future work should prioritize the inclusion of more diverse, multilingual data in the instruction-tuning mixture to prevent MoE models from becoming "monolingual specialists." Additionally, further research into auxiliary losses and routing strategies (like expert-choice routing) may continue to improve the balance and performance of large-scale MoE systems.
Summary updated