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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hui, Tingfeng, Zhang, Zhenyu, Wang, Shuohuan, Sun, Yu, Wu, Hua, Su, Sen
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909333669806080
author Hui, Tingfeng
Zhang, Zhenyu
Wang, Shuohuan
Sun, Yu
Wu, Hua
Su, Sen
author_facet Hui, Tingfeng
Zhang, Zhenyu
Wang, Shuohuan
Sun, Yu
Wu, Hua
Su, Sen
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_01610
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Upcycling Instruction Tuning from Dense to Mixture-of-Experts via Parameter Merging
Hui, Tingfeng
Zhang, Zhenyu
Wang, Shuohuan
Sun, Yu
Wu, Hua
Su, Sen
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Upcycling Instruction Tuning from Dense to Mixture-of-Experts via Parameter Merging
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2410.01610