The INT8 Scale and the Pruned MAC Count
The INT8 Scale and the Pruned MAC Count
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
The INT8 Scale and the Pruned MAC Count
The chapter makes two optimization claims: an INT8 scale of 0.50 / 127 quantizes a 0.236 weight to the integer 60, and structured pruning cuts a 24-million-MAC inference to 18 million. Both must close before anyone calls the model “smaller.” This audit re-runs the INT8 scale and the pruned MAC count at full precision, then bounds exactly what the numbers justify.
Companion to the chapter Model Optimization for Edge AI — every number here comes from that chapter.
See the relationship before changing it
The figure reads from left to right. The blue card is channels removed. The middle card applies the page rule. The green card is macs left. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 25 %.
- 2
Name the relationship. MACs left = 24 million x (1 - removed fraction)
- 3
Substitute with units. 24 x (1 - 0.25) = 18.00 million MACs
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change channels removed
Try Predict the direction of MACs left = 24 million x (1 - removed fraction). Test another channels removed, then compare macs left.
Observe Pruning removes dense work only when the runtime can skip the removed channels. Reset channels removed to 25 and compare macs left.
Explain Pruning removes dense work only when the runtime can skip the removed channels.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
Ada: This chapter makes two numeric claims I want to close before anyone calls the optimized model “smaller”: that an INT8 scale of 0.50 / 127 quantizes a 0.236 weight to 60, and that structured pruning cuts a 24-million-MAC inference to 18 million. Let me re-run both at full precision.
- Scale and round-trip. The chapter rounds the scale to
0.00394for display; the stored value is0.50 / 127 = 0.00393701. Quantizing givesround(0.236 / 0.00393701) = round(59.944) = 60— the same integer either way. Reconstructing with the exact scale is60 x 0.00393701 = 0.23622, so this weight’s round-trip error is|0.236 - 0.23622| = 0.00022, comfortably below the worst-case half-step of0.00393701 / 2 = 0.00196850. - Weight-tensor storage.
2,400,000 weights x 4 bytes = 9,600,000 bytes = 9.6 MBin FP32;x 1 byte = 2.4 MBin INT8. The saving is9.6 - 2.4 = 7.2 MB, a4x(75%) cut on the weight tensor alone. - Pruned compute. Removing 25% of channels takes
24,000,000 x 0.75 = 18,000,000 MACs. At 5 inferences per second that is18,000,000 x 5 = 90,000,000 MACs/sinstead of24,000,000 x 5 = 120,000,000 MACs/s— a30,000,000 MACs/s, or 25%, reduction.
The audit closes the trade only for the weight tensor and the dense MAC count. A 4x file shrink and a 25% compute cut are real, but activation memory, calibration behaviour near the decision boundary, and the exported runtime graph are separate measurements — the numbers here justify continuing the conversion, not shipping it.
The optimisation model deliberately does not simulate calibration-set shift, accuracy loss, sparse-kernel support, memory traffic, latency, or thermal limits; it checks one scalar quantisation round-trip and the stated structured MAC reduction.
Work the audit first, then check the displayed derivation.
Every number above is taken from the chapter’s own material and re-derived step by step.