SLM on ESP32-S3: Training a Small Language Model on an $8 Microcontroller 2026

SLM on ESP32-S3: Training a Small Language Model on an $8 Microcontroller 2026

Introduction — Why Run a Language Model on an $8 Microcontroller? The idea of running a language model on a microcontroller that costs less than a cup of coffee sounds improbable, but the ESP32-S3 makes it a reality. With dual-core Xtensa LX7 processors running at up to 240 MHz, 512 KB of internal SRAM, and support for up to 8 MB of external octal SPI PSRAM, this $6–8 chip can execute small language models (SLMs) entirely offline — no cloud, no WiFi dependency, no API keys required. ...

August 6, 2026 · 14 min · baeseokjae
Gemma 4 On-Device Deployment Guide

Gemma 4 On-Device Deployment Guide: Run Google's Open Model Locally

Gemma 4 is Google’s family of open-weights models released April 2, 2026 under Apache 2.0 — four sizes from a 2B mobile-ready model to a 31B dense powerhouse, all runnable locally without sending a single byte to Google’s servers. This guide covers every deployment path: Ollama, LM Studio, Hugging Face Transformers, llama.cpp, Android, and iOS. What Is Gemma 4 and Why Run It On-Device? Gemma 4 is Google DeepMind’s fourth-generation open-weights language model family, released on April 2, 2026 under the Apache 2.0 license with no commercial restrictions. The family spans four sizes — E2B (~2.3B effective parameters), E4B (~4.5B), 26B MoE (only 3.8B active per token), and 31B Dense — each capable of running entirely on consumer hardware. At the top end, the 31B model scores 85.2% on MMLU Pro and 81.8% on HumanEval; the 26B MoE model sits at Arena AI ELO rank #3 globally at 1452 — all while being something you can run on a gaming laptop. Running Gemma 4 on-device eliminates API costs entirely, replacing per-token billing with a one-time GPU investment. More importantly, inference stays local: code, documents, customer data, and proprietary context never leave your machine. For enterprises bound by HIPAA, SOC 2, or internal data governance rules, that’s not optional — it’s the whole point. Apache 2.0 also means you can fine-tune on proprietary data and redistribute the result commercially, without any restrictions that come with Meta’s Llama license or Mistral’s community terms. ...

May 11, 2026 · 17 min · baeseokjae