Show HN: Scalar codebook quantization, an interactive guide A new interactive guide walks through scalar codebook quantization, the scheme used to fit SmolLM2-135M's 134.5 million weights into the 256 MB of RAM on a 2010 iPod touch, where 32-bit floats would need 538 MB. The guide builds the method in four stages: per-group scales for each 64 weights, a Hadamard-matrix rotation to spread outliers, a single shared codebook normalized to a Gaussian, and a kernel that rotates activations once instead of rebuilding weights, cutting the index to 4 bits for 16 levels. The author says the same codebook scheme ships in the speech model Whistle from Cactus-Compute. How a weight fits in 4 bits Neural networks are mostly big tables of numbers, called weights. SmolLM2-135M https://huggingface.co/HuggingFaceTB/SmolLM2-135M Allal et al., 2025 https://arxiv.org/abs/2502.02737 , the small language model I put on a 2010 iPod touch