Papers › APOLLO: SGD-like Memory, AdamW-level Performance

APOLLO: SGD-like Memory, AdamW-level Performance

6 Dec 2024arXiv:2412.05270archive 2025-07-28

Hanqing Zhu, Zhenyu Zhang, Wenyan Cong, Xi Liu, Sem Park, Vikas Chandra, Bo Long, David Z. Pan, Zhangyang Wang, Jinwon Lee

Large language models (LLMs) are notoriously memory-intensive during training, particularly with the popular AdamW optimizer. This memory burden necessitates using more or higher-end GPUs or reducing batch sizes, limiting training scalability and throughput. To address this, various memory-efficient optimizers have been proposed to reduce optimizer memory usage. However, they face critical challenges: (i) reliance on costly SVD operations; (ii) significant performance trade-offs compared to AdamW; and (iii) still substantial optimizer memory overhead to maintain competitive performance. In this work, we identify that AdamW's learning rate adaptation rule can be effectively coarsened as a structured learning rate update. Based on this insight, we propose Approximated Gradient Scaling for Memory-Efficient LLM Optimization (APOLLO), which approximates learning rate scaling using an auxiliary low-rank optimizer state based on pure random projection. This structured learning rate update rule makes APOLLO highly tolerant to further memory reductions while delivering comparable pre-training performance. Even its rank-1 variant, APOLLO-Mini, achieves superior pre-training performance compared to AdamW with SGD-level memory costs. Extensive experiments demonstrate that the APOLLO series performs on-par with or better than AdamW, while achieving greater memory savings by nearly eliminating the optimization states of AdamW. These savings provide significant system-level benefits: (1) Enhanced Throughput: 3x throughput on an 8xA100-80GB setup compared to AdamW by supporting 4x larger batch sizes. (2) Improved Model Scalability: Pre-training LLaMA-13B with naive DDP on A100-80GB GPUs without system-level optimizations. (3) Low-End GPU Friendly Pre-training: Pre-training LLaMA-7B on a single GPU using less than 12 GB of memory with weight quantization.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2412.05270")

Code

Syntology Ran 2 of 9 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran · fixture could not drive it.

By repository: official repository: 9 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

zhuhanqing/APOLLO officialmentioned in papermentioned on GitHubpytorchNOASSERTION report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

9 samples harvested; 2 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
1ran · fixture could not drive it
7unverified

Licence: 9 of the 9 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from zhuhanqing/APOLLO. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

apply_rotary_pos_emb zhuhanqing/APOLLO/utils/modeling_llama.py official repository ran · fixture could not drive it no licence file found · pointer only · f725bc2d76076485 · report
rotate_half zhuhanqing/APOLLO/utils/modeling_llama.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · b99eea6376d1e212 · report
check_args_torchrun_main zhuhanqing/APOLLO/utils/argparse.py official repository unverified licence not identified · pointer only · 2cdd377d5ff74882 · report
max_train_tokens_to_number zhuhanqing/APOLLO/utils/argparse.py official repository unverified licence not identified · pointer only · fef15e00e18cb2e3 · report
next_seed zhuhanqing/APOLLO/apollo_torch/random_projector.py official repository unverified licence not identified · pointer only · 79cccd597fa5d84b · report
parse_args zhuhanqing/APOLLO/utils/argparse.py official repository unverified licence not identified · pointer only · dc86d6e2692ce573 · report
prepare_model_for_int8_training_simulation zhuhanqing/APOLLO/utils/fake_quantization.py official repository unverified licence not identified · pointer only · e48f9d860da3434a · report
setup_dataset zhuhanqing/APOLLO/utils/dataloader.py official repository unverified licence not identified · pointer only · 85da4c29558f6526 · report
stable_randn zhuhanqing/APOLLO/apollo_torch/random_projector.py official repository unverified licence not identified · pointer only · efcffc3e39a1020d · report

Tasks

Quantization

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamWApollo

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections