All notes

OPEN-SOURCE

Jul 26, 2026

A 28.9M-Parameter LLM Runs on an $8 ESP32 Microcontroller

A working LLM with 28.9 million parameters runs on an ESP32, the ubiquitous $8 microcontroller. The project demonstrates that inference at the edge no longer requires dedicated hardware.

The project at slvDev/esp32-ai gets a quantized language model running on an ESP32 — a chip with no dedicated ML accelerator, limited SRAM, and a dual-core processor clocked in the hundreds of megahertz range. At 28.9 million parameters, the model is small by any server-side measure, but making it fit within the ESP32's memory constraints requires aggressive quantization and careful weight layout.

The practical implication is direct: inference can now happen on hardware that costs less than a cup of coffee, runs on a coin cell or small battery, and ships in millions of consumer and industrial devices already. No cloud round-trip, no GPU, no SBC like a Raspberry Pi required.

For embedded engineers, this shifts the design question. Instead of asking whether a device can afford network latency for AI features, the question becomes whether the on-device model is capable enough for the task. That is a better problem to have.

For solo founders building IoT products, the cost calculus changes. Offloading inference to a backend adds API cost, latency, and a network dependency. A model that runs locally on the target chip eliminates all three. The ESP32 is already in countless product designs; adding a local LLM is now a firmware decision, not a hardware upgrade.

The repository provides the implementation code and model weights, making it reproducible. The work builds on the broader trend of quantization research pushing capable models into constrained environments — 4-bit and lower precision formats are doing real work here.

The ceiling on what counts as "edge hardware" just dropped. Any project currently routing simple classification or generation tasks to a cloud API should evaluate whether an ESP32-class device handles it locally instead.