Inferensys

Glossary

Post-Training Quantization (PTQ)

A compression technique that converts a pre-trained floating-point model to a lower bit-width integer representation without retraining, using calibration data to minimize accuracy loss.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
MODEL COMPRESSION

What is Post-Training Quantization (PTQ)?

A compression technique that converts a pre-trained floating-point model to a lower bit-width integer representation without retraining, using calibration data to minimize accuracy loss.

Post-Training Quantization (PTQ) is a one-shot compression technique that maps the 32-bit floating-point weights and activations of a fully trained neural network to lower-precision integer formats, such as INT8, without requiring any further backpropagation or fine-tuning. Unlike Quantization-Aware Training (QAT), PTQ applies quantization as a post-hoc step, relying on a small, unlabeled calibration dataset to determine optimal clipping ranges and scaling factors that minimize the Kullback-Leibler divergence between the original and quantized output distributions.

The primary advantage of PTQ is its simplicity and zero training cost, making it the default path for deploying models on edge hardware like NPUs and microcontrollers. However, the absence of retraining makes the compressed model susceptible to accuracy degradation, particularly in architectures with significant outlier activations. Techniques such as per-channel quantization and batch normalization folding are critical preprocessing steps that mathematically absorb linear operations into preceding layers, reducing the quantization error introduced during the conversion to fixed-point arithmetic.

POST-TRAINING QUANTIZATION

Key Characteristics of PTQ

Post-Training Quantization (PTQ) is a one-shot compression technique that converts a pre-trained 32-bit floating-point model to a lower bit-width integer representation using a small, unlabeled calibration dataset. Unlike Quantization-Aware Training (QAT), PTQ requires no retraining or fine-tuning, making it the fastest path to deployment on integer-only hardware.

01

Calibration-Driven Precision

PTQ relies on a representative calibration dataset—typically 100-1000 unlabeled samples—to collect activation statistics. These statistics determine optimal clipping ranges and scaling factors for each tensor.

  • Min-Max Calibration: Sets the quantization range to the observed minimum and maximum activation values
  • Percentile Calibration: Discards extreme outliers to reduce quantization error for the majority of values
  • Mean Squared Error (MSE) Calibration: Minimizes the L2 distance between original and quantized tensor distributions

The quality of calibration data directly determines accuracy retention. Mismatched data distributions cause significant degradation.

02

Symmetric vs. Asymmetric Quantization

PTQ supports two fundamental mapping schemes that trade off hardware efficiency against representational fidelity:

  • Symmetric Quantization: Maps floating-point values to a signed integer range centered on zero (e.g., -128 to 127 for INT8). This eliminates the zero-point offset, simplifying hardware multiply-accumulate operations
  • Asymmetric Quantization: Uses a non-zero zero-point to map the full floating-point range into the integer domain. This better preserves distributions with non-zero means, such as ReLU activations, at the cost of additional subtraction operations

Most edge NPUs and DSPs optimize for symmetric per-tensor quantization due to its computational simplicity.

03

Per-Tensor vs. Per-Channel Granularity

The granularity of quantization parameters dramatically impacts accuracy retention:

  • Per-Tensor Quantization: Applies a single scale and zero-point to an entire weight tensor. Fastest execution but struggles with wide weight distributions across output channels
  • Per-Channel Quantization: Assigns independent quantization parameters to each output channel of a convolutional or fully-connected layer. This preserves accuracy significantly better for models with high variance in per-channel weight ranges

Per-channel quantization is the default recommendation for convolutional architectures. Per-tensor is preferred for fully-connected layers and transformer attention projections where channel variance is lower.

04

Post-Training Integer-Only Execution

The end goal of PTQ is full-integer quantization, where all arithmetic—including activations, weights, biases, and intermediate tensors—occurs in the integer domain.

  • Weight Quantization: Static; weights are quantized once offline after calibration
  • Activation Quantization: Dynamic or static; quantization parameters are either computed at runtime or fixed during calibration
  • Bias Quantization: Typically stored as INT32 to preserve accumulation precision before requantization to INT8 output

Full-integer execution eliminates floating-point units entirely, enabling deployment on microcontrollers, fixed-point DSPs, and integer-only NPU architectures like Qualcomm Hexagon and Google Edge TPU.

05

Accuracy-Aware Quantization Selection

Modern PTQ toolchains implement automatic mixed-precision selection to balance accuracy and latency:

  • Sensitivity Analysis: Measures each layer's contribution to total accuracy degradation when quantized. Layers with high sensitivity are kept at higher precision (INT16 or FP16)
  • Layer-wise Fallback: Operators that exhibit unacceptable error—often the first and last layers, depthwise convolutions, or LayerNorm—are selectively excluded from quantization
  • Quantization Simulation: The quantized graph is executed on calibration data to measure layer-wise and end-to-end accuracy drop before hardware deployment

This approach achieves near-floating-point accuracy while still realizing 2-4x throughput improvements on target accelerators.

06

Hardware-Aware Operator Fusion

PTQ pipelines apply graph-level optimizations that fuse multiple operators into single quantized kernels to minimize memory traffic and kernel launch overhead:

  • Conv-BatchNorm-ReLU Fusion: Folds BatchNorm parameters into the preceding convolution weights and biases, then applies ReLU in-place during the convolution output write
  • Add-ReLU Fusion: Combines residual addition and activation into a single fused kernel, avoiding an intermediate tensor allocation
  • Requantization Insertion: Strategically places requantization nodes between integer operations to prevent accumulator overflow while maintaining precision

These fusions are critical for achieving the theoretical TOPS/Watt of edge accelerators by reducing DRAM bandwidth pressure.

POST-TRAINING QUANTIZATION

Frequently Asked Questions

Clear, technically precise answers to the most common questions about converting floating-point neural networks to efficient integer-only models without retraining.

Post-Training Quantization (PTQ) is a compression technique that converts a pre-trained 32-bit floating-point neural network into a lower bit-width integer representation—typically INT8—using a small, unlabeled calibration dataset, without any retraining or backpropagation. The process works by collecting runtime statistics on activation ranges (min/max or moving averages) during a calibration pass, then mapping these floating-point tensors to integer grids using a scale factor and zero-point. For example, an FP32 weight of 0.345 might be represented as the INT8 value 88 with a scale of 0.00392. During inference, integer matrix multiplications execute significantly faster on hardware with vectorized instruction sets like ARM NEON or Intel AVX, while dequantization back to floating-point occurs only at the final output layer. PTQ is the most practical deployment path for edge devices because it requires no access to the original training pipeline, no labeled data, and typically completes in minutes rather than the hours or days required for Quantization-Aware Training (QAT).

ON-DEVICE RF MODEL COMPRESSION COMPARISON

PTQ vs. Quantization-Aware Training vs. Weight Pruning

A technical comparison of the three primary methods for reducing the computational footprint of neural receivers for deployment on resource-constrained edge hardware.

FeaturePost-Training Quantization (PTQ)Quantization-Aware Training (QAT)Weight Pruning

Core Mechanism

Converts pre-trained FP32 weights to INT8 using calibration data

Simulates quantization noise during forward pass training

Removes low-magnitude connections by zeroing out weights

Requires Retraining

Requires Calibration Dataset

Typical Accuracy Drop (ResNet-50)

0.3-1.0%

0.1-0.3%

0.5-2.0%

Model Size Reduction

4x

4x

5-10x

Inference Latency Improvement

2-4x

2-4x

1.5-3x

Hardware Compatibility

Standard INT8 SIMD (CPU, GPU, NPU)

Standard INT8 SIMD (CPU, GPU, NPU)

Sparse compute support required

Suitable for IQ Signal Fidelity

Moderate (phase noise risk)

High (noise-robust weights)

High (preserves critical paths)

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.