Numerical precision describes how accurately GPUs represent and process numbers. In deep learning, the chosen floating-point format (such as FP32, FP16, BF16 or FP8) defines the balance between computational performance, memory requirements and model accuracy. It therefore has a significant impact on the efficiency of AI applications.

Key Takeaways

The key facts about floating-point formats at a glance:

  • Every floating-point number consists of a sign, an exponent and a mantissa: the exponent sets the dynamic range, the mantissa the precision.
  • FP32 offers the highest accuracy and remains the reference for numerical stability, but needs the most memory and compute.
  • FP16 halves memory requirements compared with FP32, but is prone to underflow and needs techniques such as loss scaling.
  • BF16 provides the dynamic range of FP32 at half the memory footprint and is now, alongside FP16, a widely used standard for large language models.
  • FP8 reduces memory use and latency considerably further, but requires suitable hardware and careful scaling.
  • Modern NVIDIA GPUs accelerate these formats via Tensor Cores: FP8 from the Hopper generation onwards, even smaller formats from Blackwell.
  • In practice, AI frameworks combine several formats at once (mixed precision) to balance efficiency and accuracy.

What are floating-point numbers?

Floating-point numbers are a way of representing real numbers in a computer. Instead of a fixed number of decimal places as with integers, the number is broken down into a kind of scientific notation. They consist of three central components:

  • Sign
  • Exponent
  • Mantissa

The sign bit determines whether a number is positive or negative. The exponent defines the range of values that can be represented, while the mantissa (also called the significand) determines the precision — in other words, how accurately a number can be represented. More exponent bits increase the dynamic range, allowing a wider range of values. More mantissa bits improve the resolution between representable numbers.

A key trade-off is that higher precision produces more accurate results but requires more memory and computational power. Lower precision, by contrast, reduces resource usage and speeds up calculations but can increase the risk of rounding errors. This is particularly important for deep learning models, which often contain millions or even billions of parameters. Depending on the format, special values such as NaN (‘Not a Number’) or ±Inf (infinity) may also occur during certain arithmetic operations.

Very small numbers can cause underflow, where values lose accuracy, are stored as subnormal values or are rounded to zero. Conversely, overflow occurs when numbers exceed the representable range. To balance performance and stability, AI hardware often combines different floating-point formats in a process known as mixed precision. This approach has become standard in many training pipelines, particularly for large models such as LLMs.

Comparison of the formats

The choice of floating-point format has a significant impact on performance, memory requirements and model stability. While FP32 was long considered the standard, modern AI systems increasingly rely on reduced-precision formats. FP16, BF16 and, more recently, FP8 have become widely used options, particularly in deep learning applications.

FP32 (single precision)

FP32 is the classic format for scientific computing and was long considered the standard in deep learning. It provides high accuracy and a large dynamic range.

As the name suggests, FP32 uses a total of 32 bits: 1 bit for the sign, 8 bits for the exponent and 23 bits for the mantissa. This allows it to represent both very large and very small numbers with high stability. This level of accuracy is particularly important for complex simulations and sensitive training processes. However, FP32 requires significant memory and computational resources.

In practice, FP32 is now mainly used for critical parts of a model, such as loss calculation or gradient accumulation. For large models like transformers, using FP32 exclusively can be too slow and resource-intensive. Nevertheless, it remains the reference standard for numerical stability.

Advantages Disadvantages
✓ Very high precision ✗ High memory usage
✓ Large dynamic range ✗ Lower compute efficiency on GPUs
✓ Stable for training and scientific applications ✗ Less efficient for large AI models

FP16 (half precision)

FP16 was introduced to improve computing performance and reduce memory requirements. It is a key component of mixed-precision training.

FP16 uses only 16 bits: 1 sign bit, 5 exponent bits and 10 mantissa bits. This halves the memory requirements compared with FP32. As a result, GPUs can execute FP16 operations significantly faster, especially when using tensor cores. However, its dynamic range is more limited.

One challenge with FP16 is underflow, which can occur with very small values and is particularly problematic for gradients. To address this issue, training often uses loss scaling — a technique that helps avoid numerical errors by preventing small values from being rounded to zero during calculations. FP16 is well suited for neural networks, but it requires careful implementation to maintain stability.

Advantages Disadvantages
✓ High speed ✗ Prone to underflow
✓ Significantly lower memory requirements ✗ Lower numerical stability
✓ Good support from modern GPUs ✗ Additional techniques such as loss scaling required

BF16 (Brain Floating Point)

The BF16 floating-point format was developed specifically for deep learning and combines the advantages of FP32 and FP16. It is therefore particularly relevant for large models such as transformers.

BF16 also uses 16 bits, but distributes them differently: 1 sign bit, 8 exponent bits and only 7 mantissa bits. This gives it the same dynamic range as FP32 while still reducing memory requirements.

The key advantage is that BF16 significantly reduces underflow problems compared with FP16. This is particularly important when training large language models. As a result, many modern frameworks and hardware platforms favour BF16. However, the smaller mantissa results in lower precision compared with FP32.

Advantages Disadvantages
✓ Large dynamic range (similar to FP32) ✗ Lower precision than FP32
✓ Fewer underflow problems than FP16 ✗ Minor rounding errors possible
✓ Ideal for transformer models ✗ Not supported by older hardware

FP8 (Ultra Low Precision)

FP8 is a relatively new format used primarily for inference and optimised training pipelines. Its main goal is to maximise efficiency.

FP8 uses only 8 bits and is available in different variants, such as E4M3 and E5M2, which use different allocations of exponent and mantissa bits. This significantly reduces memory requirements. Modern GPUs such as the NVIDIA H100 support FP8 natively through Tensor Cores.

FP8 can deliver significant speed improvements, particularly for large models. However, its precision is considerably lower than that of higher-precision formats. For this reason, FP8 is typically combined with other formats to maintain stability. Common use cases include FP8 inference and quantised training.

Advantages Disadvantages
✓ Extremely high throughput ✗ Very limited precision
✓ Minimal memory requirements ✗ Requires specialised hardware for optimal performance
✓ Ideal for inference with large models ✗ Complex calibration required

Direct comparison of the floating-point formats

FP32 and FP16 are standardised by IEEE 754. BF16 and FP8 also follow the floating-point principle but are defined separately: BF16 is an industry format derived from FP32, while FP8 is available in variants such as E4M3 and E5M2 according to the OCP-OFP8 specification.

Format Total bits Exponent Mantissa (stored) Dynamic range (approx.)
FP32 32 8 23 approx. 10⁻³⁸ to 10³⁸
FP16 16 5 10 approx. 10⁻⁵ to 65,504
BF16 16 8 7 approx. 10⁻³⁸ to 10³⁸
FP8 8 4 to 5 2 to 3 severely limited

Hardware support

Modern GPUs are specifically designed to work efficiently with reduced numerical precision. The NVIDIA Ampere architecture expanded Tensor Core support to include formats such as BF16 and TF32, while FP16 had already been supported in earlier generations. This made mixed-precision training more accessible and widely adopted in practical AI workflows.

The more recent NVIDIA Hopper Generation extends this approach to FP8. GPUs such as the NVIDIA H100 include specialised hardware units that can execute FP8 calculations at very high speed.

The NVIDIA Blackwell architecture is the successor to Hopper and takes this development further with fifth-generation Tensor Cores and support for additional low-precision formats such as FP4. These formats are designed to further improve efficiency for large AI models, particularly in inference and training workflows. FP8 remains an important format for modern AI systems, while newer ultra-low-precision approaches aim to increase throughput while maintaining model accuracy.

The NVIDIA Ada Lovelace architecture is also highly optimised for FP16 and BF16 workloads and supports FP8 in certain models and use cases.

Tensor Cores play a central role in this development. They accelerate matrix operations, which are essential for neural networks. Lower precision allows GPUs to process more calculations in parallel, significantly improving speed and efficiency.

The practical benefits depend not only on the hardware but also on the software ecosystem. Frameworks such as PyTorch and TensorFlow support mixed precision and can often select suitable formats automatically.

However, not every GPU supports all formats equally. Older models typically rely mainly on FP32, while modern AI accelerators are designed specifically for FP16, BF16 and FP8 workloads. For large language models, BF16 and FP16 are now widely used standards. FP8 is also gaining adoption for training workflows, such as with DeepSeek-V3, but requires techniques such as fine-grained scaling and FP32 accumulation to maintain stability.

How quantisation and downcasting improve efficiency

In practical applications, reduced floating-point formats have a significant impact on the speed, memory requirements and operating costs of AI systems. Converting calculations from FP32 to FP16 or BF16 can substantially reduce memory usage, allowing larger models or higher batch sizes to run within the GPU’s available memory.

Smaller data formats also allow GPUs to perform more calculations in parallel. This increases throughput and reduces both training and inference times, especially for large neural networks with billions of parameters. A common optimisation technique is downcasting, where data or model parameters are converted from a larger format such as FP32 to a smaller format such as FP16 or BF16. This reduces memory consumption and bandwidth requirements while improving performance.

Quantisation takes this approach further by converting models into even smaller formats, such as FP8 or integer data types. This can further reduce memory requirements and improve latency, meaning the response time of an AI system. Quantisation is therefore particularly important for production AI applications and real-time inference.

However, reducing precision always involves a trade-off between efficiency and accuracy. If precision is reduced too far, rounding errors can increase and negatively affect model quality. For this reason, AI frameworks often combine multiple formats within the same workflow. Critical calculations may still use higher precision, while less sensitive operations are performed with FP16, BF16 or FP8.

Go to Main Menu