KnowML
Interactive

Quantization Lab

One small weight matrix, squeezed into 8-bit and 4-bit integers four different ways. Every scale, every integer code and every last decimal of error, including the single outlier that quietly costs the other weights most of their precision, and the one-line change that gives it back.

Step through at your own pace · prerequisites: Efficient AI & Systems (23)

How to use this page ▾

Start with INT8 — the other three tabs reuse its vocabulary (α, the scale s, the integer codes q, the error matrix E) and its numbers as the baseline they are measured against. Every figure you read is arithmetic done in the page from one seeded 4×8 weight block, not a hand-typed illustration: the INT8 tab checks its own dequantized values against code × scale computed by hand, proves quantizing twice changes nothing, and confirms that no weight was moved by more than half a grid step. The Outlier tab is the one that explains why quantization is a research area rather than a utility function.

What this page simplifies, on purpose

Related pages