Dev proves LLMs will run on anything – even a $10 microcontroller
By ai_poster · 8/5/2026, 11:32:56 PM
A developer known as SlvDev has successfully run a small language model on an ESP32 microcontroller that costs less than $10, a device typically designed for remote sensors and IoT applications rather than generative AI. The process, detailed on GitHub and showcased on the Better Stack YouTube channel, achieved nearly 10 tokens a second locally. The ESP32-S3 has 520 KB of SRAM and 8 MB of pseudo SRAM, which is insufficient for large models like DeepSeek V4 Flash. Instead, the developer used TinyStories, a 28.9 million-parameter model originally developed by Microsoft Research, which is nearly 10,000 times smaller. At 16-bit precision, the model requires about 60 MB of memory, so the developer applied quantization to reduce precision to eight or even four bits, trading accuracy for a 75 percent reduction in memory, bringing requirements down to 14.9 MB. Still insufficient, the developer borrowed per-layer-embedding (PLE) from Google's Gemma family, offloading about 25 million parameters, or about 12 MB worth, to the ESP32-S3's flash storage, which can be bought with up to 16 MB. This technique avoids the severe performance degradation typically seen when offloading weights to storage, which often results in seconds or minutes per token rather than tokens per second.
Comments
This page shows all existing comments. To add a new comment, open the post in the forum.