Published on GitHub July 23, 2026, ESP32-AI is an open-source experiment that runs a language model with 28.9 million stored parameters on an ESP32-S3 N16R8 microcontroller. The developer reports that the roughly $8 board generates about 9.5 tokens per second, entirely on the device. Its output is simple fiction learned from TinyStories, not answers, instructions, code, or tool use.
The project is useful because it makes a frequently blurred distinction visible: a device can store far more parameters than it can use as dense computation on every token. For product and technical leaders evaluating small on-device models, the important questions are where the weights live, how often the runtime reads them, what the small active core can do, and whether the exact demonstrated artifact is available. Following those questions turns the parameter headline into a bounded engineering result.
The chip forces the model across three kinds of memory
The ESP32-S3 in this project has 512KB of internal SRAM, 8MB of external PSRAM, and 16MB of flash. SRAM is the smallest and fastest tier. PSRAM supplies more working space at lower bandwidth, while flash provides the largest capacity and can retain the model when power is off. A model design that expects all weights to sit in fast memory cannot fit here.
The reported shipping artifact is 14,912,332 bytes after 4-bit quantization, which stores each large weight in a compact representation. It fits inside a 15,597,568-byte custom model partition, leaving less than 700KB in that partition. Fitting the file is only the first constraint, however. The runtime must also place working data where the processor can reach it quickly enough during generation.
ESP32-AI divides its 28.9 million stored parameters into three materially different groups. A 559,000-parameter dense core performs the repeated transformer computation. A 3.1-million-parameter output head converts the core’s internal state into scores for the next token. The remaining 25 million parameters form a lookup table used by Per-Layer Embeddings, or PLE.
Those groups do not occupy the same tier or create the same work. The output head is unpacked and staged in PSRAM at boot, while scratch space and the key-value cache used to retain prior-token attention state also live in PSRAM. The PLE table stays memory-mapped in flash. The dense core was sized against the SRAM constraint, although the project’s polished firmware leaves those core weights mapped in flash after on-board measurements found that arrangement fast enough.
This placement explains the headline: 28.9 million stored parameters. The microcontroller does not perform dense computation across all those weights per token, so the total cannot support a capability comparison with a conventional model.
Per-Layer Embeddings make the largest weight group sparse at runtime
Google documented PLE in its June 26, 2025, Gemma 3n developer guide as a way to improve model quality without putting every parameter in constrained accelerator memory. Gemma 3n can load and compute its per-layer embeddings on the CPU while keeping only the core transformer weights in GPU or TPU memory. The ESP32 project adapts the same placement idea to a much smaller hierarchy of SRAM, PSRAM, and flash.
An embedding is a learned numeric representation associated with a token. In this design, token-specific values from the large table are introduced across the model’s layers instead of requiring a larger dense core. The table can therefore hold many parameters in flash while the runtime retrieves only the rows needed for the current token.

ESP32-AI reports roughly six table-row reads per generated token, totaling about 450 bytes. In the project’s isolated bandwidth test, those reads accounted for about 0.7% of per-token memory time. That figure applies only to the flash table’s synthetic bandwidth share; it is not the total overhead of PLE or the complete inference runtime. The output head’s PSRAM traffic and the processor’s arithmetic remain much larger costs in the reported timing breakdown.
On one ESP32-S3 N16R8 and the documented configuration, the developer reports 9.72 tokens per second for model computation and about 9.5 tokens per second end to end, including serial output. These measurements show that this placement worked on the tested board. They are project-reported results, not independently reproduced benchmarks for ESP32 devices in general.
The small dense core and training domain still set the capability ceiling
The lookup table gives the model more stored token representations without making the dense core proportionally larger. That difference matters when interpreting the output. The core still has about 559,000 parameters, and the model was trained on TinyStories, a dataset of short synthetic stories designed for small language models.
The demonstrated model extends the opening “Once upon a time” with simple, mostly coherent fiction. The project documentation is explicit about the limits: it does not answer questions, follow instructions, write code, perform multi-step reasoning, or carry useful world knowledge. A larger flash-resident table can improve predictions inside the trained domain, but it does not add those missing behaviors.
ESP32-AI therefore belongs in a different product category from a lightweight agent framework such as PicoClaw. An agent framework coordinates models, tools, and external actions on a small computer. ESP32-AI is a narrow language-model and memory-placement experiment on a microcontroller; it has no documented tool use, connector layer, or agent behavior.
For any device model, interpret parameter count alongside the architecture, work performed per input, training data, and evaluation task. Treat “stored parameters” as a capacity and packaging fact, then judge capability from active computation and task results.
The reported experiments support a narrow architectural claim
The project’s RESULTS.md compares PLE with a baseline whose dense core is about the same size. Across two reported training seeds, the baseline reached a perplexity of 12.58 and the PLE model reached 11.41. Perplexity measures how uncertain a language model is about the next token, so lower is better within the same dataset and evaluation setup. The project also reports that the improvement survived its 4-bit quantization checks across two seeds.
Ablations, which remove or change one part of an experiment to test what caused the result, add useful detail. In the project’s tests, the per-layer machinery without the large table did not beat the baseline, while the full PLE design did. A wider bottom embedding with the same total stored parameter count also trailed the per-layer version. Those comparisons support the project’s claim that the flash-resident table and its per-layer use improved TinyStories prediction under the chosen core budget.
The evidence remains narrow. These are project-reported experiments over two seeds on one training setup and hardware configuration. They have not been independently reproduced and do not establish broad language capability, production reliability, or an advantage for unrelated tasks. Because the repository publishes the training, ablation, quantization, firmware, and measurement methods, readers can inspect the basis of the claim instead of relying on a parameter total or one generated sample.
The code is public, but the exact demonstrated model is not yet flashable from the repository
As of July 27, 2026, the repository’s current main branch has 31 commits and no GitHub releases. It includes firmware, wiring and flashing instructions, training code, ablations, quantization code, and detailed reported results. It does not include the trained model.bin used for the demonstration or another downloadable release of those exact weights.
That missing artifact changes what an outside reader can reproduce. The firmware guide explains how to export a model, verify the portable C runtime, compile the ESP32 firmware, and write model.bin into the custom flash partition. Without the demonstrated weights or a matching trained checkpoint, a reader cannot take the current repository, flash the reported model artifact directly, and compare the same board against the published output and timing.
Open issue #5 asks the maintainer to publish the trained model.bin or exact training configuration. Open issue #7 also questions the absent model. Both are user-raised issues, not maintainer admissions, and neither supports an inference that the project is fraudulent.
The current evidence supports a precise boundary. The public source and measured write-up make the method inspectable and provide a path to retraining it. Exact-demo reproduction remains incomplete until the weights are published or an outside team completes and documents a matching training run. Source availability, experimental detail, and a ready-to-flash artifact are separate forms of evidence.
A deployable edge-AI task needs its own output and hardware proof
A product team can apply the architectural lesson without copying this model. Start with one deterministic offline job: fixed inputs, a bounded output, and a pass-or-fail acceptance condition. Specify acceptable output quality and latency before choosing the model, because those requirements determine whether a small dense core and narrow training domain are sufficient.
Next, account for the target device’s memory tiers separately. Record the model bytes that must be read on every inference step, the weights that can stay in slower storage and be fetched sparsely, the working memory required for scratch space and cache, and the bandwidth cost of any staged output layer. A total model size that fits flash can still fail when the runtime exhausts RAM or spends too long moving weights.
Obtain the exact deployable artifact, configuration, and firmware that the pilot will use. Then run them on the target board and reproduce the accepted output and latency under the intended operating conditions. Measure power on that board as a separate requirement; ESP32-AI’s published materials do not report power consumption, so its throughput numbers cannot fill that gap.
If the proposed job needs company knowledge, cloud models, tools, or several external systems, memory placement is only one part of the design. Our analysis of local-first assistant connectors covers the additional source, scope, and ownership decisions that appear when an on-device component reaches beyond itself. Keep those system questions separate from the narrower proof that a model fits and runs.
Call the result deployable only after the exact artifact reproduces output, latency, and power on the target hardware. ESP32-AI shows how careful placement can make a large stored parameter count possible on a microcontroller. It also shows why the job, active core, training domain, and available proof remain more useful product facts than the headline count.
For teams deciding whether an edge-AI proof of concept is ready for a product pilot, BaristaLabs can help define the target job, inspect the device and runtime constraints, and set the evidence required for a go-or-stop decision. Learn more about AI consulting and strategy or contact BaristaLabs.
Sources
- ESP32-AI project repository
- ESP32-AI reported results
- ESP32-S3 firmware, build, and flashing instructions
- Google: Introducing Gemma 3n — The developer guide
- ESP32-AI issue #5: Request to publish the trained model
- ESP32-AI issue #7: Question about the absent model artifact
- Tom’s Hardware: Secondary reporting on the ESP32-AI demonstration
Edge-AI product pilot
Prove one on-device AI job on the hardware that must run it
BaristaLabs can help define the output, latency, memory, power, and reproducibility evidence required before an edge-AI proof of concept becomes a product pilot.
Best fit for teams moving a narrow offline AI task from a development board into a product decision.
Turn this idea into a pilot
Which workflow should go first?
Use the readiness check to compare impact, effort, risk, owner, and next step before booking a call.
- 3-5 minutes
- Deterministic score
- No sensitive data
Practical AI Workflow Notes
Want more practical AI operations ideas?
Get short notes on applying AI inside real small-business workflows — from document handling and customer follow-up to internal reporting, compliance, and automation guardrails.
