MeCeFO:通过容错优化增强 LLM 训练鲁棒性
MeCeFO: Enhancing LLM Training Robustness via Fault-Tolerant Optimization
AI总结:
本文提出 MeCeFO 容错优化算法,通过跳层、重计算与低秩梯度近似降低节点故障接管开销,并在保持收敛率的同时显著提升 LLM 分布式训练弹性。
摘要:
随着分布式优化扩展以满足大语言模型(LLM)训练需求,硬件故障变得越来越不可忽视。现有容错训练方法通常会引入显著的计算或内存开销,需要额外资源。为应对这一挑战,我们提出了内存与计算高效的容错优化方法 MeCeFO,这是一种以最小开销确保鲁棒训练的新颖算法。当计算节点发生故障时,MeCeFO 会将其训练任务无缝转移到相邻节点,同时采用内存和计算高效的算法优化,以最小化相邻节点同时处理两个任务所承受的额外工作负载。MeCeFO 利用三项关键算法设计:(i)Skip-connection,在反向传播期间丢弃多头注意力(MHA)模块,以实现内存和计算高效的近似;(ii)Recomputation,用于降低前馈网络(FFN)中的激活内存;(iii)低秩梯度近似,可高效估计 FFN 权重矩阵梯度。理论上,MeCeFO 达到与传统分布式训练相匹配的收敛率,即 O(1/√(nT)),其中 n 是数据并行规模,T 是迭代次数。实验上,MeCeFO 在高故障率下保持鲁棒性能,吞吐量仅下降 4.18%,展现出比以往 SOTA 方法高 5.0 倍至 6.7 倍的弹性。代码可在 https://github.com/pkumelon/MeCeFO 获取。
英文摘要:
As distributed optimization scales to meet the demands of Large Language Model (LLM) training, hardware failures become increasingly non-negligible. Existing fault-tolerant training methods often introduce significant computational or memory overhead, demanding additional resources. To address this challenge, we propose Memory- and Computation-efficient Fault-tolerant Optimization (MeCeFO), a novel algorithm that ensures robust training with minimal overhead. When a computing node fails, MeCeFO seamlessly transfers its training task to a neighboring node while employing memory- and computation-efficient algorithmic optimizations to minimize the extra workload imposed on the neighboring node handling both tasks. MeCeFO leverages three key algorithmic designs: (i) Skip-connection, which drops the multi-head attention (MHA) module during backpropagation for memory- and computation-efficient approximation; (ii) Recomputation, which reduces activation memory in feedforward networks (FFNs); and (iii) Low-rank gradient approximation, enabling efficient estimation of FFN weight matrix gradients. Theoretically, MeCeFO matches the convergence rate of conventional distributed training, with a rate of $\mathcal{O}(1/\sqrt{nT})$, where n is the data parallelism size and T is the number of iterations. Empirically, MeCeFO maintains robust performance under high failure rates, incurring only a 4.18% drop in throughput, demonstrating 5.0$\times$ to 6.7$\times$ greater resilience than previous SOTA approaches. Codes are available at https://github.com/pkumelon/MeCeFO.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。