FP4, or 4-bit floating point, is a number format that encodes each value in only four bits, usually in the E2M1 layout of one sign bit, two exponent bits and one mantissa bit. In AI hardware, FP4 is the narrowest floating-point format with native tensor-core support on current data-center accelerators, and it is used mainly to store model weights and activations for inference at a quarter of the memory cost of FP16.
On its own, FP4 can represent only sixteen bit patterns, so it is almost always paired with block scaling: a shared scale factor stored for each small group of values. The combination, standardized as microscaling formats and implemented in vendor variants, is what makes 4-bit arithmetic accurate enough for large language models.
How the E2M1 encoding works
The E2M1 encoding splits four bits into one sign bit, a two-bit exponent with a bias of 1 and a one-bit mantissa. Normal values follow the usual floating-point rule, sign times two to the power of the unbiased exponent times one plus the mantissa fraction, and the exponent code zero produces a subnormal value of 0.5. The format defines no infinity and no NaN, so every pattern is a finite number.
The resulting grid is strongly non-uniform: values are dense near zero and sparse near the maximum magnitude of 6. This shape matches the bell-shaped distribution of neural-network weights better than an evenly spaced integer grid.
| Exponent bits | Mantissa bit | Value |
|---|---|---|
| 00 | 0 | 0 (zero) |
| 00 | 1 | 0.5 (subnormal) |
| 01 | 0 / 1 | 1.0 / 1.5 |
| 10 | 0 / 1 | 2.0 / 3.0 |
| 11 | 0 / 1 | 4.0 / 6.0 |
With the sign bit, this gives fifteen distinct values, since positive and negative zero coincide numerically. The dynamic range of a single FP4 value is therefore only about 12 to 1 between the largest and smallest nonzero magnitudes, far too narrow for raw tensors.
Block scaling and FP4 variants
Block scaling gives FP4 a practical dynamic range by attaching a shared scale factor to each block of elements. The hardware multiplies each 4-bit element by its block scale during the matrix operation, so small blocks can adapt to local magnitudes while the per-element storage stays at four bits.
| Variant | Block size | Scale format | Effective bits per value |
|---|---|---|---|
| MXFP4 | 32 elements | E8M0 power of two | About 4.25 |
| NVFP4 | 16 elements | FP8 E4M3 plus per-tensor FP32 | About 4.5 |
| Plain FP4 | Whole tensor | One FP32 or FP16 scale | About 4.0 |
MXFP4 is defined in the Open Compute Project microscaling specification, which several chip makers support. NVFP4, introduced with NVIDIA Blackwell, uses smaller blocks and a finer-grained FP8 scale, which reduces quantization error at a small storage cost. Plain per-tensor FP4 is rarely accurate enough for large models.
Native FP4 tensor-core support appeared first in NVIDIA Blackwell-generation GPUs and in recent AMD Instinct accelerators, and other chip makers have announced microscaling support. On older hardware, FP4 can still serve as a compressed storage format, but values must be expanded to FP8 or FP16 before each multiplication, so only the memory saving is realized. Software stacks such as inference runtimes and compilers must also pack two FP4 values per byte and keep scale factors aligned with their blocks.
Why AI hardware adopts FP4
AI hardware adopts FP4 because halving the bit width roughly doubles both compute throughput and effective memory bandwidth relative to FP8. Narrow multipliers occupy less silicon area and consume less energy per operation, so a tensor core can perform more multiply-accumulate operations per cycle within the same power budget.
The memory effect is often more important than raw arithmetic. Large-model inference is frequently limited by the memory wall, meaning token generation waits on weight transfers from high-bandwidth memory. Storing weights in FP4 cuts those transfers by about four times compared with FP16, which raises tokens per second and lets larger models fit on one accelerator.
| Format | Bits | Typical role | Relative tensor throughput |
|---|---|---|---|
| FP16 / bfloat16 | 16 | Training, high-accuracy inference | 1x baseline |
| FP8 | 8 | Training and inference | About 2x |
| FP4 | 4 | Mainly inference, emerging training use | About 4x |
| INT4 | 4 | Weight-only quantization | Hardware dependent |
Accumulation does not happen in four bits. Tensor cores accumulate products in FP32 or a similar wide format, and only the inputs are 4-bit, which keeps rounding errors from compounding across long dot products.
FP4 versus INT4 quantization
FP4 and INT4 both use four bits, but they place their sixteen levels differently. INT4 uses evenly spaced levels, which wastes resolution on rare large values, whereas FP4 concentrates levels near zero, where most weights and activations lie. With block scaling, FP4 usually preserves accuracy better for activations, which contain occasional outliers.
INT4 remains common in weight-only quantization schemes that dequantize to FP16 before multiplication. FP4 with native tensor-core support allows both operands to stay in low precision, which unlocks the full throughput gain instead of only the memory saving.
Accuracy risks and deployment practice
The main risk of FP4 is quantization error that accumulates into measurable quality loss, especially in reasoning tasks, long contexts and small models with little redundancy. Accuracy depends strongly on the scaling scheme, the calibration data and which layers are quantized.
| Symptom | Likely cause | Mitigation |
|---|---|---|
| Perplexity rises sharply | Outlier activations clipped | Smaller blocks or rotation-based outlier smoothing |
| Quality drops on long prompts | Attention computed in FP4 | Keep attention and softmax in higher precision |
| Training diverges | Gradient noise too large | Stochastic rounding and FP8 or bfloat16 master weights |
| Uneven accuracy across tasks | Poor calibration data | Calibrate on representative prompts |
- Quantization-aware training or fine-tuning usually recovers more accuracy than post-training quantization.
- Mixed-precision layouts keep embeddings, normalization and output layers in wider formats.
- Evaluate on downstream tasks, not only perplexity, before deploying an FP4 model.
Understanding it simply
FP4 is a very short way to write numbers inside AI chips. Each number gets only four bits of space. That allows just a handful of possible values, such as 0, 1, 1.5, 3 or 6.
Imagine a ruler with only a few marks. It is rough, but it is light and quick to read. To make it useful, the chip keeps a separate zoom setting for each small group of numbers. The group says whether its marks mean millimeters or meters. Short numbers mean the chip moves less data and does more work per second. The cost is some lost precision, so engineers test the model carefully.
Applied in practice
An enterprise team serves a 70-billion-parameter language model for internal document search. In bfloat16, the weights alone need about 140 GB of memory, so the model spans two accelerators. The team quantizes the weights and activations of the linear layers to a block-scaled FP4 format, keeps attention and the output layer in FP8, and calibrates on 2,000 real queries.
The quantized weights need roughly 40 GB including scale factors, so the model now fits on one accelerator with room for a larger key-value cache. Measured throughput rises by about 2.5 times per accelerator, while accuracy on the team’s internal evaluation set falls by less than one percentage point, which the team accepts for production.