Scalar codebook quantization, an interactive guide
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Developer Mingyang Li (myli.page) published an interactive guide to scalar codebook quantization, built from putting SmolLM2-135M on a 2010 iPod touch. It walks through levels fitted to the weights, per-group scales over 64 weights, Hadamard rotation to flatten outliers, one shared codebook, and a fast kernel. By the author's figures, 4-bit indices plus one scale per group cut the model from 538 MB to 76 MB, with perplexity of 8.1–8.9 against 7.2 at 32-bit. Most numbers are self-reported and come from a single small model; 3 bits was reportedly unusable.