FP16
FP16 is a 16-bit floating-point format used in AI inference and training to reduce memory use and accelerate computation while maintaining acceptable precision.
FP16, short for floating-point 16, is a binary number format that uses 16 bits to represent a wide dynamic range of values, with 1 sign bit, 5 exponent bits, and 10 mantissa bits. In the context of AI hardware and LLMs, FP16 became the default precision for many training and inference workloads because it offers a good balance between numerical accuracy and computational efficiency. Compared to FP32 (32-bit float), FP16 halves the memory footprint and doubles the theoretical throughput on modern GPUs and accelerators that support native FP16 operations, such as NVIDIA's Tensor Cores. During training, mixed-precision techniques like AMP (automatic mixed precision) use FP16 for most calculations while keeping a master copy of weights in FP32 to preserve accuracy. For inference, many models are converted to FP16 to fit within GPU memory limits, especially for larger models like 7B or 13B parameter LLMs. However, FP16 has limited dynamic range compared to BF16 (bfloat16), which is becoming more popular for training as it maintains the same exponent range as FP32. FP16 is still widely used in older hardware and for inference on consumer GPUs. A key limitation is that FP16 can suffer from underflow or overflow when dealing with very small or very large gradients during training, which is why it is often paired with loss scaling. In the LLM ecosystem, FP16 is a common format for model weights distributed on Hugging Face and other model hubs. It is also the input format for many quantization methods, as converting from FP16 to lower-bit representations is straightforward. On the hardware side, FP16 operations are accelerated by Tensor Cores on NVIDIA GPUs (e.g., A100, H100) and by matrix engines on AMD and Intel accelerators. When benchmarking inference speed, measuring tokens-per-second in FP16 serves as a baseline against quantized formats.
(-1)^s * 2^(e-15) * (1 + m/1024)FP16 is not always faster than FP32 on all hardware; it requires native tensor core support for speedups, otherwise it can be slower due to overhead.
Related terms
Concepts you'll usually encounter alongside this one.
FP8 is an 8-bit floating-point format with two variants (E4M3 and E5M2) designed for efficient AI inference and training on modern hardware like NVIDIA H100.
INT8 is an 8-bit integer quantization format that significantly reduces model memory and speeds up inference by mapping floating-point values to 256 discrete levels.
Q4_K_M is a 4-bit quantization method in llama.cpp that combines 4-bit quantization for most weights with higher precision for important weights using a block size of 32.
A high-performance DRAM technology stacked vertically with GPU dies, providing massive memory bandwidth for LLM inference and training.
Used in benchmarks
Workloads on MyAI Bench that involve FP16.
Mentioned in tutorials
Hands-on guides that put this concept to work.
Stand up a fully functional local LLM stack on Ubuntu 22.04, NVIDIA drivers, CUDA, Ollama, and your first model, in under 30 minutes.
Run local LLMs on Windows 11 the right way, WSL2, the WSL CUDA toolkit, and Ollama with full GPU acceleration. Native installer covered too.
Apple Silicon is shockingly good at LLM inference. Get Ollama running with unified memory acceleration on any M-series Mac in 15 minutes.
DeepSeek's reasoning model rivals GPT-4 on math and code. Run the distilled 7B/14B/32B variants on consumer hardware in 30 minutes.
See how this term affects your memory budget.
Real numbers, real chips, every workload.
Picks for builders, by use case.
Stay Ahead of the AI Curve
Get weekly AI hardware news, benchmark updates, and deals in your inbox. Founding-subscriber list, be one of the first.