Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

AdaLomo: Low-memory Optimization with Adaptive Learning Rate

About

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.

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

Related benchmarks

TaskDatasetResultRank
Training Efficiency MeasurementLlama S=512 on B200 3.1-8B (base variant)
Peak Memory Usage (GiB)3.1
58
Efficiency BenchmarkingLlama 8B base variant on H200 3.1
Per-step Latency (ms)643.8
49
Training Efficiency ProfilingQwen3 family S=512 (train profiling)
Per-Step Latency (ms)527.1
43
Training Efficiency ProfilingQwen3 family S=1024 (train profiling)
Per-Step Latency (ms)517.5
42
Training Efficiency ProfilingQwen3 profiling S=2048 (train)
Per-Step Latency (ms)525
40
Training Efficiency ProfilingQwen3 profiling S=4096 (train)
Per-step Latency (ms)534.1
39
Training Efficiency ProfilingQwen3 (train)
Peak GPU Memory3.1
31
Training Iteration EfficiencyQwen3-0.6B base (train)
Per-step Latency (ms)527.1
18
LLM Training Step PerformanceQwen3-1.7B S=2048 (base variant)
Per-Step Latency (ms)584.2
9
Training Efficiency MeasurementLlama base variant (S=1024) on B200 3.1-8B
Latency (ms)715.2
9
Showing 10 of 20 rows

Other info

Follow for update