Notes

INT8 Quantization

Think of INT8 quantization as packing a model’s numbers into smaller containers. Instead of carrying around high-precision decimal values, the model uses compact 8-bit integers—small enough to fit and run efficiently on hardware with tight memory, battery, and heat limits.

What changes inside the model

Neural networks are commonly trained with 32-bit floating-point numbers (FP32) for weights and intermediate calculations. INT8 quantization converts these values into signed integers from -128 to 127. A scale and, in asymmetric schemes, a zero point preserve the connection to the original real-valued range:

real value ≈ scale × (INT8 value − zero point)

This is not simply rounding every value. The conversion chooses ranges that represent important values as faithfully as possible. Weights can use a separate scale per output channel (per-channel quantization), which usually protects accuracy better than applying one scale to an entire tensor.

Why edge devices benefit
  • Smaller models: INT8 weights use one quarter of the storage of FP32 weights.
  • Faster inference: CPUs, NPUs, and DSPs can perform optimized integer matrix operations.
  • Lower energy and heat: moving less data and using integer arithmetic reduces pressure on a phone or embedded device.

For example, a battery-powered wake-word detector must listen continuously without overheating or draining the battery. An INT8 model can fit in a microcontroller’s limited flash and RAM while responding locally, with no cloud connection. TensorFlow Lite, ONNX Runtime, and many mobile NPUs support INT8 execution.

Accuracy is the trade-off

Reducing precision introduces approximation error. Post-training quantization converts an already trained model and uses representative sample data to calibrate activation ranges. It is quick, but sensitive models can lose accuracy. Quantization-aware training simulates INT8 rounding during training, allowing the model to adapt and usually delivering better results. Ignoring this validation step can produce a model that is compact and fast but misses objects, mishears commands, or behaves poorly on real device inputs.

INT8 quantization converts a model’s weights and, usually, activations from high-precision floating-point values to 8-bit signed integers, using scale and zero-point parameters to preserve their numerical range. It reduces model storage and memory bandwidth by roughly fourfold and enables efficient integer inference. On edge hardware, it lowers latency and energy use while allowing models to fit within limited RAM and flash, with minimal accuracy loss when calibrated or trained appropriately.

Imagine replacing a box of finely graded paint colors with just 256 well-chosen shades. You lose a little subtle detail, but most people still see the same picture—and the box is much smaller and easier to carry.

INT8 quantization does something similar for an AI model. It converts the model’s numbers into a simpler format using 8-bit whole numbers, rather than more detailed numbers. This makes the model take less storage, use less battery, and often respond faster.

That matters on phones, cameras, and sensors, where space and power are limited. The goal is to keep the AI’s answers nearly as accurate while making it practical to run directly on the device.