Compute-Optimal Quantization-Aware Training

Aleksandr Dremov, David Grangier, Angelos Katharopoulos, Awni Hannun

Overview

To deploy Large Language Models (LLMs) on edge devices, practitioners heavily rely on quantization—reducing the precision of weights and activations to 4-bit, 2-bit, or even 1-bit formats—to save memory and compute. Quantization-Aware Training (QAT), where a model is trained with simulated lower precision, is the state-of-the-art method for recovering the accuracy lost during this compression.

Typically, QAT is applied after a long phase of standard full-precision (FP) pretraining. However, if you have a strict, fixed compute budget (e.g., a maximum number of total training tokens), how do you optimally divide it? Spend too much time on FP training, and the model overfits to high precision, struggling to adapt to quantization later. Spend too much time on QAT, and you waste compute training on noisy, approximated gradients.

Previous guidelines suggested a flat heuristic: dedicate roughly 10% of training time to QAT. This paper investigates whether that rule of thumb holds up as models and datasets scale, introducing a comprehensive loss scaling law to predict the optimal split and proposing a new training schedule that merges QAT with learning rate cooldown to save significant compute.

Methodology and Loss Scaling

To find the optimal compute allocation, the authors conducted extensive training runs using Llama-2 style models ranging from 86M to 2.2B parameters, trained primarily on the DCLM (DataComp-LM) dataset. They swept across different total token budgets, FP vs. QAT token splits, and QAT bit-widths (1, 2, 4, and 6-bit).

To do this efficiently, they utilized a Warmup-Stable-Decay (WSD) learning rate scheduler. This allowed them to pause FP training at any arbitrary token count and immediately initiate a learning rate cooldown, avoiding the need to train models from scratch for every single token budget.

Loss Scaling Law for Different QAT Fractions

From these experiments, they fitted a novel, unified mathematical formula that predicts final model loss based on four variables: parameter count, FP tokens, QAT tokens, and bit-width. As shown in the loss landscape above, the theoretical predictions closely match the experimental optima along constant compute curves.

Key Insights

The 10% Rule is Dead

The most striking finding is that the optimal fraction of training dedicated to QAT is not stationary. It actually grows as the total compute budget increases.

Optimal QAT Fraction vs. Total Tokens-per-Byte

The authors found this scales predictably using a specific metric: tokens-per-parameter-byte (which accounts for model size, token count, and quantization bit-width). As the compute budget scales up, the optimal QAT fraction shifts from roughly 15% to over 55%.

Low-Bit QAT is Unforgiving

Getting the compute allocation wrong for extreme quantization (1-bit or 2-bit) is disastrous. For 1-bit QAT, using the mathematically optimal QAT fraction achieves the same loss using only ~50% of the total compute compared to a naive 10% split.

Predicting the Optimal Bit-Width

If you are constrained by a specific memory footprint (e.g., 1GB) and a fixed training FLOP budget, the scaling law can tell you exactly which bit-width to target. Interestingly, as your training compute budget grows, you should actually favor lower precision to maximize the parameter count that fits within your memory constraint.

QAT & Cooldown Fusion

Standard practice dictates performing a learning rate cooldown at the end of FP training to make fine-grained adjustments to weights, followed by restarting QAT. However, initializing QAT immediately destroys that high-precision information. The authors propose fusing QAT with the cooldown phase. By doing so, the model adapts to quantization while simultaneously settling into its final loss basin, preventing redundant updates.

Key Results and Future Work

The unified loss scaling law fits the experimental data incredibly well ($R^2 > 0.98$ across all bit-widths). Furthermore, the optimal QAT fraction predicted by the scaling law—which was fitted on models up to 759M parameters—generalized perfectly to an unseen 2.2B parameter model.

Practically, the "QAT & Cooldown Fusion" method yielded consistent perplexity improvements for 4-bit and 6-bit models. In terms of compute, this effectively saved between 2% to 38% of wasted tokens across various setups compared to the traditional unfused approach.

While this study focuses on decoder-only transformer architectures, future work will explore how pretraining in lower floating-point precision (like FP8 or FP4) changes the optimal QAT fraction, and how these allocations should be handled in multi-stage pipelines involving Supervised Fine-Tuning (SFT) and Reinforcement Learning (RLHF).

Summary updated

BibTeX
@inproceedings{dremov2026compute,
  author = {Aleksandr Dremov and David Grangier and Angelos Katharopoulos and Awni Hannun},
  title = {{Compute-Optimal Quantization-Aware Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=QpbtT95S95},
}
Figure