Zenaique

Where does FP8 fit in modern LLM serving and which GPUs support it?

Flashcard·Easy·4.0 · 0·~30s·Asked atInduced AiKrutrimRoblox·Relevant atNVIDIA
Attempt it
TL;DR

FP8 is an 8-bit floating-point format with E4M3 and E5M2 variants. Native Hopper tensor cores arrived in 2022 (H100) and made FP8 the default low-precision inference format for LLMs.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture squeezing each number in a giant spreadsheet from a 16-digit field down to an 8-digit field. The total size of the spreadsheet halves. The chip can also do twice as many operations in the same time, because each cell is half as wide. Most calculations still come out almost the same because the model never needed all those extra digits. There are two ways to split the 8 digits between the size part and the precise part. One leans toward precision and is used for the numbers in the trained model. The other leans toward huge ranges and is used during training when some numbers change a lot. Newer data-center chips have built-in hardware to multiply these tiny numbers at full speed.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

FP8 is the default low-precision format for production LLM serving. It halves memory versus FP16, halves HBM bandwidth pressure during decode, and roughly doubles tensor-core throughput on matmul-heavy kernels. For most serving teams it is the single highest-value optimisation they can ship.

Using FP8 well means knowing more than the bit layout. You need to know how the two variants differ, which GPUs accelerate it, and what calibration techniques close the accuracy gap. You also need to know how FP8 KV cache compounds with FP8 weights to raise decode batch ceilings.

Bit layout: E4M3 and E5M2

FP8 follows the same sign exponent mantissa structure as larger floating-point formats, but with 8 total bits to distribute. The standard variants are:

  • E4M3: 1 sign bit, 4 exponent bits, 3 mantissa bits. The exponent is biased at 7, giving exponents from -6 to 8. Max representable is around 448, and min normal is about 2 to the minus 6. The 3 mantissa bits offer 8 fractions per binade.
  • E5M2: 1 sign bit, 5 exponent bits, 2 mantissa bits. The exponent is biased at 15, giving exponents from -14 to 15. Max representable is around 57344, and min normal is about 2 to the minus 14. It has only 4 fractions per binade.

E4M3 trades dynamic range for precision. It is well suited to weights and forward activations, which sit in bounded ranges after calibration. E5M2 trades precision for range. It is well suited to gradients, which can vary by many orders of magnitude during training and would underflow in E4M3.

Production inference uses E4M3 for both weights and activations. Training mixed precision often uses E4M3 forward and E5M2 backward, with FP32 master weights and an FP32 accumulator. This is what the NVIDIA Transformer Engine implements.

Hardware support: Hopper, then Blackwell
Accuracy and calibration
FP8 KV cache and decode batch
FP8 in the format hierarchy
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • NVIDIA H100 SXM has native FP8 tensor cores rated at about 1,979 TFLOP/s dense (3,958 with sparsity).
  • TensorRT-LLM and vLLM provide FP8 quantisation pipelines for Llama 4, DeepSeek V4 and Qwen3.5 with under 1 percent benchmark drop.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhy use E4M3 for activations and E5M2 for gradients rather than the same format throughout?
A

Activations and weights cluster near zero with relatively bounded dynamic range. Precision matters more than reach, so E4M3 (more mantissa) is better. Gradients during training can vary across many orders of magnitude as updates compound. E5M2 (more exponent) prevents underflow at the cost of mantissa precision. Mixed-precision training picks each variant for the regime it suits.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Calling FP8 a single format when it has two distinct variants. E4M3 favours precision for forward-pass tensors. E5M2 favours dynamic range for gradients. Training stacks often use both, each in its own role.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • The bit layout of E4M3 (1 sign, 4 exponent, 3 mantissa) and E5M2 (1 sign, 5 exponent, 2 mantissa)

  • Which variant is used for weights and activations versus gradients

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
What is the KV cache in transformer inference?
Flashcard·Easy