Skip to content
HardwareLab

Esp32 Llm

A real LLM running on an ESP32.

By DaveBben

Est. cost
Cost unknown
Posted
GitHub stars
643 (GitHub)
Esp32 Llm: GitHub repository card
No photo in the source; showing the GitHub repository card.

Overview

Proof that a language model can run on an ESP32: a 260K-parameter TinyLlamas model trained on TinyStories generating text at about 19 tokens per second.

How it works

It uses llama2.c on an ESP32-S3FH4R2, whose 2 MB of PSRAM fits the roughly 1 MB model. Speed-ups include using both cores, ESP-DSP SIMD dot-product functions, a 240 MHz CPU and 80 MHz PSRAM, and a larger instruction cache. It builds with the ESP-IDF toolchain.

Hardware

  • ESP32-S3 with PSRAM

This page is a short summary written by HardwareLab. Build steps, code and photos belong to the creator; follow “View original” for the full project.

See all 17