ChatPaper.aiChatPaper

희소 전문가 혼합에서 부드러운 전문가 혼합으로

From Sparse to Soft Mixtures of Experts

August 2, 2023
저자: Joan Puigcerver, Carlos Riquelme, Basil Mustafa, Neil Houlsby
cs.AI

초록

희소 전문가 혼합 아키텍처(MoE)는 훈련 또는 추론 비용의 큰 증가 없이 모델 용량을 확장합니다. 그 성공에도 불구하고, MoE는 여러 문제를 겪고 있습니다: 훈련 불안정성, 토큰 누락, 전문가 수 확장 불가능, 또는 비효율적인 미세 조정 등이 그것입니다. 본 연구에서는 이러한 문제를 해결하면서도 MoE의 장점을 유지하는 완전히 미분 가능한 희소 트랜스포머인 Soft MoE를 제안합니다. Soft MoE는 모든 입력 토큰의 다양한 가중치 조합을 각 전문가에게 전달함으로써 암묵적인 소프트 할당을 수행합니다. 다른 MoE 연구와 마찬가지로, Soft MoE의 전문가들은 (결합된) 토큰의 일부만 처리하여 더 큰 모델 용량을 낮은 추론 비용으로 가능하게 합니다. 시각 인식 분야에서 Soft MoE는 표준 트랜스포머(ViT)와 인기 있는 MoE 변형(Tokens Choice 및 Experts Choice)을 크게 능가합니다. 예를 들어, Soft MoE-Base/16은 ViT-Huge/14와 유사한 훈련 후 성능을 유지하면서 추론 비용을 10.5배(벽시계 시간 기준 5.7배) 낮춥니다. Soft MoE는 또한 확장성이 뛰어납니다: 16개의 MoE 레이어에 128명의 전문가를 가진 Soft MoE Huge/14는 ViT Huge/14보다 40배 이상 많은 파라미터를 가지고 있음에도 불구하고 추론 시간 비용은 단 2%만 증가하며, 훨씬 더 나은 성능을 보입니다.
English
Sparse mixture of expert architectures (MoEs) scale model capacity without large increases in training or inference costs. Despite their success, MoEs suffer from a number of issues: training instability, token dropping, inability to scale the number of experts, or ineffective finetuning. In this work, we proposeSoft MoE, a fully-differentiable sparse Transformer that addresses these challenges, while maintaining the benefits of MoEs. Soft MoE performs an implicit soft assignment by passing different weighted combinations of all input tokens to each expert. As in other MoE works, experts in Soft MoE only process a subset of the (combined) tokens, enabling larger model capacity at lower inference cost. In the context of visual recognition, Soft MoE greatly outperforms standard Transformers (ViTs) and popular MoE variants (Tokens Choice and Experts Choice). For example, Soft MoE-Base/16 requires 10.5x lower inference cost (5.7x lower wall-clock time) than ViT-Huge/14 while matching its performance after similar training. Soft MoE also scales well: Soft MoE Huge/14 with 128 experts in 16 MoE layers has over 40x more parameters than ViT Huge/14, while inference time cost grows by only 2%, and it performs substantially better.
PDF200December 15, 2024