Module FT19 — Quantization Formats

Quantization Formats

The format decision matrix — GGUF for universal local, AWQ for NVIDIA serving, MLX for Mac, EXL2 for max quality at low bitrate, FP8 for VRAM-rich high-quality, MXFP4/NVFP4 for the 2025 Blackwell frontier. The quality/size trade-off (Q4 is the sweet spot, ~75% smaller than FP16 with minimal loss). The three conversion workflows. Unsloth Dynamic 2.0's per-layer sensitivity-aware quantization. And the load-bearing position: Layer 4, downstream of training — compress what you built, don't change what it learned.

75
minutes
8
artifacts
6
sub-sections
FT11 gave you a fine-tuned checkpoint in FP16. It works, and it is far too large to deploy cheaply — a 7B model is 14 GB, a 70B is 140 GB. FT19 is the export step: compress that checkpoint to a deployment format without wrecking what five pillars of steering produced. One decision matrix (format is determined by the runtime — GGUF/AWQ/MLX/EXL2/FP8/MXFP4-NVFP4), one trade-off curve (Q4 is the general sweet spot), three conversion workflows, and the rule that ties it together: quantize AFTER training, default to Q4, always benchmark against the original.
Key Claims
Load-Bearing Claims

The format is determined by the inference engine, not chosen in the abstract. GGUF for universal local (Ollama/llama.cpp/LM Studio — CPU, mixed offload, Mac Metal). AWQ (AWQ-Marlin) for NVIDIA GPU production serving in vLLM/TGI. MLX for Apple Silicon native. EXL2 for max quality at low bitrate. FP8 for VRAM-rich high-quality on Hopper/Blackwell. MXFP4/NVFP4 for the 2025 Blackwell-native 4-bit frontier. Pick the runtime first, then the format that runtime consumes.

Q4 (~4 bits/parameter) is the general sweet spot — roughly 75% size reduction vs FP16 with minimal perceptible quality loss. Q2/Q3 degrade noticeably; Q5/Q8 approach lossless. GGUF's Q4_K_M, AWQ's 4-bit, and MLX's 4-bit group quant are all instances of this same sweet spot. Start at Q4; only go lower with eyes open and a benchmark.

AWQ beats GPTQ at 4-bit because it is activation-aware — a calibration pass finds the ~1% of salient weights that matter most for output quality and keeps those high-precision. AWQ-Marlin is the default recommendation for new NVIDIA server deployments; GPTQ is mature, ubiquitous, and defensible where it is what your tooling supports.

Unsloth Dynamic 2.0 beats uniform quants on quality at the same file size by measuring each layer's sensitivity and allocating bitrates accordingly — sensitive layers stay high (5/6/8-bit), tolerant layers drop low (3-bit). It is the same insight as EXL2's variable-rate quantization, packaged for the standard conversion workflow. Strictly preferable when available.

Quantization is Layer 4, downstream of Layer 3 (training). It is a transform on the final trained weights, applied after training. At sensible bitrates (Q4+) it preserves the model's learned behavior — the steering — and changes only compactness and speed. It is cheap and repeatable: one source checkpoint exports to GGUF + AWQ + MLX with no retraining. (Distinct from QLoRA's FT08 training-time quant — 'quantize to train' vs 'quantize to serve'.)

MXFP4 and NVFP4 are both E2M1 4-bit (2025 Blackwell-native) but differ in block size: MXFP4 uses 32 elements per shared scaling block; NVFP4 uses 16. NVFP4's finer-grained blocks give better accuracy at the same 4-bit width. Both support training and inference at frontier scale.

After This Module
01
State the format decision matrix: for a given deployment target (local CPU, Mac, NVIDIA production server, frontier Hopper/Blackwell), name the right quantization format and defend the choice.
02
Explain the quality/size trade-off — why Q4 (~4 bits/param) is the general sweet spot (~75% size reduction vs FP16, minimal loss), and why Q2/Q3 degrade noticeably while Q8 is near-lossless.
03
Run the three primary conversion workflows: GGUF (llama.cpp / Unsloth), AWQ (AutoAWQ), and MLX (mlx-lm), from a single fine-tuned checkpoint.
04
Explain Unsloth Dynamic 2.0 and why intelligent per-layer quantization (sensitive layers stay higher precision) beats uniform quants at the same size.
05
Place quantization correctly in the stack: Layer 4, downstream of Layer 3 (training). It compresses what training produced; it does not change learned behavior, only compactness and speed — and contrast it with QLoRA's training-time quantization (FT08).
Artifacts
01
Teaching Document
~3,400 words; 6 sub-sections — Layer 4 position, the format decision matrix (GGUF/AWQ/GPTQ/EXL2/MLX/FP8/MXFP4-NVFP4), the quality/size trade-off, the three conversion workflows, Unsloth Dynamic 2.0, and why-after-training. Learning Objectives, Key Terms, Anti-Patterns, References (llama.cpp, AutoAWQ, Unsloth Dynamic 2.0, NVIDIA NVFP4, kubesimplify).
READ
02
Diagrams
5 Mermaid diagrams (dark #14141f / #5eead4) — the format decision matrix (format -> use case), the quality/size trade-off curve, the conversion workflows (one checkpoint -> three artifacts), Unsloth Dynamic 2.0 per-layer vs uniform, and the quantize-after-training position in the stack.
READ
03
Slide Deck
13-slide reveal.js deck, exact course head/style template. Title 'Module FT19 — Quantization Formats', footer 'Course 3 — LLM Fine-Tuning Masterclass · FT19 · Pillar 6'.
READ
04
Teaching Script
~2,100-word teaching script with [SLIDE N] cues, ~45 minutes at 140 wpm. Spoken-voice transcript.
READ
05
Flashcards
28 flashcards (c3::ft19::*) — recall, application, and analysis tags across the matrix, trade-off, workflows, Dynamic 2.0, and the after-training position.
TEST
06
Exam
15-question exam, 45 minutes, exact Bloom split 3 recall / 6 application / 6 analysis. Schema: module 'FT19 — Quantization Formats'.
TEST
07
Lab Spec
Core lab (~3–5h): 'Quantize Three Ways' — take the FT11 fine-tuned model, convert to GGUF Q4_K_M, AWQ 4-bit, and MLX 4-bit. Measure size, inference speed, and quality (perplexity + benchmark) for each. Build the per-deployment-target recommendation table. Consumer-GPU/Mac-runnable. Includes the three conversions, measurement, comparison table, deliverables, and a solution key.
DO
08
Module Web Page
Single-file HTML hub
HERE