Pidoku

Quantization Research

Module 24 Lesson 24.d 50 min Difficulty 4/5

Prerequisites 10.k, 10.l, 13.b, 13.g, 24.a


Before you start: words you need#

WordPlain meaning
PTQ (post-training quantization)Converting a finished model to fewer bits, using a little calibration data. No retraining. GPTQ and AWQ are PTQ (13.c).
QAT (quantization-aware training)Training or fine-tuning the model while it “feels” the low precision, so it learns to tolerate it.
Native low precisionThe model is trained in the format it is served in (FP8, NVFP4, MXFP4), so there is no conversion step at all.
Block scaling / microscalingEach small block of numbers (16 or 32) shares one scale factor, so 4-bit numbers can cover a wide range. NVFP4 and MXFP4 work this way (10.k, 13.g).
W4A16, W4A8Shorthand for weight bits and activation bits: 4-bit weights with 16-bit activations, and so on.
OutliersA few very large values in activations or weights that wreck naive low-bit formats (13.d).
RotationMultiplying weights and activations by an orthogonal matrix (for example a Hadamard matrix) that spreads outliers out before quantizing (QuaRot, SpinQuant).

1. What is it?#

Quantization research asks how few bits each weight, activation and KV entry can use before quality or speed suffers. Fewer bits means fewer bytes per token, the main lever on memory-bound decode.

TopicStatus, November 2026
FP8 weights and activations (W8A8)ESTABLISHED: the safe default on Hopper and newer
INT4 weight-only PTQ (GPTQ, AWQ)ESTABLISHED
Block-scaled FP4 (NVFP4, MXFP4) on BlackwellESTABLISHED for weights; model makers ship FP4 checkpoints
Native low-precision training (FP8, then FP4)ESTABLISHED for FP8; EMERGING for FP4 at the frontier
FP4 activations (W4A4)EMERGING
3–4-bit KV cacheEMERGING (24.c)
Rotation-based outlier handlingESTABLISHED in tools, used selectively
2–3-bit codebook methods (AQLM, QuIP#)SPECULATIVE for serving: good quality, slow kernels
Ternary models (BitNet)SPECULATIVE at frontier scale

Facts checked on 12 November 2026. How to use each format is in 13.b–13.h; this lesson is about where the research is going.


2. Why does it matter?#

The biggest shift of 2025–26: quantization moved from the serving team to the model maker. gpt-oss (August 2025) shipped with MXFP4 MoE weights; DeepSeek-V4 (April 2026) ships native FP4 MoE weights; Kimi K3 (July 2026) ships native MXFP4 on its MoE path; NVIDIA’s Nemotron 3 Super and Ultra were trained with NVFP4; MiniMax-M3 shipped BF16 and MXFP8 checkpoints. If the model was trained in the format you serve, the main PTQ question (“how much quality did we lose?”) largely disappears. The new questions are about kernels, KV and activations.


3. Simple analogy#

Rounding prices to the nearest euro. Done after the fact (PTQ), some totals come out wrong. If the shop has always priced in whole euros (native training), nothing is lost by rounding, because there was nothing smaller to lose. Block scaling is pricing each aisle in its own unit: cents in the sweet aisle, hundreds in electronics.


4. Tiny example: bytes per weight#

FormatBits per weight incl. scales1T-parameter MoE weights
BF16162,000 GB
FP8 (per-channel scales)~8~1,000 GB
MXFP4 (one 8-bit scale per 32)4.25~531 GB
NVFP4 (one FP8 scale per 16, plus a tensor scale)~4.5~563 GB

A 1T-parameter model at FP4 fits in one 8-GPU B300 server (8 × 288 GB = 2.3 TB) with room for KV; at BF16 it does not. That is why FP4 checkpoints matter.


5. Technical explanation#

Three eras#

EraWhat happenedWhat it means when you read a paper
2022–23: finding the problemLLM.int8() found activation outliers; GPTQ and AWQ solved 4-bit weights; SmoothQuant solved 8-bit activationsFundamentals; historically important
2023–25: formats and hardwareFP8 (E4M3/E5M2) on Hopper; OCP microscaling (MX) standard; NVFP4 on Blackwell; KV quantization studied separatelyPractical toolkit
2025–26: native low precisionDeepSeek-V3 trained in FP8; NVFP4 pretraining shown at 12B scale over 10T tokens; frontier open models released in FP4The question becomes “can we train for it”, not “can we convert to it”

What is settled#

  • 4 bits is the PTQ floor for pretrained models. At 3 bits, quality loss is large on reasoning and long-form tasks; at 2 bits PTQ needs codebooks, and codebook kernels are slow because a table lookup is not a matrix multiply.
  • Block scaling is what makes 4 bits work, and hardware now does it natively.
  • Another 4-bit PTQ method gains little. GPTQ and AWQ are near the limit of what PTQ can do.

What is moving#

  1. FP4 training at frontier scale (EMERGING). NVIDIA showed NVFP4 pretraining of a 12B model on 10T tokens matching FP8 (September 2025), and Nemotron 3 Super and Ultra used it. Open question: does it hold at 1T+ parameters with long RL post-training? Watch model technical reports.
  2. FP4 activations (W4A4) (EMERGING). Weights are easy; activations have outliers. Rotations (QuaRot, SpinQuant), block scales and keeping a few sensitive layers at FP8 are the tools. vLLM’s Humming kernel library (October 2026) covers W4A16, W4A8 and W4A4 across INT4, MXFP4 and NVFP4; on DeepSeek-V4.1-Flash on 8× H20, switching the MoE layers from W4A16 to W4A8 raised output throughput by about 14–43% in the team’s own test.
  3. Mixed precision per layer. Embeddings, the output head, norms, MoE routers, attention and the indexer of a sparse-attention model often stay at higher precision. A principled rule for the rest is still missing; most teams search.
  4. KV below 8 bits (EMERGING), with the independent TurboQuant study as the reference (24.c).
  5. Train–serve consistency. Reinforcement learning needs the inference engine to produce the same probabilities as the trainer. Different low-precision kernels on each side bias the learning signal, so 2026 RL stacks align kernels and formats on both sides (24.j).

What would change the field#

  • FP4-native models with no quality debate at the top end.
  • Fast codebook kernels, which would make 2–3-bit serving practical for memory-starved settings.
  • Ternary or binary models (BitNet b1.58; a 2B open model in 2025) matching frontier quality. No sign of that at large scale yet.

6. Under the hood: how to evaluate a quantization paper#

24.a’s questions, specialised:

QuestionWhat to check
Q1 baselineCompared with GPTQ and AWQ at the same bits and group size? With FP8? Not only with round-to-nearest, which is trivially weak.
Q2 configurationSeveral model sizes; group size stated; effective bits including scales; dense and MoE
Q3 mechanismDoes it save bytes only (weight-only) or bytes and compute (weights and activations)? Is there a kernel, and on which GPU?
Q5 qualityPerplexity and short benchmarks are not enough. Long generation, multi-step reasoning, code correctness and long-context retrieval are usually missing.
Q6 hidden costsCalibration data sensitivity, quantization time, custom kernels, compatibility with tensor parallelism, CUDA graphs and paged attention
Q7 simplerDoes it beat FP8, or the model maker’s own FP4 checkpoint?

The long-generation gap is systematic: small per-token errors compound over thousands of tokens of reasoning (10.j). A method validated only on short answers has not been validated for 2026 traffic.


7. Performance implications#

  • Weight-only 4-bit helps decode (fewer bytes) but not prefill (still 16-bit maths). W4A8 and W4A4 help both, if the kernel exists for your GPU.
  • Kernels decide. The same NVFP4 checkpoint can be fast on Blackwell, which has FP4 tensor cores, and merely compact on Hopper, which must dequantize first.
  • Scales cost bytes. NVFP4 is about 4.5 bits, MXFP4 4.25; count them in capacity maths.

8. Production implications#

  • Start from the model maker’s checkpoint when one exists in your target format. It was tested by the people who trained the model.
  • FP8 remains the safe default where no official low-bit checkpoint exists.
  • Evaluate on your own long tasks before moving below 8 bits on activations or KV.
  • Pin kernel versions. A kernel-library update can change numerics; for RL rollouts that matters.

9. Common mistakes#

  1. Reading a 2023 PTQ paper as if it were the frontier.
  2. Accepting perplexity-only results.
  3. Counting 4-bit formats as 4.0 bits.
  4. Comparing a new method only with round-to-nearest.
  5. Quantizing the router, output head or sparse-attention indexer as aggressively as the FFN.
  6. Assuming an FP4 checkpoint is fast on any GPU.

10. Hands-on exercise#

  1. For one FP4 model (DeepSeek-V4-Flash, Kimi K3 or gpt-oss), read the model card and config: which tensors are FP4, which stay higher precision, and what scale format is used?
  2. Compute effective bits per weight, including scales, for INT4 with group size 128, MXFP4 and NVFP4.
  3. Take a 4-bit model and measure how far its output drifts from the BF16 model at token positions 10, 100, 1,000 and 5,000 on a long reasoning prompt.
  4. Apply the table in section 6 to one 2026 W4A4 paper. Which rows does it answer?

11. Interview questions#

  1. What is settled in quantization, and what is still open?
  2. Why is 4 bits the practical floor for post-training quantization?
  3. What changes when the model maker trains in the format you serve?
  4. Why do activations quantize worse than weights, and what do rotations do about it?
  5. Why does FP4 help decode on Hopper less than on Blackwell?
  6. Why does reinforcement learning care about which quantized kernels the inference engine uses?

12. Further reading#

Checked on 12 November 2026.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in