// Stage 6 · Inference, Deployment & Efficiency
Quantization, Pruning & Distillation
INT8/INT4, GPTQ, AWQ, SmoothQuant, BitNet and knowledge distillation.
about 8 hours7 algorithms4 paperslesson text in progress
01Goals
- Compare post-training quantisation methods
- Use GGUF/AWQ/GPTQ weights
- Understand distillation and synthetic data
Do these first: Decoding, Sampling & KV Cache
02Algorithms to master
Each card has the original paper, prerequisites and resources.
03Must-read papers
- LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale ↗2022 ✓ verified
- GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers ↗2022 ✓ verified in Essentials
- AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration ↗2023 ✓ verified
- Distilling the Knowledge in a Neural Network ↗2015 ✓ verified in Essentials
04Courses & videos
- huggingface.co ↗Official docsEN
- ggml-org/llama.cpp ↗Reference codeEN
- hanlab.mit.edu ↗CoursesEN
05Hands-on: project, code & exercises
Free, official or author-published pages. Most run in the browser or on a free Colab GPU.
PROJECT
Quantise the same 7B model to 8, 4 and 3 bits; measure perplexity, speed and memory, and plot the trade-off.
- 1ggml-org/llama.cpp ↗Reference code
Convert a model to GGUF, quantise to Q8/Q4 and compare speed and perplexity.
- 2
- 3
06Self-test
Answer in your head, then open to check.
Which is harder to quantise, weights or activations?
Activations, because of outliers.
Which weights does AWQ protect?
The salient weights tied to large-activation channels.
What information do “soft labels” carry in distillation?
The relative similarity between wrong classes.
On these routes: Algorithm Researchers