Quantization concepts and selection
Quantization stores weights (and sometimes activations) in lower precision to cut memory and often improve throughput β with quality trade-offs.
Adapted for this playbook from the π€ Transformers documentation by Hugging Face. Official page: https://huggingface.co/docs/transformers/quantization/overview. Images Β© Hugging Face (
documentation-images) unless noted. This is not a substitute for the upstream docs β verify against the current version.Covers Hugging Face pages: quantization/overview, quantization/selecting, quantization/concept_guide

Source: Hugging Face Transformers documentation.
Mental modelβ
| Idea | Meaning |
|---|---|
| Weight-only | Weights low-bit; activations higher precision |
| PTQ | Quantize after training |
| QAT | Train aware of quantization |
| Calibration | Representative data to set scales |
| Packing | Dense storage of low-bit weights |

Source: Hugging Face Transformers documentation.

Source: Hugging Face Transformers documentation.
Official: Overview, Selecting a method, Concept guide.

Source: Hugging Face Transformers documentation.
Discussion
Commentsβ
Share feedback or questions about this page. No account required.
Loading commentsβ¦