Full text not available for this paper

Summary (Overview)

  • Identified failure mode: The paper identifies error accumulation as a critical instability mechanism in low-bit storage of EMA (Exponential Moving Average) optimizer states, where quantization errors are recursively fed into subsequent updates via the EMA recursion et+1=βet+ϵt+1e_{t+1} = \beta e_t + \epsilon_{t+1}.

  • Proposed method: BReD (Block Replay Dithering) combines classical subtractive dithering with deterministic seed replay and block-wise shared dither values, making unbiased, low-variance quantization practical for large-scale training without storing auxiliary random tensors.

  • Key theoretical insight: The paper proves that even tiny rounding bias (bb) can dominate the long-horizon error budget when the EMA decay factor β→1\beta \to 1, with the bias term scaling as ∥b∥2/(1−β)2\|b\|^2/(1-\beta)^2 versus the variance term scaling as σ2/(1−β2)\sigma^2/(1-\beta^2).

  • Comprehensive evaluation: BReD achieves stable 4-bit optimizer-state compression across 5 optimizers at 120M, AdamW/Muon at 1.1B and 3.4B, and supervised fine-tuning at 7B, with PPL shifts ≤ 0.5 in pretraining and ≤ 0.2 in fine-tuning.

  • Practical impact: 4-bit BReD reduces persistent optimizer-state storage by 78.9%–86.0% with only 5.1%–16.0% throughput reduction, while 3-bit BReD remains convergent as an aggressive alternative.


Introduction and Theoretical Foundation

Background and Motivation

Large-scale model training requires substantial memory for optimizer auxiliary states such as moment estimates (AdamW), momentum buffers (Muon), and preconditioner states (SOAP). Low-bit storage of these states is a direct way to reduce memory footprint, but aggressive quantization often destabilizes training. Prior approaches (e.g., low-bit Adam variants, low-bit Muon, low-bit Shampoo) are often tied to specific optimizer families or require retuned hyperparameters.

The key insight is that EMA optimizer states are not quantized once — at every training step they are dequantized, updated, requantized, and written back. This iterative process creates a feedback loop where quantization errors propagate through the EMA recursion.

Theoretical Foundation: Quantized-EMA Error Model

The paper formalizes the error accumulation mechanism. Consider a full-precision EMA state and its low-bit stored counterpart:

st+1=βst+(1−β)ut+1,0<β<1s_{t+1} = \beta s_t + (1-\beta)u_{t+1}, \quad 0 < \beta < 1 st+1′=βstdq+(1−β)ut+1s'_{t+1} = \beta s^{dq}_t + (1-\beta)u_{t+1} ϵt+1:=st+1dq−st+1′,et:=stdq−st\epsilon_{t+1} := s^{dq}_{t+1} - s'_{t+1}, \quad e_t := s^{dq}_t - s_t

where ut+1u_{t+1} is the per-step update term, stdqs^{dq}_t is the dequantized stored state, ϵt+1\epsilon_{t+1} is the injected quantization error, and ete_t is the accumulated state error. Direct subtraction yields the core recursion:

et+1=βet+ϵt+1(2)e_{t+1} = \beta e_t + \epsilon_{t+1} \tag{2}

Key Theoretical Results

Lemma 3.1 (Bias induces persistent error): If E[ϵt]=b\mathbb{E}[\epsilon_t] = b, then:

E[et]=βtE[e0]+1−βt1−βb→t→∞b1−β(3)\mathbb{E}[e_t] = \beta^t \mathbb{E}[e_0] + \frac{1-\beta^t}{1-\beta} b \xrightarrow[t\to\infty]{} \frac{b}{1-\beta} \tag{3}

Even a small nonzero bias bb yields a persistent error scaling as O(∥b∥/(1−β))O(\|b\|/(1-\beta)) when β→1\beta \to 1.

Theorem 3.2 (Steady-state second moment): If ϵt=b+ξt\epsilon_t = b + \xi_t with independent zero-mean ξt\xi_t and E∥ξt∥F2=σ2\mathbb{E}\|\xi_t\|^2_F = \sigma^2, then:

lim⁡t→∞E∥et∥F2=∥b∥F2(1−β)2⏟mean (bias) term+σ21−β2⏟variance (noise) term(4)\lim_{t\to\infty} \mathbb{E}\|e_t\|^2_F = \underbrace{\frac{\|b\|^2_F}{(1-\beta)^2}}_{\text{mean (bias) term}} + \underbrace{\frac{\sigma^2}{1-\beta^2}}_{\text{variance (noise) term}} \tag{4}

Remark 3.3 (Mean dominates when β→1\beta \to 1): The ratio between mean and variance terms:

∥b∥F2/(1−β)2σ2/(1−β2)=(1+β)∥b∥F2(1−β)σ2(5)\frac{\|b\|^2_F/(1-\beta)^2}{\sigma^2/(1-\beta^2)} = \frac{(1+\beta)\|b\|^2_F}{(1-\beta)\sigma^2} \tag{5}

grows as 1/(1−β)1/(1-\beta) when β≈1\beta \approx 1, showing that even tiny bias dominates for large-β\beta EMA states like AdamW's second moment.


Methodology

Design Goals from Theory

The theoretical analysis motivates a two-step design rule:

  1. Remove systematic rounding bias first (since bias is amplified by 1/(1−β)1/(1-\beta))
  2. Control the remaining variance (since noise is amplified by 1/(1−β2)1/(1-\beta^2))

Interval Parameterization

For a scalar xx with neighboring grid points p0(x)≤x≤p1(x)p_0(x) \le x \le p_1(x):

Δ(x):=p1(x)−p0(x),α(x):=x−p0(x)Δ(x)∈[0,1](6)\Delta(x) := p_1(x) - p_0(x), \quad \alpha(x) := \frac{x - p_0(x)}{\Delta(x)} \in [0, 1] \tag{6}

Rounding chooses a binary endpoint indicator c∈{0,1}c \in \{0, 1\}:

c∈{0,1},x^=p0(x)+Δ(x)α^(7)c \in \{0, 1\}, \quad \hat{x} = p_0(x) + \Delta(x)\hat{\alpha} \tag{7}

The rounding–reconstruction gap is:

ϵelem(x):=x^−x=Δ(x)(α^−α(x))(8)\epsilon_{\text{elem}}(x) := \hat{x} - x = \Delta(x)(\hat{\alpha} - \alpha(x)) \tag{8}

Rounding Rules Compared

Nearest Rounding (NR): Deterministically picks nearest endpoint:

cnr(α):=1{α≥1/2}(9)c_{\text{nr}}(\alpha) := \mathbb{1}\{\alpha \ge 1/2\} \tag{9}
  • Efficient but can introduce biased errors for asymmetric data distributions.

Stochastic Rounding (SR): Draws u∼Unif(0,1)u \sim \text{Unif}(0,1):

csr(α;u):=1{u<α}(10)c_{\text{sr}}(\alpha; u) := \mathbb{1}\{u < \alpha\} \tag{10}
  • Unbiased: E[α^∣α]=α\mathbb{E}[\hat{\alpha}|\alpha] = \alpha, with Var(ϵelem∣x)=Δ(x)2α(1−α)≤Δ(x)2/4\text{Var}(\epsilon_{\text{elem}}|x) = \Delta(x)^2 \alpha(1-\alpha) \le \Delta(x)^2/4 (Eq. 11)
  • Can leave substantial residual noise.

Subtractive Dithering (SD): Draws u∼Unif(0,1)u \sim \text{Unif}(0,1), rounds dithered coordinate, reconstructs continuously:

csd(α;u):=1{α+u≥1}∈{0,1}(12)c_{\text{sd}}(\alpha; u) := \mathbb{1}\{\alpha + u \ge 1\} \in \{0, 1\} \tag{12} α^:=csd(α;u)−u+12,x^:=p0(x)+Δ(x)α^(13)\hat{\alpha} := c_{\text{sd}}(\alpha; u) - u + \frac{1}{2}, \quad \hat{x} := p_0(x) + \Delta(x)\hat{\alpha} \tag{13}

SD is unbiased with:

Var(ϵelem∣x)=Δ(x)2/12(14)\text{Var}(\epsilon_{\text{elem}}|x) = \Delta(x)^2/12 \tag{14}

which is α\alpha-independent, giving smaller worst-case conditional variance (Δ2/12\Delta^2/12 vs Δ2/4\Delta^2/4 for SR).

BReD Components

1. Deterministic Seed Replay (DSR): Regenerates dither values on the fly via a stateless keyed PRNG. For each EMA state tensor, assign a fixed state_id; at training step tt for block index jj:

κ(j,t):=(global_seed,state_id,t,j)(15)\kappa(j, t) := (\mathrm{global\_seed}, \mathrm{state\_id}, t, j) \tag{15} u←PRNG(κ(j,t))∈(0,1)(16)u \leftarrow \text{PRNG}(\kappa(j, t)) \in (0, 1) \tag{16}

This enables identical dither values at dequantization without storing random tensors.

2. Block-wise Randomization (BWR): Shares one random scalar per block of size BB, reducing PRNG calls from O(d)O(d) to O(d/B)O(d/B). For block-wise SR:

ci:=1{u(k)<α(xi)},i∈Bk(17)c_i := \mathbb{1}\{u^{(k)} < \alpha(x_i)\}, \quad i \in B_k \tag{17}

BWR preserves coordinate-wise marginal unbiasedness while introducing within-block correlation.

Full BReD Pipeline

At write time: For each block at step tt, generate a single dither via keyed PRNG (Eq. 16), apply subtractive dithering (Eqs. 12–13), store low-bit codes with block scale.

At read time: Replay the same u(k)u^{(k)} to decode and reconstruct the state.

BReD is typically combined with Microscaling data formats (MXFP4 by default for 4-bit).


Empirical Validation / Results

Pretraining Controls at 120M Scale

Table 1(a): Controlled 4-bit rounding comparison (NR, SR, BReD use identical scaling, grid, optimizer update, hyperparameters):

OptimizerFP32-StateNRSRBReD
AdamW18.3DivergedDivergedStable (18.7)
Muon17.8Degraded (31.0)Degraded (21.7)Stable (18.0)
NAdamW18.9DivergedDivergedStable (18.9)
SOAP17.6DivergedDivergedStable (18.1)
MARS18.7DivergedDivergedStable (18.9)

Table 1(b): Combination with optimizer-specific methods:

MethodAvg. acc. ↑ (Base → +BReD)PPL ↓ (Base → +BReD)
AdamW-LPMM40.3 → 40.5 (+0.2)18.7 → 18.4 (-0.3)
Muon-Grasp40.6 → 41.2 (+0.6)17.8 → 17.8 (+0.0)

Scale Check (1.1B and 3.4B Pretraining)

Table 2: 4-bit BReD remains close to FP32-state baselines:

ScaleOptimizerAvg. acc. (FP32 → BReD)PPL (FP32 → BReD)
1.1BAdamW46.5 → 46.4 (-0.1)10.8 → 10.9 (+0.1)
1.1BMuon47.6 → 47.1 (-0.5)10.3 → 10.6 (+0.3)
3.4BAdamW47.9 → 47.6 (-0.3)9.7 → 9.8 (+0.1)
3.4BMuon48.2 → 47.7 (-0.5)9.6 → 9.8 (+0.2)

End-to-End Efficiency (AdamW)

Table 3: Persistent optimizer-state storage and throughput:

ScaleStep time FP32 → BReD (s)Throughput FP32 → BReD (M tok/s)State memory FP32 → BReD (GB)
120M0.547 → 0.6511.917 → 1.6110.90 → 0.19
1.1B2.881 → 3.1780.364 → 0.3308.20 → 1.18
3.4B10.386 → 10.9450.101 → 0.09625.53 → 3.58

BReD reduces state storage by 78.9%–86.0% with 5.1%–16.0% throughput reduction.

Supervised Fine-tuning (Qwen2.5-7B)

Table 4: Fine-tuning on UltraFeedback:

OptimizerAvg. score (FP32 → BReD)PPL (FP32 → BReD)
AdamW54.2 → 54.9 (+0.7)4.6 → 4.6 (+0.0)
Muon55.2 → 54.9 (-0.3)4.6 → 4.6 (+0.0)

3-bit Compression and Block-wise Ablation

Table 5(a): 3-bit BReD summary:

SettingArchitecture/sizeOptimizersΔ Avg.Δ PPL
PretrainLLaMA-style / 120M5 optimizers[+0.0, +1.0][+0.1, +1.2]
PretrainLLaMA-style / 1.1BAdamW, Muon[-0.9, -0.7][+0.1, +0.6]
SFTQwen2.5 / 7BAdamW, Muon[-0.8, +0.8][-0.1, +0.1]

Table 5(b): BWR block-size ablation (4-bit AdamW, 120M):

Block size BAvg. acc. ↑PPL ↓Random ratioGeneration time
140.918.81486.32 ± 29 ms
3240.718.71/32340.88 ± 41 ms
25640.618.81/256335.47 ± 35 ms

Default B=32B=32 reduces random-number generation time by ~30% with negligible quality loss.


Theoretical and Practical Implications

Theoretical Contributions

  1. Mechanistic understanding: The paper provides the first formal characterization of how quantization errors accumulate through EMA recursions in optimizer states, showing that bias is amplified by 1/(1−β)1/(1-\beta) and variance by 1/(1−β2)1/(1-\beta^2).

  2. Design principles: The results establish a clear design hierarchy — first eliminate bias, then minimize variance — which is grounded in the relative amplification rates of these error components.

  3. Bridge to classical theory: The work adapts classical subtractive dithering (Roberts, 1962) to a modern large-scale training context, demonstrating its relevance for persistent state storage.

Practical Implications

  1. Optimizer-agnostic: BReD works across diverse optimizers (AdamW, Muon, NAdamW, SOAP, MARS) without changing update rules or hyperparameters, unlike prior low-bit methods tied to specific optimizer families.

  2. Memory savings: 4-bit BReD achieves 78.9%–86.0% reduction in persistent optimizer-state memory, enabling larger models or longer training runs within fixed memory budgets.

  3. Composability: BReD can be combined with optimizer-specific low-bit methods (improving AdamW-LPMM from 18.7 to 18.4 PPL and Muon-Grasp accuracy from 40.6 to 41.2), suggesting it can serve as a drop-in rounding component.

  4. Practical overhead: The block-wise design (B=32) reduces PRNG calls by 32× while maintaining quality, making the method computationally feasible at scale.


Conclusion

Main Takeaways

  • Failure mechanism identified: Low-bit EMA optimizer states suffer from recursive error accumulation where rounding bias is amplified by 1/(1−β)1/(1-\beta) and variance by 1/(1−β2)1/(1-\beta^2), explaining why naive quantization (NR, SR) diverges or degrades training.

  • BReD provides a practical solution: By combining subtractive dithering with deterministic seed replay and block-wise shared dither values, BReD achieves unbiased, low-variance quantization without auxiliary random-tensor storage or per-element random generation.

  • Robust across settings: 4-bit BReD closely matches full-precision baselines across pretraining (120M–3.4B, 5 optimizers) and fine-tuning (7B), with PPL shifts ≤ 0.5 and downstream accuracy changes within 0.7 points. 3-bit BReD remains convergent as an aggressive alternative.

  • No hyperparameter changes required: BReD preserves original optimizer update rules, making it a drop-in replacement for state storage.

Future Directions

  • Larger-scale validation: Extending evaluation to models with tens of billions of parameters and longer token budgets.
  • Broader optimizer coverage: Testing at larger scales with additional optimizer families (SOAP, MARS, Shampoo).
  • Joint quantization: Evaluating BReD combined with gradient or activation quantization.
  • Spectral state analysis: Understanding how quantization errors affect eigendecomposition operations on preconditioner states.

Limitations

The paper acknowledges: (1) largest pretraining uses 3.4B models covering only AdamW and Muon; (2) cross-optimizer breadth is evaluated only at 120M; (3) no matched comparisons with Adafactor, Adam-mini, 4-bit Shampoo, or 4-bit Preconditioned Optimization; (4) storage-error analysis does not characterize effects on spectral operations for preconditioner states.

Related papers