liveBook · Manning

Quantization scale

A quantization scale is a multiplicative factor relating quantized values or steps to the numerical values they represent.

How 2 Manning books explain it

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.

Read how CUDA for LLMs explains quantization scale →

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

Related concepts

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.