Quantization scale (or scaling factor) is a floating-point multiplier that maps the range of original floating-point values to a target integer range. It is calculated as (max_float - min_float) / (max_int - min_int). Zero-point is an integer offset that aligns the quantized integer range with the original floating-point range, ensuring that a real value of zero can be represented exactly in the quantized space without error, which is critical for operations like padding and ReLU activations.
Glossary
Quantization Scale and Zero-Point

What is Quantization Scale and Zero-Point?
Quantization scale and zero-point are the two fundamental parameters that define a linear quantization scheme, enabling the conversion of floating-point neural network values into efficient integer representations for microcontroller deployment.
Together, these parameters enable the reversible transformation: float_value ≈ scale * (int_value - zero_point). In static quantization, scale and zero-point are determined once using a calibration dataset. In quantization-aware training, the model learns to compensate for the error introduced by this mapping. This linear scheme is the core of INT8 inference, drastically reducing model memory footprint and enabling efficient fixed-point arithmetic on microcontrollers.
Key Characteristics of Scale and Zero-Point
In linear quantization, the scale and zero-point are the two fundamental parameters that define the mapping between the high-precision floating-point (FP32) domain and the low-precision integer (INT8) domain, enabling efficient integer-only arithmetic.
The Scale Factor (S)
The scale factor is a positive floating-point number that defines the ratio between the quantized integer range and the original floating-point range. It acts as the resolution of the quantization grid.
- Formula: ( S = \frac{(FP_{max} - FP_{min})}{(Q_{max} - Q_{min})} )
- Purpose: Converts an integer value back to its approximate floating-point equivalent: ( FP \approx S \times (Q - Z) ).
- Example: If a tensor's values range from -2.5 to 2.5 and it's being quantized to the INT8 range [-128, 127], the scale is ( S = (2.5 - (-2.5)) / (127 - (-128)) = 5.0 / 255 \approx 0.0196 ). This means each integer step represents a change of ~0.0196 in the original floating-point space.
The Zero-Point (Z)
The zero-point is an integer value within the quantized range (e.g., within [-128, 127] for INT8) that corresponds exactly to the real value of zero in the floating-point domain.
- Purpose: Ensures that a real zero (a common value in activations like ReLU outputs) can be represented exactly, preserving the mathematical properties of zero for operations like padding. It aligns the two numerical domains.
- Formula: ( Z = Q_{min} - \text{round}(FP_{min} / S) ).
- Result: The dequantization formula becomes ( FP = S \times (Q - Z) ). When ( Q = Z ), ( FP = 0 ).
Asymmetric vs. Symmetric Quantization
The choice of how to determine the floating-point range ([FP_{min}, FP_{max}]) defines the quantization scheme.
- Asymmetric Quantization: Uses the actual min/max of the tensor data. This minimizes quantization error but introduces a non-zero zero-point (Z), adding a small overhead to arithmetic operations.
- Symmetric Quantization: Forces ( FP_{min} = -FP_{max} ). This simplifies the math by setting the zero-point (Z) to 0, making operations faster. However, it is less efficient if the data distribution is not symmetric around zero, as it wastes part of the integer range.
- Trade-off: Asymmetric is more accurate for general activations; symmetric is faster and often used for weights.
Per-Tensor vs. Per-Channel Quantization
Scale and zero-point can be applied with different granularities, affecting accuracy and hardware compatibility.
- Per-Tensor Quantization: A single scale and zero-point is calculated for an entire tensor. This is the simplest and most widely supported method.
- Per-Channel Quantization: A unique scale and zero-point is calculated for each channel (e.g., each output channel of a convolution kernel). This accounts for varying dynamic ranges across channels, significantly improving accuracy, especially for weight tensors. It is more computationally complex to implement.
Calibration: Determining S and Z
Calibration is the process of estimating the optimal scale (S) and zero-point (Z) for a pre-trained model, typically using a small, representative dataset.
- Process: The calibration data is passed through the model to collect statistics (min/max values, histograms) for each tensor to be quantized.
- Methods:
- Min-Max: Uses the absolute observed min/max values. Simple but sensitive to outliers.
- Entropy / KL Divergence: Selects a range that minimizes the information loss between the original and quantized distributions. This is the standard method in frameworks like TensorRT for activation quantization.
- Output: The calibration process produces a set of constant S and Z parameters for the model, enabling static quantization.
Impact on Integer-Only Inference
The core benefit of defining scale and zero-point is enabling integer-only inference, where all computations use low-bit integer arithmetic, eliminating floating-point operations on the target device.
- Fused Operations: For a layer like a convolution, the integer computation becomes: ( Q_{out} = Z_{out} + \text{multiply_and_shift}( \sum (Q_{weight} - Z_{weight}) \times (Q_{input} - Z_{input}) , \frac{S_{weight} \times S_{input}}{S_{out}} ) ).
- The Re-quantization Step: The ratio ( (S_{weight} \times S_{input}) / S_{out} ) is a constant that is typically fused into the previous integer operation using a fixed-point multiply-and-shift or rounding operation.
- Result: This allows the entire network to run using only integer addition and multiplication, which is drastically faster and more energy-efficient on microcontrollers (MCUs) and digital signal processors (DSPs).
Scale & Zero-Point vs. Other Quantization Schemes
A technical comparison of linear (affine) quantization using scale and zero-point against alternative quantization schemes, highlighting their mechanisms, hardware compatibility, and suitability for TinyML deployment.
| Feature / Metric | Linear (Scale & Zero-Point) | Symmetric Quantization | Logarithmic Quantization | Binary/Ternary Quantization |
|---|---|---|---|---|
Core Mechanism | Uses a scale factor (float) and an integer zero-point to map FP range to integer range: Q = round(R / S) + Z | Uses only a scale factor; zero-point is fixed at 0, assuming a symmetric range around zero | Uses a logarithmic mapping, representing values by the exponent of a fixed base | Constrains weights/activations to {-1, 0, +1} (ternary) or {-1, +1} (binary) |
Exact Zero Representation | ||||
Hardware Arithmetic | Requires integer addition & multiplication, plus zero-point correction | Pure integer multiplication; simpler than affine | Can use bit-shift operations for power-of-two bases | Primarily uses bitwise XNOR and popcount operations |
Calibration Overhead | Moderate (requires determining S & Z via min/max or percentile) | Low (requires determining a single symmetric S) | Low (determine base and dynamic range) | Minimal (determine thresholds for binarization) |
Typical Accuracy Retention (Post-Training) | High (minimizes clipping error for asymmetric distributions) | Moderate (clipping error for asymmetric activations like ReLU) | Low to Moderate (poor precision for small values near zero) | Low (drastic precision reduction) |
Common Precision Target | INT8, INT4 | INT8, INT4 | Powers-of-two (e.g., 4-bit) | 1-bit (binary), 2-bit (ternary) |
Runtime Compute Overhead | Low (fixed extra addition per operation) | Very Low (no zero-point addition) | Very Low (bit-shifts) | Extremely Low (bitwise ops) |
Primary Use Case | General-purpose deployment (CNNs, Transformers); production standard | Hardware with pure integer units; simpler software stacks | Specialized hardware (e.g., DSPs); ultra-low bit-width scenarios | Extreme compression for binary neural networks on ultra-low-power MCUs |
Framework and Hardware Implementation
The practical application of linear quantization parameters within software frameworks and hardware accelerators to enable efficient integer-only inference on constrained devices.
The Linear Quantization Formula
The core mathematical operation that defines the mapping between real and quantized values. For a real value ( r ), the quantized integer ( q ) is calculated as:
( q = \text{round}(r / S) + Z )
- ( S ) (Scale): A positive floating-point number representing the ratio between the quantized integer step size and the real-valued step size. It's calculated as ( S = (\text{max}(r) - \text{min}(r)) / (\text{max}(q) - \text{min}(q)) ).
- ( Z ) (Zero-Point): An integer within the quantized range (e.g., 0-255 for INT8) chosen so that ( r = 0 ) maps exactly to ( q = Z ). This ensures that a real zero (common in padding and ReLU activations) can be represented without error, preserving crucial mathematical properties like zero-padding equivalence.
Calibration for Static Scale Determination
The process of determining the optimal scale (S) and zero-point (Z) for each tensor (weights and activations) using a representative dataset. This is a critical step in Post-Training Quantization (PTQ).
- Weights: Scale is calculated directly from the min/max of the pre-trained weight values.
- Activations: Require a calibration dataset (e.g., 100-500 unlabeled samples) to observe the dynamic range of layer outputs. Common algorithms include:
- Min-Max: Uses the absolute observed min/max.
- Moving Average Min-Max: Tracks a running average to smooth outliers.
- Entropy (KL Divergence): Selects a range that minimizes the information loss between the original and quantized distributions, often yielding higher accuracy.
Once calibrated, these parameters are baked into the model and remain static during inference.
Integer-Only Arithmetic in Kernels
How quantized models execute efficiently on CPUs and MCUs using integer math. The core operation of a quantized fully-connected or convolutional layer is reformulated to avoid floating-point calculations.
The operation for a layer becomes:
( q_3 = Z_3 + \text{multiply_and_shift}( \sum (q_1 - Z_1)(q_2 - Z_2), M ) )
- ( q_1, q_2 ): Input activation and weight integers.
- ( Z_1, Z_2 ): Their respective zero-points.
- ( M ): A pre-calculated fixed-point multiplier that fuses the scales ( S_1 ) and ( S_2 ) from the inputs and weights with the inverse of the output scale ( S_3 ).
- The
multiply_and_shiftis a high-performance integer operation that approximates multiplication by ( M ).
This allows the entire inference graph to run with INT8 or INT16 operations, drastically accelerating computation on integer-only hardware.
Hardware Accelerator Mapping (NPU/TPU)
How specialized AI accelerators ingest and utilize quantization parameters for peak performance. These chips have dedicated integer arithmetic units (e.g., INT8, INT4 vector processors).
- Compilation: Frameworks like TensorFlow Lite for Microcontrollers (TFLM) or vendor-specific toolchains (e.g., NVIDIA TensorRT, Qualcomm AI Engine Direct) compile the quantized graph, baking scale and zero-point values into the instruction stream or lookup tables.
- Asymmetric vs. Symmetric: Many NPUs prefer symmetric quantization (where zero-point Z is forced to 0) for simpler, faster hardware. This requires the framework to perform a graph transformation, absorbing the zero-point operations into bias terms during compilation.
- Per-Channel Quantization: For weights in convolutional layers, hardware often supports a separate scale and zero-point per output channel, allowing for finer-grained adjustment and higher accuracy. This is a key optimization supported by TFLite and most modern NPUs.
Impact on Memory and Bandwidth
The direct resource savings enabled by quantizing with scale and zero-point. This is the primary motivation for TinyML deployment.
- Model Size Reduction: Converting FP32 parameters (4 bytes each) to INT8 (1 byte each) yields a theoretical 4x reduction in model footprint. With per-tensor scale/zero-point overhead (typically 8 extra bytes per tensor), the net saving is ~3.5-4x.
- Memory Bandwidth: Loading 8-bit weights and activations from memory consumes one-fourth the bandwidth of 32-bit equivalents. This is often the dominant factor in inference latency and power consumption on microcontrollers, where memory access is energy-intensive.
- Cache Efficiency: Smaller models and tensors have a higher chance of fitting into faster, smaller on-chip caches (SRAM), reducing stalls and further accelerating inference.
These savings make deploying multi-million parameter models on devices with <1MB of SRAM feasible.
Frequently Asked Questions
Linear quantization is a core technique for deploying neural networks on microcontrollers. These questions address the essential parameters—scale and zero-point—that govern this conversion from floating-point to integer arithmetic.
The scale factor (or quantization scale) is a positive, floating-point number that defines the ratio between a unit in the quantized integer space and a unit in the original floating-point space. It is calculated as the ratio of the range of the floating-point values to the range of the target integer representation.
Mathematically, for a floating-point tensor with a clamped range [min_f, max_f] and a target integer range of [q_min, q_max] (e.g., [0, 255] for uint8), the scale S is:
codeS = (max_f - min_f) / (q_max - q_min)
This single value is used to map all values in the tensor. The conversion from float r to quantized integer q is performed as q = round(r / S) + Z, where Z is the zero-point. The scale is critical because it determines the resolution of the quantization; a larger scale means each integer step represents a larger chunk of the floating-point range, leading to potentially higher quantization error.
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
Quantization scale and zero-point are core components of linear quantization. These related concepts define the mathematical mapping and hardware considerations for deploying efficient, low-precision models.
Quantization
Quantization is a model compression technique that reduces the numerical precision of a neural network's weights and activations. It converts values from high-precision floating-point formats (like 32-bit FP32) to lower-precision integers (like 8-bit INT8). This process shrinks the model's memory footprint and accelerates inference by enabling integer arithmetic, which is faster and more power-efficient on most hardware. The core challenge is minimizing the quantization error—the difference between the original and quantized values—to preserve model accuracy.
Post-Training Quantization (PTQ)
Post-Training Quantization (PTQ) is a compression method where a pre-trained model is converted to a lower precision after training is complete. It uses a small, representative calibration dataset (with no labels required) to calculate the optimal quantization parameters—namely the scale and zero-point—for each tensor. PTQ is popular because it is fast and requires no retraining, but it can lead to higher accuracy loss compared to Quantization-Aware Training (QAT), especially for models with high dynamic ranges in their activations.
Quantization-Aware Training (QAT)
Quantization-Aware Training (QAT) is a technique where quantization error is simulated during the training or fine-tuning process. This is done by inserting fake quantization nodes into the model graph that mimic the rounding and clipping operations of integer quantization in the forward pass, while allowing gradients to flow through in the backward pass (using Straight-Through Estimator). This allows the model's weights to adapt to the lower precision, typically resulting in higher accuracy upon final integer conversion compared to PTQ, at the cost of additional training time.
Static vs. Dynamic Quantization
These are two sub-categories of PTQ defined by when scale factors are calculated:
- Static Quantization: The scale and zero-point for both weights and activations are determined once during calibration and remain fixed for all inputs during inference. This is the most common and performant method for deployment.
- Dynamic Quantization: The scale and zero-point for activations are calculated on-the-fly for each individual input at runtime. This provides flexibility for inputs with highly variable ranges but introduces computational overhead. Weights are typically still statically quantized.
INT8 Inference
INT8 Inference refers to the execution of a neural network using 8-bit integer arithmetic for both weights and activations. It is the most common target for quantization due to its favorable balance:
- 4x model size reduction compared to FP32.
- 2-4x inference speedup on hardware with INT8 support (e.g., CPU VNNI instructions, GPU Tensor Cores, NPUs).
- Typically results in <1-2% accuracy loss for many models after PTQ or QAT. The scale and zero-point are essential for correctly transforming FP32 values into the INT8 range (typically -128 to 127) and back for operations like dequantization.
Affine vs. Scale-Only Quantization
This distinction defines the quantization formula:
- Affine Quantization (Linear Quantization): Uses both a scale (floating-point) and an integer zero-point. The zero-point allows an exact mapping of a real value of zero (e.g., for padding in ReLU activations), which is critical for accuracy. This is the method described by 'quantization scale and zero-point.'
- Scale-Only Quantization (Symmetric Quantization): Uses only a scale factor, implicitly setting the zero-point to 0. This simplifies the math and hardware implementation but cannot precisely represent asymmetric value distributions, potentially leading to reduced quantization resolution and accuracy for certain tensors.

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