AdaLomo: Low-memory Optimization with Adaptive Learning Rate

Kai Lv, Hang Yan, Qipeng Guo, Haijun Lv, Xipeng Qiu


Abstract
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 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 and exhibits superior convergence performance compared to LOMO theoretically. To maintain memory efficiency, we employ non-negative matrix factorization for the second-order moment estimation. 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.
Anthology ID:
2024.findings-acl.742
Volume:
Findings of the Association for Computational Linguistics ACL 2024
Month:
August
Year:
2024
Address:
Bangkok, Thailand and virtual meeting
Editors:
Lun-Wei Ku, Andre Martins, Vivek Srikumar
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
12486–12502
Language:
URL:
https://aclanthology.org/2024.findings-acl.742
DOI:
Bibkey:
Cite (ACL):
Kai Lv, Hang Yan, Qipeng Guo, Haijun Lv, and Xipeng Qiu. 2024. AdaLomo: Low-memory Optimization with Adaptive Learning Rate. In Findings of the Association for Computational Linguistics ACL 2024, pages 12486–12502, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
Cite (Informal):
AdaLomo: Low-memory Optimization with Adaptive Learning Rate (Lv et al., Findings 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.findings-acl.742.pdf