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
Large Language Models (LLMs) are traditionally "dense," meaning every parameter is utilized for every token processed. While scaling these models has led to remarkable capabilities, it also incurs massive computational costs. Sparse Mixture-of-Experts (MoE) architectures offer a promising alternative by increasing total parameter count (capacity) while only activating a small subset of "experts" for any given input, thereby keeping inference cost (FLOPs) constant.
Despite their theoretical advantages, MoE models have historically faced a "generalization gap." When directly finetuned on a single downstream task, they often underperform dense models of the same computational budget. This research identifies massive-scale instruction tuning as the essential ingredient required to bridge this gap and unlock the full potential of MoE models.
Methodology
The authors introduce FLAN-MOE, which integrates sparse MoE layers into the popular Flan instruction-tuning framework. The architecture utilizes a Transformer-based MoE where every other feed-forward component is replaced by an MoE layer. The study explores different routing strategies, including Token-Choice and Expert-Choice, and evaluates models across three distinct setups:
- Direct Finetuning: Training on individual tasks without prior instruction tuning.
- Instruction Tuning Only: Massive-scale instruction tuning followed by zero/few-shot evaluation.
- Instruction Tuning + Finetuning: Instruction tuning followed by task-specific finetuning.
The models are trained using the Flan collective dataset, an aggregation of 1,836 tasks including mixtures like Muffin, T0-SF, NIV2, and Chain-of-Thought (CoT) reasoning tasks.
The Synergy of MoE and Instruction Tuning
A primary insight of this work is that MoE models are "instruction-hungry." They benefit disproportionately more from instruction tuning compared to their dense counterparts. While dense models show steady improvement, MoE models exhibit massive performance jumps when instructions are introduced.
As illustrated in Figure 1, MoE models are highly sensitive to the number of tasks in the instruction-tuning mixture. Increasing task diversity leads to better expert specialization and overall performance. Interestingly, the models appear more sensitive to task volume than to the absolute number of experts in the architecture, suggesting that the variety of instructions is the primary driver of expert "division of labor."
Performance and Efficiency
The integration of MoE and instruction tuning establishes a new Pareto frontier for performance-vs-compute. The FLAN-MOE-32B model, which uses approximately 32 GFLOPs per token, outperformed the FLAN-PaLM 62B dense model (~92 GFLOPs per token) across four major benchmarks while using less than 30% of the FLOPs.
On the MMLU benchmark, instruction-tuned MoE models showed an average absolute improvement of 7.1% over dense models of equivalent inference cost. Furthermore, MoE models demonstrated significantly stronger zero-shot and few-shot generalization on held-out tasks, such as those in Big-Bench Hard (BBH), compared to dense models with similar computational budgets.
Discussion and Future Work
While FLAN-MOE represents a significant step forward, certain limitations persist. The models showed lower performance on multilingual benchmarks (e.g., TyDiQA) when tuned primarily on English instructions, suggesting that fine-grained expert specialization can lead to "over-optimization" for the dominant training language. Additionally, MoE models remain more prone to overfitting in low-data regimes during final task-specific finetuning.
Future research directions include incorporating more diverse linguistic data through multilingual instructions and exploring advanced auxiliary losses to further balance expert load across increasingly complex task distributions.
Summary updated