# Running a 28.9M Parameter LLM on an $8 ESP32 Microcontroller

Original title: Running a 28.9M parameter LLM on an $8 microcontroller

> Hacker News story 49050512 · language: en · submitted 2026-07-25
> Web version: https://zeli.app/story/49050512
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 269 · by [boveyking](<https://news.ycombinator.com/user?id=boveyking>) · 💬 68
[original](<https://github.com/slvDev/esp32-ai>) · [HN discussion](<https://news.ycombinator.com/item?id=49050512>)

## Summary

I managed to run a 28.9 million parameter language model on an $8 ESP32-S3 microcontroller by leveraging Per-Layer Embeddings from Google's Gemma models. Instead of loading the entire model into fast RAM, I stored most parameters in flash memory, fetching only what is needed per token. This approach allows the device to generate coherent short stories at roughly 9 tokens per second entirely on-chip, without any server connectivity.

## Key quote

> The large model then costs almost nothing to run, because you never load most of it.

## HN discussion (68 comments)

### [titzer](<https://news.ycombinator.com/item?id=49053776>)

> It's crazy what $5 can buy you in a microcontroller these days. Have a look at these Milk-V boards:
>
> https://milkv.io
>
> The duo has up to 256MB of memory, and a 1TOPS@INT8 TPU. They run Linux and are $5. I bought 5!

### [helsinkiandrew](<https://news.ycombinator.com/item?id=49055573>)

> Voice-to-Text and Text-to-Voice models are approaching that size.  I wonder how close we are to getting small devices that can chat with us.
>
> Imagine a world where your toothbrush could give you tips about dental hygiene - or advertise toothpaste.  What a time to be alive!

### [rao-v](<https://news.ycombinator.com/item?id=49053141>)

> This is a really neat use of the per-layer embedding trick. It's also worth noting that there viable TTS models that are ~20-30M param, so it might mean you can have a ESP32 with no network access read stuff out to you in near real time!

### [kamranjon](<https://news.ycombinator.com/item?id=49055233>)

> Pretty incredible performance for the footprint - really interested to see what could be done on slightly more powerful SBCs like some that have been mentioned in this thread.

### [NooneAtAll3](<https://news.ycombinator.com/item?id=49054813>)

> While running LLM on tiny device is awesome, I'm more impressed by whatever training has produced the weights

---

## Cite

- Page: https://zeli.app/story/49050512
- Date: 2026-07-25
- Source: github.com (https://github.com/slvDev/esp32-ai)
- Hacker News: https://news.ycombinator.com/item?id=49050512

## Other languages

- zh: https://zeli.app/zh/story/49050512 · markdown: https://zeli.app/zh/story/49050512.md
- ja: https://zeli.app/ja/story/49050512 · markdown: https://zeli.app/ja/story/49050512.md
- ko: https://zeli.app/ko/story/49050512 · markdown: https://zeli.app/ko/story/49050512.md
- de: https://zeli.app/de/story/49050512 · markdown: https://zeli.app/de/story/49050512.md
- es: https://zeli.app/es/story/49050512 · markdown: https://zeli.app/es/story/49050512.md
