Back to directory

esp32-tinyLLM

A Rust inference engine that runs a 28.9-million-parameter language model on an ESP32-S3 microcontroller, ported from a C reference implementation and benchmarked to run faster than it.

esp32-tinyLLM

esp32-tinyLLM runs a small language model on an ESP32-S3, a microcontroller with 512 KB of SRAM. The model fits because most of its parameters live in a flash-mapped per-layer embedding table and the rest are 4-bit quantized; it can write short children's stories but cannot answer questions or follow instructions.

The Rust implementation is benchmarked stage by stage against the C reference it was ported from, and is reported as faster at every stage, generating around 10.5 tokens per second versus 8.2 for the C version, with a further increase available through an experimental memory-bus clock flag. Both firmwares are checked for byte-identical output: every emitted token is folded into a digest that a Rust test on the host recomputes, so a change in behavior is caught even if it makes the model faster.

The project includes benchmark data files and a plotting script so its performance tables are regenerated from measurements rather than typed by hand, along with a suite of tests comparing golden logits against PyTorch and CLI output against the compiled C binary. It is licensed under Apache-2.0.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.