AI / Edge AI Interview questions
Last updated
1. What is Edge AI?
Edge AI means running machine learning models directly on the device where the data is produced - a camera, phone, car, robot or sensor - instead of shipping that data to a remote cloud server for processing.
The model is usually trained in the cloud, then compressed and deployed to the device. From that point the device performs inference locally and acts on the result immediately.
A doorbell that detects a person on-device, or a phone that transcribes speech with no network, are typical examples. Only small results or occasional samples need to leave the device.
Take quiz
On the device that captured the data
Only inside a central cloud data center
On the training cluster after every request
Training must always happen on the edge device itself
Training happens centrally, then a compressed model is deployed to the device
The model is rebuilt from scratch for every single prediction
Edge devices never receive models from outside
2. What are the main benefits of Edge AI?
Edge AI moves inference next to the data, which gives five practical benefits:
- Low latency - no network round trip, so responses arrive in milliseconds.
- Bandwidth savings - a camera does not need to stream raw video upstream.
- Privacy - raw audio, images or health data can stay on the device.
- Offline reliability - the feature still works with a weak or missing connection.
- Lower cloud cost - you stop paying per-request inference fees at fleet scale.
The trade-off is that you must fit the model into tight memory, power and thermal limits.
Take quiz
Models are retrained on every frame
Images are always upscaled before transmission
Raw data is processed locally and only results are sent
Inference always becomes slower than in the cloud
Raw data must be uploaded for every prediction
It cannot work without internet access
Models must fit tight memory, power and thermal limits
3. What is the difference between Edge AI and Cloud AI?
Both run the same kind of models. The difference is where inference happens, and that choice changes latency, privacy, cost and model size.
| Aspect | Edge AI | Cloud AI |
| Inference location | On the device or a nearby gateway | Remote data center |
| Latency | Milliseconds, no network hop | Adds network round trip and queueing |
| Connectivity | Works offline | Needs a stable connection |
| Model size | Small, compressed models | Large models on GPU clusters |
| Data privacy | Raw data can stay local | Data must be uploaded |
| Cost model | Hardware cost up front | Pay per request or per hour |
| Updating a model | Needs an OTA rollout to every device | Deploy once on the server |
Most real products end up hybrid: the edge handles the fast path, the cloud handles heavy or rare cases.
Take quiz
It works with no connectivity
It can host very large models on GPU clusters
It keeps raw data on the device
Cloud models never need updating
You deploy once on the server instead of updating every device
Devices download the model on every request
The cloud skips model validation
4. What are common real-world use cases of Edge AI?
Edge AI shows up wherever decisions must be fast, private or made without a reliable network.
- Smart cameras - person detection, retail footfall, license plate reading.
- Automotive - driver monitoring and lane or obstacle detection.
- Industrial - predictive maintenance from vibration and temperature sensors.
- Voice - wake-word detection on phones, earbuds and speakers.
- Wearables - arrhythmia or fall detection on a watch.
- Agriculture and drones - crop or pest detection with no field connectivity.
The common thread is a continuous data stream, a need for an immediate decision, or poor connectivity. If none of those apply, a plain cloud API is usually simpler to build and maintain.
Take quiz
Must react instantly and keep always-on audio local
Needs a petabyte-scale training set at runtime
Only works when streaming audio to a server
Cannot produce numeric data
Only send data once per year
Require a human to run each prediction
Produce continuous data that is cheaper to analyze locally
5. What is on-device inference?
On-device inference is the act of running a trained model's forward pass on the local hardware, with no call to a remote service.
The device loads the model file into a runtime such as LiteRT (TFLite), ONNX Runtime or Core ML, then repeats a simple loop for each input:
- Capture input (frame, audio window, sensor reading).
- Preprocess it - resize, normalize, quantize.
- Run the model through the runtime.
- Postprocess the output - decode boxes, apply a threshold.
- Act on the result.
No training happens here. Weights stay fixed until a new model version is deployed.
Take quiz
They are retrained on every input
They are streamed from a server each time
They stay fixed, only the forward pass runs
Model retraining
Preprocessing such as resizing and normalizing
Uploading the frame to the cloud
Deleting the model file
6. What are the typical resource constraints of edge devices?
Edge hardware is a fraction of a server, and every constraint shapes model design.
- Memory - from a few KB on microcontrollers to a few GB on gateways.
- Compute - limited CPU, small or no GPU, fixed-function accelerators.
- Power - battery or a tight power budget, often milliwatts to a few watts.
- Thermal - passive cooling, so sustained loads cause throttling.
- Storage - small flash, which limits model size and update strategy.
- Connectivity - intermittent or metered links.
Because of this, model size, memory footprint and energy per inference matter as much as accuracy.
Take quiz
Because cloud GPUs bill by the watt
Devices often run on batteries or tight power budgets
Because accuracy becomes irrelevant
The model weights corrupt over time
The OS blocks all inference after one minute
Fanless devices cannot run integer math
Heat builds up and triggers clock throttling
7. What hardware is used to run Edge AI workloads?
Different chips trade flexibility against efficiency. Pick based on the model, the power budget and the software stack.
| Hardware | Strength | Typical use |
| CPU | Most flexible, runs any operator | Fallback, small models, pre/post-processing |
| GPU | Highly parallel, good for CNNs | Jetson modules, phone GPUs, video analytics |
| NPU / DSP | Best performance per watt for tensor ops | Phone SoCs, smart cameras, wearables |
| Edge TPU / ASIC | Fixed-function INT8 inference | Coral boards, embedded vision |
| FPGA | Reconfigurable, deterministic latency | Industrial, telecom, custom pipelines |
| Microcontroller (MCU) | Milliwatt power, tiny footprint | TinyML sensing, keyword spotting |
Most devices combine several, so the runtime decides which operator goes where.
Take quiz
NPU or dedicated accelerator
General-purpose CPU
Hard disk controller
Edge TPU
FPGA
Microcontroller
Mobile GPU
8. What is an NPU?
An NPU (Neural Processing Unit) is a hardware block built specifically for neural network math - mainly matrix multiplies and convolutions - usually at INT8, INT16 or FP16 precision.
Because it skips general-purpose overhead, an NPU delivers far more operations per watt than a CPU. Examples are Apple's Neural Engine, Qualcomm's Hexagon NPU and the NPU inside Rockchip RK3588.
The catch is flexibility. NPUs support a fixed list of operators and data types, and you normally reach them through a vendor SDK or a delegate. Anything unsupported falls back to the CPU.
Take quiz
It runs at much higher clock speeds
It stores the model in the cloud
It is purpose-built for tensor math and skips general-purpose overhead
It is silently deleted from the model
The NPU rewrites it into Python
The whole model is retrained
It falls back to the CPU
9. What is TinyML?
TinyML is machine learning on microcontrollers - chips with tens to hundreds of KB of RAM, running on milliwatts, often on a coin cell for months.
Models are usually tens of KB, heavily quantized, and run through runtimes such as TensorFlow Lite for Microcontrollers or CMSIS-NN. There is typically no OS, so memory comes from a fixed, preallocated tensor arena.
Common applications are keyword spotting, gesture recognition, vibration anomaly detection and simple visual wake words.
A keyword-spotting model can fit in tens of KB at 8-bit. Platforms such as Edge Impulse help with data collection, training and exporting a C++ library for the target chip.
Take quiz
Dynamic paging from cloud storage
A fixed tensor arena allocated up front
Unlimited heap growth at runtime
Training a large language model
Keyword spotting on a microcontroller
Rendering 4K video
Running a full web search index
10. What is model quantization?
Quantization stores weights, and often activations, in lower precision such as INT8 instead of FP32, so the model is smaller and runs faster on integer hardware.
The common affine mapping is real = scale * (q - zero_point), where q is the stored integer. Scale and zero point are chosen from the observed value range.
Moving from FP32 to INT8 cuts model size about 4x and reduces memory traffic. The cost is some rounding error, which is why calibration or quantization-aware training is used to protect accuracy.
Take quiz
About 4x
About 100x
About 1.1x
Counts the number of layers
Sets the learning rate
Selects the GPU to use
Converts integer steps back to real values
11. What is model pruning?
Pruning removes parameters that contribute little to the output - typically weights with the smallest magnitudes - to make the network sparser or smaller.
A common workflow is iterative: train, prune a fraction, fine-tune to recover accuracy, then repeat until you hit the target size or sparsity.
Pruning alone does not guarantee a speedup. Zeroed weights only help if the runtime or hardware can skip them, which is why many edge teams prefer removing whole channels or filters.
In practice pruning is combined with quantization, because the savings stack. TensorFlow's Model Optimization Toolkit and torch.nn.utils.prune both provide magnitude-based pruning.
Take quiz
Convert it to FP64
Delete the validation set
Fine-tune it to recover accuracy
Pruning increases the number of layers
The runtime may not skip zeroed weights
Pruned models cannot be deployed
Zeros make the file larger than FP32
12. What is knowledge distillation?
Knowledge distillation trains a small student model to imitate a large teacher model, so the student keeps much of the teacher's accuracy at a fraction of the size.
The student learns from the teacher's soft labels - the full probability distribution, softened with a temperature - not just hard class labels. The loss usually blends the normal cross-entropy with a KL divergence term against the teacher.
DistilBERT is a well-known example: about 40% smaller and 60% faster than BERT while retaining around 97% of its language understanding.
Take quiz
Only the raw pixel values
The teacher's soft probability outputs
Random noise labels
Control the device's cooling fan
Set the model's file size
Switch off the student's last layer
Soften the teacher's probabilities so more information is exposed
13. What is TensorFlow Lite?
TensorFlow Lite is Google's runtime for on-device inference on phones, embedded Linux and microcontrollers. Google has been rebranding it as LiteRT, but the .tflite format and APIs remain widely used.
The workflow has two parts. A converter turns a trained model into a compact FlatBuffer .tflite file, optionally quantized. A lightweight interpreter then loads that file on the device and runs it.
Hardware acceleration is added through delegates for GPUs, DSPs and NPUs, while the XNNPACK delegate speeds up the CPU path.
Take quiz
.tflite (FlatBuffer)
.onnx protobuf only
.pt pickle only
Automatic model training
Hardware acceleration on GPUs, DSPs and NPUs
Cloud storage for models
Encryption of the camera feed
14. What is ONNX and ONNX Runtime?
ONNX (Open Neural Network Exchange) is an open file format that describes a model as a graph of standard operators. ONNX Runtime (ORT) is the engine that executes that graph.
The point is portability: train in PyTorch, scikit-learn or another framework, export once to ONNX, then deploy to many targets.
ORT picks hardware through execution providers such as CUDA, TensorRT, OpenVINO, CoreML, NNAPI, QNN and XNNPACK, with CPU as the default fallback. There are also reduced-size builds for mobile.
ONNX Runtime also offers an ORT format for smaller binaries and a mobile package, plus tools to quantize an ONNX model to INT8 before you deploy it.
Take quiz
A license required to run models
A tool that labels training data
A backend that maps graph parts to specific hardware
It always makes the model more accurate
It removes the need for a runtime
It converts models to cloud-only format
Portability across frameworks and hardware
15. What is the difference between latency and throughput in edge inference?
Latency is how long a single inference takes from input to output, measured in milliseconds. Throughput is how many inferences complete per second.
Edge applications are usually latency-driven. A camera at 30 FPS gives you a budget of roughly 33 ms per frame for the whole pipeline - capture, preprocessing, inference and postprocessing.
Pipelining stages can raise throughput without lowering the latency of any one frame. Always report p95 or p99 latency, not just the average, because spikes cause visible stutter.
Take quiz
About 3 ms
About 33 ms
About 330 ms
Percentiles are required by ONNX
Rare spikes cause visible stutter that averages hide
The mean cannot be calculated on-device
p99 always equals the mean
16. What is multi-access edge computing (MEC)?
MEC places compute and storage inside the telecom network - at base stations or aggregation sites - so applications run a few network hops from users rather than in a distant cloud region.
It is standardized by ETSI and often paired with 5G. It sits between the device and the cloud, which is why it differs from pure on-device inference.
Typical uses include AR and cloud gaming, video analytics across many cameras, and vehicle-to-everything services where a phone or sensor is too weak to run the model alone.
Take quiz
Inside the telecom network close to users
Only on the end user's microcontroller
In a single distant cloud region
MEC never uses a network
MEC trains models on phones
MEC replaces the need for any hardware
Compute sits in the network near the device, not on the device itself
17. What is the Google Coral Edge TPU?
The Edge TPU is a small Google ASIC for fast, low-power inference. It is sold in the Coral line as a USB accelerator, M.2 and PCIe cards, and a dev board.
It delivers about 4 TOPS of INT8 compute at roughly 2 W. Models must be fully INT8 quantized and then compiled with the edgetpu_compiler.
The compiler maps supported operators to the TPU. Everything from the first unsupported operator onward runs on the CPU, so a model with an unsupported op in the middle may see little benefit.
Take quiz
FP64
Binary text only
INT8 quantized
The model is deleted
The remaining operators run on the CPU
Everything continues on the TPU anyway
The compiler retrains the weights
18. What is NVIDIA Jetson used for in Edge AI?
Jetson is NVIDIA's family of embedded modules (Nano, Orin NX, AGX Orin and others) that put a CUDA GPU with Tensor cores, ARM CPUs and video engines on one board.
It targets heavier edge workloads such as multi-camera video analytics, robotics, autonomous machines and drones. The JetPack SDK provides CUDA, cuDNN and TensorRT, and DeepStream handles video pipelines.
Power modes are configurable, from single-digit watts to around 60 W depending on the module, so you trade performance for thermals.
Take quiz
Photoshop
TensorRT
Hadoop
Coin-cell sensor logging
Static website hosting
Spreadsheet formulas
Heavier jobs such as multi-camera video analytics and robotics
19. How does post-training quantization differ from quantization-aware training?
Both produce a quantized model. The difference is when the model learns to tolerate lower precision.
| Aspect | Post-training quantization (PTQ) | Quantization-aware training (QAT) |
| When applied | After training is finished | During training or fine-tuning |
| Data needed | Small calibration set, no labels | Training data and a full training loop |
| Effort | Minutes, often one converter flag | Hours, retraining required |
| Accuracy at INT8 | Usually fine for CNNs | Higher, especially for sensitive models |
| Below 8 bits | Often drops sharply | Much more reliable |
QAT inserts fake-quantize nodes so the weights learn to survive rounding. Try PTQ first, and move to QAT only when accuracy falls short.
Take quiz
Fake-quantize nodes that simulate rounding
Extra output classes
A cloud upload layer
When you have no model at all
When you want a fast result without retraining
When you need to change the architecture
Only after deployment fails
20. Why is INT8 quantization so popular on edge devices?
INT8 hits the sweet spot between savings and accuracy loss.
- 4x smaller weights than FP32, which helps tight flash and RAM.
- Less memory traffic, which is often the real bottleneck at the edge.
- Cheaper arithmetic - integer multiplies use less energy and silicon than floating point.
- Hardware support - most NPUs, DSPs and the Edge TPU are designed around INT8.
With a representative calibration set, CNN accuracy typically stays within a point or two of FP32. Lower precisions save more but need more care.
Using per-channel weight scales for convolutions usually recovers most of the accuracy lost by coarser per-tensor scaling, so it is a common default in converters.
Take quiz
They cannot store any weights
INT8 is the only type in Python
Their arithmetic units are built around integer math
It removes the need for calibration
It adds more layers
It increases the image resolution
It disables the cache
It cuts memory traffic
21. What is the difference between structured and unstructured pruning?
Unstructured pruning zeroes individual weights anywhere in a tensor. Structured pruning removes whole units - filters, channels or attention heads.
| Aspect | Unstructured | Structured |
| What is removed | Single weights | Channels, filters, heads |
| Resulting shape | Same size, sparse matrix | Smaller dense tensors |
| Speedup on typical edge hardware | Little without sparse kernels | Direct and predictable |
| Max sparsity at same accuracy | Higher | Lower |
Some hardware supports patterns such as NVIDIA's 2:4 sparsity, which sits in between. For most edge chips, structured pruning is the safer route.
As a rule of thumb, if you must hit a latency target on a phone NPU or Coral, remove channels and retrain. If the only goal is a smaller download, unstructured pruning plus compression of the sparse weights can still shrink the file.
Take quiz
Unstructured pruning
Structured pruning
Random seed pruning
It makes weights negative
They lack sparse kernels to skip zeros
It increases the batch size
It converts the model to text
22. Why are MobileNet-style architectures efficient on edge devices?
MobileNet replaces standard convolutions with depthwise separable convolutions, which split the work in two steps.
- A depthwise convolution filters each input channel separately.
- A pointwise 1x1 convolution then mixes channels.
The cost falls to about 1/N + 1/K^2 of a standard convolution, where N is output channels and K the kernel size. For 3x3 kernels that is roughly 8-9x fewer multiply-adds.
MobileNetV2 adds inverted residual blocks, and V3 uses platform-aware architecture search and hard-swish. Width and resolution multipliers let you scale the model to the device.
The width multiplier thins every layer (0.5 halves the channels) and the resolution multiplier shrinks the input image. Together they give a family from tiny to fairly accurate for different devices.
Take quiz
Mixes information across channels with a 1x1 convolution
Filters each pixel with a 9x9 kernel
Compresses the model to binary
About 2x more
No change at all
Exactly 100x fewer
Roughly 8-9x fewer multiply-adds
23. How do you convert a TensorFlow model to TFLite?
Use tf.lite.TFLiteConverter on a SavedModel or Keras model. For full-integer INT8, supply a representative dataset so the converter can calibrate activation ranges.
import tensorflow as tf converter = tf.lite.TFLiteConverter.from_saved_model("saved_model") converter.optimizations = [tf.lite.Optimize.DEFAULT] def rep_data(): for img in calib_ds.take(200): yield [img] converter.representative_dataset = rep_data converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8] converter.inference_input_type = tf.int8 converter.inference_output_type = tf.int8 open("model_int8.tflite", "wb").write(converter.convert())
Afterwards, load the file in the TFLite interpreter and compare its outputs and accuracy with the original model. Check that every operator is supported on your target.
If conversion fails, the usual cause is an operator with no TFLite builtin. You can enable select TF ops, but that links a much larger runtime, so replacing the op in the model is usually better on small devices.
Take quiz
To retrain the model from scratch
To pick a cloud region
To calibrate activation ranges
Delete the SavedModel immediately
Compare its accuracy and outputs against the original model
Assume it is identical without testing
Only check the file size
24. How do you export a PyTorch model to ONNX for edge deployment?
Switch the model to eval mode, build a dummy input with the real shape, and call torch.onnx.export.
import torch model.eval() dummy = torch.randn(1, 3, 224, 224) torch.onnx.export( model, dummy, "model.onnx", input_names=["input"], output_names=["logits"], opset_version=17, )
Then validate. Run onnx.checker.check_model, and compare PyTorch and ONNX Runtime outputs on the same input with a small tolerance. Prefer static shapes when possible, since many edge runtimes and NPUs handle dynamic shapes poorly.
After export you can shrink the model further with ONNX Runtime's quantization tools, or hand the .onnx file to vendor converters such as TensorRT's trtexec, OpenVINO or Qualcomm's QNN tools.
Take quiz
To start training the model
So layers like dropout and batch norm use inference behavior
To upload the model to the cloud
ONNX forbids all dynamic dimensions
Static shapes improve training accuracy
They make the file encrypted
Many NPUs and runtimes handle dynamic shapes poorly
25. What is the difference between TensorRT and TFLite?
Both optimize models for inference, but they target different hardware and use different strategies.
| Aspect | TensorRT | TFLite / LiteRT |
| Owner | NVIDIA | |
| Target hardware | NVIDIA GPUs, including Jetson | CPUs, mobile GPUs, DSPs, NPUs, MCUs |
| Output | Hardware-specific engine (plan file) | Portable .tflite file |
| Key optimizations | Layer fusion, kernel auto-tuning, FP16/INT8 | Quantization, XNNPACK, delegates |
| Portability | Engine tied to GPU and TensorRT version | Runs across many platforms |
Choose TensorRT when you ship on Jetson or other NVIDIA GPUs. Choose TFLite when you need broad reach across phones and embedded boards.
The two also meet in the middle: ONNX Runtime can use TensorRT as an execution provider, so one ONNX model can reach NVIDIA GPUs and other targets.
Take quiz
TensorRT
TFLite Micro
Core ML
TensorRT
TFLite / LiteRT
CUDA drivers alone
26. What is operator fusion and why does it help?
Operator fusion merges adjacent operations - such as Conv + BatchNorm + ReLU - into one kernel, so intermediate results never travel back to main memory.
On edge hardware memory traffic often costs more time and energy than the math itself. Fewer kernel launches also reduce overhead.
Batch norm is a classic case: at inference it is just a scale and shift, so converters fold it into the convolution weights and the layer disappears entirely. Exporters and runtimes such as TFLite, TensorRT and ONNX Runtime apply common fusions automatically.
You can inspect the result in Netron. If a converted graph still shows separate Conv, BatchNorm and ReLU nodes, a fusion did not happen, which is worth investigating before blaming the hardware.
Take quiz
Move it to the cloud
Replace it with a loop in Python
Fold it into the preceding convolution weights
It increases the model's parameter count
It disables the activation functions
It forces FP64 math
Intermediate tensors do not need to be written to main memory
27. How do TFLite delegates work?
At load time the interpreter checks which parts of the graph a delegate can handle. Supported subgraphs are handed to the delegate, and everything else stays on the CPU.
Common delegates cover mobile GPUs, Qualcomm's Hexagon DSP, Core ML on iOS, and the Edge TPU. XNNPACK accelerates the CPU path by default.
Each hand-off between CPU and accelerator costs time for data copies, so a graph split into many small pieces can run slower than CPU alone. Here is how the Edge TPU delegate is attached on Linux:
from tflite_runtime.interpreter import Interpreter, load_delegate interp = Interpreter( model_path="model_edgetpu.tflite", experimental_delegates=[load_delegate("libedgetpu.so.1")], ) interp.allocate_tensors()
Take quiz
They are dropped from the model
They stay on the CPU
They are sent to the cloud automatically
Delegates cannot run more than one op
Each CPU-accelerator hand-off adds data copy overhead
The model grows in parameter count
Delegates disable quantization
28. Why do some models fail or fall back to CPU on an NPU?
NPUs support a fixed operator list, specific data types and often static shapes. When the model steps outside that, the runtime either refuses to compile it or silently moves those operators to the CPU.
Frequent causes:
- Unsupported operators - custom ops, GELU, Swish or certain attention ops.
- Unsupported dtype - FP32 graphs on an INT8-only NPU.
- Dynamic shapes - variable input size or data-dependent control flow.
- Tensors too large for on-chip SRAM, forcing slow spills.
To fix it, check the vendor's op list, swap in friendlier operators (ReLU6 or hard-swish), freeze shapes, quantize properly, and profile to see where the graph splits.
Take quiz
Replace GELU or Swish with ReLU6 or hard-swish
Replace every layer with softmax
Use random activations at runtime
Because FP32 uses too many layers
Because the NPU needs internet access
Because INT8 tensors are not allowed
The NPU does not support floating-point tensors
29. When should you choose edge inference over cloud inference?
Choose edge when the cost of the network - in time, money or risk - is higher than the cost of a smaller model.
- Latency budget under ~100 ms, such as safety or real-time control.
- Offline operation is required.
- Privacy or regulation restricts moving raw data.
- High data volume, like continuous video, makes uploading too costly.
Choose cloud when the model is too large for any device, you must iterate on it daily, or traffic is low and bursty. Many teams pick a hybrid: edge for the common case, cloud for hard ones.
A quick test: write down the worst-case latency, the offline requirement and the daily data volume per device. If any one of them rules out the cloud, start at the edge.
Take quiz
A hard real-time response budget of a few milliseconds
Needing the largest possible model
Daily model changes with no device updates
Low-volume, bursty requests
When the device is offline
When the model is too large for any device
When raw data cannot leave the premises
When latency must be under 10 ms
30. What is a hybrid edge-cloud architecture?
A hybrid design runs a small model on the device for the fast path, and escalates uncertain or complex inputs to a larger cloud model. The cloud also collects hard samples to retrain the edge model.
flowchart LR
S["Sensor input"] --> E["On-device model"]
E --> C{Confident?}
C -- Yes --> A["Act locally"]
C -- No --> CL["Cloud model"]
CL --> A
CL --> T["Hard samples for retraining"]
T --> U["OTA model update"]
U --> E
Most traffic is handled locally, so latency and cost stay low, while accuracy on difficult cases stays high. Define the confidence threshold carefully, since it controls the cloud load.
Take quiz
Every input without exception
Low-confidence or complex inputs
Only inputs that are already solved
The device screen brightness
The size of the SD card
The charger type
The confidence threshold of the edge model
31. Why is privacy a major driver for Edge AI?
When inference runs locally, raw audio, video and health signals never have to leave the device. That follows the data minimization principle behind laws such as GDPR and HIPAA, and shrinks the amount of data a breach could expose.
It also builds user trust. A camera that only reports "person detected" is easier to accept than one streaming footage.
Edge is not automatically private, though. A compromised device can leak data, and a stolen model file can leak training information. Pair it with encryption, secure boot, and techniques like federated learning or differential privacy.
Regulation also shapes the design. For example, keeping biometric templates on the device can simplify consent and data-residency questions.
Take quiz
Data minimization
Data maximization
Mandatory cloud logging
Edge devices have no storage
A compromised device can still leak data
Edge models cannot be encrypted
Privacy laws do not apply to devices
32. How does federated learning work with edge devices?
In federated learning, devices train a shared model on their own data and send only model updates to a server. The raw data never leaves the device.
sequenceDiagram participant S as Server participant D1 as Device 1 participant D2 as Device 2 S->>D1: Send global model S->>D2: Send global model D1->>D1: Train on local data D2->>D2: Train on local data D1->>S: Send weight update D2->>S: Send weight update S->>S: Aggregate with FedAvg S->>D1: Send improved model
FedAvg averages the updates, usually weighted by sample count. Challenges include non-IID data across devices, communication cost, and stragglers. Updates can still leak information, so secure aggregation and differential privacy are often added. Flower and TensorFlow Federated are common frameworks.
Take quiz
Its raw photos
Its entire storage
A model weight update
Deletes slow devices permanently
Compresses images on the server
Replaces the model with random weights
Averages device updates into the global model
33. What happens when an Edge AI device goes offline?
A well-designed edge system keeps working, because inference runs locally and does not depend on the network.
What changes is everything around it. The device should follow an offline-first pattern:
- Keep making decisions with the on-device model and cached configuration.
- Buffer telemetry and results in a bounded local queue (store-and-forward).
- Timestamp events carefully, since clocks may drift without sync.
- On reconnect, flush the queue with retry and exponential backoff.
- Postpone model updates until the link is stable.
Define what to drop when the buffer fills, and choose safe default behavior for any feature that truly needs the cloud.
Test this explicitly by unplugging the network in staging. Most offline bugs - growing queues, expired tokens, startup blocked while waiting for a server - only show up then.
Take quiz
Cloud-only with live polling
Offline-first with store-and-forward buffering
Rebooting every minute
The device must stop inference
A defined policy decides what to drop
Data is silently written to the model weights
The buffer grows without limit
34. How do you deliver model updates over the air (OTA)?
Treat a model update like a firmware release: signed, staged and reversible.
- Package the model with a manifest (version, hash, compatible runtime).
- Sign it, and have the device verify the signature before use.
- Download efficiently - delta updates and resume on weak links.
- Stage it in an inactive slot (A/B) and validate it with a quick self-test.
- Roll out gradually - canary 1-5% of devices, watch metrics, then widen.
- Roll back automatically if health checks fail.
Tools such as AWS IoT Greengrass, Azure IoT Edge, Mender and balena provide much of this pipeline.
Delta updates matter because a full model can be tens of MB over a metered cellular link. Sending only the changed parts can sometimes cut that sharply.
Take quiz
Keep the old model available so you can roll back
Run two different devices at once
Double the model size permanently
To make the update download faster
To skip signature checks
To retrain the model
To catch problems before they reach the whole fleet
35. What is split computing in Edge AI?
Split computing cuts a neural network into two parts. Early layers run on the device, and the intermediate activation is sent to a nearby edge server or the cloud, which runs the rest.
The best split point is where the activation tensor is small, such as a bottleneck layer, because early CNN layers often produce tensors larger than the input image. Total latency is roughly device compute + transfer time + server compute.
It helps weak devices and offers some privacy since raw data is not sent. It still depends on the network, so it works poorly offline.
Take quiz
The full training dataset
The device's operating system
The intermediate activation from the cut layer
Always after the first layer
At a layer where the activation is small
Only at the final softmax
At the largest tensor available
36. Why is batch size usually 1 on edge devices?
Edge inputs usually arrive one at a time - a frame, an audio window, a sensor reading - and the response is needed immediately. Waiting to fill a batch would add latency.
Cloud GPUs batch requests to keep thousands of cores busy. Small edge accelerators have much less parallel headroom, so larger batches bring limited throughput gains and use scarce memory.
The exception is a gateway handling several camera streams, where batching frames across streams can raise utilization without hurting any one stream's deadline too much.
A related trick is to keep batch size at 1 but pipeline the stages across threads, so capture, inference and postprocessing overlap and the device stays busy without adding waiting time.
Take quiz
Batches reduce model accuracy to zero
The system must wait to collect enough inputs
Batching disables the accelerator
A single wake-word microphone
A microcontroller with 64 KB RAM
A single-frame safety stop
A gateway serving several camera streams
37. What is the difference between compute-bound and memory-bound inference?
A layer is compute-bound when the processor's math units are the limit, and memory-bound when moving data to and from memory is the limit.
What decides it is arithmetic intensity - operations performed per byte moved. The roofline model compares that with the hardware's compute-to-bandwidth ratio.
- Large standard convolutions and big matrix multiplies tend to be compute-bound.
- Depthwise convolutions, element-wise ops and LLM token decoding tend to be memory-bound.
For memory-bound work, quantization, operator fusion and better data reuse help more than a faster ALU.
Profiling helps tell them apart. If raising the compute clock barely changes a layer's latency, it is probably memory-bound.
Take quiz
Arithmetic intensity, operations per byte moved
Number of Python files
Screen refresh rate
Adding more math units only
Quantization and operator fusion
Raising the display resolution
Increasing the file name length
38. How does thermal throttling affect edge inference?
When a chip heats up, it lowers its clock speed to protect itself. For inference, that means latency creeps up and FPS drops after a few minutes of sustained load, even though the first runs looked fast.
This is common in fanless phones, sealed enclosures and outdoor cameras. Benchmarks that run for 30 seconds often miss it.
To handle it:
- Benchmark for sustained periods and watch temperature and clocks.
- Reduce work - lower precision, resolution or frame rate.
- Duty-cycle inference instead of running continuously.
- Improve heat dissipation, or choose a lower power mode.
- Design pipelines to tolerate variable latency.
Mobile operating systems expose thermal-state APIs, which let an app lower its frame rate before the system forces a drop.
Take quiz
Increases voltage to speed up
Deletes the model from memory
Lowers its clock speed to reduce heat
Short runs always show lower accuracy
Throttling only affects cloud servers
Benchmarks cannot measure latency
It may finish before heat builds up and throttling begins
39. How do you benchmark an Edge AI model properly?
Benchmark on the real target device, with realistic inputs and a fixed power mode. Results from a laptop say little about an NPU.
- Run warm-up iterations first, so caches and clocks settle.
- Run hundreds of iterations and report p50, p95 and p99 latency.
- Time the full pipeline, including pre- and postprocessing.
- Measure peak memory and, if possible, power or energy per inference.
- Run long enough to expose thermal throttling.
- Check accuracy on the device, not only latency.
Useful tools are TFLite's benchmark_model and NVIDIA's trtexec:
adb shell /data/local/tmp/benchmark_model --graph=model.tflite --num_threads=4 --use_gpu=true trtexec --onnx=model.onnx --fp16 --saveEngine=model.plan
Fix the CPU governor and power mode where possible, such as nvpmodel and jetson_clocks on Jetson. Otherwise runs on the same board can differ by tens of percent.
Take quiz
To train the model a bit more
So caches and clocks settle before timing starts
To fill the SD card
Average file size
p99 latency
Mean accuracy
Number of layers
40. What is the difference between FP32, FP16, INT8 and INT4 on the edge?
They differ in bits per weight, and so in size, speed and accuracy risk.
| Precision | Bytes per weight | 100M-param model | Typical edge use |
| FP32 | 4 | ~400 MB | Training, reference baseline |
| FP16 | 2 | ~200 MB | GPUs and NPUs with half-precision support |
| INT8 | 1 | ~100 MB | Standard for CNNs on NPUs and DSPs |
| INT4 | 0.5 | ~50 MB | On-device LLMs and aggressive compression |
Each step down halves memory traffic but raises accuracy risk. INT4 usually needs weight-only methods such as GPTQ or AWQ, or QAT, rather than naive rounding.
Between FP32 and INT8 sits FP16 or bfloat16: usually a near-free win on GPUs, though many NPUs lack floating point entirely. Mixed precision - keeping sensitive layers in INT8 or FP16 while the bulk goes lower - is how most teams ship INT4 models without wrecking accuracy.
Take quiz
About 100 MB
About 400 MB
About 5 MB
Training CNNs from scratch
Storing camera images
Replacing the CPU
Compressing on-device language models
41. How do you troubleshoot an accuracy drop after INT8 quantization?
Work from the model's outputs back to the specific layers causing damage.
- Confirm the baseline - check FP32 accuracy and the preprocessing match on both.
- Check calibration data - it must be representative, with a few hundred real samples.
- Compare layer by layer - measure cosine similarity or SQNR between FP32 and INT8 activations to find the worst layers.
- Try per-channel weight quantization instead of per-tensor, especially for depthwise convs.
- Keep sensitive layers in higher precision - often the first, last, or attention softmax.
- Switch to QAT if PTQ still falls short.
Activation outliers are a frequent culprit - a few huge values stretch the range and crush the resolution for everything else.
Document the final recipe - calibration set, per-channel settings and any layers kept in higher precision - so the result is reproducible each time the model is retrained.
Take quiz
The FP32 baseline and that preprocessing matches
The color of the device case
The number of Wi-Fi networks
The Git branch name
They add extra bits to the integer
They stretch the range and reduce resolution for normal values
They delete the calibration set
They make the model larger than FP32
42. How can you optimize a vision model for a device with 1 GB RAM?
Treat peak memory, not just file size, as the budget - activations and buffers often use more than weights.
- Pick an efficient backbone such as MobileNet, EfficientNet-Lite or a small YOLO variant.
- Reduce input resolution to the smallest size that keeps accuracy.
- Quantize to INT8 to shrink both weights and activations.
- Memory-map the model so weights are not duplicated in RAM.
- Reuse buffers and avoid copying frames between stages.
- Load one model at a time and skip frames when the pipeline falls behind.
Measure peak RSS on the real device and test under load, since the OS and camera stack also need their share.
As a sanity check, a 4 MB INT8 model can still need hundreds of MB at runtime once camera buffers, the OS and activations are counted, so leave 20-30% headroom.
Take quiz
File size is never relevant
RAM only stores the OS logo
Activations and buffers can exceed the weight size
Peak memory equals disk space
Encrypts the weights
Doubles inference speed automatically
Adds more layers
Avoids duplicating weights in RAM
43. Explain the execution flow of an edge inference pipeline?
A typical vision pipeline moves data through five stages, and the whole chain must fit in the latency budget.
flowchart LR A["Capture frame"] --> B[Preprocess] B --> C["Runtime and delegate inference"] C --> D[Postprocess] D --> E["Decision or action"] E --> F["Telemetry queue"]
- Capture - the camera or sensor delivers a buffer.
- Preprocess - resize, normalize, and quantize to the model's input type.
- Inference - the runtime runs the graph on the CPU or a delegate.
- Postprocess - decode boxes, apply non-maximum suppression and thresholds.
- Act - trigger an alert, a motor command or a UI update.
Preprocessing and postprocessing are often on the CPU and can dominate total latency, so profile the whole chain.
A common optimization is to run capture and inference on separate threads with a small ring buffer, so a slow frame never blocks the camera. Drop old frames instead of queueing them - a stale detection is worse than a missing one.
Take quiz
Preprocessing
Postprocessing
Telemetry upload
Models have no runtime cost
Pre- and postprocessing can dominate total latency
Pipelines never run on CPUs
Only the camera affects speed
44. How do you secure models and data on edge devices?
Edge devices sit in places you do not control, so assume an attacker can touch the hardware.
- Secure boot and signed firmware - only trusted code runs.
- Signed, verified model updates - reject tampered files.
- Encrypt the model and data at rest, with keys in a hardware keystore or TrustZone.
- Use a TEE for sensitive inference where available.
- Encrypt traffic with mutual TLS and unique per-device identities.
- Limit retention - do not store raw data longer than needed.
Also plan for model extraction and adversarial inputs. Rate-limit outputs, and validate inputs, since a model on a device can be copied and probed.
Do not forget physical attacks. Disable debug ports such as JTAG and UART in production, and use anti-rollback counters so an attacker cannot flash an older, vulnerable model or firmware.
Take quiz
A longer filename
A larger image resolution
A verified digital signature
In a plain text file next to the model
In the public GitHub repository
In the camera frame buffer
In a hardware keystore or TrustZone
45. How do you monitor model drift on edge devices?
You rarely have labels on the device, so monitor proxies and send compact summaries instead of raw data.
- Input statistics - brightness, noise or feature histograms, compared with training data using PSI or a KS test.
- Prediction statistics - class mix and confidence distribution over time.
- Uncertainty rate - the share of low-confidence or escalated cases.
- Sampled review - upload a small, consented sample for labeling.
- Business signals - false alarm rate, user overrides.
Aggregate by device group and software version, so a drift caused by a new camera lens or firmware stands out. When drift crosses a threshold, retrain and ship an OTA update.
Keep the telemetry budget small - a few kilobytes of histograms per day per device is usually enough - and remember that privacy rules may limit what you can collect even for monitoring.
Take quiz
They always show the exact accuracy
A shift can signal drift when labels are unavailable
They replace the training set
To hide problems from engineers
To spot drift tied to a hardware or software change
To reduce model size
To avoid collecting any data
46. How do small language models run on edge devices?
Small language models (roughly 1B to 8B parameters) fit on phones and laptops through aggressive quantization and optimized runtimes.
- 4-bit weights (GGUF Q4, GPTQ, AWQ) cut a 7B model from ~14 GB at FP16 to roughly 4 GB.
- Runtimes such as llama.cpp, ExecuTorch, MLC LLM and MediaPipe LLM Inference run them on CPU, GPU or NPU.
- KV cache grows with context length, so long prompts need extra memory beyond the weights.
Token generation (decode) is memory-bandwidth-bound: each token reads nearly all the weights, so speed is roughly memory bandwidth divided by model size. This is why 4-bit models also run faster.
Techniques such as speculative decoding, a smaller context window and sliding-window attention help further.
On phones, NPU or GPU backends can beat plain CPU decoding, but support varies by model architecture. Benchmark time to first token and tokens per second on the real device.
Take quiz
Each token requires reading almost all model weights
It needs a new training run per token
It only uses the network card
The device screen
The tokenizer vocabulary file only
The battery capacity
The KV cache
47. How do you handle model versioning and rollback across an edge fleet?
Treat every model as a versioned artifact, tracked in a model registry with its metadata.
- Version it - semantic version, training data snapshot, metrics, and file hash.
- Declare compatibility - the manifest lists the runtime, firmware and hardware it supports.
- Keep the previous version on-device so rollback is instant and works offline.
- Use shadow mode - run the new model beside the old one and compare outputs before switching.
- Roll out in rings with automatic rollback on bad metrics.
- Keep a kill switch to pin devices to a known-good version.
Report the active version in telemetry, so every complaint can be tied to the exact model that produced it.
Never promote a model to the full fleet on offline metrics alone. The new version may score better on the test set but run slower on older hardware, which only a staged rollout on real devices will reveal.
Take quiz
Hides the device from the network
Deletes the old model immediately
Runs the new model beside the old one for comparison
It doubles the accuracy
Rollback is instant and works offline
It removes the need for signing
It speeds up the camera
48. How do you design Edge AI systems for energy efficiency?
Energy per inference matters as much as latency on battery devices, so reduce both the work done and how often it is done.
- Cascade models - a tiny always-on detector wakes the larger model only when needed.
- Event-triggered inference - run on motion or sound, not constantly.
- Use the NPU or DSP - they deliver far more operations per joule than the CPU.
- Lower precision, resolution and frame rate where accuracy allows.
- Duty-cycle the sensor and radio, and batch network uploads.
- Measure energy per inference, not just speed.
A faster chip is not always more efficient. Track inferences per joule on the real device.
Radios are often the biggest drain, so on-device inference can save energy overall: sending a 100 KB frame over cellular can cost more energy than analyzing it locally.
Take quiz
Running every model all the time
Waking the large model only when a tiny model triggers it
Sending all data to the cloud first
Number of lines of code
Screen size
Model name length
Inferences per joule
49. How does hardware-aware neural architecture search help Edge AI?
Neural architecture search (NAS) automatically explores network designs. The hardware-aware version adds the target device's real latency or energy to the objective, not just accuracy.
This matters because FLOPs are a poor proxy for speed. Two networks with the same FLOPs can differ greatly in latency depending on memory access and operator support.
MnasNet measured latency on a phone during search, and MobileNetV3 used platform-aware NAS. Once-for-All trains one supernet from which many specialized sub-networks can be extracted for different devices. Latency lookup tables or predictors speed the search, but the search itself can still be expensive.
Most teams do not run NAS themselves. They start from a hardware-tuned family such as MobileNetV3 or EfficientNet-Lite, and search only when a device's operator set or latency budget is unusual.
Take quiz
FLOPs often do not match real latency on the device
FLOPs are always identical to latency
NAS removes the need for devices
A cloud billing plan
One trained supernet that yields many device-specific sub-networks
A new camera sensor
A fixed single-size network only
50. Which is better for edge: a heavy model with cloud fallback or a small on-device model?
In most products, the best answer is a small on-device model that escalates to the cloud only when unsure. It keeps typical latency and cost low, works offline for common cases, and still gets help on hard ones.
A heavy model forced onto the device usually means throttling, short battery life and slow responses. A cloud-first design fails the moment connectivity drops and adds latency to every request.
| Situation | Better choice |
| Hard real-time or safety-critical | Small on-device model, no cloud dependency |
| Inputs are mostly easy, a few are hard | Small model with cloud fallback |
| Strong connectivity, rare requests, huge model | Cloud-first |
| Strict privacy rules | On-device, with federated learning for improvement |
Decide with data: measure the share of cases the small model handles confidently.