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
要旨
大規模言語モデル(LLMs)は、モデルパラメータをスケーリングすることで印象的な性能を達成していますが、これには著しい推論オーバーヘッドが伴います。LLMパラメータを支配するフィードフォワードネットワーク(FFNs)は、隠れニューロンで高い活性スパース性を示しています。これを活用するために、一部のパラメータのみがアクティブ化されるMixture-of-Experts(MoE)アーキテクチャの使用が提案されています。ただし、既存のアプローチはしばしば多大なトレーニングデータとリソースが必要であり、実用性が制限されています。私たちは、密なモデルから効率的にMoEモデルを切り出すための新しいフレームワークであるCMoE(Carved MoE)を提案します。CMoEは、効率的な専門家グループ化と軽量な適応を通じて卓越したパフォーマンスを達成します。まず、ニューロンは活性化率に基づいて共有された専門家とルーティングされた専門家にグループ化されます。次に、異なる可能性のあるルーティングプロセスと負荷分散を組み込んだ、ゼロからのトレーニングを必要としないルーティングメカニズムを構築します。控えめなデータを使用して、CMoEは、7Bの密なモデルからMoEを5分以内に生成します。軽量なファインチューニングにより、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