Visual Autoregressive (VAR) models have emerged as powerful generative tools, capable of synthesizing high-fidelity images by predicting visual tokens scale-by-scale. However, their massive computational footprint makes them difficult to deploy on standard consumer hardware. To bridge this gap, researchers often turn to Post-Training Quantization (PTQ)—converting high-precision numbers into low-bit integers.
Unfortunately, standard PTQ techniques often fail when applied to VAR models. This paper introduces a specialized PTQ framework that uses a clever "shift-and-sum" technique to protect critical image tokens from noise, alongside a resampling strategy to fix biased calibration data, setting a new state-of-the-art for efficient VAR inference.
The Challenges of Quantizing VAR Models
While Large Language Models (LLMs) predict the next word, VAR models predict the next scale of an image, moving from a blurry, low-resolution thumbnail to a high-resolution masterpiece. The authors identify two "deal-breakers" when applying standard PTQ to this process:
- Scale Sensitivity and Coarse-to-Fine Fragility: Errors made at the coarsest (smallest) scales are catastrophic. Because VAR models generate images autoregressively across scales, a single bit of noise at a $1 \times 1$ scale can propagate and amplify, completely changing the composition of the final $256 \times 256$ image.
- Calibration Mismatch: PTQ relies on a tiny "calibration" dataset to set its quantization parameters. In VAR models, the frequency at which certain "visual words" (codebook entries) appear in this small calibration set often fails to match the model's actual predicted probabilities. This discrepancy leads to biased, poor-quality quantization parameters.
Proposed Solutions: Shift-and-Sum and Resampling
To address these vulnerabilities, the authors propose two primary innovations tailored specifically for the VAR architecture:
Shift-and-Sum Quantization
The researchers discovered an "Attention Multiplier" effect: quantization noise isn't uniform. When an attention score is high, it acts as a magnifying glass for the quantization error of the associated value token.
To reduce this error without relying on specialized hardware for mixed-precision math, they introduce a "quantization kernel." For tokens with high attention scores, the model creates symmetrically shifted duplicates (e.g., $v + \text{shift}$ and $v - \text{shift}$), quantizes them, and then averages the results. This "averaging out" significantly suppresses noise for the most important parts of the image generation process.
By targeting only these highly "attentive tokens" for the shift-and-sum treatment, the model achieves high-precision results with only ~1% extra computational overhead. Furthermore, because it uses standard bit-shifts and additions, it remains entirely compatible with conventional AI accelerators.
Calibration Data Resampling
To fix the distribution mismatch in the calibration data, the authors abandon random sampling. Instead, they calculate the "target frequency" of every entry in the model's visual codebook based on predicted probabilities. They then manually reallocate tokens from oversampled entries to undersampled ones. This ensures the calibration data perfectly reflects the model's internal probability distribution, leading to much more accurate quantization parameters.
Key Results and Performance
The researchers evaluated their framework on ImageNet (for class-conditional image generation) and COCO (testing generalizability on OneFormer), as well as downstream tasks like image inpainting, outpainting, and editing.
The proposed method consistently outperformed existing PTQ baselines like BRECQ and LiteVAR across multiple architectures (VAR-d16 to VAR-d30):
- Higher Fidelity: On VAR-d30 with 4-bit weights and 4-bit activations (W4/A4), the shift-and-sum method achieved a Fréchet Inception Distance (FID) of 9.12, significantly outperforming LiteVAR's 12.25.
- Better Global Structure: Qualitative results demonstrated that while other quantization methods produce "glitchy" artifacts or lose the semantic meaning of the prompt, the Shift-and-Sum method maintains strict structural coherence.
- Hardware Efficiency: In throughput tests on an Intel Xeon CPU, the method was nearly as fast as the simplest quantization baselines, while being significantly faster than "mixed-precision" alternatives that force certain layers to remain in full precision.
Limitations and Future Directions
While the method works exceptionally well at 4-bit and 6-bit settings, the authors note a "4-Bit Floor." Performance still degrades sharply when pushed below 4 bits, where quantization noise begins to dominate the entire generation process. Future work will need to explore training-aware approaches or fundamentally different quantization strategies to break this sub-4-bit barrier, as well as test the framework on a wider variety of non-autoregressive transformer architectures.
Summary updated