A scaling factor (or scale) is a floating-point value used in quantization to linearly map values from a quantized integer range back to their original floating-point range. It is calculated as (float_max - float_min) / (quant_max - quant_min). This single parameter, often paired with a zero-point, enables the execution of high-precision models using efficient, low-precision integer arithmetic on microcontrollers.
Glossary
Scaling Factor

What is a Scaling Factor?
A scaling factor is a fundamental parameter in neural network quantization that defines the linear mapping between floating-point and integer number systems.
In practice, the scale is determined during calibration by analyzing the statistical range of a model's weights or activations. For symmetric quantization, a single scale is used. For asymmetric quantization, a scale and zero-point are used. This conversion is critical for model compression, reducing flash footprint and enabling faster INT8 inference on hardware without floating-point units.
Key Characteristics of a Scaling Factor
A scaling factor is the fundamental floating-point multiplier that bridges the quantized integer domain and the original floating-point range. Its properties dictate the precision, efficiency, and numerical stability of quantized inference.
Definition and Calculation
A scaling factor (often denoted as S or scale) is a floating-point value calculated as: S = (float_max - float_min) / (quant_max - quant_min). It defines the linear mapping relationship: float_value ≈ S * (quantized_int - zero_point). For symmetric quantization, where float_min = -float_max, this simplifies to S = float_max / quant_max.
Role in Integer-Only Arithmetic
The scaling factor enables integer-only inference by allowing all computations to occur in the quantized domain. During operations like matrix multiplication, the integer results are rescaled using the product or quotient of the input and weight scaling factors. This avoids floating-point operations entirely on hardware lacking an FPU, using only efficient integer arithmetic and fixed-point rescaling.
- Example: For a fully connected layer, the output scaling factor is often
S_out = (S_weights * S_input) / S_output.
Precision and Dynamic Range
The value of the scaling factor directly controls the resolution of the quantization. A larger scale maps a wider range of float values to the same integer range, reducing precision and increasing quantization error. A smaller scale offers higher precision but risks clipping if the float range exceeds the quantized representation. Optimal calibration finds the scale that minimizes the mean squared error (MSE) between original and dequantized values.
Per-Tensor vs. Per-Channel
The granularity of scaling factor application is a critical optimization:
- Per-Tensor: A single scale (and zero-point) is used for an entire tensor. This is simple but can be suboptimal if the tensor's distribution varies significantly.
- Per-Channel (or Per-Axis): Each channel (e.g., each output channel of a convolutional filter) has its own independent scale and zero-point. This captures intra-tensor variation more accurately, often leading to higher post-quantization accuracy, especially for weights.
Interaction with Zero-Point
In asymmetric quantization, the scaling factor works in tandem with the zero-point (Z). The zero-point is the integer value that maps to the real zero, allowing exact representation of zero (crucial for padding and ReLU activations). The dequantization formula becomes real_value = S * (int_value - Z). The scale and zero-point are determined together during calibration to minimize information loss across the asymmetric data range.
Runtime and Memory Overhead
While scaling factors are essential, they introduce overhead. Each factor is a stored float32 value (4 bytes). In a per-channel scheme, this adds 4 * num_channels bytes to the model's flash footprint. During inference, scaling operations require fixed-point integer multiplication and bit-shifts. Optimized kernels (e.g., CMSIS-NN) pre-compute and fuse these scaling operations into adjacent layers to minimize runtime cost. The total overhead is typically negligible compared to the memory savings from INT8 weights and activations.
How is a Scaling Factor Calculated and Used?
A scaling factor is the fundamental parameter in quantization that enables the conversion between high-precision floating-point numbers and low-precision integer representations, a critical process for deploying neural networks on microcontrollers.
A scaling factor (or scale) is a floating-point value used in quantization to linearly map between a quantized integer range and the original floating-point range. It is calculated as (float_max - float_min) / (quant_max - quant_min). This single value defines the resolution of the quantization, determining how much each integer step represents in the original floating-point domain. During INT8 inference, every integer weight and activation is multiplied by its associated scale to recover an approximate floating-point value for computation.
In practice, a model uses many scaling factors: typically one per tensor (e.g., per layer's weights and per layer's activations). These factors are determined during the calibration phase of post-training quantization by analyzing a representative dataset. For symmetric quantization, a single scale is used. For asymmetric quantization, both a scale and a zero-point are required. The scale is stored in memory alongside the quantized integer parameters, adding minimal overhead to the model's flash footprint while enabling efficient fixed-point arithmetic on the microcontroller.
Scaling Factor in Symmetric vs. Asymmetric Quantization
A comparison of how the scaling factor (scale) is defined and used in the two primary quantization schemes, highlighting key mathematical and implementation differences critical for microcontroller deployment.
| Feature / Property | Symmetric Quantization | Asymmetric Quantization |
|---|---|---|
Definition of Scale (S) | S = (|max_range|) / (quant_max) | S = (float_max - float_min) / (quant_max - quant_min) |
Typical Range | Centered on zero (e.g., [-127, 127] for INT8) | Can be offset from zero (e.g., [0, 255] for UINT8) |
Zero-Point (Z) | Z = 0 (by definition) | Z = round(quant_max - float_max / S) (non-zero) |
Quantization Formula | q = round(r / S) | q = round(r / S) + Z |
Dequantization Formula | r ≈ q * S | r ≈ (q - Z) * S |
Primary Use Case | Weight tensors (often symmetric around zero) | Activation tensors (e.g., ReLU outputs, asymmetric) |
Mathematical Simplicity | ||
Hardware Implementation Cost | Lower (no zero-point subtraction) | Higher (requires extra subtraction) |
Representation Efficiency for Skewed Data | ||
Common Bit Precision | INT8 | UINT8 or INT8 |
Frequently Asked Questions
A scaling factor is a critical parameter in model quantization, enabling the conversion between floating-point and integer number systems. These questions address its definition, calculation, and practical role in microcontroller deployment.
A scaling factor (or scale) is a floating-point value used in quantization to linearly map values from the original floating-point range to a target integer range and vice-versa. It is calculated as: scale = (float_max - float_min) / (quant_max - quant_min). For symmetric quantization, where the range is centered on zero, this simplifies to scale = float_max / quant_max. This factor is stored alongside the quantized integer tensors, allowing the inference engine to reconstruct approximate floating-point values during operations like dequantization or to scale integer inputs.
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 scaling factor is a core parameter in the quantization process. These related concepts define the ecosystem of techniques for deploying efficient neural networks on microcontrollers.
Quantization
Quantization is the overarching model compression technique that reduces the numerical precision of a neural network's weights and activations, typically from 32-bit floating-point (FP32) to lower-bit integers like INT8 or INT4. The scaling factor is the critical parameter derived during quantization that defines the linear mapping between the original floating-point range and the quantized integer range. This process decreases model size, memory bandwidth requirements, and enables the use of efficient integer arithmetic units ubiquitous in microcontrollers.
Zero-Point
The zero-point (z) is the integer value in asymmetric quantization that corresponds to the real value of zero. It works in conjunction with the scaling factor (s) in the quantization formula: real_value = s * (quantized_value - z). Its primary functions are:
- Enabling exact representation of zero, which is crucial for efficient padding operations in convolutional layers.
- Allowing the quantization range to be asymmetric, which better captures the distribution of data like ReLU activations (which have a minimum of zero but no fixed maximum).
Calibration
Calibration is the data-driven process used to determine the optimal quantization parameters, specifically the scaling factor and zero-point. It involves running a representative dataset (the calibration set) through the pre-trained floating-point model to collect statistics:
- For weights, the min/max values are typically known directly.
- For activations, the dynamic range is observed by tracking the minimum and maximum values that appear at each layer's output. These observed ranges are then used to calculate the layer-specific scaling factors, making calibration a critical step for maintaining model accuracy after quantization.
Integer-Only Inference
Integer-only inference is the execution paradigm where the entire neural network forward pass is performed using integer arithmetic, with no floating-point operations. This is enabled by quantization where all weights and activations are integers, and the scaling factor math is also implemented using fixed-point integer operations. Benefits for microcontrollers include:
- Elimination of power-hungry and area-intensive FPUs (Floating-Point Units).
- Deterministic, faster execution on standard integer ALUs.
- Simplified deployment to the vast majority of MCUs that lack hardware FP support.
Dequantization
Dequantization is the reverse operation of quantization, converting quantized integer values back into floating-point numbers using the formula: float_value = scale * (int_value - zero_point). In microcontroller inference, its role is nuanced:
- During Calibration: Used to simulate quantization error and calculate updated statistics.
- At Model Output: Often required to convert the final integer tensor back to a human-interpretable floating-point value (e.g., a classification score or regression value).
- Fused Operations: In many optimized kernels, dequantization is fused with a subsequent floating-point operation or avoided entirely through rescaling techniques to maintain an integer pipeline.
Fixed-Point Arithmetic
Fixed-point arithmetic is a numerical representation system used to perform calculations with fractional numbers using only integer hardware. A fixed-point number is essentially an integer with an implied radix point (like a decimal point). It is closely related to scaling factor usage:
- The scaling factor in quantization can be viewed as establishing a fixed-point format for each tensor.
- During integer-only inference, operations involving scaling factors (e.g., requantization) are implemented using fixed-point integer multiplies and bit-shifts, avoiding floating-point math entirely. This is foundational for efficient MCU deployment.

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