Skip to main content
QUICK REVIEW

[论文解读] MegaScale: Scaling Large Language Model Training to More Than 10,000 GPUs

Ziheng Jiang, Haibin Lin|arXiv (Cornell University)|Feb 23, 2024
Topic ModelingComputer Science被引用 24
一句话总结

MegaScale 提供了一个生产系统,用于在 10,000+ GPUs 上训练大型语言模型,聚焦于全栈算法-系统协同设计和深入可观测性,以实现高效性和稳定性,包括在 12,288 GPUs 上达到 55.2% MFU,并比 Megatron-LM 提升 1.34x MFU。

ABSTRACT

We present the design, implementation and engineering experience in building and deploying MegaScale, a production system for training large language models (LLMs) at the scale of more than 10,000 GPUs. Training LLMs at this scale brings unprecedented challenges to training efficiency and stability. We take a full-stack approach that co-designs the algorithmic and system components across model block and optimizer design, computation and communication overlapping, operator optimization, data pipeline, and network performance tuning. Maintaining high efficiency throughout the training process (i.e., stability) is an important consideration in production given the long extent of LLM training jobs. Many hard stability issues only emerge at large scale, and in-depth observability is the key to address them. We develop a set of diagnosis tools to monitor system components and events deep in the stack, identify root causes, and derive effective techniques to achieve fault tolerance and mitigate stragglers. MegaScale achieves 55.2% Model FLOPs Utilization (MFU) when training a 175B LLM model on 12,288 GPUs, improving the MFU by 1.34x compared to Megatron-LM. We share our operational experience in identifying and fixing failures and stragglers. We hope by articulating the problems and sharing our experience from a systems perspective, this work can inspire future LLM systems research.

研究动机与目标

  • 在极大规模(数万GPU)上激励并推动 LLM 训练,以提升模型能力与吞吐量。
  • 在大规模下解决两个核心挑战:训练效率(MFU)和训练稳定性(容错与减少落后进度)。
  • 提出覆盖模型架构、优化、数据流水线和网络的端到端算法与系统的协同设计,以实现可扩展且稳定的训练。
  • 分享实际工程经验、诊断工具和经验教训,以为未来的 LLM 系统研究提供参考。

提出的方法

  • 在模型块、优化器、计算/通信重叠、数据流水线与网络调优等方面进行算法与系统组件的协同设计。
  • 使用并行 Transformer 块、滑动窗口注意力,以及 LAMB 优化器来实现尺度化并维持准确性。
  • 采用混合并行(数据、流水线、张量、序列)及重叠策略以隐藏通信成本。
  • 通过预取和基于树的加载优化数据流水线;融合操作并实现 GEMM/通信的重叠。
  • 开发广泛的可观测性与诊断工具、基于心跳的故障检测,以及快速检查点/恢复流程。
  • 设计网络拓扑和拥塞控制(ECMP 降级、基于 RTT/ECN 的控制)以在大规模下维持高吞吐。

实验结果

研究问题

  • RQ1如何在超过 10,000 GPUs 的规模下扩展 LLM 训练,同时保持高效率与稳定性?
  • RQ2哪些算法和系统设计选择(并行性、优化器、注意力机制)在大规模下最大化 MFU 与收敛?
  • RQ3在极端规模下运行稳定训练任务需要哪些可观测性、容错和快速恢复技术?
  • RQ4哪些具体的工程实践(数据流水线、网络调优、初始化)最有效地减少停机时间和落后进度?
  • RQ5在真实生产运行中,MegaScale 相较于现有开源基线如 Megatron-LM 的表现如何?

主要发现

  • MegaScale 在 12,288 GPUs 上训练 175B 模型时实现了 55.2% Model FLOPs Utilization (MFU)。
  • 这 1.34× 的改进相较 Megatron-LM。
  • MegaScale 在数周内对数百亿参数级别的专有模型进行训练,处理多万亿标记,持续收敛并从超过 100 次故障中恢复。
  • 该系统通过健壮的工作流和检查点优化,展示自动故障定位、快速恢复,以及最小化的训练中断。
  • 一组可观测性工具与诊断工具支持在生产级训练中的故障定位、异常检测和性能分析。
  • 作者开源部分组件并分享工程经验教训,以惠及社区。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。