Learn AI Math

FP16

What is FP16?

In one sentence: FP16 is a 16-bit floating point format that uses half the memory of FP32.

It stores each number in 2 bytes, so models are half the size and run faster on GPUs. But FP16 has a smaller range, so very big or very small numbers can overflow or vanish, which can make training unstable.

Σ Quick math / rule of thumb: 16 bits = 2 bytes per parameter (1 sign + 5 exponent + 10 mantissa bits) — cuts weight memory in half vs. FP32.

What does FP16 look like?

A 7B model in FP16 needs about 14 GB of memory.

Why does FP16 matter?

FP16 helped make big models practical on GPUs.

FP16 vs. BF16

Both use 16 bits (2 bytes) per number, but BF16 trades fractional precision bits for the wide exponent range of 32-bit floats—preventing overflow crashes during large-scale AI training.

DimensionFP16BF16
Bit layout1 sign + 5 exponent + 10 mantissa1 sign + 8 exponent + 7 mantissa
Max numeric rangeNarrow (~65,504 max—needs loss scaling)Huge (~3.4 × 10³⁸, same range as FP32)
Primary sweet spotInference on older GPUsDefault format for modern LLM training

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.