Exploiting Inter-Layer Expert Affinity for Accelerating Mixture-of-Experts Model Inference

要約

Generative Pre-trained Transformer のような大規模な言語モデルでは、専門家の混合パラダイムがモデルの表現力と精度を高めるための強力な手法として登場しました。
ただし、分散システムでの並列推論用の GPT MoE モデルの展開には、主に専門家のルーティングと集約に必要な広範な Alltoall 通信が原因で、大きな課題が生じます。
この通信のボトルネックは、すでに複雑な計算環境をさらに悪化させ、高性能コンピューティング リソースの効率的な利用を妨げます。
この論文では、これらの MoE モデルの推論を大幅に高速化するために、ExFlow と呼ばれる軽量の最適化手法を提案します。
私たちは、層間のエキスパート アフィニティを利用することで通信オーバーヘッドを軽減するという新しい視点を採用しています。
以前の方法とは異なり、私たちのソリューションは、微調整や精度の低下なしに、事前トレーニングされた MoE モデルに直接適用できます。
分散システム上でコンテキスト一貫性のあるエキスパート並列処理を提案することにより、以前の方法ではすべて 2 つの Alltoall が必要であったのに対し、私たちの設計では同じ機能を提供するために 1 つの Alltoall 通信のみを使用します。
複数のレイヤーにわたるトークンのルーティングにおける条件付き確率を注意深く調査することにより、事前トレーニングされた GPT MoE モデルが暗黙的に強力なレイヤー間エキスパート アフィニティを示すことを証明しました。
次に、そのような特徴を捉えるための効率的な整数プログラミング モデルを設計し、対応する GPU に専門家を適切に配置することで、GPU 間のルーティング レイテンシーを最大 67% 削減できることを示します。
当社のソリューションは、8 ~ 64 人の専門家による最先端の MoE 実装を上回り、推論スループットが最大 2.2 倍向上しました。
さらに、モデルが非常に初期のトレーニング段階でこのエキスパート アフィニティを暗黙的に取得する方法と、このアフィニティがトレーニング中にどのように進化して安定するかについての詳細な研究を提供します。

要約(オリジナル)

In large language models like the Generative Pre-trained Transformer, the Mixture of Experts paradigm has emerged as a powerful technique for enhancing model expressiveness and accuracy. However, deploying GPT MoE models for parallel inference on distributed systems presents significant challenges, primarily due to the extensive Alltoall communication required for expert routing and aggregation. This communication bottleneck exacerbates the already complex computational landscape, hindering the efficient utilization of high-performance computing resources. In this paper, we propose a lightweight optimization technique called ExFlow, to largely accelerate the inference of these MoE models. We take a new perspective on alleviating the communication overhead by exploiting the inter-layer expert affinity. Unlike previous methods, our solution can be directly applied to pre-trained MoE models without any fine-tuning or accuracy degradation. By proposing a context-coherent expert parallelism on distributed systems, our design only uses one Alltoall communication to deliver the same functionality while previous methods all require two Alltoalls. By carefully examining the conditional probability in tokens’ routing across multiple layers, we proved that pre-trained GPT MoE models implicitly exhibit a strong inter-layer expert affinity. We then design an efficient integer programming model to capture such features and show that by properly placing the experts on corresponding GPUs, we can reduce up to 67% cross-GPU routing latency. Our solution beats the cutting-edge MoE implementations with experts from 8 to 64, with up to 2.2x improvement in inference throughput. We further provide a detailed study of how the model implicitly acquires this expert affinity at the very early training stage and how this affinity evolves and stabilizes during training.

arxiv情報

著者 Jinghan Yao,Quentin Anthony,Aamir Shafi,Hari Subramoni,Dhabaleswar K.,Panda
発行日 2024-01-16 14:16:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.DC, cs.LG パーマリンク