Quantization scale
A quantization scale is a multiplicative factor relating quantized values or steps to the numerical values they represent.
CUDA for LLMs
A quantization scale is the factor relating an integer quantization step to the corresponding interval in the original numerical range.
- How it is used
- Uses scales to map neural-network weights and activations into lower-precision representations for inference.
- How deep it goes
- Derives symmetric scales and traces their application through CUDA kernels, granularity choices, calibration, and static versus dynamic computation.
- Examples
- Works through four INT8 weights and applies per-group scales in a CUDA kernel.
- What you can do after
- Build it from scratch by computing symmetric scales and implementing quantization and dequantization kernels.
Quantization and Fast Inference
A scale factor is the multiplicative parameter that maps between quantized or fixed-point integers and their represented numerical values.
- How it is used
- Connects integer representation to tensor calibration and quantization configuration for inference.
- How deep it goes
- Derives fixed-point and affine mappings, calculates scale and zero-point, and analyzes rounding, clipping, and dot-product correction costs.
- Examples
- Works through Q3.4 encoding of 1.5 and unsigned 8-bit calibration of ReLU values from 0 to 6.
- What you can do after
- Evaluate a quantization configuration for likely accuracy loss and calculate scale and zero-point from calibrated tensor bounds.
Read how Quantization and Fast Inference explains quantization scale →
What to know first
- channel dimensionA channel dimension is a dimension of image or tensor data whose positions distinguish separate color components or feature maps.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
- quantization calibrationQuantization calibration uses representative data to determine ranges and parameters for mapping model values to a lower-precision representation.
- ReLUReLU is an activation function that maps an input x to the greater of x and zero.
Related concepts
- dequantizationused by · Dequantization maps values from a quantized numerical representation to a higher-precision representation, typically using quantization parameters.
- double quantizationused by · Double quantization is a technique that quantizes the parameters, such as scale factors, associated with an earlier quantization step to reduce their storage cost.
- block quantizationused by · Block quantization partitions numerical values into groups and assigns quantization parameters, such as scale factors, separately to each group.
- per-channel quantizationused by · Per-channel quantization assigns separate quantization parameters, such as scales, to individual channels along a tensor axis.
- quantization calibrationproduced by · Quantization calibration uses representative data to determine ranges and parameters for mapping model values to a lower-precision representation.
- quantization step sizeconfigures · Quantization step size is the spacing between adjacent quantization levels on the original numerical scale.
Questions about quantization scale
What is quantization scale?
A quantization scale is a multiplicative factor relating quantized values or steps to the numerical values they represent.
Which Manning books explain quantization scale?
CUDA for LLMs and Quantization and Fast Inference.
What should I know before learning quantization scale?
Manning books that teach quantization scale usually introduce channel dimension, accuracy, quantization calibration and ReLU first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

