esp32-ai is an experimental language-model project that runs a 28.9-million-parameter model entirely on an ESP32-S3 microcontroller. The quantized model occupies about 14.9 MB and generates text without sending data to a server. Most parameters remain in flash through a Per-Layer Embeddings design, while active computation uses SRAM and PSRAM. This memory layout allows the device to retrieve only the embedding rows required for each token. The implementation reaches roughly 9.5 tokens per second and can display generated words on a connected screen. Trained on TinyStories, the model produces short, simple stories rather than answering questions, following instructions, or providing factual knowledge. The repository includes firmware, wiring and flashing instructions, training code, quantization experiments, ablations, and measured results.

Features

  • On-device text generation
  • 28.9-million-parameter model
  • Four-bit quantized storage
  • Per-Layer Embeddings architecture
  • Flash, PSRAM, and SRAM partitioning
  • Training and firmware toolchain

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow esp32-ai

esp32-ai Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of esp32-ai!

Additional Project Details

Programming Language

Python

Related Categories

Python Large Language Models (LLM)

Registered

2026-07-27