Quantization reduces the precision used to represent model parameters, commonly converting 32-bit or 16-bit floating-point weights and biases to 8-bit or 4-bit values. Smaller representations reduce memory and computation requirements, making large language models easier to deploy and run efficiently. section 9.6.1
Use quantization to improve deployment efficiency, while evaluating its trade-offs:
- Run smaller models on consumer-class GPUs by reducing memory requirements. section 5.3.2
- Speed inference and improve energy efficiency, although accuracy loss or hardware inefficiency can result from poor choices. section 5.3.2 section 9.6.1
- Distinguish quantization from LoRA: quantization reduces numerical precision, whereas LoRA freezes pretrained weights and adds trainable low-rank matrices for adaptation. section 9.6.1
LLM deployment example
A small Code Llama model can run on a consumer-class GPU after quantization. In a related adaptation workflow, QLoRA quantizes low-rank matrices and uses an 8-bit optimizer, reducing parameters while maintaining or improving performance. section 5.3.2 section 9.6.1












