← All research notes

What is the Superfloat number format?

Superfloat (SFx) is a family of number formats for neural-network inference, from 4 to 16 bits wide. Each value is a sign bit and x − 1 fraction bits. There is no exponent field, so every multiply-add runs without the hardware a floating-point format needs to line exponents up.

How is a Superfloat value defined?

An SFx value is a signed integer code k with a fixed scale of 2^(x−1). Its value is k / 2^(x−1). In fixed-point terms SF16 is a Q1.15 number, SF8 is Q1.7 and SF4 is Q1.3. The spacing between neighbouring values is the same everywhere in the range, unlike floating point, where it grows with the exponent.

value = k / 2^(x-1)

SF16: k = 16384  →  16384 / 32768 = 0.5

Codes run from −(2^(x−1) − 1) to +(2^(x−1) − 1), so every value lies strictly between −1 and 1. 1.0 itself is not representable at any width.

FormatFixed pointCodesLargest valueStep (LSB)
SF4Q1.3−7 to 70.8750.125
SF8Q1.7−127 to 1270.99218750.0078125
SF12Q1.11−2047 to 20470.999511718750.000244140625
SF16Q1.15−32767 to 327670.9999694824218750.000030517578125

The format has no NaN, no infinity, no subnormals and no negative zero. When a result does not fit, the hardware saturates to the largest value or flushes to zero instead of producing a special value.

Why drop the exponent?

Trained networks keep their weights in a narrow band around zero. In the Superfloat benchmark suite, none of the 53.6 million weights of a trained YOLO11x detector fall outside SF16's range, and only 15 fall outside SF4's tighter ±0.875. A floating-point exponent pays, in bits and in silicon, for dynamic range those weights never use. Superfloat spends every bit after the sign on precision instead.

How does Superfloat compare with FP16, BF16 and FP8?

FormatSignExponentFraction
FP16 (IEEE half)1510
BF16187
FP8 E4M3143
FP8 E5M2152
SF161015
SF8107

Without an exponent, a multiply-accumulate unit needs no exponent-difference shifter, no leading-zero detector and no normalisation and rounding stage. In Superfloat's own 130 nm hardening runs, an IEEE FP16 processing element built through the same flow needed 1.40× the standard-cell area of an SF16 element, and its implied maximum clock was 50 MHz against SF16's 75 MHz. The Atreides note has the full tables.

What accuracy does it keep?

The superfloat repository measures SFx against FP32 controls trained in the same pipeline (accuracy for classification, mAP for detection):

TaskModelDatasetSF16FP32
Remote-sensing classificationConvNeXt-TinyEuroSAT96.4396.31
UAV object detectionYOLO11xVisDrone0.28170.2942
Satellite object detectionYOLOv8x-OBBDOTAv10.42980.4489
Video, self-supervised ViTV-JEPA 2 ViT-LUCF10185.5677.51

The V-JEPA 2 row quantizes weights only. In those runs SF8 stayed within 1% of SF16 in every domain, at a quarter of FP32's storage. SF4 matched FP32 on EuroSAT classification at an eighth of its storage, but cost 15 to 22% on dense detection.

Where does it struggle?

Weights quantize well across architectures; activations do not always. After BatchNorm, CNN activations sit near unit scale and clamping them to (−1, 1) is nearly free. A ViT's residual stream accumulates across blocks instead: in V-JEPA 2 ViT-L the largest activation reached 256.1 and 26.3% of activations fell outside the range. Models like that need scaling around the residual path rather than a straight clamp.

How do I try it?

The Python library sf computes every operation exactly as the Atreides chip does, bit for bit, and reports each overflow, underflow, divide by zero and invalid input. It needs Python 3.10 or newer and NumPy.

git clone https://github.com/aloshdenny/superfloat.python
cd superfloat.python && pip install -e .

import sf
sf.sf16(0.5) + sf.sf16(0.25)   # sf16(0.75)

The format reference covers rounding, saturation and the four events in full.