What Is FP8? Choosing Between E4M3, E5M2, and Scaling Recipes
Compare FP8’s E4M3 and E5M2 formats, tensor and block scaling, and NVIDIA GPU support. Use a quality baseline and the target deployment stack to validate an FP8 configuration.
FP8 is a family of 8-bit floating-point formats. In NVIDIA Transformer Engine 2.21, E4M3 provides finer precision between nearby values, while E5M2 represents a wider magnitude range. Accuracy and speed depend on the format, scaling recipe, GPU, library version, and model, so compare results with an FP32 or BF16 baseline.
This article focuses on FP8 training formats, scaling, and hardware support in NVIDIA Transformer Engine 2.21. NVIDIA TensorRT’s current FP8 quantization documentation is treated separately as an inference example.
How do E4M3 and E5M2 differ?
Both are 8-bit floating-point formats with one sign bit. The numbers in their names indicate the exponent and mantissa bits. More exponent bits provide a wider range of magnitudes; more mantissa bits distinguish nearby values more finely.
| Format | Sign, exponent, mantissa | Largest finite magnitude | Strength | Common use in NVIDIA Transformer Engine |
|---|---|---|---|---|
| E4M3 | 1, 4, 3 bits | 448 | Finer values than E5M2 | Weights and activations in the forward pass with tensor scaling |
| E5M2 | 1, 5, 2 bits | 57,344 | Wider numeric range | Gradients in the backward pass with tensor scaling |
These examples describe Transformer Engine’s default hybrid format. With tensor scaling, it uses E4M3 for the forward pass and E5M2 for the backward pass by default, though supported recipes can change the format. Block scaling behaves differently: E4M3 is the default for both passes because more local scales adjust the range of values. Do not assume that gradients always use E5M2.
Why scaling matters
FP8 alone may not cover the ranges found across all neural-network tensors. Scaling maps the original values to a size that FP8 can represent, then accounts for the scale when approximating the original values. Tensor scaling uses one scale for an entire tensor; block scaling uses different scales for smaller regions within that tensor.
Transformer Engine documents these main approaches:
| Recipe | How the scale is chosen | What to consider |
|---|---|---|
| Delayed scaling | From a history of the largest absolute value (amax) observed in earlier iterations | The next iteration uses the recorded values, so the history must be retained. |
| Current scaling | From the amax of the tensor being converted | The tensor is read twice: once to find its current maximum and again to scale and cast it, adding memory work. |
| Block scaling | From the maximum in regions, commonly 128 values or 128×128 tiles | Different regions of one tensor get different scales. Check GPU, CUDA, and tensor-shape requirements. |
Amax is the greatest absolute value in a tensor or block. Current scaling finds it, scales values to fit the FP8 range, and rounds them to the format. Block scaling can reduce how much one large value affects the precision available to other values when a single tensor-wide scale is used. This follows from applying scales more locally; it is not a measured guarantee of better accuracy or speed for every model.
Which approach should you examine first?
| Situation | Candidate to check first | Reason and limitation |
|---|---|---|
| You want to use a tensor-scaling recipe based on earlier amax values | Delayed scaling | It uses recorded maxima to choose the next scale. Confirm GPU and framework support. |
| You want the scale to use the current tensor’s values | Current scaling | It adapts to the current tensor, but finding amax requires an additional tensor read. |
| A tensor has widely varying values and one tensor-wide scale is a concern | Block scaling | It offers local scales, but has stricter GPU, CUDA, and tensor-size requirements. |
| You want FP8 in an inference engine | That engine’s FP8 format and scale contract | A training library’s E4M3/E5M2 settings do not automatically carry over to an inference engine. |
Do not treat FP8 block scaling and MXFP8 as the same recipe. In Transformer Engine 2.21, FP8 block scaling uses regions of 128 consecutive values or 128×128 tiles. Tensors must have at least two dimensions; the last dimension and the product of all preceding dimensions must each be divisible by 128. On Hopper, block-scaled GEMM is software-emulated, so measure before assuming a benefit. MXFP8 is a separate recipe in the same documentation version and uses one scale per 32 consecutive values.
Check GPU and software support
The following summarizes the NVIDIA Transformer Engine 2.21 support matrix. It describes that library’s support, not a guarantee for every GPU, framework, or operation.
| NVIDIA GPU compute capability | Example architecture | Tensor-scaled FP8 | FP8 block scaling |
|---|---|---|---|
| 8.0, 8.6 | Ampere | Not supported | Not supported |
| 8.9 | Ada | Supported¹ | Not supported |
| 9.0 | Hopper | Supported | Supported² |
| 10.0, 10.3 | Blackwell data center | Supported | Supported² |
| 12.0 | Blackwell workstation/consumer | Supported | Supported² |
¹ On Ada, the matrix also requires cuBLASLt 12.1.3.x or later for FP8. ² Block scaling requires CUDA 12.9 or later. This support information is limited to Transformer Engine 2.21 documentation checked on November 19, 2026. Recheck operation-specific requirements in the framework you deploy.
Validate FP8 before and after applying it
**Save a baseline at FP32 or the precision currently in use.** Record outputs and task-specific quality metrics with the same model version and representative inputs.
**Check support in the execution stack.** Match the GPU compute capability, CUDA, cuBLASLt, Transformer Engine or inference-engine version, and the operations where you plan to use FP8.
**Choose a format and scaling recipe.** Check which of E4M3 and E5M2, and which tensor or block recipe, are supported in your environment. Framework defaults can change between library versions.
**Inspect numerical issues.** With representative training or inference data, compare outputs and task metrics; look for saturation or clipping, loss of very small values, Inf or NaN, and training instability. If a problem appears, revert the format or scale to isolate the affected layer or operation. Consider keeping sensitive operations at BF16, FP16, or FP32 in a mixed-precision setup.
**Measure benefits on the target device only after quality requirements pass.** Compare throughput, latency, and memory under the same GPU, input shape, batch size, and execution conditions. Measure the actual model path instead of assuming a particular metric will improve.
Choosing FP8 is not as simple as assuming that eight bits means faster execution. Compare the range and precision trade-off between E4M3 and E5M2, scaling granularity, software support, and task quality. Choose the configuration that meets quality requirements and shows a measured benefit in the deployment environment.
References
[NVIDIA Transformer Engine 2.21: FP8 Current Scaling](https://docs.nvidia.com/deeplearning/transformer-engine/features/low_precision_training/fp8_current_scaling/fp8_current_scaling.html) — E4M3/E5M2 layouts and ranges; tensor-wise current scaling.
[NVIDIA Transformer Engine 2.21: FP8 Blockwise Scaling](https://docs.nvidia.com/deeplearning/transformer-engine/features/low_precision_training/fp8_blockwise_scaling/fp8_blockwise_scaling.html) — 128-value and 128×128 block scaling and requirements.
[NVIDIA Transformer Engine 2.21: Datatype and Hardware Support Matrix](https://docs.nvidia.com/deeplearning/transformer-engine/support_matrix.html) — Support by compute capability and CUDA/cuBLASLt requirements.
[NVIDIA Transformer Engine 2.21: Using FP8 and FP4 with Transformer Engine](https://docs.nvidia.com/deeplearning/transformer-engine/examples/fp8_primer.html) — FP8 formats, delayed scaling, and the separate MXFP8 recipe.
[NVIDIA TensorRT: Quantization Schemes](https://docs.nvidia.com/deeplearning/tensorrt/latest/inference-library/quantized-types-schemes.html) — FP8 E4M3 quantization and scale contract for TensorRT inference.