# Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models

Mixture-of-Experts와 명령어 튜닝의 만남: 대규모 언어 모델을 위한 승리의 조합

Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei 외 14명 · arXiv · 2023년 5월 24일

- **연구 문제** 희소 MoE 모델은 추론 계산량을 크게 늘리지 않고 파라미터를 더할 수 있지만, 과제별 직접 fine-tuning에서는 같은 계산량의 밀집 모델보다 성능이 낮아질 수 있습니다.
- **연구 방법** MoE 계층을 가진 모델에 FLAN 지시 튜닝을 적용해 held-out 및 held-in 평가에서 밀집 모델과 비교합니다.
- **주요 결과** 지시 튜닝을 적용한 FLAN-MoE는 여러 규모에서 밀집 모델보다 높은 성능을 보였으며, 가장 큰 FLAN-ST32B는 few-shot MMLU 65.4%와 BBH 54.4%를 기록했습니다.

## 희소 MoE 모델의 과제 전이 문제

대규모 언어 모델은 성능을 높이려면 파라미터 수와 계산량이 함께 늘어나는 문제에 부딪힙니다. 희소 Mixture-of-Experts(MoE)는 토큰마다 일부 전문가만 활성화하여 추론 비용을 크게 늘리지 않고 학습 가능한 파라미터를 더할 수 있는 구조입니다. 그러나 특정 다운스트림 과제에 직접 미세조정하면 같은 계산량의 밀집 모델보다 성능이 낮아지는 경우가 있다고 보고됩니다. 이 논문은 이 문제가 pre-training과 과제별 fine-tuning 사이의 불일치에서 비롯될 수 있다고 가정하고, 지시 튜닝을 MoE에 결합했을 때 그 결과가 어떻게 달라지는지 검증합니다.

## FLAN-MoE의 구성과 지시 튜닝 방식

FLAN-MoE는 밀집 Transformer에서 feed-forward 구성요소가 있던 위치 중 한 칸씩 건너뛴 계층을 MoE 계층으로 바꿉니다. 각 MoE 계층은 여러 독립적인 feed-forward 네트워크를 전문가로 갖고, 학습 가능한 gating network가 입력 토큰에 대해 softmax로 전문가에 대한 확률 분포를 만듭니다. 토큰마다 활성화되는 전문가는 한 개 또는 두 개이며, 나머지 전문가는 계산하지 않습니다. 최종 토큰 표현은 선택된 전문가 출력의 가중 결합입니다.

지시 튜닝 단계에서는 FLAN 학습 데이터 모음에 prefix language model 목적 함수를 적용하고 모든 모델 파라미터를 갱신합니다. 입력 길이는 2,048, 출력 길이는 512로 두었으며 학습률은 1e−4로 설정했습니다. 이 설정은 논문 본문에 기술된 기본 fine-tuning 설정이며, 다른 실험 조건은 결과별 표와 부록에서 확인해야 합니다.

## 밀집 모델과의 통제 비교

검증의 핵심은 MoE와 밀집 T5 계열을 같은 계산량 조건에서 비교하는 것입니다. 논문은 Figure 2에서 FLAN-MoE가 여러 규모에서 밀집 모델보다 나은 비용 대비 성능 경계를 보인다고 보고하며, MMLU-Direct 0-shot 및 few-shot 평가에서 평균 7.1%의 절대 향상을 제시합니다. BBH-Direct에서는 작은 규모에서 큰 개선이 나타나고 큰 규모에서는 이득이 더 작지만 여전히 의미 있다고 설명합니다.

![Figure 2: Average zero performance of FLAN -M OE models versus FLAN-T5 dense models for similar effective FLOPs per token over the 57 MMLU tasks and 23 BBH tas…](https://refivu.com/papers/d5c4a8f5-f8ec-46d3-beca-87fab1f92792/figures/figure-b55f190682d80e4143f1fd605133cdaa.png?thumb=512)

**Figure 2** : Average zero performance of FLAN -M OE models versus FLAN-T5 dense models for similar effective FLOPs per token over the 57 MMLU tasks and 23 BBH tasks.

[원문](https://arxiv.org/abs/2305.14705v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, Denny Zhou · Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

Table 1은 MMLU, BBH, Reasoning, QA를 포함한 정규화 평균을 보여 줍니다. 여기서 정규화 평균은 MMLU-Direct, BBH-Direct, Reasoning-CoT, QA-Direct 네 점수의 macro-average입니다. MMLU와 BBH는 fine-tuning 데이터에 포함되지 않은 held-out 평가이며, Reasoning과 QA는 held-in 평가입니다. 예를 들어 FLAN-EC 계열과 FLAN-ST 계열은 각 밀집 대응 모델 대비 정규화 평균 증가를 보고합니다.

![Table 1: MoE models improve instruct fine-tuning performance on top of dense counterparts. The benchmark suites are MMLU (57 tasks), BBH (23 tasks), Reasoning…](https://refivu.com/papers/d5c4a8f5-f8ec-46d3-beca-87fab1f92792/figures/figure-aeef25bede7009e54a7cb7923245f5a4.png?thumb=512)

**Table 1** : MoE models improve instruct fine-tuning performance on top of dense counterparts. The benchmark suites are MMLU (57 tasks), BBH (23 tasks), Reasoning (4 Tasks), and QA (4 Tasks). The evaluation metric across all benchmarks is few-shot prompted accuracy, specifically the exact match. To calculate this metric, we take an unweighted average across all tasks. For a comprehensive evaluation, we report the normalized average of MMLU-direct, BBH-direct, Reasoning-CoT, and QA-Direct. The MMLU and BBH evaluation benchmarks are held-out (not included in the finetuning data.) while the Reasoning and QA evaluation benchmarks are held-in. (Noted that FLAN-ST32B outperforms FLAN -PALM 62B while being \<30% of the FLOPS.)

[원문](https://arxiv.org/abs/2305.14705v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, Denny Zhou · Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## 대표 결과와 적용 범위

가장 큰 모델인 FLAN-ST32B는 few-shot MMLU에서 65.4%, few-shot BBH에서 54.4%를 기록했다고 보고됩니다. 이 모델은 FLAN-PaLM 62B보다 낮은 FLOPs를 사용하며, 원문은 네 벤치마크에서 FLAN-PaLM 62B를 넘었다고 설명합니다. 다만 FLAN-PaLM 540B와의 격차는 여전히 크다고 밝힙니다.

라우팅 방식의 비교도 같은 맥락에서 제시됩니다. FLAN-EC는 FLAN-GS보다 여러 규모와 과제에서 일관되게 높은 성능을 보였고, ST-MoE의 보조 손실과 pre-training 전략을 포함한 FLAN-ST가 이 차이를 줄였다고 저자들은 설명합니다. 이 결과는 Table 1과 부록의 개별 과제 표에 의해 뒷받침되며, 해당 모델 계열과 조건 밖으로 일반화되지 않습니다.

## fine-tuning 전략과 전문가 특화의 해석

Table 2는 보조 손실과 전문가·게이트 동결 실험을 보여 줍니다. balancing loss는 FLAN-EC BASE에서 평균 37.7에서 38.3으로 개선되었지만, FLAN-ST BASE에서는 37.8에서 36.2로 낮아졌습니다. 전문가 또는 MoE 파라미터를 동결하면 성능이 낮아졌고, 게이트만 동결하면 작은 개선이 나타났습니다. 저자들은 이 차이가 보조 손실의 pre-training과 지시 튜닝 간 불일치에서 비롯될 수 있다고 해석합니다.

또한 저자들은 MoE가 지시 튜닝의 이득을 더 많이 얻고 과제 수에 더 민감하다는 관찰에 대해, 전문가의 특화된 성질이 잡음과 미관측 데이터에 대한 민감성을 키울 수 있다는 가설을 제시합니다. 이 가설은 저자의 해석이며 원문이 직접 증명한 인과 관계가 아닙니다.

## 다국어 성능과 추가 분석의 한계

논문은 영어 중심 지시 데이터로 미세조정한 FLAN-MoE가 다국어 벤치마크에서 약하다고 보고합니다. 가장 큰 FLAN-ST32B도 MGSM에서 15.5%, TyDiQA에서 25.1%를 기록했으며, 이는 일부 비교 모델과 비슷한 수준이거나 FLAN-PaLM 변형보다 낮습니다. 저자들은 이를 영어 특화 fine-tuning의 영향으로 해석하며, 다국어 데이터의 중요성을 제안합니다.

또한 Figure 7의 전문가 사용률 분석은 규모가 커질수록 전문가 사용률이 낮아지는 경향을 보여 주지만, 이는 특정 실험 설정의 관찰입니다. 원문은 이 결과를 모든 MoE 구조나 모든 과제로 확장하지 않습니다.

![Figure 7: Expert usage of FLAN -EC at differ- ent scales during instruction finetuning, where larger models entail smaller expert usage](https://refivu.com/papers/d5c4a8f5-f8ec-46d3-beca-87fab1f92792/figures/figure-08656715e0438928130c3ed9bb46812a.png?thumb=512)

**Figure 7** : Expert usage of FLAN -EC at differ- ent scales during instruction finetuning, where larger models entail smaller expert usage.

[원문](https://arxiv.org/abs/2305.14705v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, Denny Zhou · Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

## 논문 정보

- **저자**: Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, Denny Zhou
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 5월 24일
- **등록일**: 2026년 11월 5일
- **수정일**: 2023년 7월 5일
- **버전**: v2
- **arXiv**: 2305.14705
- **분류**: cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2305.14705v2) · [원문 PDF ↗](https://arxiv.org/pdf/2305.14705v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Sparse Mixture-of-Experts (MoE) is a neural architecture design that can be utilized to add learnable parameters to Large Language Models (LLMs) without increasing inference cost. Instruction tuning is a technique for training LLMs to follow instructions. We advocate combining these two approaches, as we find that MoE models benefit more from instruction tuning than dense models. In particular, we conduct empirical studies across three experimental setups: (i) Direct finetuning on individual downstream tasks devoid of instruction tuning; (ii) Instructiontuning followed by in-context few-shot or zero-shot generalization on downstream tasks; and (iii) Instruction tuning supplemented by further finetuning on individual downstream tasks. In the first scenario, MoE models overall underperform dense models of identical computational capacity. This narrative, however, dramatically changes with the introduction of instruction tuning (second and third scenario), used independently or in conjunction with task-specific finetuning. Our most powerful model, FLAN-MOE-32B, surpasses the performance of FLAN-PALM-62B on four benchmark tasks, while using only a third of the FLOPs. The advancements embodied byFLAN-MOE inspire a reevaluation of the design principles of large-scale, high-performance language models in the framework of task-agnostic learning.

## 원문 인용

Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, Denny Zhou (2023). Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models. arXiv:2305.14705v2. https://arxiv.org/abs/2305.14705v2

**BibTeX**

```
@misc{shen2023mixture,
  title = {{Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models}},
  author = {Sheng Shen and Le Hou and Yanqi Zhou and Nan Du and Shayne Longpre and Jason Wei and Hyung Won Chung and Barret Zoph and William Fedus and Xinyun Chen and Tu Vu and Yuexin Wu and Wuyang Chen and Albert Webson and Yunxuan Li and Vincent Zhao and Hongkun Yu and Kurt Keutzer and Trevor Darrell and Denny Zhou},
  year = {2023},
  eprint = {2305.14705},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.14705v2}
}
```

## 이 논문의 용어

- [GSM8K](https://refivu.com/terms/e48f0e01064d-gsm8k)
- [MMLU](https://refivu.com/terms/3036c0ba5adb-mmlu)
- [instruction tuning](https://refivu.com/terms/0a2a2d11f238-instruction-tuning)
- [Mixture-of-Experts (MoE)](https://refivu.com/terms/2f85b581e2a0-mixture-of-experts-moe)
- [gating network](https://refivu.com/terms/e7cdc00558dc-gating-network)
- [BBH](https://refivu.com/terms/01f777eaca51-bbh)
- [auxiliary loss](https://refivu.com/terms/24a922efb7e2-auxiliary-loss)
- [Expert Dropout](https://refivu.com/terms/d5c1f67f7524-expert-dropout)
- [normalized average](https://refivu.com/terms/cf208ca8fbb1-normalized-average)

## 다른 논문 해설

- [Psychometric Predictive Power of Large Language Models](https://refivu.com/papers/3dae4c85-92da-4f9f-9a3b-8d150373620c-psychometric-predictive-power-of-large-language-models.md)
- [Tuna: Instruction Tuning using Feedback from Large Language Models](https://refivu.com/papers/a59ac188-09a8-4988-94cd-fcf6752c44b4-tuna-instruction-tuning-using-feedback-from-large-language.md)
- [CycleDistill: Bootstrapping Machine Translation using LLMs with Cyclical Distillation](https://refivu.com/papers/50523ad6-077b-4964-b2a3-de0dc35430a9-cycledistill-bootstrapping-machine-translation-using-llms.md)
- [LexMatcher: Dictionary-centric Data Collection for LLM-based Machine Translation](https://refivu.com/papers/10d9cdf2-0131-4ba8-868f-abe7e1622924-lexmatcher-dictionary-centric-data-collection-for-llm-based.md)
- [What do Large Language Models Need for Machine Translation Evaluation?](https://refivu.com/papers/69007024-125c-404d-9a1f-73237ec547d8-what-do-large-language-models-need-for-machine.md)
- [PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2-pandalm-an-automatic-evaluation-benchmark-for-llm.md)
- [Comparative Evaluation of Machine Translation Systems on Images with Text](https://refivu.com/papers/52af9e2b-9167-45ec-a459-39a4099b6eb6-comparative-evaluation-of-machine-translation-systems-on.md)
- [KazParC: Kazakh Parallel Corpus for Machine Translation](https://refivu.com/papers/adaa707f-d821-424c-83ee-af93c4f100b4-kazparc-kazakh-parallel-corpus-for-machine-translation.md)
- [Machine Translation Testing via Syntactic Tree Pruning](https://refivu.com/papers/241ef6bc-d9e5-4762-b817-d6fe146888f6-machine-translation-testing-via-syntactic-tree-pruning.md)
- [Natural Language Processing for Tigrinya: Current State and Future Directions](https://refivu.com/papers/e6c4ea39-2516-4ef6-8646-04f101922a20-natural-language-processing-for-tigrinya-current-state-and.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/d5c4a8f5-f8ec-46d3-beca-87fab1f92792-mixture-of-experts-meets-instruction-tuning-a-winning)
