JARQ: Joint Alternating Refinement for Quantization
Organizations: McGill University
Abstract
Group-wise post-training quantizers for large language models round weights onto a grid that is not refit to the resulting integer codes. We show that this leaves accuracy on the table: the best grid depends on the codes, input correlations couple the errors of different groups, and useful code changes often involve many codes at once. We propose JARQ , a plug-in refinement that starts from any group-wise quantizer and alternates a joint least-squares fit of all group scales with bounded Babai proposals that move many codes of a group together on the current grid. The problem is a bilinear box-constrained mixed-integer least-squares problem; the solver is backpropagation-free, does not increase the layer-wise objective under exact scale solves, and keeps the host's bit width, groups, zero points, and inference cost. Across Llama-2, Llama-3, and Qwen models with RTN, GPTQ, OmniQuant, and AWQ hosts, JARQ lowers perplexity in 90 of 96 comparisons, cuts three-bit RTN perplexity by up to 36%, raises mean multiple-choice accuracy in 23 of 24 configurations, and improves QEP, QuaRot, and OJBKQ outputs, at under a minute per 7B block.
Figures & tables
| (11) |
| Llama-2-7B | Llama-2-13B | Llama-3-8B | Qwen2.5-7B | Qwen3-4B | Qwen3-8B | |||||||
| Method | WT2 | C4 | WT2 | C4 | WT2 | C4 | WT2 | C4 | WT2 | C4 | WT2 | C4 |
| W3A16 | ||||||||||||
| FP16 | 5.472 | 6.973 | 4.884 | 6.468 | 6.136 | 8.881 | 6.848 | 10.442 | 13.638 | 16.626 | 9.715 | 13.290 |
| RTN | 6.663 | 8.405 | 5.521 | 7.179 | 12.048 | 16.444 | 11.954 | 16.054 | 22.447 | 27.013 | 13.456 | 17.582 |
| Ours | 6.204 6.88 | 8.217 2.24 | 5.270 4.54 | 7.158 0.29 | 8.219 31.8 | 12.667 23.0 | 7.625 36.2 | 11.916 25.8 | 16.194 27.9 | 21.625 19.9 | 10.712 20.4 | 15.103 14.1 |
| GPTQ | 6.083 | 7.990 | 5.248 | 7.034 | 7.618 | 13.242 | 7.665 | 11.677 | 15.153 | 18.623 | 10.749 | 14.720 |
| Model | Host | W/A | ARC-E | ARC-C | MMLU | Wino. | BoolQ | Avg. |
| Llama-3-8B | FP16 | W16A16 | 77.53 | 54.10 | 65.45 | 74.03 | 82.26 | 70.67 |
| RTN | W3A16 | 61.07/ 67.85 | 40.53/ 44.45 | 47.17/ 53.11 | 67.48/ 71.03 | 69.11/ 75.60 | 57.07/ 62.41 5.34 | |
| W4A16 | 77.31/ 77.78 | 51.62 / 51.11 | 62.63/ 63.57 | 72.38/ 72.38 | 79.69/ 81.07 | 68.73/ 69.18 0.45 | ||
| GPTQ | W3A16 | 63.59/ 69.32 | 39.16/ 43.00 | 52.81/ 57.47 | 71.35 / 71.19 | 69.88/ 70.34 | 59.36/ 62.26 2.90 | |
| W4A16 | 77.48/ 78.75 | 53.67 / 53.33 | 63.71 / 63.45 | 74.11/ 74.43 | 81.44/ 82.51 | 70.08/ 70.49 0.41 | ||
| OmniQuant | W3A16 | 63.80/ 68.52 | 40.96/ 43.00 | 53.45 / 52.55 | 68.75/ 70.72 | 75.08 / 71.41 | 60.41/ 61.24 0.83 |
| Model | W/A | Base | Ours |
|---|---|---|---|
| Qwen2.5-7B | W3A16 | 7.67 | 7.58 |
| W4A16 | 7.02 | 7.00 | |
| Qwen3-8B | W3A16 | 11.00 | 10.52 |
| W4A16 | 9.94 | 9.88 |
| Measurement | RTN | GPTQ |
| Indep. scale fits: gap (%) | 20.98 | 25.29 |
| 3-pass coord. descent: gap (%) | 1.31 | 0.01 |
| 3-pass coord. descent: time ratio | 1.29 | 1.32 |
| Babai gain after 1-code search (%) | 40.14 | 13.53 |
| Median codes changed | 30 | 6 |
| Joint over Fixed, held-out (%) | 12.32 | 5.47 |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Refinement time (s) | Total time (s) | Overhead | GPU memory (GiB) | CPU memory (GiB) | |
|---|---|---|---|---|---|
| 0 | — | 2.07 | 6.63 | ||
| 3 | 2.48 | 5.95 | |||
| 5 | 2.53 | 5.86 | |||
| 7 | 2.58 | 5.79 | |||
| 10 | 2.64 | 5.69 |
| One block | Two blocks | ||||||
|---|---|---|---|---|---|---|---|
| Model | Host | Host | Ours | Host | Ours | ||
| Llama-2-7B | RTN | 4.9 | 61.5 | 56.6 | 7.8 | 119.8 | 112.0 |
| GPTQ | 33.0 | 86.6 | 53.6 | 64.0 | 170.1 | 106.1 | |
| AWQ | 28.4 | 81.5 | 53.1 | 49.3 | 154.0 | 104.7 | |
| OmniQuant | 69.7 | 126.6 | 56.9 | 135.6 | 244.9 | 109.3 | |
| Qwen3-4B | RTN | 2.8 | 40.3 | 37.5 | 4.8 | 79.4 | 74.6 |
| WT2 | C4 | ||||
| Host | W/A | Base | Ours | Base | Ours |
| FP16 | W16A16 | 5.0176 | 8.9503 | ||
| OmniQuant | W3A16 | 5.7804 | 5.6818 | 9.5809 | 9.5765 |
| W4A16 | 5.1951 | 5.2085 | 9.0920 | 9.0431 | |
| AWQ | W3A16 | 5.8960 | 5.7181 | 9.5722 | 9.5719 |
| W4A16 | 5.2222 | 5.1824 | 9.0894 | 9.0833 | |
| WT2 | C4 | |||
|---|---|---|---|---|
| W/A | Base | Ours | Base | Ours |
| W3A16 | 8.2562 | 8.0641 | 11.7171 | 11.5977 |
| W4A16 | 7.7106 | 7.7025 | 10.9813 | 10.9500 |
| GSM8K | MATH-500 | |||
|---|---|---|---|---|
| Calibration | Base | Ours | Base | Ours |
| WT2 | 59.67 | 66.19 | 29.4 | 28.2 |
| C4 | 61.49 | 67.70 | 29.8 | 30.2 |
| Pile | 69.98 | 72.02 | 42.4 | 45.6 |
| Model | Host | W/A | Base | Ours |
| Llama-3-8B | FP16 | W16A16 | 47.92 | |
| GPTQ | W3A16 | — | — | |
| W4A16 | 42.53 | 42.61 | ||
| OmniQuant | W3A16 | 20.17 | 22.29 | |
| W4A16 | 42.68 | 43.67 | ||
| AWQ | W3A16 | 21.30 | 21.30 | |
| Model | Host | W/A | Host | Codes only | Scales only | Full JARQ |
|---|---|---|---|---|---|---|
| Llama-3-8B | RTN | W3A16 | 12.048/16.444 | 8.689/14.171 | 8.580/13.311 | 8.219 / 12.667 |
| W4A16 | 6.727/9.636 | 6.586/9.605 | 6.490/9.583 | 6.481 / 9.532 | ||
| GPTQ | W3A16 | 7.618 /13.242 | 7.714/12.318 | 7.784/12.628 | 7.649/ 12.011 | |
| W4A16 | 6.423/ 9.386 | 6.419/9.416 | 6.417/9.411 | 6.416 /9.408 | ||
| Qwen3-4B | RTN | W3A16 | 22.447/27.013 | 21.205/27.078 | 17.968/22.316 | 16.194 / 21.625 |
| W4A16 | 15.968/18.291 | 14.629/ 17.924 | 14.598/17.965 | 14.555 /17.930 |
| Host | Local NMSE | Linear output SSE | Linear combined | Final block NMSE | Final block combined |
|---|---|---|---|---|---|
| RTN | 1,818/1,904 | 1,888/1,904 | 1,888/1,904 | 8/8 | 8/8 |
| GPTQ | 1,739/1,904 | 1,447/1,904 | 1,443/1,904 | 7/8 | 6/8 |
| AWQ | 1,721/1,904 | 1,648/1,904 | 1,644/1,904 | 6/8 | 8/8 |
| OmniQuant | 1,794/1,904 | 1,456/1,904 | 1,456/1,904 | 2/8 | 3/8 |
| Model | W/A | Data | |||
|---|---|---|---|---|---|
| Llama-2-7B | W3A16 | WT2 | 6.4009/ 6.0186 | 6.6630/ 6.2043 | 7.1019/ 6.2951 |
| C4 | 8.1095/ 7.8924 | 8.4050/ 8.2166 | 8.9828/ 8.4944 | ||
| W4A16 | WT2 | 5.6780/ 5.5938 | 5.7261/ 5.6256 | 5.7495/ 5.6474 | |
| C4 | 7.2114/ 7.1347 | 7.2458/ 7.1857 | 7.2983/ 7.2414 | ||
| Qwen3-8B | W3A16 | WT2 | 12.3856/ 10.4292 | 13.4564/ 10.7123 | 15.7918/ 11.1354 |
| C4 | 16.0018/ 14.5767 | 17.5825/ 15.1033 | 20.3924/ 15.8302 |
| Model | W/A | (min) | (min) | Increase |
|---|---|---|---|---|
| Llama-2-7B | W3A16 | 32.13 | 87.96 | |
| W4A16 | 32.06 | 87.04 | ||
| Qwen3-8B | W3A16 | 38.54 | 95.36 | |
| W4A16 | 39.24 | 96.00 |
| Llama-2-7B | Qwen3-8B | |||
| W3A16 | W4A16 | W3A16 | W4A16 | |
| Base ( ) | 6.6630/8.4050 | 5.7261/7.2458 | 13.4564/17.5825 | 10.1369/13.6431 |
| 0.0 | 6.2254/8.2287 | 5.6203 /7.1873 | 10.5207 / 15.0312 | 9.9718/13.5872 |
| 0.2 | 6.1879/8.2263 | 5.6242/ 7.1837 | 10.6558/15.1019 | 9.9430/13.5646 |
| 0.4 | 6.1944/8.2391 | 5.6295/7.1875 | 10.7394/15.1621 | 9.9146 / 13.5575 |
| 0.6 | 6.2043/8.2166 | 5.6256/7.1857 | 10.7123/15.1033 | 9.9980/13.6271 |
| Changed coordinate | New codes | Refitted error |
|---|---|---|
| First | ||
| Second | ||