programlibs/Quant/demos/formats.xtl
One weight matrix stored five ways, and how far each moves a layer's output. Run with "just demo-lib Quant formats".
W : Float
A 16 x 16 weight matrix and an input, by a fixed ripple (no chance).
W ← 16 16 r̲eshape 0.4 × s̲in 2.3 × f̲loat r̲ange 256
ᵘe̲rr : Float -> Float
Each format's weights, and the largest change in the layer's output.
ᵘe̲rr ← { V → 'm̲ax r̲/ a̲bs y − x '+ '× i̲nner V }
Used in: libs/Quant/demos/formats.xtl:16
q : Float
q ← 0.7 qz:t̲ernary W