05.02

Quantizing without losing quality

skillmaxingInference EngineeringQuantizing without losing quality
Visual lesson

Quantizing without losing quality

Included with Pro · 5:17
Lessons · 1,186 words

Quantization is the cheapest performance win in inference and the easiest one to get subtly wrong. Converting Kite's tab-completion model from BF16 to FP8 halves its weight memory and the bytes each decode step reads, and on most models nobody will notice any change in the output. On some models, some prompts, or at 4 bits, the answers get quietly worse, and the only defense is a disciplined process: choose what to quantize by sensitivity, calibrate with representative data, and measure quality with enough samples to believe the result.

Not every number in a model is equally fragile. From least to most sensitive: the weights of linear layers, then the activations flowing between them, then the KV cache, then the attention math itself, especially softmax. That ordering is the whole strategy. Start at the robust end and move toward the fragile end only when an evaluation says you can.

Pro

Continue reading

Pro unlocks every video lesson, the full notes, worked sizing and cost calculations, and runnable configs across the Inference Engineering course, from GPUs and kernels to quantization, speculative decoding, disaggregation and production autoscaling.

Unlock full access to
Python with AIInference EngineeringAI researchComplete system design
30% off with LAUNCH30first payment
Buy now
View all plans ·Already Pro? Sign in