arXiv:2610.12444cs.LGOct 2026

Manuscript Offprint

arXiv:2610.12444

Rounding in Preconditioner Space: Redesigning 4-bit AdamW Optimizer-State Quantization

Hanyang Li, Shao Tang, Daniel Thomas Braithwaite, Gregory Dexter, Leonardo Neves, Aman Gupta, Hiroto Udagawa, Abhishek Shivanna, Daniel Silva, Rohan Ramanath

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Quantizing AdamW's optimizer states reduces persistent storage, but quantization errors propagate through the moment recurrences and perturb subsequent adaptive updates. We redesign 4-bit optimizer-state quantization for AdamW from the perspective of rounding space: the coordinate in which a quantizer chooses between adjacent reconstruction levels. For the second moment, a local analysis of the quantization cell adjacent to zero shows that small mean state error need not imply small mean preconditioner error at the next step. A one-dimensional quadratic construction further shows qualitatively different optimization dynamics under state-space and preconditioner-space rounding. These results motivate Zero-Inclusive Preconditioner-space Stochastic Rounding (ZIP-SR), which retains zero in the second-moment codebook and computes stochastic-rounding probabilities in preconditioner space. As a complementary route, Zero-Excluding EDEN calibration (ZE-EDEN) uses a zero-excluding second-moment codebook and rescales the quantized second-moment block to mitigate the preconditioner distortion caused by the positive quantization floor. Both configurations use 4-bit NormalFloat (NF4) for the first moment, with targeted stochastic rounding of the LM-head first moment during the final 10% of training. Across GPT- and Llama-style pretraining experiments ranging from 130M to 2.7B parameters, both methods reduce TorchAO 4-bit AdamW's mean validation-loss gap to 32-bit AdamW at every evaluated model size, with the largest reported gap reduction reaching 70%. In full-parameter supervised fine-tuning, both recipes achieve lower validation loss than TorchAO while remaining close to 32-bit AdamW on downstream tasks.

1 INTRODUCTION

Adam (Kingma & Ba, 2015) and AdamW (Loshchilov & Hutter, 2019) are widely used optimizers for large-scale neural network training. Their FP32 first- and second-moment buffers require 8 bytes per parameter, adding substantial memory overhead and motivating research on optimizer-state compression. Block-wise dynamic quantization enabled practical 8-bit optimizers, implemented in bitsandbytes (Dettmers et al., 2022) and TorchAO (Or et al., 2025). Li et al. (2023) extended optimizer-state quantization to 4 bits and identified the zero-point failure, in which mapping a small positive second-moment value to zero produces an excessively large update. They showed that excluding zero from the second-moment codebook prevents this failure. TorchAO's 4-bit AdamW implements this strictly positive codebook. Subsequent studies likewise exclude zero from the second-moment codebook, using either the same linear grid or alternative positive codebooks (Xu et al., 2025; Topollai & Choromanska, 2026).

Our key insight is that the rounding rule is critical to whether zero-point failure occurs with a zero-inclusive codebook. Conventional rounding chooses between neighboring levels by their values in second-moment state space, but AdamW transforms the second moment nonlinearly before it

*Work done during Hanyang Li's internship at Nubank.

†^{\dagger}Correspondence to: Shao Tang tang.shao@nubank.com.br, Aman Gupta aman.gupta@nubank.com.br.

scales the update. As a result, rounding that is accurate, or unbiased, in state space can still distort the resulting update. By defining rounding decisions in preconditioner space, we retain the same zero-inclusive codebook while reducing the probability of harmful zero selections. More broadly, optimizer-state quantizers should account for how stored states affect optimization, not solely for reconstruction error in state space.

We make two contributions.

• First, we characterize how the rounding coordinate affects near-zero second-moment quantization at fixed reconstruction levels. A local zero-cell analysis and a scalar-quadratic construction show that it affects both preconditioner error and optimization dynamics. This motivates Update-SR, which assigns stochastic-rounding (SR) probabilities using the preconditioners induced by the candidate reconstruction levels.

• Second, we develop two 4-bit AdamW configurations. Zero-Inclusive Preconditioner-space Stochastic Rounding (ZIP-SR) combines a zero-inclusive second-moment codebook with Update-SR, whereas Zero-Excluding EDEN calibration (ZE-EDEN) combines a zero-excluding codebook with EDEN block calibration (Vargaftik et al., 2022). Both use NF4 for the first moment and targeted LM-head stochastic rounding motivated by matched checkpoint interventions. At the same persistent moment-storage cost as TorchAO 4-bit AdamW, both configurations reduce its mean validation-loss gap to 32-bit AdamW across the evaluated pretraining settings and attain lower mean SFT validation loss.

PyTorch implementations of ZIP-SR and ZE-EDEN, along with example training scripts, are available at https://github.com/nubank/adamw4bit.

References (69)