Analytics & ML · Study deck

Edge ML and TinyML Deployment

A motor TinyML controller may need an anomaly decision before a cloud round trip can finish.

Data Dora is your guide for this deck.

modelingedgedeployment
Data Dora, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: A device has produced messy evidence, an analytic step is about to change an alert or control decision, and someone has to explain why the result should be trusted.
  • Explain: The shrinking model sizes show a deployment transformation whose accuracy must be re-evaluated, while the device path exposes memory, latency, power, and failure constraints absent from offline training.
  • Explain: A 60 kB TinyML model plus a 30 kB arena totals 90 kB and does not fit that release rule, even though each component fits alone.
  • Explain: Real products may split work between device and remote service.
iotclass.org

Major section

Fit the TinyML model Inside the Deployment device Budget

Deployment conversion can quantize weights or replace operations, so the converted artifact needs its own accuracy check.

  • Integration then adds the exact feature code and tensor shape expected by the deployment runtime.
  • That leaves (256-150=106\ \mathrm{kB}) before a safety reserve.
  • Latency must include the whole local path.

Key terms

If the actuator deadline
If the actuator deadline is 100 ms, the measured path has 40 ms of margin.

Numbers to remember

20 kBKeeping 20 kB free gives the TinyML model
100 msIf the actuator deadline is 100 ms
Edge AI and TinyML deployment pipeline from cloud training to microcontroller inference
Edge AI and TinyML deployment pipeline from cloud training to microcontroller inference
iotclass.org

Major section

Fit the TinyML model Inside the Deployment device Budget (continued)

The deployment device result closes the path; a successful desktop deployment conversion does not prove it runs within the target memory and latency limits.

  • Keeping 20 kB free gives the TinyML model, tensor arena, and feature buffers an 86 kB budget.
  • A 60 kB TinyML model plus a 30 kB arena totals 90 kB and does not fit that release rule, even though each component fits alone.
  • Updates need a recoverable boundary.
iotclass.org

Major section

Fit the TinyML model Inside the Deployment device Budget (continued)

If the actuator deadline is 100 ms, the measured path has 40 ms of margin.

  • A one-point accuracy summary can hide a changed false-negative rate that matters for motor protection.
  • Those results make edge deployment evidence stronger than a build message.
  • Deployment runtime and power depend on the specific microcontroller, compiler, clock, and operators.
iotclass.org

Major section

Start With the Story

A small model runs inside the field device.

  • It also has far less memory, power, and processing room than a distant server.
  • Edge deployment means placing the model near the sensor and the event.
  • Input cleaning needs time and memory.
  • The model needs working space.

Numbers to remember

3.3 V3.3 V ADC then adds a 0.806 mV step
0.806 mV3.3 V ADC then adds a 0.806 mV step
iotclass.org

Major section

Start With the Story (continued)

A device has produced messy evidence, an analytic step is about to change an alert or control decision, and someone has to explain why the result should be trusted.

  • The result needs an action.
  • Logs and recovery need space too.
  • Real products may split work between device and remote service.
iotclass.org

Major section

Edge Deployment as Placement

The shrinking model sizes show a deployment transformation whose accuracy must be re-evaluated, while the device path exposes memory, latency, power, and failure constraints absent from offline training.

  • This connects placement to the chapter's running operations claim: ship the model, feature recipe, runtime limits, version identity, fallback, telemetry, and rollback as one release.
Edge AI and TinyML deployment pipeline from cloud training to microcontroller inference
Edge AI and TinyML deployment pipeline from cloud training to microcontroller inference
iotclass.org

Major section

Summary

Edge ML deployment is a placement claim that must explain why inference belongs on the device, gateway, phone, controller, or microcontroller.

  • The deployed artifact includes the model, feature recipe, preprocessing, threshold, runtime, conversion step, checksum, and hardware target.
  • Quantization, pruning, distillation, conversion, and firmware changes can alter model behavior and should be reviewed against the accepted claim.
  • A changed sensor, firmware, runtime, threshold, feature recipe, hardware target, population, placement, privacy rule, or operations owner should reopen the deployment review.
iotclass.org

Deck summary

Key takeaways

Deployment conversion can quantize weights or replace operations, so the converted artifact needs its own accuracy check.

  • The deployment device result closes the path; a successful desktop deployment conversion does not prove it runs within the target memory and latency limits.
  • If the actuator deadline is 100 ms, the measured path has 40 ms of margin.
  • A small model runs inside the field device.
  • A device has produced messy evidence, an analytic step is about to change an alert or control decision, and someone has to explain why the result should be trusted.
iotclass.org

Retrieval practice

Recall check 1 of 3

Data Dora says: answer from memory, then check your reasoning.

Q1A team says an IoT model should move to a gateway because edge ML sounds modern. What keeps the placement decision reviewable?

AA placement note that lists the gateway target and demo accuracy but leaves feature parity, fallback, telemetry, limits, and retest triggers to later.
BA written placement claim that ties the decision need to feature parity, resource evidence, update path, fallback, telemetry, known limits, and retest trigger.
CA local-inference claim that assumes latency, cost, privacy, and safety improved without measured resource, update, or failure evidence.
DA successful demo plus a larger model file, without a named decision need, rollback path, or owner for field drift review.
Show answer

Answer: B A reviewable edge ML decision connects placement reason, model artifact, device constraints, operations behavior, and the monitoring or control claim.

iotclass.org

Retrieval practice

Recall check 2 of 3

Data Dora says: answer from memory, then check your reasoning.

Q2A TinyML keyword model was converted successfully, but the review has no edge feature-parity, resource, fallback, telemetry, or rollback evidence. What should the practitioner require before release?

AOnly the training notebook plus conversion log, because embedded timing, precision, resource use, fallback, telemetry, and rollback cannot change results.
BA dashboard screenshot and smaller model file, while feature parity, resource budget, field fallback, and owner evidence wait until after release.
CA release record proving the deployed artifact matches the training feature recipe, fits device resources, and has fallback, telemetry, rollback, owner, and retest evidence.
DNo additional evidence if the converted file is smaller, even though runtime precision, sensor timing, rollback, and support ownership are untested.
Show answer

Answer: C A practitioner release record connects model evidence with firmware, device, telemetry, update, and ownership evidence.

iotclass.org

Retrieval practice

Recall check 3 of 3

Data Dora says: answer from memory, then check your reasoning.

Q3An edge fault model passed lab tests, but field devices now show frequent low-confidence outputs after a sensor firmware update. What is the best under-the-hood response?

AReopen the release review
BIgnore the issue because the model artifact checksum did not change.
CDisable telemetry to save bandwidth during the investigation.
DRaise the confidence threshold without documenting the known limit or fallback.
Show answer

Answer: A Edge ML trust depends on runtime boundaries: feature parity, precision behavior, resource margin, telemetry, fallback, and retest triggers.

iotclass.org

Print reference

Answers

Answer key.

  1. B · A reviewable edge ML decision connects placement reason, model artifact, device constraints, operations behavior, and the monitoring or control claim.
  2. C · A practitioner release record connects model evidence with firmware, device, telemetry, update, and ownership evidence.
  3. A · Edge ML trust depends on runtime boundaries: feature parity, precision behavior, resource margin, telemetry, fallback, and retest triggers.
iotclass.org