AsyncHZP通过异步调度优化大模型训练,提升效率且无需复杂调参。
AsyncHZP: Hierarchical ZeRO Parallelism with Asynchronous Scheduling for Scalable LLM Training
- 自适应分片参数与梯度,减少通信开销。
- 多流异步调度实现计算与通信重叠,降低延迟。
- 适用于大规模稠密及MoE模型训练,稳定性强。
当前在大规模集群上训练语言模型的效率和可扩展性仍面临关键瓶颈。主流的ND并行方法通常繁琐复杂,而灵活的零冗余优化器(ZeRO)则常受通信开销制约。本文提出异步分层零并行(AsyncHZP),一种新型异步版ZeRO,旨在实现卓越性能的同时保持简单性与内存高效。与传统ZeRO过度细粒度分片导致通信低效不同,AsyncHZP在不同副本组间自适应重新分片参数、梯度和优化器状态,优化设备内存利用并显著降低通信开销。此外,设计了多流异步调度机制,将参数all-gather和梯度reduce-scatter操作在专用后台线程中执行,有效重叠通信与计算,且内存碎片极低。在稠密模型和混合专家(MoE)模型上的实证评估表明,AsyncHZP在大规模下保持稳定,持续优于经典ND并行,在无需复杂策略调优的情况下达到业界领先性能,简化了高效大规模训练路径。
原文摘要 · Abstract (English)
The training efficiency and scalability of language models on massive clusters currently remain a critical bottleneck. Mainstream approaches like ND parallelism are often cumbersome and complex, while flexible alternatives such as the Zero Redundancy Optimizer (ZeRO) are frequently hampered by communication overhead. In this paper, we propose Asynchronous Hierarchical Zero Parallelism (AsyncHZP), a novel asynchronous variant of ZeRO designed to achieve superior performance while maintaining simplicity and memory efficiency. Unlike traditional ZeRO, which employs over-fine-grained sharding that can lead to inefficient communication, AsyncHZP adaptively reshards parameters, gradients, and optimizer states across different replica groups. This strategy optimizes device memory utilization and significantly reduces communication overhead. In addition, we also design a multi-stream asynchronous scheduling method that executes parameter all-gather and gradient reduce-scatter operations in dedicated background threads, effectively overlapping communication with computation while incurring negligible memory fragmentation. Empirical evaluations on both Dense and Mixture-of-Experts (MoE) models confirm that AsyncHZP maintains robust stability at scale. It consistently outperforms classic ND parallelism, achieving state-of-the-art performance without complex strategic tuning, thereby simplifying the path to efficient large-scale training.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。