What is AI 8-bit floating point (FP8)?

FP8 is a floating point format representing numbers in 8 bits; the format proposed for deep learning has two encodings: E4M3 with a 4-bit exponent and 3-bit mantissa plus E5M2 with a 5-bit exponent and 2-bit mantissa.

Unlike 8-bit integer, which uses evenly spaced integers, FP8's exponent bits cover a wider range at coarse precision. E4M3 offers more precision, E5M2 more range.

Topic
Infrastructure and runtime
Also known as
E4M3, E5M2
Origin
2022

How AI 8-bit floating point (FP8) works

  1. Weights and activations are converted from 16-bit to 8-bit floating point.
  2. Per-tensor scaling factors fit values into the FP8 range.
  3. Matrix multiplications run on FP8-capable hardware, with accumulation usually kept at higher precision.
  4. Results are converted back to 16 or 32 bits when needed.

In more detail

E4M3 for the forward pass and E5M2 for the backward pass: roles and limits

In FP8 mixed-precision training, the two encodings serve complementary roles: E4M3 (with a maximum finite value of 448 and no infinity representation) is used in the forward pass for weights and activations where precision matters, while E5M2 (with a maximum finite value of 57,344 and IEEE 754 Inf/NaN rules) is used in the backward pass for gradients that require wider dynamic range.

Delayed and block-wise scaling

Selecting scaling factors requires either delayed scaling, which tracks the maximum absolute value (amax) history from prior iterations to avoid extra memory passes or current (dynamic) fine-grained scaling, where tile-wise or block-wise scales (such as 1×128 activation blocks and 128×128 weight blocks) absorb outlier spikes common in large language models.

The OCP MXFP8 standard and FP8 KV caches

Following the 2022 NVIDIA-Arm-Intel specification, industry adoption expanded through the Open Compute Project (OCP) Microscaling Formats (MXFP8) standard, pairing E4M3/E5M2 elements with shared 32-element E8M0 block exponents and hardware support across NVIDIA Hopper/Blackwell and AMD Instinct MI300+ accelerators, alongside FP8 KV-cache compression in LLM inference engines.

Commonly confused terms

TermHow it differs
FP4FP8 uses 8 bits per element and preserves reasonable accuracy with minimal calibration, whereas FP4 (e.g., E2M1 or NVFP4) halves memory again to 4 bits per element but requires tight block-wise microscaling to maintain LLM quality.

Why AI 8-bit floating point (FP8) matters for on-premises AI

The paper proposing FP8 calls 8-bit floating point a natural progression for accelerating training and inference beyond common 16-bit formats; it explains E5M2 follows IEEE 754 conventions for special values while E4M3 extends its range by not representing infinities, showing results matching 16-bit training on image and language tasks. The mixed precision training paper shows lower precision narrows range, managing the loss with techniques such as keeping a single-precision weight copy. Example calculation: 8-bit values take half the memory of 16-bit ones.

ON-PREMISES EXAMPLE

Before running its in-house language model with FP8 inference on new FP8-capable GPUs, a platform team compares it with the 16-bit version on an internal evaluation set, approving the switch once the gap stays within tolerance.

Common questions

Does FP8 run on every GPU?

No. Speed-ups need hardware supporting FP8 matrix operations; elsewhere gains may be limited to memory.

Does FP8 reduce accuracy?

With proper scaling and mixed precision it comes close to 16-bit on many tasks, but should be tested on the organisation's own tasks.

Sources

In the glossary: Glossary, A to D

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.