Efficient ML #2 — Neural Net Quantization

We take the trained 32-bit weights of a neural net and shrink them down to 2–8 bits using two approaches: K-Means (non-uniform) and Linear (uniform, integer arithmetic). From the affine mapping r=S(q−Z) all the way to the compression-ratio vs. accuracy trade-off, with plots measured by actually running the code on an MNIST MLP.

April 20, 2026 · 8 min · rick

Efficient ML #1 — Deep Learning Data Types

INT8, FP16, BF16, FP8 (E4M3/E5M2), FP4 — what do all these data types flooding deep learning model cards actually mean, and how do bits get interpreted as numbers? We take them apart one by one, with a widget where clicking bits updates the formula and value in real time.

April 13, 2026 · 10 min · rick