Large language models (LLMs) such as GPT-3, OPT, and LLaMA have demonstrated remarkable accuracy in a wide range of tasks. However, training these models can incur significant expenses, often requiring tens of thousands of GPUs for months of continuous operation. Typically, this training is carried out in specialized GPU clusters equipped with homogeneous high-speed Remote Direct Memory Access (RDMA) network interface cards (NICs). The acquisition and maintenance of such dedicated clusters is challenging. Current LLM training frameworks, like Megatron-LM and Megatron-DeepSpeed, focus primarily on optimizing training within homogeneous cluster settings. In this paper, we introduce Holmes, a training framework for LLMs that employs thoughtfully crafted data and model parallelism strategies over the heterogeneous NIC environment. Our primary technical contribution lies in a novel scheduling method that intelligently allocates distinct computational tasklets in LLM training to specific groups of GPU devices based on the characteristics of their connected NICs. Furthermore, our proposed framework, utilizing pipeline parallel techniques, demonstrates scalability to multiple GPU clusters, even in scenarios without high-speed interconnects between nodes in distinct clusters. We conducted comprehensive experiments that involved various scenarios in the heterogeneous NIC environment. In most cases, our framework achieves performance levels close to those achievable with homogeneous RDMA-capable networks (InfiniBand or RoCE), significantly exceeding training efficiency within the pure Ethernet environment. Additionally, we verified that our framework outperforms other mainstream LLM frameworks under heterogeneous NIC environment in terms of training efficiency and can be seamlessly integrated with them.
翻译:大语言模型(LLMs)如GPT-3、OPT和LLaMA在广泛的任务中展现出卓越的准确性。然而,训练这些模型会产生高昂成本,通常需要数万张GPU连续运行数月。此类训练通常在配备同构高速远程直接内存访问(RDMA)网卡的专用GPU集群中进行。获取和维护这类专用集群极具挑战性。现有的LLM训练框架(如Megatron-LM和Megatron-DeepSpeed)主要聚焦于同构集群环境下的训练优化。本文提出Holmes,一种针对异构NIC环境的LLM训练框架,通过精心设计的数据并行与模型并行策略实现高效训练。我们的核心技术创新在于一种新型调度方法,该方法根据GPU设备所连接网卡的特性,智能地将LLM训练中的不同计算任务分配至特定GPU设备组。此外,所提出的框架利用流水线并行技术,即使在不同集群节点间缺乏高速互联的情况下,仍能扩展至多个GPU集群。我们开展了涵盖异构NIC环境下多种场景的综合实验。在大多数情况下,我们的框架实现了接近同构RDMA网络(InfiniBand或RoCE)的性能水平,显著高于纯以太网环境的训练效率。同时,我们验证了本框架在异构NIC环境下的训练效率优于其他主流LLM框架,并能与之无缝集成。