TensorFlow Lite Micro and tools for microcontroller AI

Language models on a microcontroller sound absurd, and until recently they were. The ESP32-S3 has 512 KB of SRAM and up to 32 MB of external PSRAM. A useful chat model needs gigabytes. The trick that changed in 2025 was quantized nanomodels: 20 to 30 million parameter transformers, INT8-quantized, fine-tuned for one narrow task, that fit in the space between “keyword spotting” and “cloud LLM.” A recent XDA piece walked through a 28.9M model deployed on an ESP32-S3, and the comments made clear the biggest question is not “can I do this” but “what tools do I use.” Below are the seven desktop apps we would install first.

What to look for in a microcontroller LLM toolchain

Quick comparison

App Best for Platforms Free plan Note
TensorFlow Lite Micro The default microcontroller inference runtime Windows, macOS, Linux Yes C++ library, integrates with any toolchain
Edge Impulse Studio Data-to-firmware pipeline Web + desktop CLI Free tier Trains and deploys models from a browser
PlatformIO Cross-platform build inside VS Code Windows, macOS, Linux Yes Handles ESP32, RP2040, nRF, STM32 in one project
ESP-IDF Espressif’s official SDK Windows, macOS, Linux Yes First-class support for ESP32-S3 PSRAM and AI accelerators
Arduino IDE 2 Beginner-friendly deployment Windows, macOS, Linux Yes Now supports ESP32 board packages out of the box
TinyMaix Lightest runtime for tiny models Linux, macOS, Windows Yes 400-line inference core, INT8 friendly
llama.cpp Cross-target small-model runner Windows, macOS, Linux Yes The reference for small transformer inference

The apps

1. TensorFlow Lite Micro - Best default runtime

TensorFlow Lite Micro (TFLM) is the runtime most microcontroller AI projects standardize on. It is a C++ library with no dynamic allocation, no OS dependencies, and no file system access. Espressif ships an official ESP-IDF component that adds ESP-NN kernels for the S3, so INT8 convolutions and dense layers run four to eight times faster than the reference kernels. If you are new to microcontroller AI, this is the runtime the tutorials assume.

Where it falls short: the API is C++ and unforgiving. Debugging a bad model input often ends in a stack trace on the serial port.

Pricing:

Platforms: the desktop toolchain runs on Windows, macOS, Linux

Download: github.com/tensorflow/tflite-micro

Bottom line: the first library to add to a new microcontroller AI project.

2. Edge Impulse Studio - Best data-to-firmware pipeline

Edge Impulse Studio is the browser app that takes you from a sensor recording to a deployable firmware binary. Upload data, label it, pick a model architecture, train, and it emits a C++ library or a full Arduino sketch tuned for the target board. Support for ESP32-S3, nRF52840, Nicla Vision, and Nano 33 BLE Sense is deep. The desktop CLI lets you script the whole pipeline for CI.

Where it falls short: the free tier caps training time and dataset size. Advanced architectures require the enterprise tier.

Pricing:

Platforms: Web app plus a CLI for Windows, macOS, Linux

Download: edgeimpulse.com

Bottom line: the pick when you would rather train in a browser than in Colab.

3. PlatformIO - Best cross-platform build environment

PlatformIO is the VS Code extension that turns a single project into a build for any of a hundred boards. Switch target from ESP32-S3 to RP2040 to nRF52 with a two-line change in platformio.ini. TensorFlow Lite Micro, TinyMaix, and Edge Impulse libraries all install via the built-in package manager. The debugger integration works with any J-Link or ST-Link probe.

Where it falls short: the initial download is heavy. First-run performance is slow on Windows.

Pricing:

Platforms: Windows, macOS, Linux (as a VS Code extension)

Download: platformio.org

Bottom line: the environment that keeps the same project alive across three chip vendors.

4. ESP-IDF - Best when the target is ESP32-S3 specifically

ESP-IDF is Espressif’s official framework. If the project is committed to the ESP32-S3 family, this is the deepest tooling: native PSRAM allocators, first-party ESP-NN kernels, and OTA update support baked in. The idf.py CLI drives menuconfig, flash, monitor, and unit tests. Pairs cleanly with TFLM and TinyMaix.

Where it falls short: ESP32-only. Locking in early limits portability.

Pricing:

Platforms: Windows, macOS, Linux

Download: github.com/espressif/esp-idf

Bottom line: the framework when you know the target is an ESP32.

5. Arduino IDE 2 - Best for the first microcontroller AI project

Arduino IDE 2 is where most people start. Board managers for ESP32, RP2040, and nRF are one click away, TensorFlow Lite Micro is available as a bundled library, and the serial monitor is right there in the app. The rewritten 2.x version added a proper debugger and per-project sketches.

Where it falls short: slower builds than PlatformIO or ESP-IDF, and less control over compilation flags.

Pricing:

Platforms: Windows, macOS, Linux

Download: arduino.cc/en/software

Bottom line: the on-ramp that most first-time projects use before graduating to PlatformIO.

6. TinyMaix - Best runtime for the smallest models

TinyMaix is the runtime you reach for when TFLM is too big. The whole inference engine is about 400 lines of C. It supports INT8 and INT16 quantized models, integer-only inference, and boards with as little as 30 KB of RAM. Perfect for tiny transformer decoders that only need to greet, classify, or route.

Where it falls short: narrower op coverage than TFLM. Custom layers may need to be hand-ported.

Pricing:

Platforms: cross-compiles from Windows, macOS, Linux

Download: github.com/sipeed/TinyMaix

Bottom line: the runtime for the “does it even fit” moment.

7. llama.cpp - Best for pushing the ceiling of what a microcontroller can hold

llama.cpp is not a traditional microcontroller runtime, but the community has ported it to ESP32-S3, RP2350, and even the Milk-V RISC-V boards for research purposes. If the model in play is a 20 to 60 million parameter transformer distilled from a modern base, llama.cpp’s GGUF quantization pipeline lets you shrink it to something the board can hold. Runs on the desktop first for prototyping, then cross-compiles.

Where it falls short: integrating the inference loop into an embedded RTOS is manual work. Real-time performance depends on aggressive quantization.

Pricing:

Platforms: cross-compiles from Windows, macOS, Linux

Download: github.com/ggml-org/llama.cpp

Bottom line: the reference runtime for anyone squeezing a “real” transformer onto a board.

How to pick the right one

FAQ

Can an ESP32-S3 actually run a language model? A tiny one. Under 30 million parameters, INT8 quantized, one narrow task. Do not expect ChatGPT. Expect intent classification, structured extraction, or short scripted responses that beat template matching.

What is the difference between TFLM and TinyMaix? TFLM is the Google-maintained, broader runtime with better op coverage and vendor kernels. TinyMaix is a leaner runtime designed for the smallest devices. Use TFLM by default; drop to TinyMaix when TFLM will not fit.

Do I need ESP-IDF if I use PlatformIO? PlatformIO bundles a copy of ESP-IDF under the hood. You get the same runtime, wrapped in a friendlier build system. Use ESP-IDF directly only when you need the latest features or Espressif’s exact CI setup.

Can Edge Impulse train an LLM for microcontrollers? Not yet. Edge Impulse’s model catalog covers CNN, RNN, and transformer variants sized for classification and detection, not language generation. For LLM work, train in PyTorch and use llama.cpp or TinyMaix for deployment.

Is llama.cpp really usable on a microcontroller? For research and demos, yes. Production-grade deployment usually swaps in TFLM or TinyMaix once the model architecture is settled, because their memory footprint is tighter and their integration into RTOS builds is cleaner.