Mixed precision training is a technique that performs forward and backward propagation using float16 (half-precision) arithmetic to drastically reduce memory footprint and increase throughput on modern GPUs with Tensor Cores. A master copy of model weights is retained in float32 (single-precision) to preserve numerical stability, with a loss scaling factor applied to prevent gradient underflow in the reduced dynamic range.
Glossary
Mixed Precision Training

What is Mixed Precision Training?
A training paradigm that reduces memory consumption and accelerates computation by using lower-precision 16-bit floating-point formats for most operations while maintaining a master copy of weights in 32-bit precision.
This paradigm is critical for training large Vision Transformer architectures on high-resolution medical imagery, where the memory savings enable larger batch sizes and higher input resolutions. By combining float16 compute with float32 accumulation, mixed precision achieves near-identical accuracy to full-precision training while often delivering a 2-3x speedup on compatible hardware.
Key Features of Mixed Precision Training
A training paradigm that strategically combines 16-bit and 32-bit floating-point formats to dramatically reduce memory footprint and accelerate computation on modern tensor-core GPUs without sacrificing model accuracy.
Master Weight Copy
A full-precision FP32 master copy of all model weights is maintained throughout training. During each iteration, weights are cast to FP16 for the forward and backward passes to leverage faster half-precision compute. The resulting FP16 gradients are then used to update the master FP32 weights, preventing the gradual loss of small-magnitude updates that would otherwise vanish in lower precision.
Automatic Loss Scaling
A technique to preserve gradient values that underflow to zero in FP16. The loss is multiplied by a large scaling factor before backpropagation, shifting small gradient magnitudes into the representable FP16 range. After the backward pass, gradients are unscaled by the same factor before the optimizer step. Modern frameworks implement dynamic loss scaling, which automatically adjusts the scale factor by monitoring gradient overflow to find the optimal range.
Tensor Core Acceleration
NVIDIA Tensor Cores are specialized hardware units that perform fused multiply-add operations on FP16 matrices, delivering up to 8x higher throughput compared to standard FP32 CUDA cores. Mixed precision training is explicitly designed to exploit these units by ensuring matrix multiplications and convolutions execute in half-precision, while accumulation steps retain FP32 precision to maintain numerical stability.
Memory Bandwidth Reduction
Storing activations and gradients in FP16 halves the memory footprint of these tensors compared to FP32. This enables:
- Larger batch sizes that improve training stability
- Deeper or wider models that fit within GPU memory constraints
- Reduced I/O pressure on memory bandwidth-bound operations For large vision transformers, this often translates to a 40-50% reduction in total GPU memory consumption.
Arithmetic Intensity Optimization
Mixed precision shifts the bottleneck from compute-bound to memory-bandwidth-bound operations. By reducing the byte count of every tensor transfer, operations like element-wise additions and normalization layers execute faster. This is particularly impactful for Vision Transformers, where the self-attention mechanism involves numerous memory-intensive reshaping and scaling operations between the compute-heavy matrix multiplications.
NVIDIA Apex and Native AMP
Two primary implementation paths exist:
- NVIDIA Apex: A PyTorch extension offering
opt_levelpresets (O0-O3) that progressively automate mixed precision, from conservative FP32 fallback lists to aggressive full-FP16 execution - Native Torch AMP:
torch.cuda.ampprovides context managers (autocast) and gradient scalers (GradScaler) with fine-grained control, automatically casting eligible ops to FP16 while keeping safety-critical ops in FP32
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about accelerating deep learning with reduced-precision arithmetic.
Mixed precision training is a methodology that accelerates neural network training by using lower-precision 16-bit floating-point formats (FP16 or BF16) for the majority of arithmetic operations while maintaining a master copy of model weights in 32-bit single precision (FP32). During each training iteration, a master FP32 weight is downcast to FP16 for the forward and backward passes, where matrix multiplications and convolutions execute faster on modern hardware like NVIDIA Tensor Cores. The resulting FP16 gradients are then used to update the master FP32 weights, preserving the numerical stability required for convergence. To prevent small gradient values from underflowing to zero in FP16, a technique called loss scaling multiplies the loss value by a large factor before backpropagation, then unscales the gradients before the weight update. This hybrid approach typically reduces memory consumption by nearly 50% and can deliver 2-3x speedups on compatible accelerators without sacrificing final model accuracy.
Related Terms
Mastering mixed precision training requires understanding the surrounding hardware, software, and numerical techniques that make it safe and effective for medical imaging models.
Automatic Mixed Precision (AMP)
A software framework that automates the casting of operations to lower precision. AMP automatically selects the appropriate data type for each operation, using FP16 for matrix multiplications and convolutions while keeping reductions and normalizations in FP32. In PyTorch, this is implemented via torch.cuda.amp with a GradScaler that dynamically scales the loss to prevent gradient underflow in the 16-bit range.
Loss Scaling
A critical technique that multiplies the loss value by a large constant before backpropagation to push small gradient values into the representable range of FP16. Without scaling, gradients for many parameters would underflow to zero, stalling training. Modern implementations use dynamic loss scaling, which automatically increases or decreases the scale factor based on a history of gradient overflow checks.
TensorFloat-32 (TF32)
A 19-bit data format native to the NVIDIA Ampere architecture and beyond. TF32 uses the same 10-bit mantissa as FP16 but retains the 8-bit exponent range of FP32, providing the dynamic range of 32-bit with the throughput of 16-bit. On A100 and H100 GPUs, TF32 is the default math mode for matrix multiplications, offering a 1.6x speedup over FP32 with no code changes required.
Brain Floating Point (BF16)
A 16-bit floating-point format with the same 8-bit exponent as FP32 but a truncated 7-bit mantissa. Unlike FP16, BF16 preserves the full dynamic range of FP32, eliminating the need for loss scaling. This format is particularly advantageous for medical imaging models where large activation ranges are common. BF16 is natively supported on Google TPUs and NVIDIA A100/H100 GPUs.
FP8 Training
The next frontier in low-precision training, using 8-bit floating-point formats on NVIDIA H100 GPUs. FP8 comes in two variants: E4M3 (4 exponent bits, 3 mantissa bits) for forward propagation and E5M2 (5 exponent bits, 2 mantissa bits) for gradients. This requires fine-grained scaling factors computed per-tensor or per-block to maintain numerical stability, enabling another 2x throughput improvement over FP16.
Master Weight Copy
The foundational mechanism that makes mixed precision safe. A full-precision FP32 master copy of all model weights is maintained throughout training. Each iteration, a truncated FP16 copy is created for the forward and backward passes to maximize speed. The resulting FP16 gradients are then used to update the FP32 master weights, preserving the precision necessary for stable convergence over many iterations.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us