Eliminating the Gradient Buffer: Algebraically Exact In-Backward Momentum with Two-Thirds Less Memory for Dense and Routed Models

Training with gradient accumulation keeps a full-size gradient buffer next to the weights and optimizer state: 16 bytes per parameter with AdamW and 12 with Muon, before any activation is stored. We show that for momentum optimizers this buffer is unnecessary. Each micro-batch's gradient is folded into the momentum during the backward pass and freed, with micro-batch weights that make the result equal to accumulate-then-update, and a snapshot of the previous momentum (about one byte per parameter) recovers Nesterov momentum, the global gradient norm and clipping, all exact in exact arithmetic. The same byte can instead hold an int8 running mean of the update's gradient, which keeps the norm exact even under abrupt gradient changes; we recommend it in practice. With momentum in blockwise int8 and weights in bf16, both stochastically rounded, a weight matrix's training state falls by 67% against Muon and 75% against AdamW (12 and 16 to 4 bytes per parameter). For mixture-of-experts layers the absorb runs inside the grouped weight-gradient kernel and each expert's momentum is clocked by the tokens it receives. With Muon's update (StreamMuon), a 113M Transformer comes within 0.003 bits per byte of Muon over three seeds (1.148 ± 0.007 vs 1.145 ± 0.007); streaming costs no throughput, and where Muon must recompute activations to fit, StreamMuon is 1.18–1.22× faster. On a standard mixture-of-experts Transformer it also matches Muon, and with SGD-Nesterov on CIFAR-10 the streamed form matches fp32 SGD. On one 8 GB GPU, AdamW, Muon and 8-bit Muon stop at 0.28B dense parameters; StreamMuon runs at 1.46B and its lighter variant at 2.0B, and for a standard MoE Transformer the largest model grows from 0.51B (8-bit Muon) to 1.31B (StreamMuon) and 1.71B (Lite). Code: https://github.com/amzker-labs/streamstate

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-25
DOI
https://doi.org/10.5281/zenodo.24543999
Primary Topic
Stochastic Gradient Optimization Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Eliminating the Gradient Buffer: Algebraically Exact In-Backward Momentum with Two-Thirds Less Memory for Dense and Routed Models

Ammar Patel
1 links
Zenodo (CERN European Organization for Nuclear Research)
Stochastic Gradient Optimization Techniques
preprint

Eliminating the Gradient Buffer: Algebraically Exact In-Backward Momentum with Two-Thirds Less Memory for Dense and Routed Models

Ammar Patel
preprint en

Abstract

Training with gradient accumulation keeps a full-size gradient buffer next to the weights and optimizer state: 16 bytes per parameter with AdamW and 12 with Muon, before any activation is stored. We show that for momentum optimizers this buffer is unnecessary. Each micro-batch's gradient is folded into the momentum during the backward pass and freed, with micro-batch weights that make the result equal to accumulate-then-update, and a snapshot of the previous momentum (about one byte per parameter) recovers Nesterov momentum, the global gradient norm and clipping, all exact in exact arithmetic. The same byte can instead hold an int8 running mean of the update's gradient, which keeps the norm exact even under abrupt gradient changes; we recommend it in practice. With momentum in blockwise int8 and weights in bf16, both stochastically rounded, a weight matrix's training state falls by 67% against Muon and 75% against AdamW (12 and 16 to 4 bytes per parameter). For mixture-of-experts layers the absorb runs inside the grouped weight-gradient kernel and each expert's momentum is clocked by the tokens it receives. With Muon's update (StreamMuon), a 113M Transformer comes within 0.003 bits per byte of Muon over three seeds (1.148 ± 0.007 vs 1.145 ± 0.007); streaming costs no throughput, and where Muon must recompute activations to fit, StreamMuon is 1.18–1.22× faster. On a standard mixture-of-experts Transformer it also matches Muon, and with SGD-Nesterov on CIFAR-10 the streamed form matches fp32 SGD. On one 8 GB GPU, AdamW, Muon and 8-bit Muon stop at 0.28B dense parameters; StreamMuon runs at 1.46B and its lighter variant at 2.0B, and for a standard MoE Transformer the largest model grows from 0.51B (8-bit Muon) to 1.31B (StreamMuon) and 1.71B (Lite). Code: https://github.com/amzker-labs/streamstate

Zenodo (CERN European Organization for Nuclear Research)
Stochastic Gradient Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon