Match each 4-bit format to its niche in 2026 inference and fine-tuning.
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.
Detailed answer & concept explanation~6 min readEverything 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. 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.
- NVIDIA Blackwell B200 ships native FP4 tensor cores, used by serving stacks like vLLM and TensorRT-LLM to run frontier models at higher throughput.
- QLoRA introduced NF4 in 2023 and remains the standard for memory-efficient fine-tuning in Hugging Face PEFT.
- Unsloth uses NF4 plus double quantisation to fit 70B fine-tunes on a single 80 GB H100 GPU.
- DeepSeek V4 serving stacks experimented with FP4 weights on B200 to roughly double decode throughput versus FP8.
- bitsandbytes library implements NF4 as the bnb_4bit_quant_type option that pairs with PEFT for QLoRA workflows.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does NF4 cluster more levels near zero than uniform 4-bit would?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
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.
Same topic, related formats. Practice these next.