Quantization-Aware Pre-Training with Constrained Empirical Weight Distribution

Ningfeng Yang, Tor M. AamodtarXiv 2026

Quantizing Large Language Models (LLMs) to ultra-low bitwidths (like 1 or 2 bits) is the "holy grail" for deploying massive models on edge devices. However, training these models from scratch—a process called Quantization-Aware Pre-Training (QAPT)—is notoriously unstable. A new paper from researchers at the University of British Columbia introduces CEWT (Constrained Empirical Weight disTribution), a hyperparameter-free method that smooths out the training process and delivers significant accuracy gains for low-precision models.

TL;DR

CEWT is a simple, hyperparameter-free optimizer extension that stabilizes low-precision training by forcing model weights to follow a Gaussian distribution. By eliminating "rounding boundary oscillations," it reduces pre-training perplexity by an average of 2.5 points for 1-bit and 2-bit models with only a 4% increase in training time.

What Problem Does This Paper Address?

When training quantized networks, we often use the Straight-Through Estimator (STE) to bypass the non-differentiable nature of rounding. However, this leads to a phenomenon called rounding boundary weight oscillation.

Imagine a weight sitting right at the threshold between being rounded to "0" or "1." Because the gradient is biased, the weight often jitters back and forth across this boundary every iteration. This creates massive amounts of noise in the gradients of other weights, slowing down convergence and hurting final model accuracy.

Existing solutions usually involve "soft constraints" (like dampening losses) or freezing weights, but these require tedious hyperparameter tuning that often doesn't transfer well between different model sizes or architectures.

Methods

The authors propose CEWT, an optimizer post-update step that acts as a hard constraint on the weight distribution.

Instead of just letting weights land wherever the gradient pushes them, CEWT projects the weights of each layer to the nearest point in weight space that perfectly matches a zero-mean Gaussian distribution. The algorithm is surprisingly elegant:

  1. Rank: Flatten the weight matrix and sort the weights to find their rank.
  2. Normalize: Convert these ranks into uniform probabilities in the range (0, 1).
  3. Map: Use the inverse standard Gaussian CDF ($\Phi^{-1}$) to map these probabilities back to Gaussian values (a technique known as inverse transform sampling).
Figure 2: Visualization of the CEWT mapping process. It takes an empirical distribution (a), ranks it (b), and maps it to a standard Gaussian (c) via a non-decreasing function (d).

This process effectively "pulls" weights away from the problematic rounding boundaries where they tend to oscillate. The authors also introduce TGCS (Tensor-Wise Quantization Grid with Channel-Wise Scaling) to ensure this global Gaussian constraint plays nicely with standard per-channel quantization schemes.

Datasets

The researchers evaluated CEWT on a massive scale:

  • C4 (Colossal Clean Crawled Corpus): Used to pre-train LLaMA and GPT models ranging from 95M to 610M parameters on 3 billion tokens.
  • ImageNet-64x64: Used to evaluate vision models (DeiT-Base) to ensure the method generalizes beyond language tasks.

Key Insights and Ideas

  • The Assumption Gap: Most quantizers (like BBQ or QuEST) are mathematically designed assuming weights are Gaussian. However, QAPT naturally breaks this assumption, creating "spikes" of weights at rounding boundaries. CEWT forces reality to match the mathematical assumption.
  • Hard vs. Soft Constraints: By making the Gaussian distribution a requirement rather than a suggestion (like weight decay), the authors eliminated the need for hyperparameter tuning. CEWT is "plug-and-play."
  • Oscillation Suppression: As seen in Figure 1, standard training (blue) shows massive spikes at rounding boundaries. CEWT (orange) smooths these out, drastically reducing the "Rounding Boundary Mass" (RBM) and the resulting gradient noise.
Figure 1: Effects of CEWT on pre-round (BBQ) and pre-clip (QuEST/LSQ) weight distributions of a LLaMA-95M with 2-bit weights and activations pre-trained on 3 billion C4 tokens. See Algo- rithms 8, 9, and 10 from definitions of pre-round and pre-clip weights.

Key Results

  • Perplexity Gains: For LLaMA and GPT models, CEWT consistently reduced pre-training perplexity by an average of 2.5 points, with improvements as high as 21 points in some 1-bit configurations.
  • Efficiency: The method introduces a geomean increase of only 4% in training time, a small price to pay for avoiding expensive hyperparameter grid searches.
  • Zero-Shot Performance: Models trained with CEWT showed superior performance across standard benchmarks like HellaSwag, ARC, and PiQA compared to standard quantization-aware training.
  • Universality: The benefits held true across different optimizers (AdamH, MuonH, LionH, SSO) and different quantizers (LSQ, QuEST, BBQ).

Limitations and Future Work

  • Law of Large Numbers: CEWT relies on having enough parameters in a layer to form a meaningful distribution. It starts to lose effectiveness in very small layers (fewer than ~1024 parameters).
  • QAFT vs. QAPT: The authors noted that CEWT is most effective for long-duration pre-training from scratch. Its impact on short-term fine-tuning (QAFT) is less consistent, as weight oscillation takes time to become a dominant source of error.
  • Computational Complexity: The argsort operation has $O(N \log N)$ complexity. While manageable now, for extremely wide models, this could become a bottleneck unless implemented with more efficient engineering tweaks (like channel-wise sorting).

For those interested in trying it out, the code is open-sourced at github.com/1733116199/cewt.

Summary updated

BibTeX
@misc{yang2026quantization,
  author = {Ningfeng Yang and Tor M. Aamodt},
  title = {{Quantization-Aware Pre-Training with Constrained Empirical Weight Distribution}},
  year = {2026},
  eprint = {2609.32659},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.32659},
}
Figure