FP32 Weights
16 × 16 · continuousQuantization Error
|original − reconstructed|Weight Distribution
FP32 · no thresholdsExported C Array
Why this matters for TinyML
Memory Bandwidth
FP32 weights need 4× the SRAM of INT8. On an ESP32 with ~520 KB total RAM, that determines whether your model fits at all. INT4 fits 8× more weights in the same flash chip.
Integer MAC
Cortex-M4/M7 SIMD instructions execute 8-bit multiplies in a single cycle. FP32 multiplies take 4–10 cycles and require a software floating-point library. INT8 matrix multiplication runs ~4× faster on the same silicon.
Milliwatt Power
Moving less data across the memory bus costs less energy per inference. A quantized INT8 keyword-spotting model can run for months on a coin cell, where the FP32 version needs a LiPo pack.
Accuracy Trade-off
Watch the error heatmap bloom as you crush precision. INT8 typically loses <1% accuracy on well-trained models. INT4 needs careful per-channel scaling. Below that, you're trading real model intelligence for silicon headroom.