5.3.17 · D3MLOps & Deployment

Worked examples — Edge deployment and ONNX

2,240 words10 min readBack to topic

We reuse only two engines from the parent:

  • Latency: edge wins when .
  • Quantization: the affine map with , , and round-trip error .

The scenario matrix

Every worked example below is tagged with the cell it covers.

Cell Scenario class What can go wrong
A Symmetric range zero-point should land on
B Asymmetric / positive-only range (post-ReLU) zero-point shifts off centre
C Negative-only range sign of , does real-0 still map to an integer?
D Value outside the range (outlier) saturation / clamping at
E Degenerate range division by zero in
F Error bound as a limit shrink range → shrink error
G Latency break-even (real-world word problem) edge-vs-cloud decision
H Latency at the boundary (tie) equality case, degenerate bandwidth
I Exam-style twist: 4× size vs accuracy trade reasoning, not just plugging

Example 1 — Cell A: symmetric range, the "textbook" case


Example 2 — Cell B: positive-only range (post-ReLU activations)


Example 3 — Cell C: negative-only range


Example 4 — Cell D: an outlier OUTSIDE the range (saturation)

Figure — Edge deployment and ONNX

Example 5 — Cell E: degenerate range (division by zero)


Example 6 — Cell F: the error bound as a LIMIT


Example 7 — Cell G: latency break-even (real-world word problem)

Figure — Edge deployment and ONNX

Example 8 — Cell H: the exact tie (boundary case)


Example 9 — Cell I: exam twist (size vs accuracy reasoning)


Active recall

Recall Did every cell get covered?

Which example handles a value outside the calibrated range? ::: Example 4 (Cell D, saturation). Which example breaks the scale formula and why? ::: Example 5 — zero-width range gives , dividing by zero in . In the latency rule, edge wins when what exceeds what? ::: network+queue cost exceeds the compute penalty of the smaller chip. What makes per-channel ranges beat a global range mathematically? ::: smaller ⇒ smaller error bound (Example 6). When does infinite bandwidth flip the decision to cloud? ::: transfer terms vanish, so only queue+compute remain (Example 8).


Connections