Edge AI · Onboard computer
A robotaxi
Waymo’s onboard computer processes sensor data and plans driving actions in real time. Tesla uses in-vehicle inference hardware for FSD (Supervised).
Session 1 · Edge AI & TinyML
You’re traveling at 90 km/h. An obstacle suddenly appears 5 metres ahead.
200 ms
90 km/h = 25 m/s
5 m ÷ 25 m/s = 0.2 s
The car reaches the obstacle’s position in 200 ms at unchanged speed. Braking still takes time and distance after the command.
30 ms
170 ms before the obstacle point
250 ms
50 ms after the obstacle point
Illustrative timings. Both paths use 10 ms to capture data and 20 ms to process it. The cloud path adds an upload and a return trip, each using the delay you set.
That’s the idea behind Edge AI. When a decision has to happen right away, processing onboard keeps the network round trip out of the loop.
Edge AI · Onboard computer
Waymo’s onboard computer processes sensor data and plans driving actions in real time. Tesla uses in-vehicle inference hardware for FSD (Supervised).
TinyML · Microcontroller
An accelerometer measures the fan’s vibrations. An ESP32 runs a small model to flag unusual patterns. The model has to fit the microcontroller’s memory and power budget.
On-device inference · Driving
On approach at 90 km/h, the robotaxi senses three cars side by side at 60 km/h.
One car pulls ahead of the other two. Sensors pick up the space it leaves in its lane.
Combine the readings into tracks. The gap is shrinking because the robotaxi is 30 km/h faster.
Update the tracks and measure the space ahead and behind in that lane.
Predict that the cars will stay side by side. The planner chooses to slow down and follow.
Predict whether the gap will hold. If there’s room ahead and behind, the planner chooses a lane change.
The controller brings the robotaxi down to 60 km/h and holds a gap of about 35 m.
The controller steers into the open lane, then speeds up to pass the other cars.
Schematic road layout. At 60 km/h, a 3–4 m gap gives only about 0.2 seconds. Following-distance guidance · How Waymo drives
On-device inference · Vibration
An accelerometer measures vibration at a specific motor mount.
Group readings into short windows. Calculate vibration strength and which frequencies stand out.
The TinyML model flags a vibration pattern outside the motor’s usual range.
The controller drives an active damper at the mount. The accelerometer measures again to check the effect.
This example assumes a motor mount equipped with active damping. Active damping research
Next, the Car AI demo ↓The planner checks traffic within 180 pixels and picks a lane and speed. The 4 → 6 → 4 network sets the controls every tick.
6 hidden + 4 output = 10 computing neurons. They use 48 weights and 10 biases. The five visible rays are a visual aid in this mode.
Edge AI runs a model on the device collecting the data or on a nearby computer.
The robot uses its onboard computer to decide how to move.
A computer on the factory floor can inspect feeds from several cameras.
Keeping the model close can shorten response times and reduce how much raw data travels to the cloud. Harvard ML Systems
Microcontroller
TinyML runs machine learning on very small, low-power devices with limited memory, such as microcontrollers.
Think of a battery-powered motor monitor. It can combine sound from a microphone and motion from an accelerometer to flag an unusual pattern.
Sound and motion together make it multimodal. Running the model locally makes it Edge AI. Running it on a low-power microcontroller makes it TinyML as well.
Flag an unusual pattern
Phone
The model runs directly on the device collecting the data.
A phone’s microphone captures your voice. A speech model on the phone turns that audio into text. When local recognition is supported and enabled, the audio can stay on the device.
Microphone audio
“The meeting starts at nine.”
Robot
The onboard computer runs the model as part of the robot’s sensing and control loop.
A floor-cleaning robot uses live camera and lidar data to navigate busy aisles. Its onboard system uses the model’s output to decide where to go and sends commands to the wheels.
Factory computer
Industrial Edge AI runs models close to the machines and processes they monitor.
Several cameras can send images of parts to one computer on the factory floor. Its model flags defects so the line can divert the affected parts.
Inference can also run directly on the machine. The choice depends on what the machine can handle and whether several stations need to share a computer.
Flag a part for removal
FlashFlash is the microcontroller’s permanent storage stores the program and the model. RAM holds sensor readings and the model’s working data while it runs.
FlashFlash is the microcontroller’s permanent storage · Car AI lane-following network
232 bytes
4 inputs → 6 hidden neurons → 4 output neurons. Count 4 × 6 + 6 × 4 = 48 weights and 10 biases. At 4 bytes each, those 58 parameters take 232 bytes.
RAM · Raw vibration buffer
600 bytes
100 samples × 3 axes × 2 bytes per axis. Preprocessing and intermediate model results also need RAM.
The vibration buffer uses 100 samples per second and 16-bit readings. Both bars use the same 1,200-byte scale. TinyML memory in Harvard ML Systems
The network uses lane-center offset, heading, target speed, and current speed to set the four driving controls.
The model takes 8 ms in this example. The first warning also waits for the buffer to fill.
1,025 ms to the first alert if that window contains the fault.
Illustrative timings. The capture time follows the window on the previous slide. In continuous monitoring, overlapping windows can produce updates more often. Shorter windows also give the model less signal to work with.
Start the clock once the vibration readings are ready. Both paths run the same trained model.
Model runs on the device
25 ms
9×
as long in the cloud
225 ms ÷ 25 ms
Model runs in the cloud
225 ms
200 ms added by the round trip.
Illustrative timings. Both paths use 25 ms to process and alert. The slider sets the network delay in each direction.
A battery-powered sensor can sleep between measurements if the application can tolerate gaps in coverage.
Continuous monitoring
10 mA
Average current if the device stays awake for all 10 seconds.
Wake once every 10 seconds
1.09 mA
Average current with 1 second awake at 10 mA and 9 seconds asleep at 0.1 mA.
AwakeAsleep · Each division represents 1 second
For example, a periodic health check can sleep between readings. A short vibration spike can happen in the middle of that sleep window.
Illustrative current values. Measure the whole device, including the sensor, processor, and any radio transmissions. MLPerf Tiny benchmarks
The hardware sets the memory, compute, and power budget.
Microcontroller
512 KB
On-chip RAM · 8 MB flash (N8 board)
2 CPU cores · up to 240 MHz
Example classifier with 50,000 int8 weights uses 50 KB for weights.
Laptop
36 GB
Unified RAM shared by CPU and GPU
12 CPU cores · up to 4.06 GHz
18 GPU cores
Quantized downloads
Llama 3.1 · 8 billion params · 4.9 GB
Qwen 2.5 · 14 billion params · 9 GB
ML server
640 GB
GPU memory across 8 H100s · 2 TB system RAM
112 CPU cores · up to 3.8 GHz
Llama 3.1 with 405 billion parameters runs in FP8 across all eight H100 GPUs.
On the ESP32-S3, every byte counts. The device needs room for the model, sensor readings, and intermediate results.
Quantization stores the lane-following network’s 48 weights using fewer bits. A scale tells us what each stored integer represents.
32-bit floating-point weights
192 bytes
48 weights × 4 bytes
8-bit integer weights
48 bytes
48 weights × 1 byte
For this illustrative weight, use a scale of 0.02 and a zero point of 0.
With ten 32-bit biases, the quantized weights and biases total 88 bytes. Model metadata and planner settings add storage. Compare accuracy and timing on the target hardware after quantizing. LiteRT quantization specification
Car AI’s weights are already integers, so we can store them directly as Int8 with a scale of 1.
The model’s 48 weights are −1, 0, or +1. All three fit in a signed byte.
Keep each integer as it is. Multiplying by 1 when you read it back gives the exact original weight.
Store each weight in one byte. Keep the 10 biases at 32 bits, or four bytes each.
Before · 32-bit weights
232 bytes
48 × 4 bytes for weights + 10 × 4 bytes for biases
After · 8-bit weights
88 bytes
48 × 1 byte for weights + 10 × 4 bytes for biases
144 bytes saved, about 62% of parameter storage. A scale of 1/127 codes these same weights as −127, 0, and +127 and uses the same space. That scale helps when weights have fractions.
Choose a Car AI weight to see its Float32 bytes and both Int8 encodings.
Float3232 bits · 4 bytes
10111111100000000000000000000000
Int8 · scale 18 bits · 1 byte
11111111
3 bytes saved per weight
Int8 · scale 1/1278 bits · 1 byte
10000001
3 bytes saved per weight
Either Int8 scale saves 144 bytes across 48 weights. The float bytes are shown most significant first. Float and signed-byte formats
For weights between −1 and +1, a scale of 1/127 gives the same one-byte storage with finer steps.
Int8 · Scale 1
0
Round(0.37 × 1) = 0 stored in 1 byte
Read back 0 × 1
Absolute error 0.37
Int8 · Scale 1/127
0.37008
Round(0.37 × 127) = 47 stored in 1 byte
Read back 47 ÷ 127
Absolute error 0.00008
Original weightRecovered weight
127 is the largest positive Int8 code. Mapping −1 and +1 to −127 and +127 gives 255 evenly spaced values in the same range, with a step of about 0.00787. Scale 1 gives three values.
Supervised learning uses vibration recordings labeled healthy or faulty.
First deployment
Relearning loop
Keep monitoring and review new alerts
Example. A healthy replacement motor trips the old model. Once a technician confirms it is healthy, that recording can teach the next model what normal looks like.
The accelerometer gives us a stream of samples. We take a short window and turn it into inputs the model can use.
Signal A · slower vibration
Signal B · faster vibration
Synthetic examples. RMS summarizes vibration strength within the window.
Proposed build. The browser simulates traffic and plans the lane and speed. The ESP32 runs the trained network.
Browser
ESP32-S3
4 inputs → 6 hidden neurons → 4 outputs
Store the model and firmware in flash. Use RAM for inputs and intermediate values.
First test. Give both versions of the network the same four inputs. Compare the output flags before swapping in the board’s decisions.
A cheap vibration check runs every window. The model only wakes when the score reaches the threshold.
Illustrative scores. Lower the threshold to pass the weak fault in window 7 through to the model.
The board raises local warnings. A dashboard displays the events it sends.
Motor monitor
Raw readings stay on the board. Local warnings work offline.
2.16 MB of raw samples per hour
100 samples/s × 3 axes × 2 bytes × 3,600 s
Event sent to telemetry store
Maintenance dashboard
Motor 07 · fault detected
14:32 · inspect the motor
120 bytes per event · example payload
Local warning raised. The dashboard received the event.
Four devices turn microphone, camera, or motion readings into an action right where the data is collected.
Wake-word detection
The speaker recognizes “Alexa” locally. The request that follows can go to the cloud.
Now Playing
The phone matches an audio fingerprint against songs stored on the device and shows the title.
Face matching
The TrueDepth camera reads your face and the phone checks it against the enrolled face to unlock.
Fall detection
The watch uses wrist-motion data to detect a hard fall and can prompt the wearer to respond.
These devices use onboard camera processing to decide what to flag, avoid, or follow.
Person and pet alerts
Supported Nest cameras classify objects locally so an alert can tell you whether it saw a person or an animal.
Obstacle avoidance
The vacuum recognizes hazards such as charging cables and steers around them while cleaning.
Subject tracking
ActiveTrack follows a selected subject as the drone adjusts its flight and framing.
A hearing aid runs AI on a dedicated chip. Two TinyML projects use microcontrollers.
On-device audio
Neural noise reduction
A neural network on the hearing aid’s Sirius chip helps reduce background noise.
TinyML project
Gesture control
The Nano Matter classifies motion from an accelerometer. A recognized gesture can trigger a smart-home action.
TinyML project
Person detection
A small camera module can run a person detector and send the result to a host board.