Organizations: Tandon School of Engineering, New York University · Courant Institute School of Mathematics, Computing, and Data Science, New York University
Large reasoning models (LRMs) improve task performance by generating longer intermediate reasoning traces, but this substantially increases inference costs and makes low-precision quantization increasingly important. However, aggressively quantized models often perform poorly on reasoning tasks. We observe larger activation fluctuations during the first decoding steps of reasoning. Calibration that omits these early states may miss their activation fluctuations. To address these reasoning-specific quantization challenges, we propose CodeQuant2, a clustering-based LUT quantization framework for low-precision large reasoning models. CodeQuant2 mitigates activation outliers with rotation and scaling, uses clustering to represent non-uniform weight distributions, and adapts codebook sizes to the quantization difficulty of each layer. Guided by our observation of reasoning-time activation behavior, CodeQuant2 further improves calibration sample selection to better match actual decoding statistics. Combined with our customized LUT CUDA kernel, CodeQuant2 delivers substantial accuracy improvements on reasoning benchmarks while achieving up to 2.85× speedup over BF16.
Figures & tables
Figure 1: Overview of the CodeQuant2 framework. Left: Rotation and scaling are fused into the model for outlier smoothing. Right: CodeQuant2 applies fine-tuned rotation and scaling, allocates clusters adaptively, tunes centroids and assignments, and uses a LUT-based kernel for inference.
Figure 2: Activation behavior during reasoning decoding on GSM8K Cobbe et al. (2021b) , measured on Qwen3-4B-Thinking Team (2025) and averaged over 128 samples. Left: Averaged activation standard deviation across decoding steps with and without thinking. Right: Activation heatmaps at representative decoding steps.
Figure 3: Adaptive cluster allocation and clustering. Left: Importance scores and latency guide cluster allocation. Right: K-means initializes the centroid matrix and per-row binary assignment matrices.
Figure 4: (a) The steps of the LUT kernel, including a one-time LUT precomputation and table lookup. (b) The precomputed LUT is stored in the shared memory in the Streaming Multiprocessors.
Models
Methods
Wiki2 ( ↓ )
C4 ( ↓ )
MA500 ( ↑ )
GSM8K ( ↑ )
AIME25 ( ↑ )
AIME26 ( ↑ )
HE ( ↑ )
LCB ( ↑ )
Avg ( ↑ )
Qwen3- 4B-Thinking
BF16
11.478
18.391
0.958
0.952
0.688
0.708
0.963
0.758
0.838
QuaRot
17.366
26.879
0.394
0.506
0.004
0.000
0.000
0.002
0.151
ParoQuant
14.771
23.070
0.720
0.847
0.183
0.142
0.549
0.180
0.437
SqueezeLLM
14.627
22.642
0.852
0.908
0.192
0.158
0.695
0.158
0.494
CodeQuant
13.623
21.410
0.930
0.929
0.392
0.367
0.902
0.464
0.664
Ours
12.890
20.538
0.950
0.938
0.563
0.613
0.945
0.614
0.770
Table 1: Performance under A4W4 setting in terms of perplexity on WikiText2 and C4, and accuracy on Math500 (MA500), GSM8K, AIME25, AIME26, HumanEval (HE), and LiveCodeBench (LCB).
Models
Methods
A4W4
A8W4
AIME25
AIME26
AIME25
AIME26
pass@1
pass@8
pass@1
pass@8
pass@1
pass@8
pass@1
pass@8
Qwen3-4B- Thinking
BF16
0.688
0.733
0.708
0.867
0.688
0.733
0.708
0.867
QuaRot
0.004
0.033
0.000
0.000
0.175
0.233
0.088
0.133
ParoQuant
0.183
0.267
0.142
0.133
0.283
0.533
0.271
0.433
SqueezeLLM
0.192
0.333
0.158
0.200
0.438
0.600
0.454
0.600
Table 2: Mathematical reasoning performance on AIME25 and AIME26 under A4W4 and A8W4, evaluated with both pass@1 and pass@8.
Table 3: Qwen3-4B-Thinking on L40s: decode throughput.
Configuration
MATH-500
GSM8K
AIME25
AIME26
HumanEval
LiveCodeBench
Avg. Acc.
Gain
Base
0.930
0.929
0.392
0.367
0.902
0.464
0.664
–
+ R&S
0.928
0.934
0.450
0.421
0.933
0.557
0.704
+4.00
+ ACA
0.938
0.938
0.542
0.488
0.937
0.599
0.740
+3.64
+ LC
0.950
0.937
0.546
0.567
0.939
0.619
0.760
+1.94
+ RAC
0.950
0.938
0.563
0.613
0.945
0.614
0.770
+1.08
Table 5: Cumulative component ablation on Qwen3-4B-Thinking under A4W4. The base configuration uses fixed random rotation and SmoothQuant scaling. Each subsequent row adds the listed component cumulatively. AIME results are pass@1, and gains are in percentage points.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Models
Methods
ARC ( ↑ )
PIQA ( ↑ )
WinoGrande ( ↑ )
Avg ( ↑ )
A4W4
Qwen3- 4B-Thinking
BF16
0.937
0.874
0.830
0.881
QuaRot
0.752
0.562
0.281
0.532
ParoQuant
0.913
0.789
0.641
0.781
SqueezeLLM
0.914
0.791
0.681
0.795
CodeQuant
0.928
0.836
0.772
0.845
Appendix
Table 8: Performance on standard language understanding and commonsense reasoning tasks under A4W4 and A8W4 quantization.
Models
Methods
Wiki2 ( ↓ )
C4 ( ↓ )
MA500 ( ↑ )
GSM8K ( ↑ )
AIME25 ( ↑ )
AIME26 ( ↑ )
HE ( ↑ )
LCB ( ↑ )
Avg ( ↑ )
A8W4
Qwen3- 4B-Thinking
BF16
11.478
18.391
0.958
0.952
0.688
0.708
0.963
0.758
0.838
QuaRot
14.312
22.492
0.758
0.868
0.175
0.088
0.537
0.137
0.427
ParoQuant
13.444
21.190
0.900
0.920
0.283
0.271
0.811
0.448
0.606
SqueezeLLM
12.999
20.260
0.940
0.938
0.438
0.454
0.915
0.552
0.706
CodeQuant
12.430
19.732
0.946
0.951
0.596
0.638
0.915
0.629
0.779
Appendix
Table 9: Main evaluation results under A8W4 quantization.
Large Reasoning Models (LRMs) rely on long reasoning traces, making inference expensive. While low-bit quantization reduces per-token decoding cost, we show that aggressive 2-bit inference can fail to deliver end-to-end speedup because instability in the generation process inflates total token count. Instead of merely lowering answer accuracy, 2-bit quantization often produces much longer traces with repetitive loops, budget exhaustion, delayed commitment, and unclosed reasoning segments. We analyze full reasoning traces of Qwen3 reasoning models across mathematical and commonsense benchmarks and show that accuracy degradation is tightly linked to these process-level failures. To address them, we introduce two lightweight controls: FP16 planning, which gives the 2-bit model a short high-precision outline, and loop rescue, which detects repetitive traces and either commits to an earlier answer or falls back to FP16. On MATH-500, loop rescue improves Qwen3-8B accuracy from 17.2% to 74.2%, while planning plus loop rescue improves Qwen3-32B from 65.0% to 87.2%. Overall, our results show that extreme low-bit reasoning becomes practical when its failures are treated as controllable generation pathologies: with lightweight detection and selective FP16 support, 2-bit inference can recover accuracy while preserving real end-to-end speed. Our code is available at: https://github.com/brain-lab-research/quantized-reasoning.
Quantization is widely used to reduce the inference cost of large language models, but its effect on reasoning models is not fully captured by final-answer accuracy or per-token latency. We show that low-bit post-training quantization can introduce a hidden test-time compute cost: quantized reasoning models often generate longer chains of thought even when they still answer correctly. Across mathematical reasoning, code generation, scientific question answering, and agentic tool-use benchmarks, we find that INT4/INT3 quantization can preserve accuracy but increase reasoning-token usage, offsetting the expected per-token speedup. To measure this effect, we introduce the CoT Token Inflation Ratio, which compares reasoning length between quantized and full-precision models averaged across all evaluation benchmarks. We further show that token inflation is accompanied by behavioral changes in the reasoning trace, including more intermediate steps and greater semantic repetition. These changes translate into measurable end-to-end real-world serving penalties. Finally, we evaluate mitigation strategies and find that prompting and decoding-time sampling offer inconsistent accuracy-length trade-offs, while quantization-aware training shows more promise in reducing both accuracy degradation and token inflation. Our results suggest that reasoning-token usage should be reported alongside accuracy when evaluating quantized reasoning models.
Xinyu Lian, Walid Krichene, Beichen Huang +4
University of Illinois Urbana-Champaign · Microsoft · Anyscale +1
Large reasoning models (LRMs) reach competition-level math and coding accuracy via long autoregressive decoding, making per-token decoding cost a primary deployment concern. Weight quantization is the standard tool for acceleration, but representative recipes -- including state-of-the-art end-to-end (E2E) QAT -- lose accuracy on long-decoding reasoning benchmarks despite preserving perplexity and short-decode accuracy. Through a systematic gradient-direction analysis, we identify two factors driving this gap: (i) KV-cache fidelity preservation under the QAT loss, which E2E supervision attenuates via the softmax Fisher metric; and (ii) Hessian-subspace alignment between calibration data and the deployment distribution. We propose LookAhead Quantization (LAQuant), a layer-wise weight-only QAT method that addresses both factors without online-transform overhead by combining reasoning-domain calibration with a one-layer lookahead loss whose implicit cross-layer co-adaptation preserves the next-layer residual stream. For Qwen3-4B under W3G128 quantization, LAQuant improves AIME25 Pass@1 over ParoQuant by 15.11pp (1.93pp over ParoQuant++ at matched calibration) while achieving a 3.42x decoding speedup over FP16 on RTX A6000, compared with ParoQuant's 3.01x.