fp8 – explained simply
fp8 is an 8-bit number format that cuts a model’s memory use in half compared with fp16, usually with only a small loss in quality.
Also: FP8, float8, e4m3fn, e5m2
With just one byte per parameter, a model in fp8 needs only half as much memory as in fp16 or bf16. There are two common variants: E4M3 (4-bit exponent, 3-bit mantissa) and E5M2 (5 and 2 bits). File names like fp8_e4m3fn show which one is used.
Researchers have shown that training and post-quantization in fp8 often achieve quality similar to 16-bit. For image models, fp8 variants are popular for fitting large models into 12 or 16 GB of VRAM. However, the diffusers documentation warns that fp8 can be sensitive depending on the GPU, CUDA, and PyTorch version.
Newer graphics cards can calculate fp8 directly; older ones only store the values in fp8 and compute internally at higher precision.
What does that mean for you? If a full-size image model does not fit in your VRAM, the fp8 variant is often the easiest workaround.