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

foundations
math-foundations
calculation-audit
edge-fog
Ada 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.

Channels removed changes macs left An input card leads through the rule MACs left = 24 million x (1 - removed fraction) to the macs left result. INPUT PAGE INPUT APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrows. Pruning removes dense work only when the runtime can skip the removed channels.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 25 %.

  2. 2

    Name the relationship. MACs left = 24 million x (1 - removed fraction)

  3. 3

    Substitute with units. 24 x (1 - 0.25) = 18.00 million MACs

  4. 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.

25 %
Chapter baseline
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?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only channels removed moves here. Field effects named in the technical boundary stay fixed.
TryThe 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 . Use Check derivation.
ObserveThe displayed ledger resolves 0.50 / 127, 0.236, 60, 24-million-MAC, 18 million at full precision. 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. Check derivation shows this.
ExplainINT8 rounding maps 0.236 through a 0.50/127 scale to code 60, while removing 25% of channels reduces 24 million MACs to 18 million; weight storage and runtime memory remain separate gates. Check derivation confirms it.

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.00394 for display; the stored value is 0.50 / 127 = 0.00393701. Quantizing gives round(0.236 / 0.00393701) = round(59.944) = 60 — the same integer either way. Reconstructing with the exact scale is 60 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 of 0.00393701 / 2 = 0.00196850.
  • Weight-tensor storage. 2,400,000 weights x 4 bytes = 9,600,000 bytes = 9.6 MB in FP32; x 1 byte = 2.4 MB in INT8. The saving is 9.6 - 2.4 = 7.2 MB, a 4x (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 is 18,000,000 x 5 = 90,000,000 MACs/s instead of 24,000,000 x 5 = 120,000,000 MACs/s — a 30,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.

Technical boundaries
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.