← Open Source
DaveBben

esp32-llm

Running a LLM on the ESP32.

InfrastructureDeploy & ServeC
Open on GitHub
Momentum
+0stars in 24 hours0.0%
645
Stars
82
Forks
+3
This week
1
Contributors
Created 2024-09-03 · Updated 2026-10-15 · #15578 today
Top developers
DaveBben

DaveBben/esp32-llm is ranked 15,578 with 645 stars.

Same-category comparison

DaveBben/esp32-llm is ranked 15,578 among these 8 peers; WW-AI-Lab/openclaw-office is ranked 15,580.

Same-category comparison
NameRankMetrics
SforAiDl/KD_Lib15,483
Language:
Python
Stars:
651
Forks:
60
Description:
A Pytorch Knowledge Distillation library for benchmarking and extending works in the domains of Knowledge Distillation, Pruning, and Quantization.
ParisNeo/lollms_hub15,520
Language:
Python
Stars:
649
Forks:
102
Description:
A proxy server for multiple ollama instances with Key security.
mlcommons/ck15,527
Language:
Python
Stars:
649
Forks:
122
Description:
Collective Knowledge (CK), Collective Mind (CM/CMX) and MLPerf automations: community-driven projects to learn how to run AI, ML, and other emerging workloads more efficiently and cost-effectively across diverse models, datasets, software, and hardware using MLPerf methodology and benchmarks.
danilofalcao/cursor-deepseek15,554
Language:
Go
Stars:
647
Forks:
51
Description:
A high-performance HTTP/2-enabled proxy server designed specifically to enable Cursor IDE's Composer to use DeepSeek's and OpenRouter's language models. This proxy translates OpenAI-compatible API requests to DeepSeek/OpenRouter API format, allowing Cursor's Composer and other OpenAI API-compatible tools to seamlessly work with these models.
WW-AI-Lab/openclaw-office15,580
Language:
TypeScript
Stars:
645
Forks:
115
princeton-nlp/LLM-Shearing15,622
Language:
Python
Stars:
643
Forks:
59
Description:
[ICLR 2024] Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning.
apache/casbin-gateway15,630
Language:
Go
Stars:
642
Forks:
71
Description:
See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for. Claude Code, Codex, Cursor, Gemini CLI and more: one endpoint for 44 model vendors, A–F API authenticity grading, per-agent permissions, usage and prompt records.
open-edge-platform/dlstreamer15,633
Language:
C++
Stars:
642
Forks:
211
Description:
Deep Learning Streamer (DL Streamer) Pipeline Framework is an open-source streaming media analytics framework, based on GStreamer* multimedia framework, for creating complex media analytics pipelines for the Cloud or at the Edge.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageC
CategoryInfrastructure
SubcategoryDeploy & Serve
KeywordsIoT, LocalAI
Stars645
Forks82
Contributors1
Created date2024-09-03
Updated date2026-10-15
Stars in 1 day0
Stars in 7 days3
Rank15,578
Previous rank6,702
Rank change-8,876
7-day stars rank7,320
Previous 7-day stars rank5,770
7-day stars rank change-1,550
Total stars rank15,861
Previous total stars rank15,830
Total stars rank change-31
CountryUSA
README summary

Running a LLM on the ESP32 Summary I wanted to see if it was possible to run a Large Language Model (LLM) on the ESP32. Surprisingly it is possible, though probably not very useful. The "Large" Language Model used is actually quite small. It is a 260K parameter tinyllamas checkpoint trained on the tiny stories dataset. The LLM implementation is done using llama. 2c with minor optimizations to make it run faster on the ESP32. Hardware LLMs require a great

deal of memory. Even this small one still requires 1MB of RAM. I used the ESP32-S3FH4R2 because it has 2MB of embedded PSRAM. c for the ESP32 With the following changes to , I am able to achieve **19. Utilizing both cores of the ESP32 during math heavy operations. Utilizing some special dot product functions from the ESP-DSP library that are designed for the ESP32-S3. These functions utilize some of the few SIMD instructions the ESP32-S3 has

. Maxing out CPU speed to 240 MHz and PSRAM speed to 80MHZ and increasing the instruction cache size. Setup This requires the ESP-IDF toolchain to be installed

Frequently asked questions

How many stars and forks are recorded?

DaveBben/esp32-llm has 645 stars and 82 forks.

What is the repository rank?

DaveBben/esp32-llm is ranked 15,578.

What language and category are recorded?

DaveBben/esp32-llm has 645 stars, uses C and belongs to Infrastructure.

Which repository is closest in rank?

DaveBben/esp32-llm is compared with WW-AI-Lab/openclaw-office, ranked 15,580 with 645 stars.

README

Running a LLM on the ESP32

Summary

I wanted to see if it was possible to run a Large Language Model (LLM) on the ESP32. Surprisingly it is possible, though probably not very useful.

The "Large" Language Model used is actually quite small. It is a 260K parameter tinyllamas checkpoint trained on the tiny stories dataset.

The LLM implementation is done using llama.2c with minor optimizations to make it run faster on the ESP32.

Hardware

LLMs require a great deal of memory. Even this small one still requires 1MB of RAM. I used the ESP32-S3FH4R2 because it has 2MB of embedded PSRAM.

Optimizing Llama2.c for the ESP32

With the following changes to llama2.c, I am able to achieve 19.13 tok/s:

  1. Utilizing both cores of the ESP32 during math heavy operations.
  2. Utilizing some special dot product functions from the ESP-DSP library that are designed for the ESP32-S3. These functions utilize some of the few SIMD instructions the ESP32-S3 has.
  3. Maxing out CPU speed to 240 MHz and PSRAM speed to 80MHZ and increasing the instruction cache size.

Setup

This requires the ESP-IDF toolchain to be installed

idf.py build
idf.py -p /dev/{DEVICE_PORT} flash
Nearby in the ranking
Similar items