AlgoViz

Quantization, file formats and runtimes

hard 6 min

Quantization maps weight values to a smaller set of representable levels, typically with scales and sometimes other metadata.

Trace the example

Follow the evidence through each stage, then test a change in the case.

Fit weights into a memory budget

Fit weights into a memory budget. Selected component: Weight tensors inside Model artifact.
Open full-size diagram

Model artifact

1 billion weights

This estimate counts weight payload only. Scales, metadata, nonquantized layers, cache and activations require additional space.

A 0.5 GB weight payload fits within 0.6 GB free memory. Does that prove the full service fits?

Measure the packed weight payload

0.50 GB before overhead

GB is decimal here. Group scales, metadata, caches and activations are additional. The slider illustrates packing arithmetic.