Organizations: University of Georgia · University of North Texas · Northeastern University · University of Minnesota · University of Virginia · Stevens Institute of Technology
Quantization reduces the deployment cost of large language models (LLMs). However, post-training quantization (PTQ) cannot fine-tune model parameters and often degrades accuracy in low-bit settings, while quantization-aware training (QAT) requires backpropagation and incurs high memory overhead. We propose ZeroQAT, a zeroth-order QAT framework supporting both weight and activation quantization. By using forward-only gradient estimation, ZeroQAT removes backpropagation and substantially reduces memory and computation while retaining end-to-end optimization benefits. We further introduce a lightweight variant of ZeroQAT for quantized fine-tuning, which freezes and pre-quantizes most parameters to further cut memory usage. Experiments show that ZeroQAT consistently outperforms representative PTQ and QAT baselines while requiring significantly less memory. For example, ZeroQAT enables fine-tuning of a 13B model at extremely low bit-widths (e.g., 2-4 bits) on a single 8GB GPU, and even allows fine-tuning a 6.7B model on a OnePlus 12 smartphone, demonstrating its practicality for end-to-end QAT on resource-limited edge devices.
Figures & tables
Method
Category
Quant Support
Low-bit performance
Memory Efficiency
Pre-train
Fine-tune
SmoothQuant
Range PTQ
WA
✗
✗
High
GPTQ
Approx PTQ
WO
✗
✗
High
OmniQuant
Approx PTQ
WA
✓
✗
Moderate
LLM-QAT
Full QAT
WA
✓
✓
Low
QLoRA
PEFT QAT
WO
✓
✓
Moderate
Table 1: Comparison of our method with existing methods. PEFT indicates parameter-efficient fine-tuning. WO and WA indicate weight-only and weight-activation quantization, respectively.
Method
Category
Quantized Pre-training (PPL ↓ )
Quantized Fine-tuning (Acc ↑ )
W6A6
W2A16
W4A4
W6A6
W2A16g128
W4A4
ZO (FP16)
-
5.47
66.0
Zero-shot
-
-
41.3
SmoothQuant
Range-based PTQ
6.20
100.23 ‡
83.12
57.2
27.7 ‡
32.9 ‡
OmniQuant
Approx-based PTQ
5.87
37.37
14.26
63.9
40.6 ‡
38.8 ‡
EfficientQAT
QAT
5.60
33.40
76.32 ‡
66.4
45.4
28.6 ‡
Table 2: Results of applying different quantization methods on LLama-2-7B. ‡ indicates that the method is intrinsically not suitable for the setting; we report these results to illustrate its limitations.
Figure 1: Comparison of the block-wise reconstruction loss reduction between OmniQuant ( Shao et al., 2023 ) and our method. The X-axis is the index of layer, Y-axis measures the ratio of loss decrease.
Figure 2: Objective inconsistency between the reconstruction loss used by approximation-based PTQ and final evaluation metrics.
LLama / PPL ↓
LLama1-7B
LLama1-13B
LLama2-7B
LLama2-13B
LLama3-8B
Task
WIKI
C4
WIKI
C4
WIKI
C4
WIKI
C4
WIKI
C4
FP16
-
5.68
7.08
5.09
6.61
5.47
6.97
4.88
6.46
6.14
9.45
W2A16
RTN
1.1e5
1.3e5
6.8e4
5.6e4
3.8e4
4.8e4
4.2e4
1.2e3
4.2e4
5.6e4
GPTQ
5.6e4
689.13
5.5e3
6.97
7.7e3
NAN
2.1e3
323.12
4.2e3
1.2e3
OmniQuant
15.47
24.89
13.21
18.31
37.37
90.64
17.21
26.76
28.48
56.64
ZeroQAT
9.65
13.55
9.09
11.87
17.18
28.36
8.67
13.68
9.14
12.89
Table 3: Weight-only and weight-activation quantization results of LLama-series models on two datasets: WikiText2 (WIKI), and C4.
LLama / Acc ↑
Method
PIQA
ARC-e
ARC-c
HellaSwag
Winogrande
Avg.
LLama-1-7B
FP16
77.47
72.38
41.46
73.00
67.07
65.26
Spinquant
73.81
66.58
34.16
67.02
59.95
60.30
FlatQuant
75.73
68.87
36.88
69.31
65.46
63.17
ZeroQAT
76.98
69.32
36.19
70.86
64.87
63.64
LLama-2-7B
FP16
79.05
74.54
46.16
75.98
69.06
68.96
Spinquant
75.30
65.32
39.42
71.45
63.46
62.99
Table 4: Weight-only and weight-activation quantization results of LLama models. This table reports the accuracy of 5 zero-shot tasks. Refer to Table E.1 for more results.
Figure 3: lightweight ZeroQAT for fine-tuning.
OPT / Acc ↑
OPT-2.7B
OPT-6.7B
OPT-13B
Task
SST-2
CB
SQuAD
DROP
SST-2
CB
SQuAD
DROP
SST-2
CB
SQuAD
DROP
Zero-shot
56.3
50.0
29.8
10.0
64.2
50.0
37.9
13.1
58.8
46.4
46.2
14.6
FP16 (ZO)
-
90.0
69.6
68.7
22.9
90.2
71.4
76.0
26.4
91.4
67.9
84.7
30.9
W2A16g128
RTN
44.4
44.6
0.0
0.0
59.2
50.0
0.0
0.0
53.5
50.0
0.0
0.0
QuZO
47.2
46.3
0.0
0.0
60.6
55.3
0.0
0.0
59.6
51.8
0.0
0.0
QLoRA
61.2
51.8
0.0
8.2
64.8
58.9
0.0
0.0
63.8
69.6
0.0
0.0
Table 5: Weight-only and weight-activation quantized fine-tuning results of OPT models. The table reports the accuracy or F1 score of the corresponding tasks. g128 indicates the group size is 128.
Method
#Bits
7B
13B
-
FP
67.0
69.3
QLoRA w/GPTQ
W2A16
31.8
32.4
QA-LoRA
W2A16
34.6
37.3
IR-QLoRA
W2A16
34.4
36.3
PEQA
W2A16
35.2
34.8
EfficientQAT
W2A16
49.1
52.1
Table 6: Averaged accuracy over 5 zero-shot datasets after fine-tuning. Results on MMLU and GSM8K are presented in Table E.2 and Table E.3 .
Table 7: Memory consumption and wallclock time per update during quantized pre-training and fine-tuning under the W2A16g128 setting. Since ZeroQAT only stores the weights in memory, its memory usage remains unaffected by batch size. Four and sixteen is the ideal batch size in FlatQuant and EfficientQAT, respectively.
Stage
Metrics
OPT-1.3B
OPT-2.7B
OPT-6.7B
FP16
ZeroQAT
FP16
ZeroQAT
FP16
ZeroQAT
Fine-tuning
Latency
11.2s
7.8s
19.6s
12.3s
/
29.1s
Weight memory
2.6GB
0.9GB
5.4GB
1.8GB
13.4GB
4.6GB
Running memory
3.5GB
1.2GB
8.1GB
2.6GB
OOM
6.4GB
Inference
Token / s
10.9
15.4
7.58
11.0
3.13
4.76
Speed up
1.0 ×
1.41 ×
1.0 ×
1.45 ×
1.0 ×
1.52 ×
Table 8: Evaluation of memory consumption and speed on a OnePlus 12 smartphone under W4A4 quantization. Prompts of 384 tokens are used in inference, and OOM indicates out of memory.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Experiment
Hyperparameters
Values
Quantized Pre-training
Batch size
4
Iteration
10K
Learning rate
{5e-7, 1e-8}
Lr for smothing
5e-6
Lr for clipping
1e-5
Lr schedule
Linear Decay
Appendix
Table B.1: The hyperparameter for experiments. For ZeroQAT, we only show the setting of extra hyperparameters, and have the same setting in other common hyperparameters as MeZO ( Malladi et al., 2023 ) .
PPL ↓
LLama-1-7B
LLama-2-13B
Leanable Components
W4A4
W2A16
W4A4
W2A16
Smoothing + Clipping
6.17
9.65
5.27
8.67
W/O Smoothing
1.4e3
29.61
5.2e3
15.97
W/O Clipping
16.64
9.4e3
18.7
2.8e3
W/O Smoothing & Clipping
2.1e3
1.2e4
1.7e4
4.6e3
Appendix
Table C.1: Effect of each component. WikiText2 perplexity is reported in this table. W/O indicates removing the corresponding learnable components. Here, smoothing indicates scaling and transformation.
Method
Fine-tuning Memory
PTQ memory
SST-2
CB
SQuAD
DROP
FP ZO
14.2 GB
-
90.2
71.4
76.0
26.4
OmniQuant (ZO)
14.2 GB
4.4 GB
61.2
48.2
24.7
11.7
OmniQuant (FO)
98.6 GB
4.4 GB
58.7
55.3
31.8
13.5
ZeroQAT
3.7 GB
-
88.6
67.4
61.3
22.4
Appendix
Table C.2: Compare with the PTQ method with different fine-tuned models as starting points. Results of fine-tuning OPT-6.7B under W4A4 setting. ZO and FO indicate the starting fine-tuned checkpoint is from first-order and zeroth-order optimization, respectively.
PPL ↓
LLama2-7b
LLama2-13b
Method
W2A16
W4A4
W2A16
W4A4
ZeroQAT (LW)
41.05
19.34
21.97
15.45
ZeroQAT
29.61
12.95
15.95
10.41
Appendix
Table C.3: Effect of using lightweight ZeroQAT in quantized pre-training. LW indicates lightweight. Perplexity on Wikitext2 is reported.
Table C.4: Ablation study for selecting which layers to maintain full-precision and update in Quantized Fine-tuning. The highlighted line with a blue rectangle is the setting used in ZeroQAT. Attn_Q: attention Query layer; Attn_V: attention Value layer; Attn_K: attention Key layer; Attn_O: attention output projection; Dense: dense fully connected layer.
Table 17
Method
Bit
Qwen2.5-7B
Mistral-7B
-
FP16
6.67
5.54
RTN
W2A16
2.4e4
4.7e4
OmniQuant
W2A16
42.84
31.28
ZeroQAT
W2A16
18.37
14.67
OmniQuant
W4A4
15.32
13.74
FlatQuant
W4A4
7.23
5.78
Appendix
Table D.1: Results of perplexity on Wikitext2 on Qwen and Mistral.
OPT / PPL ↓
OPT-2.7B
OPT-6.7B
OPT-13B
Task
WIKI
PT
C4
WIKI
PT
C4
WIKI
PT
C4
FP16
-
12.47
15.13
13.16
10.86
13.09
11.74
10.13
12.34
11.20
W6A6
SmoothQuant
12.64
15.91
13.34
11.34
13.82
12.14
10.56
12.76
11.40
RPTQ
13.19
16.37
14.04
11.19
13.98
12.08
11.19
13.98
12.08
RPTQ*
12.71
15.53
13.33
10.96
13.24
11.86
10.96
13.24
11.86
OmniQuant
12.62
15.32
13.29
10.96
13.20
11.81
10.21
12.47
11.17
Appendix
Table D.2: Weight-activation quantization results of OPT models on three datasets: WikiText2 (WIKI), Penn Treebank (PT), and C4. RPTQ* represents a variant that quantizes all activations except the softmax output.
LLama / Acc ↑
Method
PIQA
ARC-e
ARC-c
HellaSwag
Winogrande
Avg.
LLama-1-7B
FP16
77.47
72.38
41.46
73.00
67.07
65.26
SmoothQuant
49.80
30.40
25.80
27.40
48.00
38.41
OmniQuant
67.38
53.87
30.63
53.12
55.25
52.15
Spinquant
73.81
66.58
34.16
67.02
59.95
60.30
FlatQuant
75.73
68.87
36.88
69.31
65.46
63.17
ZeroQAT
76.98
69.32
36.19
70.86
64.87
63.64
Appendix
Table E.1: Weight-only and weight-activation quantization results of LLama models. This table reports the accuracy of 5 zero-shot tasks.
LLama-1-7B (FP: 38.41%)
GPTQ
EfficientQAT
SmoothQuant
OmniQuant
ZeroQAT
W2A16
23.71%
24.74%
-
25.65%
32.55%
W4A4
-
-
24.55%
26.93%
34.73%
Appendix
Table E.2: Results of fine-tuning Llama-1-7B on MMLU benchmarks. 5-shot results are reported.
LLama-2-7B (FP: 27.3%)
SmoothQuant
OmniQuant
FlatQuant
ZeroQAT
W2A16
-%
6.3%
18.3%
20.7%
W4A4
0.6%
7.8%
18.8%
22.1%
Appendix
Table E.3: Results of fine-tuning Llama-2-7B on GSM8K benchmarks. 5-shot results are reported.
Quantization-aware training (QAT) is essential for extremely low-bit large language models (LLMs). Current QAT methods are mainly based on scalar quantization (SQ), which enables efficient optimization but suffers from severe performance degradation at 2-bit precision. On the other hand, vector quantization (VQ) provides substantially higher representational capacity, but its discrete codebook lookup prevents end-to-end training. We propose LC-QAT, a 2-bit weight-only VQ-QAT framework that represents quantized weights via a learned affine mapping over discrete vectors, which yields a high-quality PTQ initialization and enables fully differentiable end-to-end optimization without explicit codebook lookup in the training forward pass. This strong post-training initialization makes LC-QAT highly data-efficient. Experiments across diverse LLMs demonstrate that LC-QAT consistently outperforms state-of-the-art QAT methods while using only 0.1%--10% of the training data. Our results establish LC-QAT as a practical and scalable solution for extreme low-bit model deployment. Codes are publicly available at https://github.com/AI9Stars/UniSVQ.
Haoyu Wang, Xingyu Yu, Haiyan Zhao +2
Department of Computer Science and Technology, Tsinghua University, Beijing, China · School of Software and Microelectronics, Peking University, Beijing, China · College of Computer Science and Technology, National University of Defense Technology, Hunan, China.
Quantization-aware training (QAT) leverages lower-precision arithmetic to reduce the cost of LLM deployment, but aggressive quantization degrades final model performance. A common remedy is mixed-precision training, in which high precision is assigned to some of the layers to maintain performance while keeping the cost constrained. This approach then requires precision assignments for model layers during training. We provide a new approach, called Q-PACE, consisting of a second-order sensitivity model that predicts the loss increase as a sum of quantization noise MSE weighted by per-layer curvature coefficients. During training, we periodically re-compute these coefficients using perturbations across layers, and re-assign precision. Pretraining and supervised fine-tuning experiments on LLMs of up to 4B parameters show that Q-PACE consistently improves over existing mixed-precision training recipes, and achieves comparable loss at substantially lower total memory budgets. We further find that quantization sensitivity is highly predictable by depth and layer type, and its stability during training allows for infrequent, cheap recalibration.
Alexandra Volkova, Matin Ansaripour, Erik Schultheis +2
Post training quantization is essential for deploying large language models (LLMs) on resource constrained hardware, yet state of the art methods enforce uniform bit widths across layers, yielding suboptimal accuracy efficiency trade offs. We present RAMP (Reinforcement Adaptive Mixed Precision), an off policy Soft Actor Critic framework that learns per layer bit width assignments to minimize perplexity under a global bit budget. The policy conditions on an 11 dimensional embedding of activation statistics, weight properties, and structural descriptors, enabling zero shot transfer across model families and scales. To enable stable sub 4 bit quantization, we introduce Scale Folding, a preconditioning technique that migrates activation outliers into weights via per channel scaling and normalization layer compensation. A quality prioritized reward with asymmetric penalties and budget cliffs drives rapid convergence. On Llama 2 7B, RAMP achieves 5.54 perplexity at 3.68GB (3.65 effective bits), outperforming uniform 4 bit AWQ (5.60 at 3.90 GB) and GPTQ by 6% in size and 1% to3% in quality. Critically, a policy trained only on Llama 2 7B generalizes zero shot to Llama 2 13B and Mistral 7B, often surpassing target specific training, supporting the hypothesis that quantization sensitivity is primarily architectural. The HALO pipeline exports allocations to GGUF format for kernel free inference on CPUs, GPUs, and edge devices, retaining 99.5% of FP16 commonsense reasoning performance.