NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PTMQ: Post-training Multi-Bit Quantization of Neural Networks

Ke Xu, Zhongcheng Li, Shanshan Wang, Xingyi Zhang

Abstract

Post-Training Quantization (PTQ) is a highly efficient technique for compressing deep neural networks, yet it typically produces static models optimized for a single bit-width. This paper presents PTMQ, the first framework to bring multi-bit quantization—enabling a single model to switch between precision levels (e.g., 3-bit to 8-bit) at runtime—into the PTQ domain. PTMQ achieves accuracy comparable to specialized fixed-bit models while being roughly 100x faster to optimize than prior training-based multi-bit approaches.

Introduction

Deep neural networks (DNNs) are increasingly deployed on edge devices with limited compute and battery resources. Quantization, which reduces the precision of weights and activations from 32-bit floating-point to lower-bit integers, is a standard solution. However, traditional methods are "static," requiring a separate model for each desired bit-width. Multi-bit quantization allows for dynamic adaptation, but previously required computationally expensive Quantization-Aware Training (QAT). PTMQ addresses this by enabling multi-bit adaptation within the efficient PTQ framework, requiring only minutes of optimization and a small calibration dataset.

Methodology

PTMQ optimizes a model's rounding values and scaling factors across a range of bit-widths simultaneously using a small calibration dataset. The core insight is that quantization noise from varying bit-widths can be "absorbed" into weight rounding values. By treating rounding as a learnable parameter across multiple precisions, PTMQ finds a configuration that works for all target bit-widths.

Overview of the PTMQ framework, highlighting the Multi-bit Feature Mixer (MFM) and Group-Distill Loss (GD-Loss).

Multi-bit Feature Mixer (MFM)

During block-wise optimization, the MFM fuses features generated at different bit-widths (low, medium, and high). This forces the learned rounding values to be robust across the entire precision spectrum, preventing the model from biasing toward a single bit-width.

Group-wise Distillation Loss (GD-Loss)

To stabilize the learning of low-precision representations, PTMQ employs an internal "teacher-student" mechanism. The high-bit quantized version of a block serves as a guide for lower-bit versions, ensuring that low-precision features do not drift significantly from the high-precision ground truth.

To enable real-time adaptation, normalization layers are fused into the weights, eliminating the need to recalculate statistics when switching bit-widths. For mixed-precision scenarios, a genetic algorithm searches the Pareto frontier to find the optimal bit-width for each layer, balancing model size and sensitivity.

Experimental Results

The researchers evaluated PTMQ on the ImageNet dataset across various architectures, including CNNs (ResNet, MobileNetV2) and Vision Transformers (ViT, DeiT).

  • Efficiency: PTMQ is approximately 100x faster than previous multi-bit methods like MultiQuant. For instance, optimizing ResNet-18 takes only 1.4 hours on a single GPU, compared to 144 hours for MultiQuant.
  • Accuracy: On ResNet-50 at 3-bit precision, PTMQ outperformed AdaRound by 3.0% and BRECQ by 1.11%. For Vision Transformers, it showed a 0.3% to 0.5% accuracy improvement over PTQ4ViT at 4-bit and 5-bit precisions.
  • Mixed Precision: The framework supports seamless mixed-precision deployment, where different layers operate at different bit-widths, optimized via a Pareto frontier search using a genetic algorithm.

Ablation Analysis

Ablation studies confirm the necessity of both MFM and GD-Loss for maintaining high performance across multiple bit-widths.

Ablation analysis of the Multi-Bit Feature Mixer and Group-Distill Loss components.

The study shows that without MFM, the model tends to overfit to specific bit-widths, while GD-Loss is crucial for guiding the optimization of the most aggressive quantization levels.

Conclusion

PTMQ represents a significant step forward in making dynamic neural network quantization practical for real-world deployment. By moving multi-bit optimization from a training task to a post-training calibration task, it enables rapid deployment on edge devices where compute resources for full training are unavailable. Future work will focus on hardware-level kernel support to fully realize the efficiency gains of real-time bit-width switching.

Summary updated

BibTeX
@inproceedings{xu2024ptmq,
  author = {Ke Xu and Zhongcheng Li and Shanshan Wang and Xingyi Zhang},
  title = {{PTMQ: Post-training Multi-Bit Quantization of Neural Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i14.29553},
}
Figure