FP4

Also known as: 4-bit floating point · E2M1

On this page 7

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 bitsMantissa bitValue
0000 (zero)
0010.5 (subnormal)
010 / 11.0 / 1.5
100 / 12.0 / 3.0
110 / 14.0 / 6.0
Positive values representable in E2M1

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.

VariantBlock sizeScale formatEffective bits per value
MXFP432 elementsE8M0 power of twoAbout 4.25
NVFP416 elementsFP8 E4M3 plus per-tensor FP32About 4.5
Plain FP4Whole tensorOne FP32 or FP16 scaleAbout 4.0
Main FP4 variants used in AI accelerators

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.

FormatBitsTypical roleRelative tensor throughput
FP16 / bfloat1616Training, high-accuracy inference1x baseline
FP88Training and inferenceAbout 2x
FP44Mainly inference, emerging training useAbout 4x
INT44Weight-only quantizationHardware dependent
FP4 compared with neighboring precision formats

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.

SymptomLikely causeMitigation
Perplexity rises sharplyOutlier activations clippedSmaller blocks or rotation-based outlier smoothing
Quality drops on long promptsAttention computed in FP4Keep attention and softmax in higher precision
Training divergesGradient noise too largeStochastic rounding and FP8 or bfloat16 master weights
Uneven accuracy across tasksPoor calibration dataCalibrate on representative prompts
Common FP4 problems and their mitigations
  • 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.