<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged boards</title>
<link>https://coderlegion.com/tag/boards</link>
<description>Powered by Question2Answer</description>
<item>
<title>Running a 56M-Parameter LLM on Just Three ESP32 Boards</title>
<link>https://coderlegion.com/24088/running-a-56m-parameter-llm-on-just-three-esp32-boards</link>
<description>
&lt;p&gt;When I was a kid, I loved the movie &lt;em&gt;WALL&amp;middot;E&lt;/em&gt;. I often wondered if something like that would be possible in the future.&lt;/p&gt;

&lt;p&gt;As I grew up, I learned how robots work and how much it costs to build one. I realized that building intelligent machines isn't just about software&amp;mdash;it's also about overcoming hardware limitations.&lt;/p&gt;

&lt;p&gt;Projects like this remind me that we're slowly bringing intelligence to even the smallest devices.&lt;/p&gt;

&lt;p&gt;When people talk about running AI locally, they usually mean a laptop with a decent GPU, a Raspberry Pi, or an NVIDIA Jetson.&lt;/p&gt;

&lt;p&gt;Microcontrollers rarely enter this type of conversation.&lt;/p&gt;

&lt;p&gt;After all, an ESP32-S3 only has a few megabytes of memory. Running a language model on it sounds impossible.&lt;/p&gt;

&lt;p&gt;I saw a post about running an LLM on an ESP32 by &lt;a href=&quot;https://x.com/slvDev&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;slvDev&lt;/a&gt;, and I was fascinated by it.&lt;/p&gt;

&lt;p&gt;Then I came across another project by &lt;a href=&quot;https://github.com/wladimiravila&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Wladimir Avila&lt;/a&gt;, which took the idea even further.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;How can we fit a bigger model on one ESP32?&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&quot;What if multiple ESP32 boards worked together like a tiny AI cluster?&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's exactly what &lt;strong&gt;esp32s3-distributed-ai&lt;/strong&gt; does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Modern language models are huge.&lt;/p&gt;

&lt;p&gt;Even &quot;small&quot; language models often require tens or hundreds of megabytes of memory, which is far beyond what an ESP32-S3 can provide.&lt;/p&gt;

&lt;p&gt;Buying more powerful hardware is the obvious solution.&lt;/p&gt;

&lt;p&gt;But this project explores another idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Split the model across multiple microcontrollers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rather than forcing one board to hold the entire model, each board becomes responsible for a different part of the inference pipeline. The boards then communicate wirelessly to generate text together.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hardware
&lt;/h2&gt;

&lt;p&gt;The setup is surprisingly simple.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 &amp;times; ESP32-S3 N16R8 boards&lt;/li&gt;
&lt;li&gt;ESP-NOW for communication&lt;/li&gt;
&lt;li&gt;One board hosts a Wi-Fi access point&lt;/li&gt;
&lt;li&gt;A browser-based interface to interact with the model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No cloud.&lt;/p&gt;

&lt;p&gt;No router.&lt;/p&gt;

&lt;p&gt;No internet connection after flashing the firmware.&lt;/p&gt;

&lt;p&gt;Everything runs locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Model Is Split
&lt;/h2&gt;

&lt;p&gt;Instead of storing the entire transformer on one board, the project partitions it.&lt;br&gt;
&lt;/p&gt;

&lt;div class=&quot;highlight js-code-highlight&quot;&gt;
&lt;pre class=&quot;highlight plaintext&quot;&gt;&lt;code&gt;             Prompt

                &amp;#9474;

         Board C (Web UI)

                &amp;#9474;

         Board A (Embeddings)

                &amp;#9474;

      Board B (Transformer)

                &amp;#9474;

      Board A (Output Head)

                &amp;#9474;

         Board C (Browser)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each board has a specific responsibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Board A&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Embeddings&lt;/li&gt;
&lt;li&gt;Output head&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Board B&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transformer layers&lt;/li&gt;
&lt;li&gt;KV cache stored in PSRAM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Board C&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remaining embedding table&lt;/li&gt;
&lt;li&gt;Wi-Fi access point&lt;/li&gt;
&lt;li&gt;Web interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The boards exchange intermediate activations over ESP-NOW until the next token is generated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ESP-NOW?
&lt;/h2&gt;

&lt;p&gt;One of the most interesting design decisions is the communication layer.&lt;/p&gt;

&lt;p&gt;Instead of using MQTT, TCP sockets, or a router, the project relies on &lt;strong&gt;ESP-NOW&lt;/strong&gt;, Espressif's lightweight peer-to-peer wireless protocol.&lt;/p&gt;

&lt;p&gt;Advantages include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No external infrastructure&lt;/li&gt;
&lt;li&gt;Low communication overhead&lt;/li&gt;
&lt;li&gt;Direct board-to-board messaging&lt;/li&gt;
&lt;li&gt;Fully offline operation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;According to the author, the boards communicate through a custom protocol built on top of ESP-NOW, with Board C simultaneously hosting the browser interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 56 Million Parameter Model
&lt;/h2&gt;

&lt;p&gt;The project runs a language model with approximately &lt;strong&gt;56 million parameters&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To make this possible, it uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;4-bit and 8-bit quantization&lt;/li&gt;
&lt;li&gt;Split Per-Layer Embeddings (Split-PLE)&lt;/li&gt;
&lt;li&gt;Flash memory for large embedding tables&lt;/li&gt;
&lt;li&gt;PSRAM for the KV cache&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These optimizations allow a model that would never fit on a single board to execute across three inexpensive microcontrollers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspired by Previous Work
&lt;/h2&gt;

&lt;p&gt;This project builds upon another impressive experiment by &lt;a href=&quot;https://x.com/slvDev&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;slvDev&lt;/a&gt;, who demonstrated that a &lt;strong&gt;28.9 million-parameter&lt;/strong&gt; language model could run on a single ESP32-S3.&lt;/p&gt;

&lt;p&gt;That work introduced the use of &lt;strong&gt;Per-Layer Embeddings (PLE)&lt;/strong&gt;, inspired by Google's Gemma architecture, to dramatically reduce SRAM requirements by storing most embedding parameters in flash memory.&lt;/p&gt;

&lt;p&gt;The distributed version extends that idea even further by partitioning the model across multiple devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current Limitations
&lt;/h2&gt;

&lt;p&gt;The project is still experimental.&lt;/p&gt;

&lt;p&gt;Some of the current limitations mentioned by the author include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brute-force tokenizer implementation&lt;/li&gt;
&lt;li&gt;Quality loss from aggressive 4-bit quantization&lt;/li&gt;
&lt;li&gt;Generating relatively short responses (around 30 words)&lt;/li&gt;
&lt;li&gt;Focusing on demonstrating distributed inference rather than competing with larger LLMs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;The most exciting part isn't that three ESP32 boards can generate text.&lt;/p&gt;

&lt;p&gt;It's the engineering mindset behind it.&lt;/p&gt;

&lt;p&gt;Instead of scaling &lt;strong&gt;up&lt;/strong&gt;, this project scales &lt;strong&gt;out&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Rather than purchasing more powerful hardware, it distributes computation across multiple low-cost devices.&lt;/p&gt;

&lt;p&gt;That idea could inspire future work in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offline robotics&lt;/li&gt;
&lt;li&gt;Smart factories&lt;/li&gt;
&lt;li&gt;Distributed IoT intelligence&lt;/li&gt;
&lt;li&gt;Edge AI&lt;/li&gt;
&lt;li&gt;TinyML research&lt;/li&gt;
&lt;li&gt;Sensor networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As embedded AI becomes more common, approaches like this could make sophisticated models accessible on hardware that costs only a few dollars.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This isn't about replacing ChatGPT.&lt;/p&gt;

&lt;p&gt;It's about pushing the boundaries of what's possible on resource-constrained hardware.&lt;/p&gt;

&lt;p&gt;Seeing three inexpensive ESP32 boards collaborate to run a 56M-parameter language model is a reminder that innovation often comes from clever system design&amp;mdash;not just bigger GPUs.&lt;/p&gt;

&lt;p&gt;Projects like this show that the future of AI won't exist only in massive data centers. It may also live on tiny devices working together at the edge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/wladimiravila/esp32s3-distributed-ai&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://github.com/wladimiravila/esp32s3-distributed-ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;p&gt;I'm Ganesh, and I'm building MakeSense, an AI tool that turns public GitHub pull requests into concise summaries, prioritized insights, and interactive quizzes. It's free, unlimited, and source-available. If you review open-source code, I'd love for you to give it a try and share your feedback.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MakeSense:&lt;/strong&gt; &lt;a href=&quot;https://makesensegithub.com/&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://makesensegithub.com/&lt;/a&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/24088/running-a-56m-parameter-llm-on-just-three-esp32-boards</guid>
<pubDate>Mon, 10 Aug 2026 08:44:29 +0000</pubDate>
</item>
</channel>
</rss>