Shrinking Models by Sharing Weights — K-Means-based Quantization

Group a neural network’s weights into a few representative values with K-Means, and you can shrink the model several-fold with almost no accuracy loss. We explore it with an interactive widget where you watch the clusters converge and the storage shrink in real time. (Deep Compression, Han et al. 2016)

June 6, 2026 · rick

Integer-Arithmetic-Only Neural Network Inference — Linear Quantization

Beyond storing weights as integers — running the multiplications and additions entirely in integer arithmetic at inference. We connect reals and integers with the affine map r = S(q − Z), and explore it with a widget where you change the scale and zero point and watch the quantization error. (Jacob et al. 2018, the basis of TFLite integer quantization)

May 9, 2026 · rick