arXiv:2504.03655cs.DCcs.LG2025-04被引 1

发现训练大模型时,内存和带宽比算力更重要。

Memory and Bandwidth are All You Need for Fully Sharded Data Parallel

  • 分析全分片数据并行下硬件与模型规模的匹配关系。
  • 揭示集群互联带宽和显存大小是主要瓶颈。
  • 适合大规模模型训练的硬件配置优化参考。

Transformer模型在语言处理等领域取得突破,模型规模可扩展性对性能至关重要。然而,即使在现代高性能硬件上,训练大模型仍面临挑战。现有研究多关注优化训练分布以降低内存占用、提升速度,却忽视了模型规模与硬件限制带来的可扩展性问题。本文深入分析了不同硬件集群上使用全分片数据并行(FSDP)训练大模型时的计算、内存与网络需求,探究模型规模与硬件配置间的复杂关系,识别出实现最大模型与硬件效率、有效序列长度管理及最优训练吞吐量的关键配置。研究发现,集群互联带宽与GPU显存大小相比计算性能更具决定性,二者协同作用形成训练效率瓶颈。通过理论分析、仿真与实测验证,揭示了硬件限制对训练效能的影响,确定关键硬件阈值及网络连通性的作用。研究结果促使重新评估训练策略,为用户找到硬件最优的FSDP配置提供指导,提升大规模Transformer模型的训练效率。

原文摘要 · Abstract (English)

Transformer models have revolutionized a wide spectrum of disciplines, especially in language processing. The recent success has proven that model size scalability is crucial for achieving superior performance metrics. However, training large transformer models is challenging even on modern hardware with powerful GPUs and high-speed interconnects. Existing studies primarily focus on optimizing model training distribution strategies to minimize memory footprint and enhance training speed, often overlooking the scalability challenges related to model size and hardware constraints. To address this oversight, we thoroughly investigate computational, memory, and network demands of training large transformers using the Fully Sharded Data Parallel (FSDP) distributed strategy across different hardware clusters. We explore the intricate relationships between model size and hardware setups to identify configurations that ensure maximum model and hardware efficiency, effective sequence length management, and optimal training throughput. A significant finding of our study is the critical interplay of the cluster's connection bandwidth and GPU memory size compared to the computational performance of GPUs. This interplay limits training efficiency, underscoring the role of both hardware characteristics as a possible bottleneck. By integrating theoretical analysis with simulations and empirical tests, we demonstrate how hardware limitations affect training efficacy, identifying key hardware thresholds and the impact of network connectivity. Our findings prompt a reassessment of training strategies guiding users on the way to finding hardware-optimal FSDP configurations, enhancing training efficiency for large-scale transformer models.

分布式训练硬件优化FSDP大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。