liveBook · Manning

Mixed precision

Mixed precision is a computational technique that uses multiple numerical precisions for different values or operations to balance resource efficiency and numerical accuracy or stability.

How 3 Manning books explain it

Domain-Specific Small Language Models

Using reduced-precision numeric formats for some computations or weights to reduce memory use, often with limited loss in performance.

How it is used
Uses lower-precision arithmetic to reduce memory and improve computational efficiency during model training and inference.
How deep it goes
Explains FP16 and FP32 representation, training-time switching, gradient stability, and inference tradeoffs without detailing hardware kernels.
Examples
Uses GPT-Neo and Mistral 7B memory estimates, FP16 representation diagrams, and BF16 hardware-support checks.
What you can do after
Apply it by selecting lower-precision model formats to meet GPU memory constraints while preserving comparable performance.

Read how Domain-Specific Small Language Models explains mixed precision →

Deep Learning with R, Third Edition

Mixed-precision training is model training that uses numerical values with different floating-point precisions to balance computational efficiency and numerical accuracy.

How it is used
Speeds model training on GPUs or TPUs while preserving precision-sensitive weight updates.
How deep it goes
Explains dtype roles, unstable operations, loss scaling, and Keras configuration without deriving hardware-level implementation details.
Examples
Uses a mixed_float16 mini-GPT configuration, float32 layer opt-outs, and fixed or automatic optimizer loss scaling.
What you can do after
Operate/configure Keras mixed precision and protect training with float32 exceptions or loss scaling.

Read how Deep Learning with R, Third Edition explains mixed precision →

Deep Learning with Python, Third Edition

A training technique that uses lower-precision numeric types for some computations while keeping others in higher precision to balance speed, memory use, and numerical stability.

How it is used
Uses lower-precision computation to speed GPU or TPU training while preserving full precision for stability-sensitive updates.
How deep it goes
Explains layer dtypes, gradient casting, unstable operations, and loss scaling, but does not derive floating-point behavior mathematically.
Examples
Demonstrates Keras dtype policies, float32 opt-outs, fixed or automatic loss scaling, and a mini-GPT configuration.
What you can do after
Apply mixed precision in Keras, configure loss scaling, and protect numerically unstable layers with float32.

Read how Deep Learning with Python, Third Edition explains mixed precision →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.