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: Those sensor limits exist before the chapter's 100 MB model becomes a 5 MB TFLite model or a 200 kB microcontroller artifact, so firmware sample-rate changes remain release-level retest triggers.
  • Explain: The mathematical gist: A stated-assumption 1.00 kHz vibration band needs at least 2.00 kHz sampling; the practical 2.56× anti-alias factor raises that target to 2.56 kHz.
  • Explain: A catalog-typical 12-bit, 3.3 V ADC then adds a 0.806 mV step, 0.233 mV RMS rounding noise, and 74.0 dB ideal SNR.
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 kB)(256-150=106\ \mathrm{kB})(256−150=106 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.
A TinyML release must preserve model accuracy through conversion, match its firmware input path, and fit the target device's memory and latency budgets.
A TinyML release must preserve model accuracy through conversion, match its firmware input path, and fit the target device's memory and latency budgets.
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.
  • 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.

Picture a machine that must spot a fault even when the Internet is down.

It can act quickly and keep raw data on site.

Numbers to remember

0.806 mVADC step
iotclass.org

Major section

Start With the Story (continued)

The mathematical gist: A stated-assumption 1.00 kHz vibration band needs at least 2.00 kHz sampling; the practical 2.56× anti-alias factor raises that target to 2.56 kHz.

  • 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

Start With the Story (continued)

Under the Hood examines reduced number formats, memory peaks, drift, and the limits that appear when a lab model meets field hardware.

  • An edge model release must fit input cleaning, model memory, action time, logging, and a safe fallback on the device.
  • A catalog-typical 12-bit, 3.3 V ADC then adds a 0.806 mV step, 0.233 mV RMS rounding noise, and 74.0 dB ideal SNR.
  • Those sensor limits exist before the chapter's 100 MB model becomes a 5 MB TFLite model or a 200 kB microcontroller artifact, so firmware sample-rate changes remain release-level retest triggers.
iotclass.org

Major section

Edge Deployment as Placement

The memory card then tests the whole release.

  • From 256 kB, firmware uses 150 kB and the reserve takes 20 kB, leaving 86 kB.
  • A 60 kB model plus a 30 kB arena needs 90 kB, so it misses the budget by 4 kB before inference even runs.

Why it matters

Operator support and firmware integration come next because the target must accept the converted model and reproduce its exact features and tensor shape.

A TinyML release must preserve model accuracy through conversion, match its firmware input path, and fit the target device's memory and latency budgets.
A TinyML release must preserve model accuracy through conversion, match its firmware input path, and fit the target device's memory and latency budgets.
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.
  • The mathematical gist: A stated-assumption 1.00 kHz vibration band needs at least 2.00 kHz sampling; the practical 2.56× anti-alias factor raises that target to 2.56 kHz.
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 written placement claim that ties the decision need to feature parity, resource evidence, update path, fallback, telemetry, known limits, and retest trigger.
BA placement note that lists the gateway target and demo accuracy but leaves feature parity, fallback, telemetry, limits, and retest triggers to later.
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: A 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 release record proving the deployed artifact matches the training feature recipe, fits device resources, and has fallback, telemetry, and rollback.
CA dashboard screenshot and smaller model file, while feature parity, resource budget, field fallback, and owner evidence wait until after release.
DRequire no additional evidence if the converted file is smaller, because size proves runtime precision and operational readiness.
Show answer

Answer: B 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.

Q3How should the team respond to the changed field inputs and low confidence?

AIgnore low confidence because the model artifact hash has not changed.
BDisable field telemetry to save bandwidth during confidence investigation.
CReopen release review of the changed inputs, confidence, fallback, and field evidence.
DRaise the threshold silently without documenting fallback or known limits.
Show answer

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