AdaLomo: Low-memory Optimization with Adaptive Learning Rate

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Lv, Kai, Yan, Hang, Guo, Qipeng, Lv, Haijun, Qiu, Xipeng
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914826152837120
author Lv, Kai
Yan, Hang
Guo, Qipeng
Lv, Haijun
Qiu, Xipeng
author_facet Lv, Kai
Yan, Hang
Guo, Qipeng
Lv, Haijun
Qiu, Xipeng
contents Large language models have achieved remarkable success, but their extensive parameter size necessitates substantial memory for training, thereby setting a high threshold. While the recently proposed low-memory optimization (LOMO) reduces memory footprint, its optimization technique, akin to stochastic gradient descent, is sensitive to hyper-parameters and exhibits suboptimal convergence, failing to match the performance of the prevailing optimizer for large language models, AdamW. Through empirical analysis of the Adam optimizer, we found that, compared to momentum, the adaptive learning rate is more critical for bridging the gap. Building on this insight, we introduce the low-memory optimization with adaptive learning rate (AdaLomo), which offers an adaptive learning rate for each parameter. To maintain memory efficiency, we employ non-negative matrix factorization for the second-order moment estimation in the optimizer state. Additionally, we suggest the use of a grouped update normalization to stabilize convergence. Our experiments with instruction-tuning and further pre-training demonstrate that AdaLomo achieves results on par with AdamW, while significantly reducing memory requirements, thereby lowering the hardware barrier to training large language models. The code is accessible at https://github.com/OpenLMLab/LOMO.
format Preprint
id arxiv_https___arxiv_org_abs_2310_10195
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle AdaLomo: Low-memory Optimization with Adaptive Learning Rate
Lv, Kai
Yan, Hang
Guo, Qipeng
Lv, Haijun
Qiu, Xipeng
Machine Learning
Computation and Language
Large language models have achieved remarkable success, but their extensive parameter size necessitates substantial memory for training, thereby setting a high threshold. While the recently proposed low-memory optimization (LOMO) reduces memory footprint, its optimization technique, akin to stochastic gradient descent, is sensitive to hyper-parameters and exhibits suboptimal convergence, failing to match the performance of the prevailing optimizer for large language models, AdamW. Through empirical analysis of the Adam optimizer, we found that, compared to momentum, the adaptive learning rate is more critical for bridging the gap. Building on this insight, we introduce the low-memory optimization with adaptive learning rate (AdaLomo), which offers an adaptive learning rate for each parameter. To maintain memory efficiency, we employ non-negative matrix factorization for the second-order moment estimation in the optimizer state. Additionally, we suggest the use of a grouped update normalization to stabilize convergence. Our experiments with instruction-tuning and further pre-training demonstrate that AdaLomo achieves results on par with AdamW, while significantly reducing memory requirements, thereby lowering the hardware barrier to training large language models. The code is accessible at https://github.com/OpenLMLab/LOMO.
title AdaLomo: Low-memory Optimization with Adaptive Learning Rate
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2310.10195