Dynamic Mixture of Experts: An Auto-Tuning Approach for Efficient Transformer Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Guo, Yongxin, Cheng, Zhenglin, Tang, Xiaoying, Tu, Zhaopeng, Lin, Tao
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917949107863552
author Guo, Yongxin
Cheng, Zhenglin
Tang, Xiaoying
Tu, Zhaopeng
Lin, Tao
author_facet Guo, Yongxin
Cheng, Zhenglin
Tang, Xiaoying
Tu, Zhaopeng
Lin, Tao
contents The Sparse Mixture of Experts (SMoE) has been widely employed to enhance the efficiency of training and inference for Transformer-based foundational models, yielding promising results.However, the performance of SMoE heavily depends on the choice of hyper-parameters, such as the number of experts and the number of experts to be activated (referred to as top-k), resulting in significant computational overhead due to the extensive model training by searching over various hyper-parameter configurations. As a remedy, we introduce the Dynamic Mixture of Experts (DynMoE) technique. DynMoE incorporates (1) a novel gating method that enables each token to automatically determine the number of experts to activate. (2) An adaptive process automatically adjusts the number of experts during training. Extensive numerical results across Vision, Language, and Vision-Language tasks demonstrate the effectiveness of our approach to achieve competitive performance compared to GMoE for vision and language tasks, and MoE-LLaVA for vision-language tasks, while maintaining efficiency by activating fewer parameters. Our code is available at https://github.com/LINs-lab/DynMoE.
format Preprint
id arxiv_https___arxiv_org_abs_2405_14297
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Dynamic Mixture of Experts: An Auto-Tuning Approach for Efficient Transformer Models
Guo, Yongxin
Cheng, Zhenglin
Tang, Xiaoying
Tu, Zhaopeng
Lin, Tao
Machine Learning
Artificial Intelligence
The Sparse Mixture of Experts (SMoE) has been widely employed to enhance the efficiency of training and inference for Transformer-based foundational models, yielding promising results.However, the performance of SMoE heavily depends on the choice of hyper-parameters, such as the number of experts and the number of experts to be activated (referred to as top-k), resulting in significant computational overhead due to the extensive model training by searching over various hyper-parameter configurations. As a remedy, we introduce the Dynamic Mixture of Experts (DynMoE) technique. DynMoE incorporates (1) a novel gating method that enables each token to automatically determine the number of experts to activate. (2) An adaptive process automatically adjusts the number of experts during training. Extensive numerical results across Vision, Language, and Vision-Language tasks demonstrate the effectiveness of our approach to achieve competitive performance compared to GMoE for vision and language tasks, and MoE-LLaVA for vision-language tasks, while maintaining efficiency by activating fewer parameters. Our code is available at https://github.com/LINs-lab/DynMoE.
title Dynamic Mixture of Experts: An Auto-Tuning Approach for Efficient Transformer Models
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2405.14297