liveBook · Manning

Per-channel quantization

Per-channel quantization assigns separate quantization parameters, such as scales, to individual channels along a tensor axis.

How 2 Manning books explain it

Quantization and Fast Inference

Per-channel quantization assigns separate quantization parameters to each tensor channel.

How it is used
Uses per-channel quantization to limit cross-channel outlier penalties in weight compression and quantization-aware training.
How deep it goes
Derives symmetric scales and broadcasting, implements fake quantization, and measures reconstruction, gradient masking, metadata, and training effects.
Examples
Compares ResNet-18 convolution weights and INT4 gradient survival, and measures scale overhead for transformer projections.
What you can do after
Build a symmetric per-channel quantizer and fake quantizer, and evaluate their error and deployment tradeoffs.

Read how Quantization and Fast Inference explains per-channel quantization →

CUDA for LLMs

Channel-wise quantization uses separate quantization parameters for individual channels or output features.

How it is used
Adapts quantization scales to output features or attention heads with different magnitudes.
How deep it goes
Walks through channel indexing, INT8 quantization and dequantization kernels, and calibration-based scale selection.
Examples
Uses a 4,096-feature weight matrix, transformer attention heads, and a group-of-128 feed-forward comparison.
What you can do after
Builds from scratch CUDA quantization and dequantization kernels that load a scale for each channel.

Read how CUDA for LLMs explains per-channel quantization →

What to know first

Related concepts

Questions about per-channel quantization

What is per-channel quantization?

Per-channel quantization assigns separate quantization parameters, such as scales, to individual channels along a tensor axis.

Which Manning books explain per-channel quantization?

Quantization and Fast Inference and CUDA for LLMs.

What should I know before learning per-channel quantization?

Manning books that teach per-channel quantization usually introduce activation, accuracy, channel dimension and float16 first.

What is the difference between per-channel quantization and per-tensor quantization?

Per-channel quantization assigns separate quantization parameters, such as scales, to individual channels along a tensor axis. Per-tensor quantization applies a shared set of quantization parameters, such as scale and zero point, to all values in a tensor.

What is per-channel quantization a kind of?

Per-channel quantization is a kind of quantization. Model quantization represents model parameters or computations with reduced-precision numerical values, often to lower storage or computational requirements.

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.