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.
| Dimension | FP16 | BF16 |
|---|---|---|
| Bit layout | 1 sign + 5 exponent + 10 mantissa | 1 sign + 8 exponent + 7 mantissa |
| Max numeric range | Narrow (~65,504 max—needs loss scaling) | Huge (~3.4 × 10³⁸, same range as FP32) |
| Primary sweet spot | Inference on older GPUs | Default format for modern LLM training |
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/fp16/">FP16, explained simply</a> (The AI Math Dictionary)