Table of Contents
Fetching ...

Upcycling Instruction Tuning from Dense to Mixture-of-Experts via Parameter Merging

Tingfeng Hui, Zhenyu Zhang, Shuohuan Wang, Yu Sun, Hua Wu, Sen Su

TL;DR

This paper points out that intermediate checkpoints during instruction tuning of the dense model are naturally suitable for specialized experts, and proposes an expert expansion stage to flexibly achieve models with flexible numbers of experts, where genetic algorithm and parameter merging are introduced to ensure sufficient diversity of new extended experts.

Abstract

Mixture-of-Experts (MoE) shines brightly in large language models (LLMs) and demonstrates outstanding performance in plentiful natural language processing tasks. However, existing methods transforming LLMs from dense to MoE face significant data requirements and typically rely on large-scale post-training. In this paper, we propose Upcycling Instruction Tuning (UpIT), a data-efficient approach for tuning a dense pre-trained model into a MoE instruction model. Specifically, we first point out that intermediate checkpoints during instruction tuning of the dense model are naturally suitable for specialized experts, and then propose an expert expansion stage to flexibly achieve models with flexible numbers of experts, where genetic algorithm and parameter merging are introduced to ensure sufficient diversity of new extended experts. To ensure that each specialized expert in the MoE model works as expected, we select a small amount of seed data that each expert excels to pre-optimize the router. Extensive experiments with various data scales and upcycling settings demonstrate the outstanding performance and data efficiency of UpIT, as well as stable improvement in expert or data scaling. Further analysis reveals the importance of ensuring expert diversity in upcycling.

Upcycling Instruction Tuning from Dense to Mixture-of-Experts via Parameter Merging

TL;DR

This paper points out that intermediate checkpoints during instruction tuning of the dense model are naturally suitable for specialized experts, and proposes an expert expansion stage to flexibly achieve models with flexible numbers of experts, where genetic algorithm and parameter merging are introduced to ensure sufficient diversity of new extended experts.

Abstract

Mixture-of-Experts (MoE) shines brightly in large language models (LLMs) and demonstrates outstanding performance in plentiful natural language processing tasks. However, existing methods transforming LLMs from dense to MoE face significant data requirements and typically rely on large-scale post-training. In this paper, we propose Upcycling Instruction Tuning (UpIT), a data-efficient approach for tuning a dense pre-trained model into a MoE instruction model. Specifically, we first point out that intermediate checkpoints during instruction tuning of the dense model are naturally suitable for specialized experts, and then propose an expert expansion stage to flexibly achieve models with flexible numbers of experts, where genetic algorithm and parameter merging are introduced to ensure sufficient diversity of new extended experts. To ensure that each specialized expert in the MoE model works as expected, we select a small amount of seed data that each expert excels to pre-optimize the router. Extensive experiments with various data scales and upcycling settings demonstrate the outstanding performance and data efficiency of UpIT, as well as stable improvement in expert or data scaling. Further analysis reveals the importance of ensuring expert diversity in upcycling.
Paper Structure (25 sections, 2 equations, 6 figures, 10 tables, 3 algorithms)

This paper contains 25 sections, 2 equations, 6 figures, 10 tables, 3 algorithms.

Figures (6)

  • Figure 1: Workflow of vanilla upcycling, specialized upcycling, and the proposed upcycling instruction tuning (UpIT) solutions. UpIT achieves specialized experts with various checkpoints, increases the expert number during the expert expansion stage, and maintains discrepancy among experts through router initialization, thereby achieving efficient and flexible upcycling.
  • Figure 2: The performance of various checkpoints saved during an instruction tuning process, with a red star indicating the best performance on each benchmark. Checkpoints saved at different epochs excel in different benchmarks, demonstrating the potential as specialized experts.
  • Figure 3: Performance comparison of UpIT and vanilla upcycling methods under different size of training data. Detailed results in Section \ref{['sec:detail_scaling_data']}
  • Figure 4: Performance comparison of UpIT and vanilla upcycling methods under different total and activated experts. Detailed results in Section \ref{['sec:detail_scaling_expert']}.
  • Figure 5: Proportion of tokens dispatched to each expert on different benchmarks, where experts in UpIT exhibit stronger diversity than LoRAMoE.
  • ...and 1 more figures