TinyML is machine learning that runs on microcontrollers — parts with kilobytes of RAM, no operating system, and a power budget measured in milliwatts. It is the smallest end of edge AI, and the constraints are severe enough that most of what works in mainstream machine learning simply does not apply.
The appeal is straightforward. A device that can classify what it is sensing does not need to transmit raw data, which means it can run for years on a coin cell, respond in milliseconds, and keep working with no network at all.
This guide covers what actually fits on a microcontroller, the memory constraint that decides everything, the frameworks worth using, and the applications where TinyML delivers value that no other architecture can.
What Makes TinyML Different
TinyML is not simply a smaller version of edge AI. The hardware class changes the rules of the problem.
| Cloud ML | Edge AI (SoC) | TinyML (MCU) | |
|---|---|---|---|
| Memory for the model | Gigabytes | Hundreds of MB | Tens to hundreds of KB |
| Power | Hundreds of watts | 1–30 W | Microwatts to milliwatts |
| Operating system | Full | Linux | None or a small RTOS |
| Arithmetic | Float32 | Float16 or int8 | Int8, sometimes lower |
| Typical latency | Network-bound | Milliseconds | Microseconds to milliseconds |
| Unit cost | Per-query billing | Tens of dollars | A few dollars |
The last row is what makes TinyML commercially interesting. It puts inference into products where a Linux-capable module would never be economically or thermally viable — disposable sensors, consumer devices at volume, and anything that must last years on a battery.
RAM Decides What Is Possible
The most common misconception in TinyML is that model file size is the limiting factor. It is not. Weights live in flash, which is comparatively plentiful. The binding constraint is peak activation memory — the working RAM needed to hold intermediate results as data flows through the network.
A model that occupies 80 KB of flash may require 200 KB of RAM at its widest layer. On a part with 256 KB total, shared with the application, networking stack, and sensor buffers, that model does not fit regardless of how small the file is.
In TinyML the question is never how accurate a model can be. It is how accurate it can be inside the memory you actually have left.
What TinyML Can and Cannot Do
Being realistic about the boundary saves a great deal of wasted effort.
Works well: motion and gesture classification
Accelerometer and gyroscope data is low rate and highly structured. Distinguishing walking, running, falling, a machine cycle, or an animal behaviour is a well-solved TinyML problem that runs comfortably in a few tens of kilobytes.
Works well: keyword spotting and sound classification
Detecting a wake word, glass breaking, a smoke alarm, or an abnormal machine sound. Audio is converted to a spectrogram first, turning the problem into small-image classification that fits comfortably on modern parts.
Works well: anomaly detection on sensor streams
Learning what normal vibration, current, or temperature behaviour looks like and flagging deviation. Because it needs only normal data to train, it avoids the hardest part of most industrial ML projects — collecting examples of failures that are, by definition, rare.
Works with care: low-resolution vision
Presence detection, simple object classification, and person counting at small input sizes are achievable on parts with an NPU or generous RAM. Anything requiring fine detail, many classes, or high frame rates belongs on more capable edge AI hardware.
Does not work: large models and open-ended tasks
Language models, general object detection across many classes, high-resolution segmentation, and on-device training of anything substantial are outside the class. Attempts to force them produce either a model that does not fit or one whose accuracy is too low to be useful.
Frameworks and the Development Workflow
The TinyML toolchain has matured considerably, and the practical workflow is now fairly standard.
- TensorFlow Lite for Microcontrollers — the most widely supported runtime, with a small interpreter designed for parts without an operating system.
- Vendor-specific runtimes — silicon suppliers provide optimised libraries that map operators onto their DSP or NPU. These typically outperform generic runtimes substantially on their own hardware.
- End-to-end TinyML platforms — tools that handle data collection, feature extraction, training, and deployment to a specific board. Excellent for getting to a working prototype quickly.
- Classical machine learning — decision trees, random forests, and logistic regression remain highly competitive at this scale, run in a fraction of the memory, and are far easier to reason about. They deserve to be tried first rather than treated as a fallback.
The workflow runs: collect representative data from the actual sensor and mounting, extract features, train and evaluate on a workstation, quantise with representative calibration data, convert to the target runtime, then profile on hardware. The final step is the one teams most often skip and most often regret.
Getting TinyML to Work in a Real Product
Because the device transmits conclusions rather than raw signals, TinyML is also one of the most effective forms of IoT data reduction available — the bandwidth saving is a direct consequence of the architecture rather than an added optimisation.
Frequently Asked Questions
Conclusion
TinyML makes intelligence affordable at the smallest scale, which is exactly where connected products are most constrained. A few dollars of silicon, a coin cell, and a well-chosen model produce devices that decide locally, transmit rarely, and last for years.
Success depends on respecting the constraint that governs everything: available RAM at the widest layer. Design for that, engineer good features rather than deeper networks, cascade cheap detection ahead of expensive inference, validate the quantised model on real hardware, and keep a route open to update it. Within those limits, TinyML is remarkably capable — and outside them, no amount of optimisation will help.
