FP4 vs NF4, pick the answer that captures the actual structural difference
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
FP4 uses 16 uniformly-spaced floating-point buckets; NF4 uses 16 non-uniform quantile buckets calibrated to a unit normal, so it captures more signal on bell-shaped weight tensors.
Imagine you have to pick exactly 16 height labels to describe everyone in a city. One approach spaces the labels uniformly from 4 feet to 7 feet, every 2.4 inches. That works, but most people cluster around 5'5" so half your labels are wasted on heights almost nobody has. The other approach looks at the actual height distribution first and places more labels in the crowded middle of the range and fewer in the rare extremes. The second approach loses less information about typical people because it puts its precision where the density is. NF4 is the second approach for transformer weights, which cluster around zero in a bell shape. FP4 is the first approach, spacing buckets evenly without knowing the data shape.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: establish both formats are 4-bit, contrast uniform versus quantile codebook layouts, explain why the normal prior fits pretrained weights, then cover the block-scaling interaction and the FP4 default override.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming NF4 stores more bits per weight than FP4. Both are exactly 4 bits per value; the difference is where the 16 representable values are placed within the range.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.