arXiv:2502.07846cs.PFcs.LG2025-02被引 3

分析大模型训练中GPU内存消耗的底层机制

Memory Analysis on the Training Course of DeepSeek Models

  • 从微批量大小、激活重计算等维度拆解内存影响因素
  • 揭示3D并行与ZeRO优化对显存占用的关键作用
  • 适合关注大模型训练效率与资源规划的研究者

本文对DeepSeek-v2和DeepSeek-v3等模型训练过程中的GPU内存消耗进行了理论分析,旨在明确不同分布式训练配置下的设备级内存需求。重点考察了微批量大小、激活重计算策略、3D并行及ZeRO优化等关键因素对内存使用的影响。需要强调的是,本文探讨的训练策略并非DeepSeek官方配置,而是为深入理解大规模混合专家模型训练中的内存动态而设计。

原文摘要 · Abstract (English)

We present a theoretical analysis of GPU memory consumption during the training of DeepSeek models such as DeepSeek-v2 and DeepSeek-v3. Our primary objective is to clarify the device-level memory requirements associated with various distributed training configurations. Specifically, we examine critical factors influencing memory usage, including micro-batch size, activation recomputation policies, 3D parallelism, and ZeRO optimizations. It is important to emphasize that the training policies discussed in this report are not representative of DeepSeek's official configurations. Instead, they are explored to provide a deeper understanding of memory dynamics in training of large-scale mixture-of-experts model.

大模型训练显存分析分布式训练

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