A developer who goes by Slava S. just got a real language model — not a chatbot gimmick, an actual 28.9-million-parameter neural network — running entirely on an ESP32-S3, the same $8 microcontroller you'd find inside a smart plug or a DIY weather station. It writes short stories, on-device, with no cloud call and no Wi-Fi required, printing text at just under 10 tokens a second onto a tiny I2C display. The project, published to GitHub as esp32-ai in late July 2026, isn't a toy demo pretending to think. It's a genuine architecture trick borrowed from Google's Gemma, and it's roughly 100 times bigger than the last language model anyone successfully ran on hardware this small.
How you cram an AI into 512 kilobytes
Here's the actual problem this project solves: a language model's size mostly lives in its embedding table, the lookup structure that turns each token into a vector the network can process. For a 28.9-million-parameter model, that table alone is around 25 million parameters, and there's no way that fits in 512KB of fast SRAM alongside everything else the chip needs to do. The old approach was to shrink the whole model until it fit in RAM, which is how you end up with a 260,000-parameter toy that can barely string a sentence together. Slava's approach instead borrows Gemma 3n's Per-Layer Embeddings idea: keep the table in slow 16MB flash memory, memory-mapped so it reads like RAM, and pull only the handful of rows, about six of them, roughly 450 bytes, that a given token actually needs. The dense processing core, a much smaller ~560K parameters, is the only part that has to live in fast memory the whole time.
The $8 board vs. a typical local-AI PC
Hardware cost
Spec
~$8
ESP32-S3 board
$800–$2,000+ (GPU alone)
Fast memory
Spec
512KB SRAM
ESP32-S3 board
16–24GB VRAM
Model size
Spec
28.9M parameters
ESP32-S3 board
7B–70B+ parameters
Power draw
Spec
Under 1 watt
ESP32-S3 board
150–450 watts
What it can actually do
Spec
Write short children's stories
ESP32-S3 board
Chat, code, reason, follow instructions
Spec
ESP32-S3 board
Typical local-AI PC
Hardware cost
~$8
$800–$2,000+ (GPU alone)
Fast memory
512KB SRAM
16–24GB VRAM
Model size
28.9M parameters
7B–70B+ parameters
Power draw
Under 1 watt
150–450 watts
What it can actually do
Write short children's stories
Chat, code, reason, follow instructions
None of this makes the ESP32 a replacement for anything you'd use day to day. The model was trained purely on TinyStories, a dataset built specifically for tiny models, so it can only generate short, simple narratives — ask it a real question and it will just keep telling you a story instead. That's the honest ceiling here. But the technique underneath it isn't a toy: Per-Layer Embeddings is the same idea Google ships in production Gemma models, just applied at a scale nobody had bothered to test on a chip this cheap before.
How each word actually gets generated
1
The dense core, about 560,000 parameters, runs entirely in SRAM to build the next token's context.
2
The chip pulls roughly 6 rows, about 450 bytes total, from the 25-million-parameter embedding table sitting in flash.
3
Those rows get merged into the layer's computation instead of ever occupying permanent RAM.
4
The next token prints to the I2C display, and the whole cycle repeats at just under 10 times a second.
Nothing about the board itself is unusual — the whole trick is in how the model's memory is organized across it. · Unsplash
Why this actually matters beyond the demo
The interesting part isn't that a microcontroller can now write toy stories — it's what the memory trick implies for everything one size class up. The same logic that makes 25 million parameters fit in flash instead of RAM is exactly why phones and integrated graphics chips are getting noticeably better at running real local models without dedicated VRAM. If you've read about running a local model without a GPU at all or wondered what a token actually is once you strip away the marketing, this project is that same architecture pushed to its most extreme, cheapest possible endpoint — and it still works.
My honest take: this won't replace your Raspberry Pi local-AI setup, and it isn't supposed to. What it proves is that the industry's obsession with ever-bigger models has a mirror image nobody pays enough attention to — models getting radically more efficient at the bottom end, not just bigger at the top. If you've thought about what running AI actually costs in electricity at GPU scale, keep an eye on this end of the market instead. Efficiency tricks like this one tend to climb up the stack, not stay stuck at the bottom.
Common questions
Can the ESP32-S3 AI model answer questions or write code?
No. It was trained only on the TinyStories dataset, so it generates short, simple children's-style narratives. Ask it anything else and it will just keep writing a story instead.
How fast does it generate text?
About 9.88 tokens per second — a genuinely readable pace, live on the board's small display, with no internet connection needed at any point.
What makes this different from just using a smaller AI model?
It's not that the model is small — 260,000-parameter models have run on similar hardware before. It's that Per-Layer Embeddings, a technique borrowed from Google's Gemma 3n, lets a model with roughly 100 times more parameters fit by keeping its embedding table in flash storage instead of RAM.