arXiv:2610.09372v1 cs.CL

MoE 사전학습에서의 전문가 결합: 상관 배치 및 토큰 셔플링을 통한 All-to-All 오버헤드 감소

Expert Coupling in MoE Pretraining: Reducing All-to-All Overhead with Correlated Placement and Token Shuffling

Radha Gulhane, Quentin Anthony, Beren Millidge

제출 2026-10-07

한국어 초록

전문가 혼합(MoE) 층은 트랜스포머의 피드포워드 블록을 E개의 전문가 네트워크로 대체하며, 각 토큰은 이들 중 k개의 전문가로 라우팅됩니다. 전문가 병렬화(EP) 환경에서는 전문가들이 여러 GPU에 분산 배치되며, 모든 MoE 층은 순전파 및 역전파 과정에서 토큰을 해당 전문가로 디스패치하고 결과를 결합하기 위해 all-to-all 집합 통신을 실행합니다. 노드당 8개의 AMD Instinct MI300X GPU를 갖춘 클러스터에서, 이러한 집합 통신은 top-2 라우팅을 적용한 EP32에서 학습 단계 시간의 45%를, top-6 라우팅에서는 60%를 차지할 수 있습니다. 본 연구에서는 사전학습 초기부터 라우터가 단일 층 내부뿐만 아니라 층 전반에 걸쳐 상관된 패턴으로 토큰을 전문가에 할당하도록 이미 학습한다는 점을 발견했습니다. top-2의 경우, 한 층 내 전문가 쌍 중 0.8%가 전체 토큰의 42%에 의해 함께 선택되며, 한 토큰이 특정 층에서 선택하는 전문가는 다음 층에서 선택할 전문가를 예측합니다. 저자들은 이러한 상관관계를 활용하여 토큰 자체의 GPU에 더 많은 토큰-전문가 할당을 유지함으로써 GPU 간 및 노드 간 통신을 줄입니다. 상관 전문가 배치(Correlated expert placement)는 자주 함께 선택되는 전문가들을 동일한 GPU에 배치합니다. 각 토큰을 각 GPU로 한 번만 전송하는 디스패처와 결합하여, 디스패치되는 행을 최대 58%까지 제거합니다. 토큰 셔플링(Token shuffling)은 시퀀스 병렬화가 EP 그룹 전반에 걸쳐 토큰을 샤딩할 때 적용됩니다. 이는 어텐션 이후 이어지는 reduce-scatter 과정에서 각 토큰을 다음 층의 전문가를 보유할 것으로 예측된 GPU로 이동시킵니다. 단일 노드에서 이는 토큰의 GPU에서 처리되는 토큰-전문가 할당 비율을 12.5%에서 59%로 증가시킵니다. Megatron-LM 환경에서 top-2 및 top-6 라우팅을 적용한 8부터 64까지의 EP 차수에 걸쳐, 두 방식은 all-to-all 시간을 1.16~2.63배 줄이고 엔드투엔드 단계 시간을 최대 1.41배 단축합니다. 두 방식 모두 모델의 기본 라우팅 결정이나 전문가 매개변수를 변경하지 않습니다.

원문 초록

Mixture-of-Experts (MoE) layers replace the feed-forward block of a Transformer with E expert networks, and each token is routed to k of these experts. Under expert parallelism (EP) the experts are distributed across GPUs, and every MoE layer runs all-to-all collectives in the forward and backward passes to dispatch tokens to their experts and then combine the results. On a cluster with 8 AMD Instinct MI300X GPUs per node, these collectives can take 45% of the training step at EP32 with top-2 routing and 60% with top-6 routing. We find that early in pretraining routers have already learned to assign tokens to experts in correlated patterns, both within a layer and across layers. At top-2, 0.8% of the expert pairs in a layer are selected together by 42% of tokens, and the experts a token selects at one layer predict the experts it selects at the next layer. We use these correlations to keep more token--expert assignments on the token's own GPU, which reduces communication across GPUs and across nodes. Correlated expert placement puts experts that are often selected together on the same GPU. Combined with a dispatcher that sends each token to each GPU once, it removes up to 58% of dispatched rows. Token shuffling applies when sequence parallelism shards tokens across the EP group. It moves each token to the GPU predicted to hold its next-layer experts during the reduce-scatter that follows attention. On one node this raises the share of token--expert assignments served on the token's GPU from 12.5% to 59%. In Megatron-LM, across EP degrees from 8 to 64 with top-2 and top-6 routing, the two methods reduce all-to-all time by 1.16-2.63X and end-to-end step time by up to 1.41X. Neither method changes the models' underlying routing decisions or expert parameters.

제출 이력

확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.

  1. arXiv:2610.09372v1

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

공통 태그로 연결된 공개 논문이 아직 없습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.