To tackle the huge computational demand of large foundation models, activation-aware compression techniques without retraining have been introduced. However, since these methods highly rely on calibration data, domain shift issues may arise for unseen downstream tasks. We propose a test-time quantization (TTQ) framework which compresses large models on the fly at inference time to resolve this issue. With an efficient online calibration, instant activation-aware quantization can adapt every prompt regardless of the downstream tasks, yet achieving inference speedup. Several experiments demonstrate that TTQ can improve the quantization performance over state-of-the-art baselines.
Figures & tables
Figure 1: (a) Offline static quantization (e.g., AWQ/GPTQ) requires calibration data, incurs domain shift risk, and cannot be recalibrated after deployment. (b) Our TTQ is online dynamic quantization, with zero offline calibration, and capable of on-device self-calibration at inference time.
TTQ
AWQ (C4 Calib)
Calib Tokens T
0 (r=0)
0 (r=16)
211
212
213
214
215
216
217
WT2 Perplexity ( ↓ )
24.93
24.17
25.73
25.56
25.62
25.55
25.42
25.07
25.02
Table 1: Calibration length impact at 3-bit quantization with g=32 for OPT-350M model.
Table 2: Groupsize impact on WT2 perplexity at 3-bit quantization for Qwen3-1.7B model.
Table 3: Perplexity ( ↓ ) of OPT/Qwen3/Gemma3 models with different quantization methods. It shows macro average across WT2/PTB/C4 datasets. Groupsize is g=32 for all cases. Calibration token length is T=217 for AWQ. Bold and underline denote the best and second best, respectively. Asterisk “*” indicates reaching competitive performance to the original un-compressed LLM.
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 2: Histogram of top-5 hyperparameter selections (α,λ,p) for different OPT models with quantization bits of q∈{2,3,4,5} .
Table 4: Runtime Speed (k tokens/sec) of Query Projection Module for Qwen3 Models with 4-bit AWQ and TTQ, on NVIDIA A40 GPU.
Table 5: Runtime Speed (k tokens/sec) of Query Projection Module for Qwen3 Models with 4-bit AWQ and TTQ, on NVIDIA A100 GPU.
Table 6: Runtime Speed (k tokens/sec) of Query Projection Module for Qwen3 Models with 4-bit AWQ and TTQ, on NVIDIA L40 GPU.
Table 7: Runtime Speed (k tokens/sec) of Query Projection Module for Qwen3 Models with 4-bit AWQ and TTQ, on NVIDIA RTX3090 GPU.
Table 8: Runtime Speed (k tokens/sec) of Query Projection Module for Qwen3 Models with 4-bit AWQ and TTQ, on NVIDIA RTX4090 GPU.
Table 9: Perplexity ( ↓ ) of OPT models with different quantization methods. It shows macro average and standard deviation across WT2/PTB/C4 datasets. Groupsize is g=32 for all cases. Calibration token length is T=217 for AWQ. Bold and underline denote the best and second best, respectively. Asterisk “*” indicates reaching competitive performance to the original un-compressed LLM.
Table 10: Perplexity ( ↓ ) of Qwen3 models with different quantization methods. It shows macro average and standard deviation across WT2/PTB/C4 datasets. Groupsize is g=32 for all cases. Calibration token length is T=217 for AWQ. Bold and underline denote the best and second best, respectively. Asterisk “*” indicates reaching competitive performance to the original un-compressed LLM.
Table 11: Perplexity ( ↓ ) of Gemma3 models with different quantization methods. It shows macro average and standard deviation across WT2/PTB/C4 datasets. Groupsize is g=32 for all cases. Calibration token length is T=217 for AWQ. Bold and underline denote the best and second best, respectively. Asterisk “*” indicates reaching competitive performance to the original un-compressed LLM.
Quantization q
2 bits
3 bits
4 bits
5 bits
Qwen3-VL-2B: Acc 80.35%
RTN
0.00%
9.23%
73.27%
80.22%
AWQ (COCO-Cap Calib)
1.41%
75.67%
79.04%
79.89%
AWQ (OK-VQA Calib)
1.37%
74.68%
79.47%
79.80%
AWQ (ChartQA Calib)
0.67%
75.52%
79.29%
79.80%
AWQ (TextVQA Calib)
0.82%
72.15%
78.85%
80.21%
Appendix
Table 12: Accuracy ( ↑ ) of Qwen3-VL models with different quantization methods on TextVQA benchmark. Groupsize is g = 32 for all cases. Bold and underline denote the best and second best, respectively. Asterisk “*” indicates reaching competitive performance to the original un-compressed VLM.
Benthmark
Libero Spatial
Libero Object
Libero Goal
Libero 10
Avg
BF16
97.5%
100.0%
97.0%
96.5%
97.75%
RTN
57.0%
65.0%
27.5%
2.0%
37.88%
AWQ (Spatial Calib)
90.5%
100.0 %
85.0%
82.0%
89.34%
AWQ (Object Calib)
91.5%
98.5%
92.0%
78.0%
90.00%
AWQ (Goal Calib)
92.5%
100.0 %
93.5 %
84.5%
92.63%
AWQ (10 Calib)
94.0 %
99.5 %
92.5 %
76.5%
90.63%
Appendix
Table 13: Success rate ( ↑ ) of π0.5 VLA model with different quantization methods on LIBERO robot manipulation benchmark. We use q=2 bits and g=64 groupsize. Bold and underline denote the best and second best, respectively.
Model
layers
heads
hidden size
head dim
MLP dim
Huggingface ID
125M
12
12
768
64
3072
facebook/opt-125m
350M
24
16
1024
64
4096
facebook/opt-350m
1.3B
24
32
2048
64
8192
facebook/opt-1.3b
2.7B
32
32
2560
80
10240
facebook/opt-2.7b
6.7B
32
32
4096
128
16384
facebook/opt-6.7b
13B
40
40
5120
128
20480
facebook/opt-13b
Appendix
Table 14: OPT model parameters Zhang et al. (2022)
Model
layers
heads
KV heads
hidden size
head dim
MLP dim
Huggingface ID
0.6B
28
16
8
1024
128
3072
Qwen/Qwen3-0.6B
1.7B
28
16
8
2048
128
6144
Qwen/Qwen3-1.7B
4B
36
32
8
2560
128
9728
Qwen/Qwen3-4B
8B
36
32
8
4096
128
12288
Qwen/Qwen3-8B
14B
40
40
8
5120
128
17408
Qwen/Qwen3-14B
32B
64
64
8
5120
128
25600
Qwen/Qwen3-32B
Appendix
Table 15: Architecture parameters of Qwen3 dense models Yang et al. (2025)
Model
layers
heads
KV heads
hidden size
head dim
MLP dim
Huggingface ID
270M
18
4
1
640
256
2048
google/gemma-3-270m-it
1B
26
4
1
1152
256
6912
google/gemma-3-1b-it
4B
34
8
4
2560
256
10240
google/gemma-3-4b-it
12B
48
16
8
3840
256
15360
google/gemma-3-12b-it
27B
62
32
16
5376
256
21504
google/gemma-3-27b-it
Appendix
Table 16: Gemma3 instruction-tuned text transformer parameters Gemma Team et al. (2025)
Model
layers
heads
KV heads
hidden size
head dim
MLP dim
Hugginface ID
2B
24
16
8
2048
128
11008
Qwen/Qwen3-VL-2B-Instruct
4B
32
32
8
4096
128
22016
Qwen/Qwen3-VL-4B-Instruct
8B
36
32
8
4096
128
22016
Qwen/Qwen3-VL-8B-Instruct
32B
64
40
8
5120
128
27392
Qwen/Qwen3-VL-32B-Instruct
Appendix
Table 17: Qwen3-VL transformer parameters Bai et al. (2025)
Module
layers
heads
KV heads
hidden size
head dim
MLP dim
LLM: Gemma-2B
18
8
1
2048
256
16384
Vision Encoder: SigLIP ViT-L
24
16
16
1024
64
4096
Diffusion Policy: Gemma-300M
18
8
1
1024
128
4096
Appendix
Table 18: π0.5 VLA transformer parameters Intelligence et al. (2025) : Huggingface ID lerobot/pi05_libero_finetuned
Low-bit activation quantization remains a major bottleneck in efficient large language model (LLM) deployment. The difficulty is not only that activations contain outliers, but that their distributions are often poorly matched to a low-bit uniform quantizer. Existing post-training quantization (PTQ) methods suppress peaks, balance channels, or minimize reconstruction error, yet they rarely specify what activation distribution is actually easy to discretize. As a result, activations may appear numerically smoother while still incurring large quantization error because the quantization range remains wide or most values collapse into a few levels near the mean. We recast activation transformation as quantizer-facing distribution design and analyze quantization error from an information-theoretic perspective. Our analysis shows that quantization-friendly activations should jointly have a smaller numerical range and sufficient dispersion within that range. Guided by this analysis, we propose InfoQuant, a train-free method that employs Peak Suppression Orthogonal Transformation (PSOT) to shape activations into more quantization-friendly distributions. We further introduce adaptive outlier-token selection to improve the robustness of PSOT during optimization. Across multiple LLM families, InfoQuant consistently outperforms prior PTQ and end-to-end training baselines. Under W4A4KV4, it preserves 97% of floating-point accuracy on average and reduces the LLaMA-2 13B performance gap by 42% over the previous state of the art. Code is available at https://github.com/LLIKKE/InfoQuant
Ke Li, Dong An, Xiaoling Zang +6
School of Software Technology, Zhejiang University · Ant Group · College of Computer Science and Technology, Zhejiang University of Technology +3
Many LLM applications require only narrow capabilities, yet standard post-training quantization (PTQ) methods allocate precision without considering the target task. This can waste bits on layers that are less relevant to the task signal while over-compressing layers that are critical for downstream behavior. We propose Task-Aware Quantization (TAQ), a training-free, weight-only mixed-precision PTQ framework that uses a small set of unlabeled task calibration prompts to allocate higher precision to task-relevant transformer layers under a fixed bit budget. TAQ estimates layer importance from hidden representations and output sensitivity, and we instantiate it with three scoring rules: TAQ-IS, based on activation information and stability; TAQ-KL, based on output-distribution sensitivity under a quantization-noise proxy; and TAQ-O, a label-informed oracle diagnostic for analyzing layer sensitivity. Across several benchmarks, TAQ outperforms task-agnostic baselines such in most settings, with especially strong gains in the accuracy--memory ratio. We further validate that these gains translate to real deployment behavior through hardware throughput and latency measurements, and analyze calibration robustness and residual-stream error propagation. Overall, TAQ turns mixed-precision PTQ from a model-centric compression step into a task-conditioned precision-allocation problem. A reference implementation is available at \includegraphics[height=1em]{imgs/github-mark.png}.
Amit LeVi, Raz Lapid, Rom Himelstein +3
1Technion—Israel Institute of Technology · 2Intuit · 3Ben-Gurion University of the Negev +1
Recent generative models have become increasingly powerful, but their inference cost continues to grow. Model quantization offers a promising way to compress these models and accelerate inference. However, at 4 bits, activation quantization is substantially more challenging than weight quantization. Recent post-training quantization (PTQ) and quantization-aware training (QAT) methods have made progress in 4-bit activation quantization by introducing smoothing, SVD branches, rotations, mixed precision, or advanced formats such as NVFP4. These additional operators and data types impose demanding requirements on inference engines and hardware, limiting the broad adoption of low-precision models. Can quantization be achieved using only plain low-bit operators? To answer this question, we propose JustQuant, a simple yet effective framework that moves the complexity of low-bit quantization from deployment-time operators into the training process. We first revisit model quantization from the perspective of knowledge distillation and show that a key reason existing PTQ and QAT methods fail is that they typically exploit supervision at only a single level. We then introduce Theseus QAD, a quantization-aware distillation method that progressively applies multi-level supervision, analogous to the gradual replacement process in the Ship of Theseus. Extensive experiments on DiT and diffusion large language models show two distinct regimes. For smaller models, Theseus QAD can serve as a lightweight warm-up stage that substantially improves subsequent QAT with plain operators, while naive QAD may collapse in the same setting. For larger models, Theseus QAD provides a stronger distillation training path than ordinary QAD. Across both regimes, JustQuant improves low-bit quantization quality while avoiding the complex operators required by many existing PTQ methods.
Kaicheng Yang, Kaisen Yang, Chunyu Liu +8
Shanghai Jiao Tong University · Tsinghua University · The Hong Kong Polytechnic University