动态大模型训练中,实现计算负载自动均衡,提升训练效率。
Balanced and Elastic End-to-end Training of Dynamic LLMs
- 提出DynMo系统,自动调节各GPU间计算负载
- 在多种动态架构下,训练速度提升1.17至4.52倍
- 适合大规模分布式训练,可释放空闲显卡资源
为降低大语言模型的计算与内存开销,已有多种方法被提出,包括专家混合(MoE)、参数渐进剪枝、动态冻结层、动态稀疏注意力、提前退出机制以及深度混合(MoDs)。这些方法虽能减少总体计算量,但常导致各工作节点间负载严重失衡,限制其在大规模分布式训练中的应用。本文提出自主动态负载均衡方案DynMo,可证明地最小化负载不平衡,并在流水线并行训练中自适应均衡各工作节点的计算负荷。此外,DynMo能动态将计算集中到更少工作节点,不牺牲训练吞吐率,使空闲节点可释放回任务管理器。该方案支持单机多卡及多机集群部署,实际可用性强。相比传统静态分布式训练(如Megatron-LM、DeepSpeed),DynMo在动态GPT模型上实现最高达4.52倍的端到端训练加速:MoE提升1.23倍,参数剪枝提升3.18倍,层冻结提升2.23倍,稀疏注意力提升4.02倍,提前退出提升4.52倍,MoDs提升1.17倍。
原文摘要 · Abstract (English)
To reduce the computational and memory overhead of Large Language Models, various approaches have been proposed. These include a) Mixture of Experts (MoEs), where token routing affects compute balance; b) gradual pruning of model parameters; c) dynamically freezing layers; d) dynamic sparse attention mechanisms; e) early exit of tokens as they pass through model layers; and f) Mixture of Depths (MoDs), where tokens bypass certain blocks. While these approaches are effective in reducing overall computation, they often introduce significant workload imbalance across workers. In many cases, this imbalance is severe enough to render the techniques impractical for large-scale distributed training, limiting their applicability to toy models due to poor efficiency. We propose an autonomous dynamic load balancing solution, DynMo, which provably achieves maximum reduction in workload imbalance and adaptively equalizes compute loads across workers in pipeline-parallel training. In addition, DynMo dynamically consolidates computation onto fewer workers without sacrificing training throughput, allowing idle workers to be released back to the job manager. DynMo supports both single-node multi-GPU systems and multi-node GPU clusters, and can be used in practical deployment. Compared to static distributed training solutions such as Megatron-LM and DeepSpeed, DynMo accelerates the end-to-end training of dynamic GPT models by up to 1.23x for MoEs, 3.18x for parameter pruning, 2.23x for layer freezing, 4.02x for sparse attention, 4.52x for early exit, and 1.17x for MoDs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。