Low-precision training often relies on stochastic rounding (SR) to keep quantized gradients unbiased and prevent small updates from rounding to zero. Standard SR draws an independent random threshold for every gradient element. However, accelerators generate random numbers on vector units whose throughput lags far behind their matrix units. Drawing one threshold per element saturates the vector unit and can make INT8 training with SR slower than BF16 training. Sharing random thresholds across tensor elements removes this cost but forces those elements to round in the same direction and shifts their rounding errors by a common offset. We find that this offset degrades training primarily through the activation gradient, which propagates the error backward into earlier layers. Because earlier layers cannot cancel an incoming offset using their own local rounding errors, the offset must be removed at the layer where it originates. We propose Structured Subspace Stochastic Rounding (S3R), which quantizes each upstream gradient once for both the activation and weight gradient matrix multiplications and shares a single threshold per token across the hidden dimension. Its error correction, S3R-EC, subtracts the structured mean rounding error from the activation and weight gradients while leaving the optimizer unchanged. In LLM pre-training experiments, uncorrected threshold sharing degrades convergence, whereas S3R-EC eliminates this degradation and matches the validation loss of independent SR. Furthermore, S3R-EC accelerates full INT8 training steps of dense LLMs on TPU v5p by 1.24x to 1.32x over BF16 and by 1.11x over independent SR.
Figures & tables
Fig. 1: Overview of INT8 (S8) quantization training with S3R and its structured error correction S3R-EC. On the VPU, S3R broadcasts a compact seed ut∈[0,1]B×S×1 , one threshold per token, to Rt=Φ(ut) inside the vector registers, so Rt is never materialized. In the backward pass, the upstream gradient Gt is quantized once , and the int8 result is written to HBM once and read by both the activation-gradient product GtWt⊤ and the weight-gradient product Xt⊤Gt . S3R-EC subtracts the token-constant and channel-constant parts of the rounding error from ∇X and from the FP32 weight gradient gˉW , and the AdamW update is unchanged.
Fig. 2: Worked example of S3R-EC (two tokens, four channels, units of Δ ). Left: one shared threshold per token ( r1=0.85 , r2=0.10 ) rounds all channels of token 1 up and all of token 2 down; the known error E=q−s splits into Estr and a residual N with zero row and column sums. Here Estr reduces to one offset ε per token (in general it also has a per-channel term). Right: both variants subtract εWi1 from the activation gradient (row Wi of W ); two-way also subtracts x⊤Estr from the weight gradient (input feature x ), which dX-only leaves unchanged.
Fig. 3: Validation loss versus training step for all configurations of Table I , each at its best learning rate. Lines show the mean over 3 seeds, and shaded bands span the seed minimum to maximum. The bottom panel enlarges the last 25% of steps. S3R ( Φbcast ) lies off this scale (final loss 6.24).
Configuration
Best LR
Val. loss
Gap to BF16
BF16
6×10−4
4.892±0.015
—
INT8 RTNE
6×10−4
5.106±0.013
+0.214
Independent SR
6×10−4
4.929±0.019
+0.037
S3R ( Φ2D )
3×10−4
5.055±0.017
+0.163
S3R-EC, dX-only ( Φ2D )
6×10−4
4.924±0.021
+0.032
S3R-EC, two-way ( Φ2D )
6×10−4
4.919±0.022
+0.027
TABLE I: Final Validation Loss of the 12-Layer Model after 2000 Steps (32.8M C4 Tokens) with 8-Bit Per-Tensor Backward Gradients. Mean ± Sample Std over 3 Seeds at Each Configuration’s Best Learning Rate, Chosen on Seed 0. All Configurations Use AdamW. † Lowest Learning Rate Tried
dX error
dW error
Emb.
Configuration
layer 0
layer 11
layer 0
error
Independent SR
0.572
0.111
0.456
0.457
S3R ( Φ2D )
0.877
0.228
0.691
0.703
S3R ( Φ2D ), dW-only corr.
0.882
0.228
0.694
0.706
S3R-EC, two-way ( Φ2D )
0.476
0.103
0.377
0.378
S3R ( Φbcast )
3.157
0.313
5.141
5.285
TABLE II: Relative Stochastic Gradient Error (Frobenius Norm Relative to the BF16 Gradient) on a BF16 Checkpoint at Step 1000 (LR 6×10−4 , Seed 0), Pooled over 4–9 Fixed Training Batches. Layer 0 Is the Bottom of the 12-Layer Model. The dW-Only Correction (Corr.) Keeps Only the Token-Mean Term of the Weight-Gradient Correction. The Last Two Rows Choose the Thresholds of the Two Backward Products Separately and Use the dW-Only Correction
Speedup over BF16 ( × )
S3R-EC, extra time over S3R (%)
Shape
(H,Dffn)
INT8 RTNE
Indep. SR (Threefry)
S3R ( Φ2D )
Two-way
dX-only
W1
(512,2048)
1.12
0.58
1.08
+13.0
+14.8
W2
(1024,4096)
1.45
0.91
1.44
+7.3
+9.6
W3
(2048,8192)
1.73
1.29
1.73
−0.6
+1.7
W4
(3072,12288)
1.92
1.54
1.92
+4.8
+4.1
W5
(3840,15360)
1.84
1.53
1.83
+2.8
+3.3
TABLE III: Speedup over BF16 of One SwiGLU FFN Block (Forward + Backward, per Device) on TPU v5p, and Extra Device Time of S3R-EC over S3R ( Φ2D ). B=8 ( 4 for W9 ), S=2048 ; Median over Repeated Steps. S3R-EC: Mean of Two Further Runs, Each against S3R in the Same Run.
Dense models
MoE models
Configuration
Llama 3.1-8B
Qwen3-8B
Gemma 3-12B
Qwen3-30B-A3B
DeepSeek-V2-Lite (16B)
BF16
3862
4018
6550
6454
3659
INT8 RTNE
2926 ( 1.320× )
3110 ( 1.292× )
4822 ( 1.358× )
7305
3842
Independent SR (Threefry)
3350 ( 1.153× )
3607 ( 1.114× )
5526 ( 1.185× )
7914
4269
S3R ( Φ2D )
2903 ( 1.331× )
3104 ( 1.294× )
4853 ( 1.350× )
7286
3840
S3R-EC, two-way
3008 ( 1.284× )
3243 ( 1.239× )
4961 ( 1.320× )
7621
4029
TABLE IV: Full Training Step (Forward, Backward, and AdamW Update) on TPU v5p with bf16 -Output INT8 GEMMs. Median Step Time (ms) over 20 Steps after 12 Warm-Up Steps; Per-Device Batch 4, S=4096 . In Parentheses: Speedup over BF16 on the Dense Models. S3R-EC, Two-Way, Uses the Factor All-Gather; on the Dense GEMMs, It Also Computes a Per-Channel Rounding-Variance Statistic That the Update Does Not Use, So Its Times Are Slightly Pessimistic. On the MoE Models, the Expert GEMMs Receive Only the Channel-Mean Part of the Correction.
Should low-precision transformer inference use stochastic rounding (SR) or round-to-nearest (RN)? The answer depends on where in the network you look. We isolate this effect by holding the numerical format fixed and varying only the rounding rule at individual operation sites. To enable experiments at freely chosen precisions, we extend the PRISM vectorized rounding library to arbitrary virtual precision via a variable-precision stochastic rounding (VPSR) algorithm, proving that the rounding decision is evaluated exactly in hardware floating point. We develop two analyses providing complementary insight into this site-level trade-off. First, a probabilistic forward-error bound for linear projections shows that SR's error envelope grows as O(nu) in reduction length n, versus O(nu) for RN, a gap that widens rapidly at low precision and is most pronounced in the long multilayer perceptron (MLP) down-projection. Second, a second-order decomposition of expected cross-entropy loss change at the output softmax into signed drift, drift curvature, and a Fisher-weighted variance penalty reveals why the two sites behave oppositely: MLP noise is predominantly a uniform logit shift to which softmax is invariant, so SR's variance is largely discounted; head noise is non-uniform across the vocabulary and is not. On DistilGPT-2 at t=6 significand bits, observations match theory: SR in the MLP raises perplexity to 1.15x the full-precision reference, versus 2.21x for RN. At the language-model head, the ordering reverses because SR introduces non-uniform variance, whereas deterministic RN carries none. In a mixed-precision configuration (MLP output at t=6), assigning SR to the MLP and RN to the head brings perplexity within 1.10x of the full-precision reference, a 28% reduction over matched-bit RN.
Yohan Chatelain, Pablo de Oliveira Castro
Krembil Centre for Neuroinformatics, CAMH, Toronto, Canada · Universite Paris-Saclay, UVSQ, LI-PaRAD, Versailles, France
ReRound (Reconstructive Rounding) is a post-training quantization method that addresses the midpoint ambiguity inherent in standard round-to-nearest (RTN) schemes when quantizing weights near the centers of quantization intervals. Starting from a pretrained LLM, ReRound trains a conditional diffusion model to produce continuous reconstructions of low-bit weights for the LLM. These reconstructed weights act as a guidance signal to disambiguate the rounding direction of weights located close to interval midpoints. To integrate this reconstruction-guided rounding with conventional RTN, ReRound introduces a tolerance metric measuring how far the quantized weight (not the final quantized integer) is away from the midpoint: quantized weights within a tolerance region around midpoints are quantized using diffusion-based reconstructions, whereas weights closer to quantization boundaries are quantized with RTN. By sweeping the tolerance parameter, ReRound generates multiple candidate quantized integer weight matrices and selects the de-quantized weight matrix candidate whose leading singular values most closely match those of the original full-precision weights. This selected candidate determines the tolerance parameter ReRound uses. ReRound is particularly effective for smaller LLMs. Across a range of such models, it consistently outperforms standard RTN for 3-bit and 4-bit weight quantization. ReRound achieves superior accuracy compared to an extensive set of calibration-free methods, remains competitive with calibration-dependent approaches, and operates entirely offline, introducing no additional overhead during low-bit inference. The ReRound strategy represents a new approach for low-bit quantization. The method applies to AI models beyond LLMs. This paper focuses on its applications to small LLMs.
Quantization-aware training (QAT) is widely deployed but typically relies on the Straight-Through Estimator (STE), which passes gradients through non-differentiable quantizers by fiat. This often makes training brittle near bin boundaries and weakly aligned with the actual behavior of the low-precision model. We introduce JacQuant, a QAT framework that learns a lightweight surrogate of the model's local sensitivity to parameter changes and uses it to stabilize and accelerate training within standard variance-reduced optimizers. The surrogate is inexpensive (diagonal or block-diagonal), data-driven, and compatible with common weight and activation quantizers. On code-preserving training phases, we prove convergence for non-convex objectives and obtain linear rates under a PL condition, and we relate the learned sensitivity to end-to-end output fidelity via a simple calibration argument. Across LLM benchmarks at ≤2 bits, JacQuant consistently reaches higher accuracy than STE-based QAT, and the runtime analyses on various models show that the added cost remains negligible under practical group sizes. The method is drop-in and requires no changes to the forward quantizers; our empirical claims are scoped to ultra-low-bit LLM QAT.