Quantization — Technologies & Tricks

Updated July 2026 with 2025–2026 SOTA additions — new entries marked ★. Algorithm names link to their papers (arXiv / project page).

April 2026 · Version 1.0


Contents

  1. Foundations
  2. Number Formats
  3. Quantization Basics
  4. Activation Outliers: The Central Problem
  5. Weight Quantization Methods
  6. Activation Quantization
  7. KV Cache Quantization
  8. Diffusion Model Quantization
  9. MoE Quantization
  10. Vision Model Quantization
  11. FP8 / FP4 Training (Native Low-Precision)
  12. Hardware Support
  13. Inference Frameworks and Quantization Formats
  14. LoRA + Quantization
  15. Quantization for Inference Acceleration
  16. Failure Modes and Mitigations
  17. Calibration Best Practices
  18. Production Patterns
  19. Open Models with Quantized Releases
  20. Recent Frontier 2025–2026
  21. Production Stack 2026

1. Foundations

1.1 What is quantization?

Replacing high-precision numbers (FP32 / BF16) with lower-precision (INT8, INT4, FP8, FP4) representations to reduce memory, bandwidth, and compute cost.

\[\hat{x} = s \cdot \operatorname{round}(x/s) + z, \quad s = \text{scale},\; z = \text{zero-point}.\]

1.2 Why quantize?

1.3 Quantization vs distillation vs pruning

1.4 The Pareto frontier (2026 defaults)

Setting Memory savings Quality loss Use
BF16 (baseline) 0% training, FP16 inference
FP8 (E4M3 / E5M2) < 0.5% H100/B200 inference + training
INT8 weights, FP16 act < 1% widely supported
INT8 W & A 2× + 2× throughput 1–2% SmoothQuant
INT4 weights 1–2% GPTQ / AWQ standard
FP4 (E2M1) 1–2% Blackwell native
INT2 / 1.58-bit 8–16× 5–15% extreme; BitNet b1.58

1.5 The big idea

Key

For modern LLMs, weights compress easily; activations are harder (because of channel-wise outliers). KV cache compresses too. Most quality issues come from naive per-tensor activation quantization; per-channel / per-token / per-block scaling fixes most issues.

2. Number Formats

2.1 Floating-point formats

Format Sign + Exp + Mantissa Range Precision
FP32 1 + 8 + 23 \(\sim 10^{\pm 38}\) high
FP16 (IEEE) 1 + 5 + 10 \(\sim 10^{\pm 5}\) needs loss scaling
BF16 1 + 8 + 7 \(\sim 10^{\pm 38}\) ML-friendly
FP8 E4M3 1 + 4 + 3 ±448 forward / weights
FP8 E5M2 1 + 5 + 2 ±57344 gradients (more range)
FP6 E3M2 1 + 3 + 2 ±28 rare; experimental
FP4 E2M1 1 + 2 + 1 ±6 Blackwell native
FP4 E3M0 1 + 3 + 0 ±16 alt FP4

2.2 Integer formats

2.3 Block FP / Microscaling (MX)

Microsoft's MX format: per-block scale (typically 32 elements) of FP4 or FP6 mantissas. Standardized as MXFP4, MXFP6. Hardware-supported on B100/B200.

2.4 Why BF16 won training

Same range as FP32 (8 exp bits) but lower precision (7 mantissa). Range matters most for gradients / activations during training; precision can be made up by accumulating in FP32. No loss scaling needed (unlike FP16).

2.5 Why FP8 (over INT8) for training

2.6 Why FP4 is the next frontier

Blackwell (B100/B200) supports FP4 natively at \(\sim 2\times\) FP8 throughput. Combined with double quantization (per-block scale stored at 8-bit, scaled itself), gives 4-bit forward at training quality.

3. Quantization Basics

3.1 Linear / affine quantization

\[\hat{x} = s \cdot q + z, \quad q = \operatorname{round}((x - z)/s), \quad s \in \mathbb{R}_+,\; z \in \mathbb{Z}.\]

Symmetric: \(z = 0\), range \([-Q_{\max}, Q_{\max}]\). Asymmetric: \(z \neq 0\), range \([Q_{\min}, Q_{\max}]\).

3.2 Scale computation

Min-max: \(s = (\max - \min)/(Q_{\max} - Q_{\min})\).

Symmetric min-max: \(s = \max |x|/Q_{\max}\).

Percentile: drop top/bottom 0.1% before computing range; reduces outlier impact.

MSE / KL minimization: search for \(s\) minimizing reconstruction error or KL divergence between fp and quantized distributions.

3.3 Granularity

3.4 Calibration

A small dataset (\(\sim\) 128–1024 samples) used to compute scales for activations / static quantization. Critical:

3.5 Static vs dynamic

3.6 PTQ vs QAT

3.7 Straight-Through Estimator (STE)

For QAT: round operation has zero gradient. STE passes gradient through as identity:

\[\frac{\partial\,\operatorname{round}(x)}{\partial x} \approx 1.\]

4. Activation Outliers: The Central Problem

4.1 The observation (LLM.int8(), Dettmers et al.)

LLMs' activations have a small number of channels with > 100× the typical magnitude. These outliers:

4.2 Why outliers exist

Pretrained Transformers learn to use a few high-norm channels for attention sink behavior. Cannot be removed without retraining; must be handled.

4.3 Per-tensor disaster

Per-tensor scale is set by the outlier →quantization grid stretched →all non-outlier values bucketed together.

INT8 effectively becomes \(\sim\) INT4 for non-outlier channels.

4.4 Five solutions

  1. Per-channel (weights): outliers isolated to their own channel scale.
  2. Per-token (activations): outliers don't dominate other tokens.
  3. Mixed-precision: keep outlier channels in FP16; rest in INT8 (LLM.int8()).
  4. Migration: shift outlier scale from activations to weights (SmoothQuant).
  5. Rotation: orthogonal rotation distributes outlier energy across channels (QuaRot, SpinQuant).

5. Weight Quantization Methods

5.1 Round-to-Nearest (RTN) baseline

Simplest: quantize each weight to nearest grid point. Per-channel symmetric. Works fine to INT8; degrades at INT4.

5.2 GPTQ (Frantar et al. 2022)

Layer-wise reconstruction with the inverse Hessian:

\[H = 2XX^\top + \lambda I, \quad H \in \mathbb{R}^{d \times d}.\]

Quantize columns one at a time; after quantizing column \(k\), update remaining columns to compensate:

\[\Delta W_{:,\,j>k} = -\frac{(W_q - W)_{:,k} \cdot [H^{-1}]_{k,\,j>k}}{[H^{-1}]_{kk}}.\]

INT4 or INT3 weight quant with minimal quality loss.

5.3 AWQ (Lin et al. 2023)

Activation-aware: identify "salient" weights connected to large activations; protect them. Per-channel scaling \(s \in \mathbb{R}^d\):

\[\min_{s}\; \big\| W\operatorname{diag}(s^{-1})\,(\operatorname{diag}(s)X) - WX \big\|.\]

Then symmetric quantize \(W\operatorname{diag}(s^{-1})\). Faster than GPTQ; no per-layer Hessian.

5.4 SmoothQuant (Xiao et al. 2023)

Migrate scale from activations to weights:

\[W' = W \cdot \operatorname{diag}(s), \quad X' = X \cdot \operatorname{diag}(s^{-1}),\]

with \(s_c = (\max_i |X_{i,c}|)^\alpha / (\max_i |W_{i,c}|)^{1-\alpha}\), \(\alpha \in [0.4, 0.6]\). Activations become flatter (easier to quantize); weights absorb the scale.

Enables INT8 W & A inference where naive PTQ would fail.

5.5 QuaRot (Ashkboos et al. 2024)

Apply random rotations \(Q \in O(d)\) to weight + activation pairs:

\[W' = QW, \quad X' = XQ^\top.\]

\(W'X' = QWXQ^\top\) is invariant under rotations of input/output, but the rotated activations have outliers spread across channels (no longer concentrated). Per-channel quantization becomes much easier.

Hadamard rotations chosen for FFT-fast matmul. Used in W4A4 inference.

5.6 SpinQuant

Learned rotations + per-channel scales. Better than random Hadamard for some models.

5.7 HQQ (Half-Quadratic Quantization)

Closed-form half-quadratic optimization for per-block scales. No calibration data required; extremely fast.

5.8 OmniQuant (Shao et al.)

Learnable per-layer + per-channel quantization parameters via gradient descent (lightweight). Better than GPTQ at very low bits (INT3, INT2).

5.9 LLM-QAT (Liu et al.)

QAT for LLMs using teacher-generated synthetic data (no need for original training corpus). Recovers quality at W4A4 and below.

5.10 QUIP / QUIP#

Incoherence preprocessing: rotate weights to make them "incoherent" (similar magnitudes), then quantize. Lossless 2-bit compression with sparse codebooks.

5.11 BitNet b1.58 (1.58-bit)

Ternary weights \(\{-1, 0, +1\}\) trained from scratch. \(\log_2 3 \approx 1.58\) bits per weight. Matches BF16 quality at > 3B scale; \(\sim 5\times\) faster inference. Requires retraining.

5.12 Comparison table

Method Bits Calib Quality Notes
RTN W8 no \(\sim\) baseline simplest
GPTQ W4/W3 yes (Hessian) high per-layer reconstruct
AWQ W4 yes (small) high activation-salient
SmoothQuant W8A8 yes good migration trick
QuaRot W4A4 no/small good rotation
SpinQuant W4A4 yes (small) better than QuaRot learned rotation
HQQ W4 none good no-calibration fast
OmniQuant W4–W2 yes (gradient) best at W2 learnable params
QUIP# W2 yes good at W2 incoherence + codebook
BitNet b1.58 W1.58 retrain matches BF16 from-scratch QAT

★ 2026 SOTA update — Rotation successors: FlatQuant, DuQuant

★ 2026 SOTA update — Trellis and extreme low-bit weights

6. Activation Quantization

6.1 The challenge

Activations are dynamic (depend on input), have outliers, and need per-token scaling.

6.2 Static activation quantization

Calibrate scales offline; freeze. Cheap; good for INT8 if outliers handled.

6.3 Dynamic per-token quantization

Compute scale per token at runtime: \(s_t = \max_c |x_{t,c}|/Q_{\max}\). Standard for INT8 / FP8 activations in production.

6.4 Per-channel activation

Different channels have different ranges. Combine per-token + per-channel: each scalar gets its own scale via a (per-token) · (per-channel) outer product.

6.5 Mixed-precision activations

LLM.int8(): detect outlier channels at runtime; route those through FP16 matmul; rest through INT8. Two parallel matmuls; merge results.

\[y = \operatorname{INT8}(W_{\text{rest}}) \cdot \operatorname{INT8}(X_{\text{rest}}) + \operatorname{FP16}(W_{\text{out}}) \cdot \operatorname{FP16}(X_{\text{out}}).\]

6.6 SmoothQuant activations

Migrating scale to weights flattens activation distribution; per-tensor or per-token quantization then works at INT8 quality.

6.7 FP8 activations

Hopper / Blackwell: FP8 (E4M3 forward, E5M2 backward) tensor cores.

Per-tensor or per-block (per 128) scaling. Matmul accumulator in FP32. Natural fit for activations because outliers fit FP8's wider exp range.

6.8 Activation quantization granularity choice

Granularity Cost Quality Use
Per-tensor cheapest worst W8A8 with SmoothQuant
Per-token cheap better W8A8, FP8
Per-channel medium good rare in production
Per-token + per-channel higher best rare
Per-block (128) medium good FP8 / FP4 in TE

7. KV Cache Quantization

7.1 Why KV separately?

KV cache often dominates inference memory at long context.

Reducing per-element bytes is direct savings without affecting weight precision.

7.2 Per-channel for K, per-token for V (KIVI)

KIVI insight: K has channel-wise outliers; V is token-wise stable.

7.3 INT8 / INT4 KV cache

Quantization Memory savings Quality loss
FP16 baseline 0%
FP8 KV < 0.5%
INT8 KV (per-channel K, per-token V) < 1%
INT4 KV (KIVI) 1–2%
INT2 KV (extreme) 5–10%

7.4 Outlier-aware KV quantization

Some channels of K have persistent outliers. Solutions:

7.5 FP8 KV (modern frontier)

H100 / B200: FP8 KV native; per-block scale stored alongside. 2× memory saving with negligible quality loss.

Standard in production serving frameworks.

7.6 Implementation

Frameworks: vLLM (KV INT8 / FP8), TensorRT-LLM (FP8 KV), SGLang, llama.cpp (Q4 / Q5 / Q8 KV), KIVI-2 reference impl.

★ 2026 SOTA update — Vector-quantized KV cache

8. Diffusion Model Quantization

8.1 Why harder than LLMs

8.2 Q-Diffusion (Li et al. 2023)

First systematic PTQ for diffusion. Time-aware calibration: split timesteps into bins; calibrate scales per bin.

8.3 PTQ4DM (He et al.)

Symmetric channel-wise weight quantization + dynamic activation. INT8 with < 1% FID loss.

8.4 Q-DiT (DiT-specific)

PTQ for DiT (Sora, SD3, FLUX backbones). Handles adaLN-induced outliers via per-block scaling.

8.5 SVDQuant (Li et al. 2024)

Low-rank decomposition + 4-bit quantization for FLUX:

\[W = Q + BA, \quad Q \in \operatorname{INT4},\; B, A \in \text{FP16 low-rank}.\]

The low-rank residual absorbs hard-to-quantize structure; INT4 covers the bulk.

4-bit FLUX with quality matching FP16.

8.6 EfficientDM, Q-DM, BitsFusion

Various PTQ approaches for SD-class diffusion. INT8 W & A standard; INT4 W achievable.

8.7 INT4 W + FP8 A

A common production setting for SDXL: 4-bit weights, 8-bit activations. \(\sim 4\times\) memory savings; mild quality loss.

8.8 LCM / DMD2 + quantization

Distillation reduces NFEs; quantization reduces per-step cost.

Combining: 4-step distilled SDXL with 4-bit weights \(\sim 100\times\) faster than baseline.

★ 2026 SOTA update — FP4 diffusion and video

9. MoE Quantization

9.1 Why MoE quantization is harder

9.2 Per-expert calibration

Calibrate each expert independently; require enough hits per expert. Sample more for popular experts; less for cold (or use shared calibration).

9.3 Variable bits per expert

9.4 Router FP precision

Keep the router (small linear) at FP16 / BF16. Quantizing the router degrades expert selection.

9.5 ktransformers MoE serving

Combines:

Enables 671B DeepSeek-V3 on a single workstation with \(\sim\) 96 GB VRAM.

9.6 DeepSeek-V3's FP8 native MoE

Trained natively in FP8 (E4M3 forward, with per-128-element block scaling). MoE expert FFNs in FP8; shared layers BF16. 2× throughput vs BF16; minimal quality loss.

10. Vision Model Quantization

10.1 ViT and ConvNet PTQ

10.2 Mobile vision quantization

MobileNet / EfficientNet / MobileViT: INT8 PTQ standard; can run on phone NPUs (Apple ANE, Qualcomm AI Engine).

10.3 Detection + segmentation

Q-DETR: quantization-aware DETR with attention map distillation. MobileSAM / EfficientSAM: smaller + INT8 for mobile.

10.4 VLM quantization

★ 2026 SOTA update — Modality-balanced VLM quantization

11. FP8 / FP4 Training (Native Low-Precision)

11.1 The mixed-precision training stack

Standard recipe (BF16 era):

11.2 FP8 training (NVIDIA Transformer Engine, H100)

2× throughput vs BF16; matched quality with proper scale management.

11.3 Scale management

11.4 Loss scaling (FP16 only)

For FP16 (not BF16 / FP8): scale loss by \(S\), divide gradients by \(S\) before optimizer. Prevents underflow. Not needed for BF16.

11.5 Stochastic rounding

Round to nearest with probability proportional to fractional part:

\[\hat{x} = \begin{cases} \lceil x \rceil & \text{prob } x - \lfloor x \rfloor \\ \lfloor x \rfloor & \text{else} \end{cases}\]

Unbiased in expectation; better than nearest rounding for very low precision (FP4, INT2). Especially useful for accumulators.

11.6 DeepSeek-V3 FP8 recipe

11.7 FP4 training (Blackwell, B100/B200)

FP4 (E2M1) at 2× FP8 throughput. Requires:

Early production results: matched BF16 / FP8 quality for some workloads; still maturing for general training.

11.8 Microscaling (MX) formats

Standardized per-block FP formats: MXFP4 (per-32 block of FP4), MXFP6, MXFP8. Hardware-supported on Blackwell / AMD MI300+. Becoming the standard low-precision format.

★ 2026 SOTA update — Native FP4 training (2025)

12. Hardware Support

12.1 NVIDIA

12.2 AMD

MI300X / MI325X: BF16 + FP8 (E4M3, E5M2).

192 / 256 GB HBM. Competitive on memory-bound workloads.

12.3 Apple Silicon

M1/M2/M3/M4: ANE (Apple Neural Engine) optimized for INT8. CoreML supports INT4 / INT8 weight quant. MLX framework: Apple's MoE / quantized inference framework.

12.4 Mobile NPUs

Qualcomm AI Engine (Hexagon NPU): INT8 / INT4 weight, INT8 activation. MediaTek APU: similar.

Google Tensor / TPU mobile: INT8.

12.5 Hardware-specific sparsity

2:4 sparsity on H100 / B200: 2 of 4 weights zero →2× matmul throughput. Combined with quantization for \(\sim 4\times\) effective speedup.

12.6 Edge accelerators

Coral TPU, Hailo, Jetson: INT8 PTQ standard. Groq LPU: deterministic int / FP inference at very low latency.

12.7 TPU FP8 / int8

TPU v5p / v6e (Trillium): BF16 + INT8. Different tensor-core programming model.

13. Inference Frameworks and Quantization Formats

13.1 The framework lineup (2026)

Framework Quant formats Notes
bitsandbytes 8-bit, 4-bit (NF4, FP4) QLoRA standard; PyTorch
GGUF (llama.cpp) Q2–Q8, K-quants CPU + GPU + Apple Silicon
AWQ W4A16 TinyChat / vLLM kernels
GPTQ / ExLlamaV2/V3 W4A16, W3A16 Marlin kernels for fast
TensorRT-LLM FP8, INT8 W & A, GPTQ, AWQ NVIDIA's; production
vLLM FP8, AWQ, GPTQ, BitsAndBytes Wide format support
SGLang FP8, AWQ, GPTQ High-throughput serving
HQQ W4 / W3 / W2 Calibration-free; fast
Olive ONNX-based; multi-format Microsoft's pipeline
NVIDIA Model Optimizer FP8 / INT4 / INT8 + sparsity Production conversion
Apple MLX INT4, INT8 Apple Silicon native
ktransformers GGUF + offload + MoE Consumer DeepSeek-V3

13.2 GGUF / llama.cpp K-quants

K-quants vary precision per layer / matrix automatically: critical layers (e.g., attention output) at higher bits.

13.3 NF4 (NormalFloat 4)

4-bit format optimized for normally-distributed weights. Used in QLoRA. Better than uniform INT4 for typical model weights.

13.4 Marlin / Machete kernels

Fast W4 GEMM kernels for INT4 weight quantization. Used in vLLM, TensorRT-LLM. 2–4× speedup over FP16 GEMM.

13.5 Format conversion

14. LoRA + Quantization

14.1 QLoRA (Dettmers et al. 2023)

14.2 Standard QLoRA recipe

14.3 Q-Galore, GaLore variants

Memory-efficient training of full-precision base via low-rank gradient projection. Combined with quantization for further savings.

14.4 Unsloth optimizations

15. Quantization for Inference Acceleration

15.1 Memory bandwidth analysis

For decode (memory-bound): per-step time \(\approx\) (model bytes) / (HBM bandwidth).

Llama-3-70B BF16 on H100 (3 TB/s HBM3): 140 GB / 3000 GB/s = 47 ms/step. INT4: 35 GB / 3000 GB/s = 12 ms/step. \(\sim 4\times\) faster decode.

15.2 Compute bandwidth analysis

For prefill (compute-bound): per-step time \(\approx\) FLOPs / (peak FLOPs).

INT8 matmul \(\sim 2\times\) BF16; FP8 \(\sim 2\times\); FP4 \(\sim 4\times\). Speedup applies primarily to prefill.

15.3 Speedup table (typical)

Setting Decode speedup Memory Quality
BF16 baseline 100% baseline
INT8 weights (W8A16) 1.5–2× 50% near baseline
INT4 weights (W4A16) 2–4× 25% \(\sim\) 1% loss
FP8 (W8A8) 2–3× 50% near baseline
W4A8 mixed 25% wts, 50% acts 1% loss

15.4 Per-deployment selection

16. Failure Modes and Mitigations

16.1 Quality cliff at INT4

Quality OK at INT8, suddenly bad at INT4. Fix: per-channel for weights; per-token for activations; consider AWQ / GPTQ over RTN.

16.2 Outlier sensitivity

Per-tensor activation quant collapses. Fix: SmoothQuant migration, QuaRot rotation, mixed-precision (LLM.int8()).

16.3 Long-context quality degradation

Quantized model fine on short context; degrades on long.

Fix: don't quantize KV too aggressively; check perplexity at long context; switch to FP8 KV.

16.4 Tokenizer / language regression

Some tokens / languages disproportionately affected. Fix: more diverse calibration data; per-language eval.

16.5 Calibration overfit

Model great on calibration distribution, poor elsewhere. Fix: diverse calibration; use percentile / MSE-based scales rather than max.

16.6 Diffusion FID drift

Quantized diffusion has higher FID despite low MSE. Fix: per-timestep calibration; SVDQuant for FLUX; check perceptual quality not just numeric.

16.7 Quantized MoE expert atrophy

Cold experts get poor quantization; quality drops. Fix: per-expert calibration with adequate samples; or keep cold experts FP.

16.8 Speculative-decoding mismatch

Draft and target models quantized differently; rejection rate spikes. Fix: match precision; or lower acceptance threshold.

16.9 QAT-PTQ gap

PTQ quality far below QAT. Fix: try AWQ / GPTQ / SpinQuant / OmniQuant; if still bad, consider QAT (LLM-QAT).

17. Calibration Best Practices

17.1 Calibration data

17.2 Scale-determination strategies

17.3 Eval after quantization

17.4 Per-layer sensitivity analysis

Quantize one layer at a time; measure quality drop. Layers with high sensitivity (often first/last attention) kept at higher precision.

17.5 Mixed-bit allocation

Given a target average bits, allocate per layer / module by sensitivity. Critical layers higher; less-critical lower.

Used in K-quants automatically.

18. Production Patterns

18.1 Tier-based serving

18.2 Distillation + quantization

Distill into smaller model + quantize the student.

Compounding gains: 10× from distillation + 4× from quantization \(= 40\times\) inference cost reduction.

18.3 Quantization-aware deployment

18.4 Mixed deployment

18.5 Quantize then continue training

Some workflows: PTQ to INT8 →fine-tune to recover quality →re-quantize. Approaches QAT quality with PTQ simplicity.

18.6 Continuous re-quantization

As the base model evolves (RLHF iterations), re-quantize. Maintain calibration data hash for reproducibility.

19. Open Models with Quantized Releases

19.1 LLMs

19.2 Vision encoders

19.3 VLMs

19.4 Diffusion

20. Recent Frontier 2025–2026

20.2 BitNet b1.58 follow-ups

Pure-ternary LLMs trained from scratch; matches BF16 quality at scale; requires retraining (no PTQ path).

Hardware support emerging.

20.3 Research directions

★ 2026 SOTA update — Native 1.58-bit LLMs ship

21. Production Stack 2026

Use case Default approach Notes
Cloud LLM (max throughput) FP8 (W8A8 + FP8 KV) H100/B200 TRT-LLM / vLLM
Cloud LLM (memory-tight) W4A16 (AWQ) + FP8 KV TensorRT-LLM Marlin
Cloud diffusion INT8 W & A + FP8 KV cross-attn TRT-LLM diffusion
Cloud MoE (DeepSeek-V3) FP8 native + per-expert blocks Megatron + custom
Workstation MoE (671B) GGUF Q4 + ktransformers + offload Consumer-class
Single-GPU consumer LLM GGUF Q4 K M (llama.cpp) 7B/13B sweet spot
Apple Silicon LLM MLX INT4 / INT8 Native ANE
QLoRA fine-tune NF4 base + LoRA adapters Single 24–48 GB GPU
Mobile vision INT8 + 2:4 sparsity Hexagon / ANE
Edge embedded INT8 (PTQ) Coral / Jetson / Hailo
Multimodal frontier Vision FP16 + LLM AWQ + FP8 KV Mixed precision

Appendix A: Twenty-Five Things to Know

  1. Affine quant: \(\hat{x} = s \cdot \operatorname{round}((x - z)/s) + z.\)
  2. Symmetric vs asymmetric (\(z = 0\) vs not).
  3. Granularity: per-tensor / per-channel / per-token / per-block.
  4. BF16 has same range as FP32 (8 exp bits).
  5. FP8: E4M3 forward, E5M2 backward.
  6. FP4 (E2M1) on Blackwell at 2× FP8 throughput.
  7. Microscaling (MXFP4, MXFP6): per-block FP standard.
  8. GPTQ: Hessian-based per-column quantization with update.
  9. AWQ: salient-channel scaling formula.
  10. SmoothQuant: migrate scale from activations to weights.
  11. QuaRot: orthogonal rotation spreads outliers.
  12. LLM.int8(): outlier channels in FP16, rest INT8.
  13. KIVI: per-channel K, per-token V.
  14. NF4: 4-bit format for normal-distributed weights.
  15. GGUF K-quants: per-layer adaptive precision.
  16. QLoRA: NF4 base + BF16 LoRA adapters.
  17. Marlin / Machete: fast W4 GEMM kernels.
  18. DeepSeek-V3 FP8 recipe: per-block + double-quant + custom kernels.
  19. BitNet b1.58: ternary weights; matches BF16 at > 3B with retraining.
  20. PTQ vs QAT: post-training cheap vs aware-training quality.
  21. STE: gradient passes through round.
  22. SVDQuant: low-rank residual + INT4 for FLUX.
  23. Per-expert calibration for MoE quantization.
  24. ktransformers: GGUF Q4 + offload for 671B on workstation.
  25. Quantization × distillation × sparsity = compounding gains.

Appendix B: Decision Tree — "How to Quantize?"

  1. Cloud serving with H100/B200 hardware? → FP8 (W8A8 + FP8 KV); TensorRT-LLM or vLLM.
  2. Cloud serving on A100 / older? → \(\operatorname{INT8}\) (SmoothQuant) or \(\operatorname{W4A16}\) (AWQ).
  3. Memory-tight / want max throughput? → \(\operatorname{W4A16}\) (AWQ + Marlin) + FP8 KV.
  4. Single consumer GPU (24–80 GB)? → GGUF Q4 K M (llama.cpp) or AWQ via vLLM.
  5. Fine-tuning on single GPU? → QLoRA (NF4 + LoRA via bitsandbytes / Unsloth).
  6. Apple Silicon device? → MLX INT4 / INT8.
  7. Mobile / NPU (Qualcomm, ANE, MediaTek)? → INT8 PTQ via OpenVINO / Core ML / QNN.
  8. Diffusion model serving? → INT8 W & A; SVDQuant for FLUX 4-bit.
  9. MoE serving on workstation? → ktransformers + GGUF Q4 + CPU offload.
  10. Training a frontier model from scratch? → FP8 (Transformer Engine) or experimental FP4.

Appendix C: Year-by-Year Quantization Milestones