Quantization scale and zero-point are the two parameters that define an affine transformation for mapping a range of floating-point values to a range of integers. The scale (a floating-point number) determines the step size between quantized levels, while the zero-point (an integer) represents the quantized value that corresponds to the real number zero, enabling the accurate representation of both positive and negative values. Together, they implement the formula: real_value = scale * (quantized_value - zero_point).
Glossary
Quantization Scale and Zero-Point

What is Quantization Scale and Zero-Point?
The core parameters that define the affine transformation for converting floating-point values to integers.
The choice of these parameters determines whether symmetric quantization (zero-point = 0) or asymmetric quantization is used. Asymmetric schemes, by aligning the quantized range to the actual min/max of the tensor data, often yield lower quantization error for asymmetric distributions like ReLU activations. These parameters are calculated during a calibration step in Post-Training Quantization (PTQ) or learned during Quantization-Aware Training (QAT) to minimize accuracy loss.
Key Characteristics of Scale and Zero-Point
The quantization scale (S) and zero-point (Z) define an affine transformation that maps floating-point values to a quantized integer range. These two parameters are the core of modern integer quantization, enabling both symmetric and asymmetric schemes.
The Affine Transformation Formula
The mapping from a real (float) value r to a quantized integer q is defined by the equation:
q = round(r / S) + Z
The inverse operation, dequantization, reconstructs an approximate float value r' from the integer:
r' = S * (q - Z)
- Scale (S): A positive floating-point number that defines the step size between consecutive integer values. It's calculated as
S = (rmax - rmin) / (qmax - qmin). - Zero-Point (Z): An integer within the quantized range that corresponds exactly to the real value zero. It ensures that the value zero is representable without error, which is critical for operations like padding.
Symmetric vs. Asymmetric Quantization
The choice of how to set Z defines the two primary quantization schemes.
- Symmetric Quantization: The zero-point
Zis forced to be 0. The quantized range is symmetric around zero (e.g.,[-127, 127]for 8-bit). This simplifies the arithmetic because the(q - Z)term becomes justq. It is most effective when the tensor's value distribution is roughly symmetric around zero, which is common for weight tensors after normalization. - Asymmetric Quantization: The zero-point
Zis calculated to exactly map the observed minimum value of the tensor (rmin). The quantized range covers[rmin, rmax]precisely. This uses the full integer range more efficiently for data with an asymmetric distribution (e.g., ReLU activations, which are all non-negative), typically resulting in lower quantization error.
Granularity: Per-Tensor vs. Per-Channel
Scale and zero-point parameters can be applied at different levels of granularity, trading off accuracy for complexity.
- Per-Tensor Quantization: A single scale and zero-point are calculated for an entire tensor. This is the simplest and most common scheme, supported by all hardware. However, it can introduce significant error if the tensor's values vary widely across channels.
- Per-Channel Quantization: A unique scale and zero-point are calculated for each output channel of a weight tensor (e.g., each filter in a convolutional layer). This provides a much tighter fit to the actual data distribution, dramatically reducing error, especially for depthwise convolutions. It is a key technique for low-bit quantization (e.g., INT4). The increased parameter overhead is minimal.
Determining Parameters: Calibration
For Static Quantization, the optimal S and Z must be determined before deployment via a calibration process.
- Data Collection: A small, representative dataset (the calibration set) is passed through the model.
- Range Observation: For each tensor to be quantized (weights and activations), the observed minimum (
rmin) and maximum (rmax) values are recorded. For activations, this often involves tracking a running histogram. - Scheme Selection: Choose symmetric or asymmetric based on the observed distribution.
- Parameter Calculation: Apply the formulas:
S = (rmax - rmin) / (qmax - qmin)Z = round(qmin - rmin / S)
Advanced calibration methods use entropy minimization or mean-square-error minimization to find the optimal clipping range, a process known as quantization clipping or saturation.
Hardware Implications and Integer Arithmetic
The primary purpose of S and Z is to enable efficient integer-only inference. Consider a core operation like a fully connected layer: Y = X * W.
With quantized inputs (Xq, Sx, Zx) and weights (Wq, Sw, Zw), the operation is decomposed into integer arithmetic:
- Perform the integer matrix multiplication:
M = Xq * Wq. - Account for zero-points and scales in a fixed-point adjustment. Modern frameworks and Neural Processing Units (NPUs) fuse these adjustments into efficient, fixed-point operations, avoiding floating-point computation entirely.
The zero-point ensures that common operations like adding a bias (which is also quantized) or performing a ReLU on zero work correctly in the integer domain.
Error Sources and Mitigation
Quantization is a lossy process. The scale and zero-point parameters directly influence the quantization error.
- Clipping Error: Occurs when values outside
[rmin, rmax]are saturated to the nearest quantized limit. Setting the range too narrow increases this error. - Rounding Error: The
round()operation in the quantization formula introduces small errors for values not exactly aligned with the quantization grid. - Zero-Point Mismatch: In asymmetric quantization, if
Zis not an integer, it is rounded, causing a shift in the entire mapping.
Mitigation Techniques:
- Quantization-Aware Training (QAT): Simulates quantization during training, allowing the model to adapt its weights to the
SandZparameters. - Bias Correction: A post-training quantization method that adjusts layer biases to compensate for the change in output distribution caused by weight quantization.
- Mixed-Precision Quantization: Using higher precision (e.g., FP16) for sensitive layers with problematic distributions, while quantizing others to INT8.
Symmetric vs. Asymmetric Quantization
A comparison of the two primary schemes for defining the affine mapping between floating-point and quantized integer ranges, based on their use of the zero-point parameter.
| Feature / Characteristic | Symmetric Quantization | Asymmetric Quantization |
|---|---|---|
Zero-Point (ZP) Value | 0 | Non-zero integer (typically positive) |
Quantized Range Symmetry | ||
Mapping to Float Range | Centered on zero (e.g., [-α, +α]) | Mapped to [min, max] of tensor |
Typical Data Fit | Optimal for zero-centered distributions (e.g., weights post-normalization) | Optimal for asymmetric distributions (e.g., ReLU activations, which are ≥ 0) |
Computational Overhead | Lower (ZP = 0 simplifies integer math) | Higher (requires ZP addition/subtraction in ops) |
Quantization Error for Asymmetric Data | Higher (wastes representable range on unused negative values) | Lower (uses full integer range) |
Common Hardware Support | Universal | Universal, but may require explicit ZP handling |
Calibration Complexity | Lower (determine single scale factor from max(abs(min), abs(max))) | Higher (determine both min and max to calculate scale and ZP) |
Practical Applications and Examples
The scale (s) and zero-point (z) are not just theoretical constructs; they are the critical parameters that enable efficient integer arithmetic in real-world systems. This section explores their concrete applications across hardware, frameworks, and deployment scenarios.
Enabling Integer-Only Inference on CPUs
The primary application of scale and zero-point is to convert floating-point matrix multiplications into pure integer operations. For a layer operation (Y = XW + b), where (X) and (W) are quantized to INT8, the calculation becomes:
[Y_{int} = (X_{int} - z_x)(W_{int} - z_w) * \frac{s_x s_w}{s_y} + \text{... bias terms} ]
- Hardware Acceleration: Modern CPU instruction sets (e.g., Intel VNNI, ARM DOT) have dedicated integer multiply-accumulate (IMAC) units that execute 8-bit operations in a single cycle, offering massive throughput gains over floating-point units (FPUs).
- Memory Bandwidth: Loading 8-bit integers instead of 32-bit floats reduces memory traffic by 4x, a critical bottleneck for performance.
Asymmetric Quantization for Activation Tensors
Asymmetric quantization, defined by a non-zero zero-point, is essential for quantizing activation tensors (layer outputs like ReLU).
- Real-World Example: The output of a ReLU activation function has a range of [0, +max]. A symmetric range (e.g., [-127, 127] for INT8) would waste half its quantization levels on negative values that never occur.
- Zero-Point's Role: By setting (z) to map the floating-point
0.0to an integer (e.g., 0 for uint8, or a mid-range value for int8), the scheme efficiently uses the full integer range [0, 255] to represent only the positive values, minimizing quantization error. - Framework Implementation: TensorFlow Lite's
tf.quantization.quantizefunction uses asymmetric quantization by default for activations, calculatingscale = (max - min) / (qmax - qmin)andzero_point = qmin - round(min / scale).
Per-Channel Quantization for Convolution Weights
Per-channel quantization applies a unique scale and zero-point to each output channel of a weight tensor (e.g., each filter in a convolutional layer).
- Why it's Superior: Weight distributions often vary significantly across channels. A single scale for the entire tensor (per-tensor) must accommodate the widest range, causing high error for channels with narrow distributions.
- Accuracy Impact: For models like MobileNet, using per-channel (vs. per-tensor) INT8 quantization can improve Top-1 accuracy by 2-5% with no runtime overhead.
- Implementation: During calibration, statistics (min/max or histograms) are collected independently per channel. The quantization formula (W_{int}^{(c)} = \text{round}(W_{float}^{(c)} / s^{(c)}) + z^{(c)}) is applied channel-wise.
- Hardware Support: Most modern NPUs (e.g., Qualcomm Hexagon, Google TPU) natively support per-channel quantized weights.
Calibration: Determining Optimal Parameters
Calibration is the process of finding the optimal scale and zero-point for a pre-trained model using a small, representative dataset (unlabeled).
Common Calibration Methods:
- Min-Max: Uses the absolute observed min/max values. Simple but vulnerable to outliers.
- Moving Average Min-Max: Tracks a running average to smooth outliers.
- Entropy (KL Divergence): Selects a threshold that minimizes the information loss (KL divergence) between the float and quantized distributions. This is often the most accurate method for activations.
Example Workflow in PyTorch:
- Run calibration data through the model in evaluation mode.
- Observers attached to layers record tensor statistics.
- Post-calibration, observers compute
scaleandzero_pointusing the chosen method. - These parameters are embedded into the model's state dict for export.
Dequantization: The Reverse Transformation
Dequantization is the affine transformation back to floating-point: (r = s (q - z)). It's crucial for operations that cannot be quantized or for debugging.
Key Applications:
- Mixed-Precision Layers: Some layers (e.g., certain ops in LSTMs) may remain in FP16. Inputs from INT8 layers must be dequantized before use.
- Residual Connections: When adding a quantized tensor to a higher-precision tensor, the quantized tensor is dequantized first.
- Model Outputs: Final logits are often dequantized to FP32 for softmax or loss calculation.
- Accuracy Validation: During quantization debugging, dequantizing intermediate tensors allows direct comparison against the original FP32 model's outputs to isolate error sources.
Hardware-Specific Optimization (NPUs/TPUs)
Scale and zero-point parameters are tailored to exploit specific hardware accelerators.
- Google TPU: Uses bfloat16 for most operations but employs int8/int32 'dynamic fixed-point' for matrix units. The scale factor is often constrained to a power-of-two, allowing implementation via a simple bit-shift instead of a full integer multiplication.
- Qualcomm Hexagon NPU: Supports asymmetric per-channel INT8 quantization. The DSP firmware is optimized for the affine transformation (s(q-z)), fusing scale and zero-point correction into a single operation.
- Apple Neural Engine (ANE): Uses a proprietary 16-bit floating-point (FP16) or 8-bit integer format. The
MLModeltools in Core ML automatically determine and encode the optimal scale/zero-point during model conversion from PyTorch/TensorFlow. - Implication: Exporting a quantized model requires using the target hardware's specific toolchain (e.g., TensorRT, Core ML Tools, TFLite Converter) to ensure these parameters are correctly formatted and leveraged.
Frequently Asked Questions
The quantization scale and zero-point are the core parameters that define the affine transformation mapping floating-point values to a quantized integer range. This FAQ addresses common questions about their role, calculation, and impact on model performance.
The quantization scale and zero-point are the two parameters that define an affine transformation for converting between floating-point and quantized integer representations. The scale is a floating-point multiplier that determines the resolution of the quantization, representing the size of each integer step in the original float range. The zero-point is an integer offset that aligns the integer quantization grid with the floating-point range, ensuring that a specific integer value (often zero) corresponds to the real value zero, which is critical for operations like padding. Together, they implement the mapping: float_value = scale * (int_value - zero_point) and its inverse for quantization.
These parameters are calculated per-tensor (or per-channel) based on the observed range of values (min/max) and the target quantization bit-width. They are fundamental to both symmetric quantization (where zero-point is typically forced to 0) and asymmetric quantization (where zero-point is non-zero to better fit asymmetric data distributions).
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The scale and zero-point are core parameters in the affine quantization transform. These related concepts define how the mapping is applied, measured, and optimized.
Affine Quantization Transform
The affine quantization transform is the mathematical operation defined by scale (s) and zero-point (z) that maps a floating-point value (r) to an integer (q): q = round(r / s) + z. Its inverse, dequantization, is r = s * (q - z). This linear mapping allows the representation of both symmetric and asymmetric value ranges using integer arithmetic.
- Core Operation: Enables efficient integer compute by converting costly FP32/FP16 operations to INT8.
- Linearity: Preserves the relative ordering and scaling of the original tensor, which is crucial for maintaining the numerical behavior of linear and convolutional layers.
Quantization Granularity
Quantization granularity specifies the tensor scope over which a single set of scale and zero-point parameters is shared. It is a primary lever in the accuracy-efficiency trade-off.
- Per-Tensor: One (s, z) pair for an entire tensor. Simplest, most hardware-friendly, but can have higher error if the tensor's value distribution is wide.
- Per-Channel: Unique (s, z) for each output channel of a weight tensor (common) or each channel of an activation tensor. Better accuracy, as it adapts to varied distributions across channels, but requires more parameter storage and slightly more complex hardware support.
- Per-Group/Block: Parameters shared across subgroups of elements within a tensor, offering a middle ground between per-tensor and per-channel granularity.
Calibration
Calibration is the process of determining the optimal scale and zero-point parameters for a pre-trained model. It involves running a small, representative dataset (the calibration set) through the model to observe the statistical distribution of weights and activations.
- Range-Based Methods: Record minimum and maximum observed values (
min,max) to define the quantizable range. Simple but sensitive to outliers. - Distribution-Based Methods: Use metrics like KL-divergence or mean squared error minimization to find a range that best matches the original distribution, often providing better accuracy by clipping outliers.
- Output: The calibration process produces a set of constant (s, z) pairs for static quantization or defines the algorithm for calculating them dynamically at runtime.
Quantization Error
Quantization error is the numerical distortion introduced when a continuous range of floating-point values is mapped to a finite set of discrete integer levels. It is the difference between the original value r and the dequantized value r' = s * (q - z).
- Sources: Error arises from rounding (to the nearest grid point) and clipping/saturation (values outside the representable range are clamped).
- Model Impact: Accumulated error across layers can degrade model accuracy (measured as quantization-aware accuracy drop). The goal of selecting good (s, z) is to minimize this error.
- Bias Correction: A post-quantization technique that adjusts layer biases to compensate for the systematic error introduced by quantizing weights, thereby reducing overall quantization error.
Symmetric vs. Asymmetric Quantization
This distinction defines how the quantized integer range is aligned with the original floating-point range, directly influencing the zero-point value.
- Symmetric Quantization: The quantized range is symmetric around zero. This forces the zero-point
zto be 0, simplifying the arithmetic (q = round(r / s)). It is optimal for data distributions that are already symmetric (e.g., weights after normalization, some activations with ReLU). - Asymmetric Quantization: The quantized range maps precisely to the observed [
min,max] of the tensor. The zero-pointzis a non-zero integer, allowing the range to 'shift' and represent asymmetric distributions more efficiently (e.g., ReLU activations which are all non-negative). This typically provides a tighter fit and lower clipping error but adds a zero-point term to all calculations.
Integer-Only Arithmetic
Integer-only arithmetic refers to the execution of a full neural network inference pipeline using only integer operations, eliminating floating-point computation. This is enabled by careful management of scale and zero-point parameters.
- Requirement: All inputs (weights, activations) and constants (bias) must be in integer form. Biases are typically pre-scaled to the appropriate integer range during model conversion.
- Operation Fusing: Scale factors from consecutive layers (e.g., a convolution followed by a requantization) can be mathematically fused into a single, more efficient scaling operation, often implemented as a fixed-point multiplication or bit-shift.
- Hardware Benefit: Enables high-throughput, low-power execution on hardware with dedicated integer ALUs (e.g., ARM Cortex-M CPUs, many NPUs, and DSPs), which are ubiquitous in edge and mobile devices.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us