Breadboard
docs
Example project · Builds & projects

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.

The A tiny AI storyteller (ESP32-S3) circuit as rendered by the simulator

What's on the bench

  • Battery
  • ESP32-S3
  • TFT 2.8″ 240×320 (ST7789)

How it's wired

  • Battery · posESP32-S3 · vin
  • Battery · negESP32-S3 · gnd
  • ESP32-S3 · 3v3TFT 2.8″ 240×320 (ST7789) · vcc
  • ESP32-S3 · gnd2TFT 2.8″ 240×320 (ST7789) · gnd
  • ESP32-S3 · g6TFT 2.8″ 240×320 (ST7789) · clk
  • ESP32-S3 · g7TFT 2.8″ 240×320 (ST7789) · din
  • ESP32-S3 · g5TFT 2.8″ 240×320 (ST7789) · cs
  • ESP32-S3 · g3TFT 2.8″ 240×320 (ST7789) · dc
  • ESP32-S3 · g4TFT 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.

Related projects