A tiny AI storyteller (ESP32-S3)
A real 28.9-million-parameter TinyStories language model (slvDev/esp32-ai, MIT) running entirely on the emulated ESP32-S3: the 15.5 MB app image with the embedded model fills a 16 MB flash chip, the int8-staged weights and KV cache live in the 8 MB octal PSRAM, and both LX7 cores split every matrix row. The story streams to the big 2.8″ color TFT — your prompt in yellow, the tale in white, and a live tokens-per-second footer fed over real hardware SPI (every pixel costs honest bus time). Type a few words into the serial monitor and press Enter: the model tokenizes your prompt on-device and writes you a new story at its true hardware-class rate, ~8 tokens/second with the panel attached, courtesy of the JIT that compiles the hot int8 dot-product loop to WebAssembly on the fly.

What's on the bench
- Battery
- ESP32-S3
- TFT 2.8″ 240×320 (ST7789)
How it's wired
- Battery · pos→ESP32-S3 · vin
- Battery · neg→ESP32-S3 · gnd
- ESP32-S3 · 3v3→TFT 2.8″ 240×320 (ST7789) · vcc
- ESP32-S3 · gnd2→TFT 2.8″ 240×320 (ST7789) · gnd
- ESP32-S3 · g6→TFT 2.8″ 240×320 (ST7789) · clk
- ESP32-S3 · g7→TFT 2.8″ 240×320 (ST7789) · din
- ESP32-S3 · g5→TFT 2.8″ 240×320 (ST7789) · cs
- ESP32-S3 · g3→TFT 2.8″ 240×320 (ST7789) · dc
- ESP32-S3 · g4→TFT 2.8″ 240×320 (ST7789) · rst
This project runs prebuilt firmware on the emulated board; open it in the simulator to watch it work and inspect every part live.



