Skip to main content
QUICK REVIEW

[논문 리뷰] OpenMoE: An Early Effort on Open Mixture-of-Experts Language Models

Fuzhao Xue, Zian Zheng|arXiv (Cornell University)|2024. 01. 29.
Topic ModelingComputer Science인용 수 7
한 줄 요약

OpenMoE의 디코더-전용 MoE LLM(650M–34B) 출시와 코드/데이터 중심 사전학습, MoE 라우팅 분석 및 오픈 MoE 개발을 위한 시사점. 라우팅 동작, UL2 대 CasualLM 목표, 코드-데이터 이점에 대해 조사한다.

ABSTRACT

To help the open-source community have a better understanding of Mixture-of-Experts (MoE) based large language models (LLMs), we train and release OpenMoE, a series of fully open-sourced and reproducible decoder-only MoE LLMs, ranging from 650M to 34B parameters and trained on up to over 1T tokens. Our investigation confirms that MoE-based LLMs can offer a more favorable cost-effectiveness trade-off than dense LLMs, highlighting the potential effectiveness for future LLM development. One more important contribution of this study is an in-depth analysis of the routing mechanisms within our OpenMoE models, leading to three significant findings: Context-Independent Specialization, Early Routing Learning, and Drop-towards-the-End. We discovered that routing decisions in MoE models are predominantly based on token IDs, with minimal context relevance. The token-to-expert assignments are determined early in the pre-training phase and remain largely unchanged. This imperfect routing can result in performance degradation, particularly in sequential tasks like multi-turn conversations, where tokens appearing later in a sequence are more likely to be dropped. Finally, we rethink our design based on the above-mentioned observations and analysis. To facilitate future MoE LLM development, we propose potential strategies for mitigating the issues we found and further improving off-the-shelf MoE LLM designs.

연구 동기 및 목표

  • 다양한 규모에 걸쳐 최초의 오픈 가능하고 재현 가능한 디코더-전용 MoE LLM 학습 솔루션을 제공한다.
  • MoE 라우팅 메커니즘을 분석하여 토큰이 어떻게 전문가에게 할당되는지 이해한다.
  • 조밀한 baselines와 비교하여 MoE LLM의 비용 효과성과 성능을 평가한다.
  • 향후 MoE 모델에서 라우팅 및 데이터 혼합 이슈를 완화하기 위한 교훈을 공유하고 전략을 제안한다.

제안 방법

  • Top-2 게이팅(K=2) 및 잔여 MoE 설계를 갖춘 디코더-전용 ST-MoE 아키텍처를 채택한다.
  • 엔드 투 엔드 MoE 학습의 안정화를 위해 로드 밸런스 손실과 라우터 z-손실을 사용한다.
  • UL2 목표(PrefixLM, SpanCorrupt)와 상당한 코드 데이터를 활용하여 사전학습하고, 정렬을 위한 지도형 WildChat 데이터로 미세조정한다.
  • 라우팅 오버헤드와 모델 용량의 균형을 맞추기 위해 MoE 레이어를 교차 삽입한다(예: 매 4 또는 6 레이어마다).
  • 최대 1T+ 토큰까지 Base/16E, 8B/32E, 34B/32E, Chat 변형을 포함한 여러 OpenMoE 변형을 학습 및 공개한다.
  • TinyLLaMA와 OpenLLaMA 같은 오픈 밀집 기준선과 비교하여 TriviaQA, HumanEval, WMT16 En-Ro, BigBench-Lite, lm-evaluation-harness 서브셋, 및 챗용 MT-Bench 등 벤치마크를 혼합하여 평가한다.
(a) Comparison of the validation loss on different pre-training datasets.
(a) Comparison of the validation loss on different pre-training datasets.

실험 결과

연구 질문

  • RQ1OpenMoE 모델에서 도메인, 언어, 작업에 걸친 MoE 라우팅 결정은 어떻게 작동하는가?
  • RQ2라우팅 결정이 학습 초기 단계에서 고정되며 맥락에 거의 무관한가, 그리고 이는 순차적 작업에 어떤 의미가 있는가?
  • RQ3데이터 혼합(특히 코드 중심 데이터)과 학습 목표(UL2 vs CasualLM)가 MoE 모델의 성능 및 학습 안정성에 미치는 영향은 무엇인가?
  • RQ4지도학습 미세조정이 길이가 긴 시퀀스에서의 토큰 드롭이나 명령-조정 불일치와 같은 라우팅 관련 이슈를 완화할 수 있는가?
  • RQ5활성화 파라미터 대비 전체 학습 데이터 측면에서 OpenMoE가 밀집형 LLM과 비교해 비용 효율적으로 우수한가?

주요 결과

  • 맥락에 독립적인 특화로 라우팅이 이루어지는 것으로 분석되었다; 토큰은 맥락에 상관없이 동일한 전문가에게 라우팅되는 경향이 있다.
  • 라우팅 결정은 초기 학습에서 학습되며 사전학습 전반에 걸쳐 대체로 고정되어, 도메인 외 데이터에서 잘못된 라우팅의 가능성을 야기한다.
  • 끝으로 떨어지는 드롭(Drop-towards-the-End): 특정 전문가의 용량이 고정되어 있어 후반 토큰이 드롭될 수 있으며, 특히 명령-조정 데이터에서 그렇다.
  • 코드 데이터와 UL2 목표는 사전학습 성능을 향상시키며, 코드 중심 데이터가 특정 벤치마크에서 토큰 예측을 더 쉽게 만든다.
  • OpenMoE-8B/32E는 더 낮은 비용으로 밀집형 오픈 모델과 비교해 TriviaQA 및 WMT16 En-Ro에서 경쟁력 있는 성능을 달성하고, Chat 변형은 단일 턴에서 강한 성능을 보이나 토큰 드롭으로 인해 다중 턴에서 다소 낮다.
  • MT-Bench에서 OpenMoE는 단일 턴 코딩 태스크에서 기준선보다 우수하나, 다중 턴 결과에서 시퀀스 길이 토큰 드롭으로 인해 큰 폭으로 하락하는 경향이 있다.
(b) Comparison of validation accuracy on different pre-training datasets.
(b) Comparison of validation accuracy on different pre-training datasets.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.