Nesterov Method for Asynchronous Pipeline Parallel Optimization
Thalaiyasingam Ajanthan, Sameera Ramasinghe, Yan Zuo, Gil Avraham, Alexander Long
TL;DR
This work tackles gradient staleness in asynchronous pipeline parallel optimization by introducing a Nesterov Accelerated Gradient variant with delay correction in the weight space. The method modifies the look-ahead in NAG to discount gradient contributions by $(1-\gamma_t)$ and evaluates gradients at delayed look-ahead points, yielding sublinear convergence for convex, smooth objectives with fixed delay. Empirically, it substantially outperforms existing asynchronous methods and even surpasses synchronous GPipe on decoders-only language models up to 1B parameters, including decentralized SWARM training; a memory-efficient no-weight-stash variant also shows competitive performance. The results establish asynchronous optimization as a viable option for large-scale language modeling and provide a practical, convergent approach for 100% pipeline utilization in both centralized and decentralized settings.
Abstract
Pipeline Parallelism (PP) enables large neural network training on small, interconnected devices by splitting the model into multiple stages. To maximize pipeline utilization, asynchronous optimization is appealing as it offers 100% pipeline utilization by construction. However, it is inherently challenging as the weights and gradients are no longer synchronized, leading to stale (or delayed) gradients. To alleviate this, we introduce a variant of Nesterov Accelerated Gradient (NAG) for asynchronous optimization in PP. Specifically, we modify the look-ahead step in NAG to effectively address the staleness in gradients. We theoretically prove that our approach converges at a sublinear rate in the presence of fixed delay in gradients. Our experiments on large-scale language modelling tasks using decoder-only architectures with up to 1B parameters, demonstrate that our approach significantly outperforms existing asynchronous methods, even surpassing the synchronous baseline.
