ChatPaper.aiChatPaper

CMoE: 효율적인 LLM 추론을 위한 Mixture-of-Experts의 신속한 구성

CMoE: Fast Carving of Mixture-of-Experts for Efficient LLM Inference

February 6, 2025
저자: Zehua Pei, Lancheng Zou, Hui-Ling Zhen, Xianzhi Yu, Wulong Liu, Sinno Jialin Pan, Mingxuan Yuan, Bei Yu
cs.AI

초록

대형 언어 모델(Large language models, LLMs)은 모델 파라미터의 스케일링을 통해 인상적인 성능을 달성하지만, 이는 상당한 추론 오버헤드를 동반합니다. LLM 파라미터를 지배하는 피드포워드 네트워크(Feed-forward networks, FFNs)는 숨겨진 뉴런에서 높은 활성 희소성을 나타냅니다. 이를 활용하기 위해 연구자들은 일부 파라미터만 활성화하는 전문가들의 혼합(Mixture-of-experts, MoE) 아키텍처를 제안했습니다. 그러나 기존 접근 방식은 종종 방대한 학습 데이터와 자원이 필요하여 실용성이 제한됩니다. 저희는 밀집 모델에서 MoE 모델을 효율적으로 조각내는 새로운 프레임워크인 CMoE (Carved MoE)를 제안합니다. CMoE는 효율적인 전문가 그룹화와 가벼운 적응을 통해 놀라운 성능을 달성합니다. 먼저, 뉴런은 활성화 비율에 기반하여 공유 및 경로 지정된 전문가로 그룹화됩니다. 그런 다음, 우리는 처음부터 학습 없이 라우팅 메커니즘을 구성하고, 미분 가능한 라우팅 프로세스와 부하 분산을 통합합니다. CMoE는 7B 밀집 모델에서 5분 이내에 적절히 설계된 사용 가능한 MoE를 생성합니다. 가벼운 미세 조정을 통해 1시간 이내에 높은 성능 회복을 달성합니다. 저희는 코드를 https://github.com/JarvisPei/CMoE 에 공개적으로 제공합니다.
English
Large language models (LLMs) achieve impressive performance by scaling model parameters, but this comes with significant inference overhead. Feed-forward networks (FFNs), which dominate LLM parameters, exhibit high activation sparsity in hidden neurons. To exploit this, researchers have proposed using a mixture-of-experts (MoE) architecture, where only a subset of parameters is activated. However, existing approaches often require extensive training data and resources, limiting their practicality. We propose CMoE (Carved MoE), a novel framework to efficiently carve MoE models from dense models. CMoE achieves remarkable performance through efficient expert grouping and lightweight adaptation. First, neurons are grouped into shared and routed experts based on activation rates. Next, we construct a routing mechanism without training from scratch, incorporating a differentiable routing process and load balancing. Using modest data, CMoE produces a well-designed, usable MoE from a 7B dense model within five minutes. With lightweight fine-tuning, it achieves high-performance recovery in under an hour. We make our code publicly available at https://github.com/JarvisPei/CMoE.

Summary

AI-Generated Summary

PDF112February 10, 2025