Home Knowledge Base Static quantization

Static quantization uses fixed quantization parameters (scale and zero-point) determined during a calibration phase, rather than computing them dynamically at runtime. Both weights and activations are quantized using these pre-determined parameters.

How It Works

1. Calibration: Run the model on a representative calibration dataset (typically 100-1000 samples) to observe the range of activation values in each layer. 2. Parameter Determination: Compute scale and zero-point for each activation tensor based on observed min/max values (or percentiles to handle outliers). 3. Quantization: Quantize both weights and activations using the fixed parameters. 4. Inference: All operations (matrix multiplications, convolutions) are performed in INT8 using the pre-determined quantization parameters.

Advantages

Disadvantages

Calibration Strategies

When to Use Static Quantization

Static quantization is the standard choice for production deployment of CNNs and other models where maximum inference speed and hardware compatibility are priorities.

static quantizationmodel optimization

Related Topics

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.