A weight tensor of 100 million parameters stored in FP32 (4 bytes each) spans the range . What are the unsigned INT8 () affine scale and zero-point , what are the quantised and dequantised values and error for , and how much parameter memory is saved?
ML systems and evaluation, Model compression
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can perform affine uniform quantisation and compute both reconstruction error and memory savings.
Key idea
Affine quantisation maps real values to integers via and , with and .
Steps
- Compute the scale: .
- Compute the zero-point so that maps cleanly to an integer: .
- Quantise : .
- Dequantise: . The absolute quantisation error is (within the maximum rounding bound ).
- Compute memory savings: FP32 uses ; INT8 uses (plus negligible per-tensor and metadata), saving ( reduction, or smaller).
Common mistakes
- Dividing by instead of () when mapping endpoints onto .
- Forgetting to ensure that is representable without error (zero-padding in convolutions requires to map to an exact integer ).
How long your answer should be
Five lines of arithmetic; 3–4 minutes.
Last checked on 4 December 2026.
Read this
Previous in ML systems and evaluation: How does permutation feature importance measure a feature’s contribution, why must it be computed on held-out validation data rather than training data, and what happens when two strongly correlated features () are evaluated with it?
Next in ML systems and evaluation: What are the Shapley value formula and its four uniqueness axioms, and for a 3-feature model with coalition values , , , , , , and , what are the exact Shapley attributions (verifying efficiency)?