Multi-Head Mengsel-van-Experts
Multi-Head Mixture-of-Experts
April 23, 2024
Auteurs: Xun Wu, Shaohan Huang, Wenhui Wang, Furu Wei
cs.AI
Samenvatting
Sparse Mixtures of Experts (SMoE) schaalt de modelcapaciteit zonder significante toename van trainings- en inferentiekosten, maar vertoont de volgende twee problemen: (1) Lage expertactivatie, waarbij slechts een kleine subset van experts wordt geactiveerd voor optimalisatie. (2) Gebrek aan fijnmazige analytische mogelijkheden voor meerdere semantische concepten binnen individuele tokens. Wij stellen Multi-Head Mixture-of-Experts (MH-MoE) voor, dat een multi-head mechanisme gebruikt om elk token op te splitsen in meerdere sub-tokens. Deze sub-tokens worden vervolgens toegewezen aan en parallel verwerkt door een diverse set experts, en naadloos geherintegreerd in de oorspronkelijke tokenvorm. Het multi-head mechanisme stelt het model in staat om collectief aandacht te besteden aan informatie uit verschillende representatieruimtes binnen verschillende experts, terwijl het de expertactivatie aanzienlijk verbetert, waardoor het contextbegrip verdiept en overfitting wordt verminderd. Bovendien is onze MH-MoE eenvoudig te implementeren en ontkoppeld van andere SMoE-optimalisatiemethoden, waardoor het gemakkelijk te integreren is met andere SMoE-modellen voor verbeterde prestaties. Uitgebreide experimentele resultaten over drie taken: Engels-gericht taalmodeleren, meertalig taalmodeleren en gemaskerde multimodale modelleertaken, demonstreren de effectiviteit van MH-MoE.
English
Sparse Mixtures of Experts (SMoE) scales model capacity without significant
increases in training and inference costs, but exhibits the following two
issues: (1) Low expert activation, where only a small subset of experts are
activated for optimization. (2) Lacking fine-grained analytical capabilities
for multiple semantic concepts within individual tokens. We propose Multi-Head
Mixture-of-Experts (MH-MoE), which employs a multi-head mechanism to split each
token into multiple sub-tokens. These sub-tokens are then assigned to and
processed by a diverse set of experts in parallel, and seamlessly reintegrated
into the original token form. The multi-head mechanism enables the model to
collectively attend to information from various representation spaces within
different experts, while significantly enhances expert activation, thus deepens
context understanding and alleviate overfitting. Moreover, our MH-MoE is
straightforward to implement and decouples from other SMoE optimization
methods, making it easy to integrate with other SMoE models for enhanced
performance. Extensive experimental results across three tasks: English-focused
language modeling, Multi-lingual language modeling and Masked multi-modality
modeling tasks, demonstrate the effectiveness of MH-MoE.