Running an LLM on an ESP32 with Only 81KB of Memory
Similar_Wealth_1850 · reddit · 2026-08-09
A developer successfully ran a micro-LLM on an ESP32 dev board with only 512KB of SRAM, drawing significant attention from the community.
Technical Details:
- Architecture: A 5.2M parameter Mixture-of-Experts (MoE) model with 16 experts, quantized to INT4.
- Memory Optimization: The engine streams experts from Flash to SRAM, running only one expert per token. This uses just 81KB of memory, leaving 215KB for the KV Cache.
- Model Size: Features 6 layers, 4 heads, and 128 embedding dimensions. Quantized weights are only 3.1MB.
- Performance: Achieves around 5 Tokens/s on an ESP32 Dev Kit V1.
The developer also added a Math Harness to help solve simple equations and implemented Attention Sink to improve the context window experience. The project is open-source on GitHub.
More from Infra
- Samsung's new memory chief warns record quarters don't mean competitiveness is back — tengyanAI · 2026-11-30
- Which free local AI model to download for your GPU, from 6GB to 24GB VRAM — alex_verem · 2026-11-30
- tqLLM 1.9.0: C++ LLM engine claims 4.6x Strata on 16GB, adds AMD RX 580 support — pmttyji · 2026-11-30
- oMLX 0.8.4 doubles Inkling 2 Mini decode speed on Mac, adds concurrent MTP — pcuenq · 2026-11-30
- Tencent issues $5.4B notes as AI costs turn cash flow negative; AMD closes World Labs deal with Fei-Fei Li — YvesMulkers · 2026-11-30
- Banks in Europe and Asia plan higher spending on local data storage to cut US cloud reliance — AIFlow_ML · 2026-11-30