SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.05270 · 2024

APOLLO: SGD-like Memory, AdamW-level Performance

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2412.05270.json · badge: /api/ran/2412.05270.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
zhuhanqing/APOLLO canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhuhanqing/APOLLO/utils/modeling_llama.py
pointer only (licence: NONE) · get_code("f725bc2d76076485")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhuhanqing/APOLLO when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

max_train_tokens_to_number Ran
ran, honoured the contract we drafted
zhuhanqing/APOLLO/utils/argparse.py
pointer only (licence: NOASSERTION) · get_code("fef15e00e18cb2e3")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

next_seed Ran
ran, honoured the contract we drafted
zhuhanqing/APOLLO/apollo_torch/random_projector.py
pointer only (licence: NOASSERTION) · get_code("79cccd597fa5d84b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_model_for_int8_training_simulation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zhuhanqing/APOLLO/utils/fake_quantization.py
pointer only (licence: NOASSERTION) · get_code("e48f9d860da3434a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

rotate_half Ran
ran; our contract draft was wrong, not the code
zhuhanqing/APOLLO/utils/modeling_llama.py
pointer only (licence: NONE) · get_code("b99eea6376d1e212")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhuhanqing/APOLLO when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

stable_randn Ran
ran; our contract draft was wrong, not the code
zhuhanqing/APOLLO/apollo_torch/random_projector.py
pointer only (licence: NOASSERTION) · get_code("efcffc3e39a1020d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_args_torchrun_main Not yet run
unverified (harvested, no recorded run)
zhuhanqing/APOLLO/utils/argparse.py
pointer only (licence: NOASSERTION) · get_code("2cdd377d5ff74882")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
zhuhanqing/APOLLO/utils/argparse.py
pointer only (licence: NOASSERTION) · get_code("dc86d6e2692ce573")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

setup_dataset Not yet run
unverified (harvested, no recorded run)
zhuhanqing/APOLLO/utils/dataloader.py
pointer only (licence: NOASSERTION) · get_code("85da4c29558f6526")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, zhuhanqing/APOLLO (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 2 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
rotate_half 360 other papers
217 dated earlier, 10 the same month, 124 later, 6 same year, order not determinable, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
apply_rotary_pos_emb 83 other papers
63 dated earlier, 18 later, 2 same year, order not determinable · 6 only as an assembly brick
2306.15595 (2023-06)
Extending Context Window of Large Language Models via Positional Interpolation
2307.05695 (2023-07)
ReLoRA: High-Rank Training Through Low-Rank Updates
2307.06945 (2023-07)
In-context Autoencoder for Context Compression in a Large Language Model
and 80 more not named here
check_args_torchrun_main 1 other paper
1 dated earlier
2407.08296 (2024-07)
Q-GaLore: Quantized GaLore with INT4 Projection and Layer-Adaptive Low-Rank Gradients

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.05270")
get_code_for_paper("2412.05270")
have("2412.05270")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2412.05270.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2412.05270.svg)](https://syntology.ai/paper/2412.05270)

Connect an agent — have() is free.