Match each 4-bit format to its niche in 2026 inference and fine-tuning.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
FP4 is a standard 4-bit floating-point format with native Blackwell tensor cores for fast inference matmul; NF4 is a non-uniform 4-bit format from QLoRA whose levels match a normal distribution for weight storage
Imagine compressing a list of numbers down to just 16 possible values each. You have two ways to pick those 16 levels. The first is to space them out using a clean math rule, the same way most hardware understands numbers. That picks a grid the chip can multiply with at full speed. The second is to look at the actual numbers you have, notice they bunch up near zero, and place more of your 16 levels in that crowded region so the compression hurts less. The first style is FP4 and runs fast on the newest chips. The second is NF4 and was invented to make fine-tuning huge models possible on a single GPU.
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: define FP4 as E2M1 with native Blackwell tensor cores, contrast NF4 as a non-uniform storage format from QLoRA whose levels match a normal distribution, walk through QLoRA's dequant-to-BF16 path, then compare deployment niches.
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.
Treating FP4 and NF4 as interchangeable because both use 4 bits. They differ in where the 16 levels are placed and in whether dedicated tensor-core hardware multiplies them, which puts them in very different deployment niches.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.