Skip to content
Models · Jul 26, 2026

28.9M-parameter language model runs on an $8 microcontroller without server support

A GitHub project demonstrates a 28.9M-parameter model on an ESP32-S3, generating text at 9.5 tokens/sec entirely on-device using Per-Layer Embeddings from Google’s Gemma models.

Trust79
HypeLow hype

2 sources · cross-referenced

ShareXLinkedInEmail
TL;DR
  • A 28.9M-parameter language model runs entirely on an $8 ESP32-S3 microcontroller, generating text at about 9.5 tokens/sec without server support.
  • The model stores 25M parameters in flash and uses 512KB SRAM for the active compute core, leveraging Google’s Per-Layer Embeddings technique.
  • The model was trained on TinyStories and produces short, coherent stories but cannot answer questions, follow instructions, or write code due to its small reasoning core.
  • Firmware, wiring, training, and quantization code are open-source; on-chip measurements and ablations are documented in RESULTS.md.

A GitHub project demonstrates running a 28.9 million parameter language model entirely on an ESP32-S3 microcontroller that costs about $8, generating text at roughly 9.5 tokens per second without sending data to a server. The model stores 25 million of its parameters in the device’s 16MB flash and uses only 512KB of SRAM for the active compute core, relying on Google’s Per-Layer Embeddings technique to sample rows from flash as needed.

The project reports end-to-end throughput of about 9.5 tokens/sec and pure compute throughput of 9.7 tokens/sec, with the model quantized to 4-bit and totaling 14.9MB in size. Most of the embedding table resides in slow flash and only about 450 bytes are pulled into SRAM per token, keeping the working set small while the bulk of the model remains resident in non-volatile storage.

The model was trained on the TinyStories dataset, which consists of short synthetic stories designed to be learnable by small models, so it generates simple, mostly coherent stories but cannot answer questions, follow instructions, or write code. The authors note that these limitations stem from the small reasoning core rather than the memory layout trick, which is primarily an architectural demonstration.

All artifacts are open-source: firmware and wiring instructions live under firmware/esp32_llm/README.md, training and quantization code under src/ and experiments/, and detailed on-chip measurements, ablations, and method write-ups under RESULTS.md. The repository also documents a correction from an earlier inflated parameter count after a bug in accounting was fixed.

Sources
  1. 01Hacker News — AI (100+ points)Running a 28.9M parameter LLM on an $8 microcontroller
  2. 02GitHubslvDev/esp32-ai
Also on Models

Stories may contain errors. Dispatch is assembled with AI assistance and curated by human editors; despite the trust-score filter, mistakes happen. We correct publicly — every article links to its revision history. Nothing here is financial, legal, or medical advice. Verify before relying on any claim.

© 2026 Dispatch. No ads. No sponsorships. No paid placement. Reader-supported via Ko-fi.

Built by a person who cares about honest AI news.