arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.14864cs.DCcs.AI
收藏

动态大语言模型的均衡与弹性端到端训练

Balanced and Elastic End-to-end Training of Dynamic LLMs

RIKEN Center for Computational Science(日本京都计算科学研究中心);Koç University(科克大学)

Mohamed Wahib, Muhammed Abdullah Soyturk, Didem Unat

AI总结:

针对动态大模型训练中工作负载不平衡的问题,提出自主动态负载均衡方案DynMo,通过自适应均衡计算负载和动态整合计算资源,显著提升了多种动态GPT模型的端到端训练效率。

摘要:

为了减少大型语言模型的计算和内存开销,研究者提出了多种方法。这些方法包括:a) 专家混合,其中令牌路由会影响计算平衡;b) 模型参数的渐进式剪枝;c) 动态冻结层;d) 动态稀疏注意力机制;e) 令牌在穿过模型层时的提前退出;以及 f) 深度混合,其中令牌会绕过某些块。虽然这些方法在减少总体计算量方面很有效,但它们往往会在工作节点之间引入显著的工作负载不平衡。在许多情况下,这种不平衡严重到使这些技术在实际的大规模分布式训练中变得不切实际,由于效率低下,其适用性仅限于玩具模型。我们提出了一种自主动态负载均衡解决方案 DynMo,它可证明地实现了工作负载不平衡的最大化减少,并在流水线并行训练中自适应地均衡各工作节点间的计算负载。此外,DynMo 在不牺牲训练吞吐量的情况下,动态地将计算整合到更少的工作节点上,允许将空闲工作节点释放回作业管理器。DynMo 支持单节点多 GPU 系统和多节点 GPU 集群,并可用于实际部署。与 Megatron-LM 和 DeepSpeed 等静态分布式训练解决方案相比,DynMo 将动态 GPT 模型的端到端训练速度分别提高了:MoEs 最高 1.23 倍,参数剪枝 3.18 倍,层冻结 2.23 倍,稀疏注意力 4.02 倍,提前退出 4.52 倍,MoDs 1.17 倍。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑