The QF8 format encodes each value as a 1-bit sign and 7-bit u3.4 fixed-point log₂ code, with a shared E8M0 block exponent per 32 elements. Reconstruction: x̂ = (-1)^σ · s · 2^((c-64)/16). Effective cost: 8.25 bits/element. Provides 16 levels per octave across 8 octaves.
A QF8-encoded block of k = 32 values consists of:
u3.4 fixed-point code c ∈ {0, 1, …, 127}.with c = 0 encoding exact zero. The effective storage cost is 8 + 8/32 = 8.25 bits per element.
The u3.4 code provides 3 integer bits and 4 fractional bits of log₂|x/s|, spanning 8 octaves with 16 representable levels per octave. The ratio between consecutive representable values is constant:
giving a maximum relative quantization error of (r − 1)/2 ≈ 2.22%.
Compare FP8 E4M3: 8 levels per octave (3-bit mantissa), maximum relative error 1/16 = 6.25% within each binade.
For two QF8 values with log codes c_a, c_b:
This replaces a 4×4 mantissa multiplier (FP8) with a 7-bit carry-lookahead adder — a ~3.5× reduction in gate count (66 vs. 231 gates).
QF8 adopts Kulisch accumulation (Johnson, 2018):