Machine learning on a microcontroller

Small machine-learning models can run on microcontrollers, with no operating system and very little memory.

Core

Train elsewhere, run inference on the microcontroller A model is trained on a computer or in the cloud, and the fixed, trained model is run on the microcontroller to make inferences from new sensor data. Runtimes include LiteRT for Microcontrollers and ExecuTorch, and some microcontrollers add an NPU. Computer or cloud Training Trained model fixed from now on Microcontroller Inference applies the model to new data new sensor data Runtimes TensorFlow Lite became LiteRT in September 2024 LiteRT for Microcontrollers code still in the tflite-micro repository needs no operating system, no standard C/C++ libraries and no dynamic memory allocation ExecuTorch the PyTorch project's runtime for on-device inference, including microcontroller targets NPUs now in MCUs from several vendors Cortex-M core Ethos-U NPU NPU licensed from Arm CPU core NPU an NPU of the vendor's own design
A model is trained on a computer or in the cloud, then the fixed model runs inference on the microcontroller with a runtime such as LiteRT for Microcontrollers or ExecuTorch.

Key points

  1. Training normally happens on a computer or in the cloud; the microcontroller only runs inference, applying a fixed, already-trained model to new sensor data.1
  2. Google renamed TensorFlow Lite to LiteRT in September 2024. Its microcontroller version, LiteRT for Microcontrollers (still kept in the tflite-micro code repository), needs no operating system, no standard C/C++ libraries and no dynamic memory allocation.213as of 6 October 2026
  3. ExecuTorch is the PyTorch project's runtime for on-device inference, including microcontroller targets.4as of 6 October 2026
  4. Microcontroller-class NPUs now appear in MCUs from several vendors. Some license Arm's Ethos-U NPU and pair it with a Cortex-M core; others design an NPU of their own.5678