Skip to content
Practice tests · 30 items

Quantization & Numerics practice test

FP8 E4M3 and E5M2 scaling, INT4 weight-only kernels, GPTQ, AWQ, SmoothQuant, EXL2 and GGUF k-quants, MXFP4 and NVFP4 block scales, KV quantization, accuracy evaluation beyond perplexity, and batch-invariant determinism. The pool for this topic holds 10 easy, 12 medium and 8 hard items. Each answer comes with its reasoning and a link to the question or concept page it was drawn from.

Configure a test
Topic
Difficulty
Questions
10 in this pool · about 7 min
Reveal answers
Sign in to startNeeds a free account · retakes deal unseen items first

Sample items with answers

easy · sample
FP8 comes in E4M3 and E5M2. Which format do inference engines use for weights and activations, and why?
E5M2, because its larger range up to 57,344 avoids the need for scales
✓E4M3: 3 mantissa bits give finer steps, and scales take care of range
E5M2, because its extra exponent bit makes rounding error smaller
E4M3, because it can represent infinity while E5M2 cannot

E4M3 has 3 mantissa bits and tops out at 448; E5M2 has 2 mantissa bits and reaches 57,344. For inference the values are scaled into range by a per-tensor, per-channel or per-block factor, so precision matters more than raw range, and E4M3 halves the rounding step. E5M2's range suits gradients in training, where magnitudes swing widely. More exponent bits widen range but coarsen precision. The common E4M3 variant (E4M3FN) drops infinity and keeps only NaN, buying a little extra range; E5M2 is the one with infinities.

easy · sample
A model trained in BF16 produces some activations above 70,000. What happens if you serve it in FP16?
Nothing, since FP16 and BF16 have the same range
The values round to the nearest multiple of 256 but stay finite
✓They overflow to infinity, since FP16 tops out at 65,504
They are clamped to 65,504 by the tensor cores automatically

FP16 has 5 exponent bits and 10 mantissa bits, so its largest finite value is 65,504. BF16 has 8 exponent bits, the same range as FP32 (about 3.4e38), with only 7 mantissa bits. A BF16-trained model never had pressure to keep activations under 65,504, so FP16 serving can produce infinities that turn into NaNs in the next norm or softmax. Tensor cores do not clamp by default. BF16 trades precision for range, which is why it became the default for training and serving large models.

After the test

Picking an option is easier than deriving the answer at a whiteboard. These pages make you derive it: