AI Terms Dictionary

A comprehensive multilingual AI terminology dictionary

Definition

Mixed Precision Training (MPT) combines half-precision (FP16) and full-precision (FP32) data types during neural network training. By using FP16 for most operations, MPT reduces memory footprint and increases computational speed on modern GPUs with tensor cores. To maintain numerical stability, critical updates are performed in FP32. This technique allows for larger batch sizes and faster convergence without sacrificing model accuracy, making it essential for training large-scale deep learning models efficiently.

Summary

A training technique that uses both 16-bit and 32-bit floating-point numbers to accelerate computation and reduce memory usage.

Key Concepts

Use Cases

Code Example

1
2
3
4
5
6
7
import torch
import torch.cuda.amp as amp

# Example snippet showing automatic mixed precision context
with amp.autocast():
    output = model(input)
    loss = criterion(output, target)