Saved in:
Bibliographic Details
Main Authors: Yu, Shuhua, Zhou, Ding, Xie, Cong, Xu, An, Zhang, Zhi, Liu, Xin, Kar, Soummya
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.17866
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913724982362112
author Yu, Shuhua
Zhou, Ding
Xie, Cong
Xu, An
Zhang, Zhi
Liu, Xin
Kar, Soummya
author_facet Yu, Shuhua
Zhou, Ding
Xie, Cong
Xu, An
Zhang, Zhi
Liu, Xin
Kar, Soummya
contents Pre-training Transformer models is resource-intensive, and recent studies have shown that sign momentum is an efficient technique for training large-scale deep learning models, particularly Transformers. However, its application in distributed training remains underexplored. This paper investigates a novel communication-efficient distributed sign momentum method with multiple local steps, to cope with the scenarios where communicating at every step is prohibitive. Our proposed method allows for a broad class of base optimizers for local steps, and uses sign momentum in the global step, where momentum is generated from differences accumulated during local steps. For generic base optimizers, by approximating the sign operator with a randomized version that acts as a continuous analog in expectation, we present a general convergence analysis, which specializes to an $O(1/\sqrt{T})$ rate for a particular instance. When local step is stochastic gradient descent, we show an optimal $O(1/T^{1/4})$ rate in terms of $\ell_1$ gradient norm for nonconvex smooth cost functions. We extensively evaluate our method on the pre-training of various sized GPT-2 models from scratch, and the empirical results show significant improvement compared to other distributed methods with multiple local steps.
format Preprint
id arxiv_https___arxiv_org_abs_2411_17866
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Distributed Sign Momentum with Local Steps for Training Transformers
Yu, Shuhua
Zhou, Ding
Xie, Cong
Xu, An
Zhang, Zhi
Liu, Xin
Kar, Soummya
Machine Learning
Pre-training Transformer models is resource-intensive, and recent studies have shown that sign momentum is an efficient technique for training large-scale deep learning models, particularly Transformers. However, its application in distributed training remains underexplored. This paper investigates a novel communication-efficient distributed sign momentum method with multiple local steps, to cope with the scenarios where communicating at every step is prohibitive. Our proposed method allows for a broad class of base optimizers for local steps, and uses sign momentum in the global step, where momentum is generated from differences accumulated during local steps. For generic base optimizers, by approximating the sign operator with a randomized version that acts as a continuous analog in expectation, we present a general convergence analysis, which specializes to an $O(1/\sqrt{T})$ rate for a particular instance. When local step is stochastic gradient descent, we show an optimal $O(1/T^{1/4})$ rate in terms of $\ell_1$ gradient norm for nonconvex smooth cost functions. We extensively evaluate our method on the pre-training of various sized GPT-2 models from scratch, and the empirical results show significant improvement compared to other distributed methods with multiple local steps.
title Distributed Sign Momentum with Local Steps for Training Transformers
topic Machine Learning
url https://arxiv.org/abs/2411.17866