Servingcore
Quantisation
Store weights (and sometimes activations or KV cache) in fewer bits: less memory, faster decode, some quality risk.
What it is and why it exists
FP16/BF16 uses 2 bytes per parameter; FP8 and INT8 use 1; INT4 uses half a byte. Because decode is memory-bound, fewer bytes per weight means faster tokens and bigger batches. Methods: weight-only (GPTQ, AWQ), FP8 on recent GPUs, GGUF formats for llama.cpp. Quality loss is small at 8 bits and task-dependent at 4.
Quick prototype
Download a 4-bit GGUF and run it locally.
In production, at scale
Benchmark quality on your evals per quantisation level, FP8 where hardware supports it, INT4 for memory-constrained deployments, and quantised KV cache for long contexts.
Vendors and tools
| AWQ / GPTQ / bitsandbytes | Weight quantisation |
|---|---|
| llama.cpp GGUF | Quantised local models |
| TensorRT-LLM / vLLM FP8 | FP8 serving |
On AWS: Quantised models on SageMaker / EC2; Inferentia2 with Neuron supports reduced precision.
How it fails
- 4-bit model silently worse at maths or code
- Comparing speed on a GPU without native support for the format
What the interviewer asks next
A 70B model in FP16 vs INT4: weight memory?
FP16: 70B × 2 B ≈ 140 GB. INT4: ≈ 35 GB (plus some overhead) — two 80 GB GPUs vs one.