[KongchangAI]
Conceptmixed precision / FP16训练

Mixed Precision Training

A deep learning training optimization technique that uses half-precision floating point (FP16) during forward propagation and gradient computation while retaining full-precision (FP32) master weight copies for parameter updates. This approach significantly reduces GPU memory consumption and accelerates training throughput.

Core Facts

Timeline (last 90 days)

Nov 6

The smallest positive normal number for fp16 is approximately 6e-5, and many gradient values below this magnitude underflow to zero, causing parameters to stop updating, which is why mixed-precision training requires GradScaler.

Unverified50%
Nov 1

During training with mixed precision, memory usage roughly requires 16-20 bytes per parameter (including parameters, gradients, and optimizer states) plus activation overhead.

Unverified50%
Oct 27

The accuracy of MLPs is limited by the training distribution, and large errors may occur for structures containing rare elements or extreme coordination, so their main role is to provide consistent and efficient relative ranking rather than to replace high-accuracy validation.

Unverified50%
Oct 26

In mixed-precision training, the choice of rounding positions may be more critical than overall precision.

Unverified50%
Oct 15

Mixed-precision training uses both low-precision (FP16, BF16 or FP8) and high-precision (such as FP32) numerical formats during training, using low precision for matrix operations to save memory and bandwidth, while retaining high precision for sensitive steps such as parameter updates to avoid overflow.

Unverified50%
Oct 15

Pretraining's footprint on VRAM (or NPU on-chip memory) is usually several times that of inference, and it is extremely sensitive to numerical precision; a single overflow or underflow during mixed-precision training can cause the loss to diverge.

Unverified50%
Oct 4

Different hardware architectures, different CUDA versions, and different operator scheduling orders can all cause subtle differences in floating-point rounding results.

Unverified50%
Oct 4

In production environments, engineers need to handle complex issues such as mixed-precision training (FP16/BF16) and distributed parallelism strategies (data parallelism, pipeline parallelism, and tensor parallelism).

Unverified50%
Sep 28

Gradient checkpointing and mixed-precision training (FP16/BF16) are common memory-reduction measures.

Unverified50%
Sep 11

Modern training frameworks use mixed-precision training and gradient scaling (loss scaling) techniques to prevent small values from being swallowed by amplifying small gradients into the representable range.

Unverified50%

1 more timeline events

All Facts (16)

Verified

Mixed-precision training stores weights in FP32 while using FP16 or BF16 for forward and backward pass computations, which can reduce memory usage by nearly half.

90%
Verified

In mixed-precision training, the forward pass uses FP16 to leverage Tensor Core acceleration while parameter updates retain FP32 to maintain numerical stability, which has become standard practice for large model training.

75%
Verified

Mixed-precision training was jointly proposed by NVIDIA and Baidu in 2018; its core idea is to use FP16 in forward and backward propagation to reduce VRAM usage and accelerate computation, while retaining an FP32 master weight copy for parameter updates.

75%
Unverified

Mixed-precision training can increase training speed by approximately 2x and reduce VRAM usage by nearly half without significantly compromising model accuracy.

70%
Unverified

The smallest positive normal number for fp16 is approximately 6e-5, and many gradient values below this magnitude underflow to zero, causing parameters to stop updating, which is why mixed-precision training requires GradScaler.

50%
Unverified

During training with mixed precision, memory usage roughly requires 16-20 bytes per parameter (including parameters, gradients, and optimizer states) plus activation overhead.

50%
Unverified

The accuracy of MLPs is limited by the training distribution, and large errors may occur for structures containing rare elements or extreme coordination, so their main role is to provide consistent and efficient relative ranking rather than to replace high-accuracy validation.

50%
Unverified

In mixed-precision training, the choice of rounding positions may be more critical than overall precision.

50%
Unverified

Mixed-precision training uses both low-precision (FP16, BF16 or FP8) and high-precision (such as FP32) numerical formats during training, using low precision for matrix operations to save memory and bandwidth, while retaining high precision for sensitive steps such as parameter updates to avoid overflow.

50%
Unverified

Pretraining's footprint on VRAM (or NPU on-chip memory) is usually several times that of inference, and it is extremely sensitive to numerical precision; a single overflow or underflow during mixed-precision training can cause the loss to diverge.

50%
Unverified

Different hardware architectures, different CUDA versions, and different operator scheduling orders can all cause subtle differences in floating-point rounding results.

50%
Unverified

In production environments, engineers need to handle complex issues such as mixed-precision training (FP16/BF16) and distributed parallelism strategies (data parallelism, pipeline parallelism, and tensor parallelism).

50%
Unverified

Gradient checkpointing and mixed-precision training (FP16/BF16) are common memory-reduction measures.

50%
Unverified

Modern training frameworks use mixed-precision training and gradient scaling (loss scaling) techniques to prevent small values from being swallowed by amplifying small gradients into the representable range.

50%
Unverified

Mixed-precision training with the Adam optimizer requires approximately 14 bytes per parameter, meaning full-parameter training of a 70-billion-parameter model may require over 1TB of memory.

50%
Unverified

Under limited hardware conditions, techniques such as mixed-precision training and gradient accumulation can be used to maximize resource utilization efficiency.

50%

Source Articles