根据梯度熵动态调整压缩率,显著降低大模型训练通信开销。
EDGC: Entropy-driven Dynamic Gradient Compression for Efficient LLM Training
- 基于梯度熵变化动态调节压缩率,兼顾效率与误差。
- 在32卡V100和64卡H100上分别提速46.45%和16.13%。
- 适合大规模分布式LLM训练场景,提升通信效率。
训练大语言模型(LLMs)面临计算资源和内存容量的严峻挑战。尽管分布式训练技术可缓解这些问题,但仍存在显著的通信开销。现有方法多依赖静态梯度压缩,忽视训练过程中梯度的动态特性,导致性能下降。本文提出一种基于熵驱动的动态梯度压缩框架EDGC,通过梯度熵变化自适应调整压缩率,平衡压缩效率与误差。其核心包括:下采样法高效估计梯度熵,降低计算开销;建立压缩率与梯度熵的理论关联,支持更优决策;窗口式机制动态调整流水线各阶段压缩率。我们在32块NVIDIA V100和64块NVIDIA H100集群上分别训练GPT2-2.5B和GPT2-12.1B模型。结果表明,EDGC将通信延迟和训练时间分别减少最多46.45%和16.13%,同时保持模型精度。
原文摘要 · Abstract (English)
Training large language models (LLMs) poses significant challenges regarding computational resources and memory capacity. Although distributed training techniques help mitigate these issues, they still suffer from considerable communication overhead. Existing approaches primarily rely on static gradient compression to enhance communication efficiency; however, these methods neglect the dynamic nature of evolving gradients during training, leading to performance degradation. Accelerating LLM training via compression without sacrificing performance remains a challenge. In this paper, we propose an entropy-driven dynamic gradient compression framework called EDGC. The core concept is to adjust the compression rate during LLM training based on the evolving trends of gradient entropy, taking into account both compression efficiency and error. EDGC consists of three key components.First, it employs a down-sampling method to efficiently estimate gradient entropy, reducing computation overhead. Second, it establishes a theoretical model linking compression rate with gradient entropy, enabling more informed compression decisions. Lastly, a window-based adjustment mechanism dynamically adapts the compression rate across pipeline stages, improving communication efficiency and maintaining model performance. We implemented EDGC on a 32-NVIDIA-V100 cluster and a 64-NVIDIA-H100 cluster to train GPT2-2.5B and GPT2-12.1B, respectively. The results show that EDGC significantly reduces communication latency and training time by up to 46.45% and 16.13% while preserving LLM accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。