Skip to main content

Module float_layout

Module float_layout 

Source
Expand description

A float layout is a tuple of exponent width, mantissa width and special-value policy; the scalar codecs proxima-gguf/src/quant/bf8_e5m2.rs and bf4_e2m1.rs will instantiate it instead of each hand-coding the same arithmetic.

Structs§

FloatLayout
A sign encoding, exponent_bits, mantissa_bits; at most 32 bits wide. An integer is the layout with exponent_bits 0 and a bias_override of 1 - mantissa_bits, which makes its scale exactly 1.

Enums§

SignEncoding
How the sign of a stored number is encoded.
Specials
How a layout treats the all-ones exponent and finite overflow.