quantwiki
Weight quantization formats and trellis codebooks, each with a live figure. The figure on every page is drawn by a short JavaScript model in the editor beside it: change the model and the figure follows.
Formats
Trellis quantization
Trellis codebooks
How the pages work
Each figure is an SVG drawn by a fixed view. The view asks a model for the numbers: how to quantize a block, or how to decode a trellis state. The model is plain JavaScript in the editor; it recompiles a moment after you stop typing, and errors show under the editor while the last good model keeps running. Your edits are saved in this browser, Reset code restores the original, and Copy link puts your version in the URL.
Helpers such as fp16, f16round, E4M3, E2M1,
mul32, byteSum, gauss and normInv are in scope in every model.
They are defined in lib/num.js.