Skip to content
← All concepts
Concept

Quantisation

Reducing model precision (e.g., 16-bit to 4-bit) to save memory and enable local inference.

How quantisation shrinks a model to fit one GPU

Step 1 of 4

16-bit weights

A 70B-parameter model stored in FP16 needs about 140GB for the weights alone, which means two 80GB GPUs.

Smaller and faster, with a quality cost you should measure on your own tasks.

Simple explanation

Quantisation shrinks a model by using fewer bits per parameter. A 16-bit 70B model needs 140GB of RAM; a 4-bit quantised version needs ~35GB — fitting on one GPU.

Engineering explanation

Quantisation reduces parameter precision: FP16 (16-bit) → INT8 (8-bit) → INT4 (4-bit). Methods: GPTQ, AWQ, GGUF (for CPU/Mac). Trade-off: smaller/faster but slight quality loss. QLoRA uses 4-bit quantisation of the base model during LoRA fine-tuning. Production local serving (Ollama, vLLM) uses quantised models.

Example

A 70B-parameter model: FP16 weights ≈ 140GB (2× 80GB GPUs). INT4 ≈ 35GB (1× 80GB GPU or a Mac with 64GB RAM). Weights only; the KV cache needs more.

When to use it

Local inference, self-hosting, fine-tuning on limited GPUs, cost reduction.

Common misconception

Quantisation does NOT destroy quality. 4-bit quantised models often keep most of their full-precision quality (figures like 95%+ are a commonly quoted rule of thumb, not a guarantee; losses vary by model, method and task). Evaluate the quantised model on your own tasks before switching.