esp32-ai
A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.
A research repository that reproduces the Lat-Defuse sparse-autoencoder intervention method on Gemma-3-12B and mechanistically evaluates how it corrects RAG errors caused by misleading retrieved documents.
3
No data
0
16
MIT
2026-07-30
It provides a faithful, code-independent adaptation of a peer-reviewed method, made auditable through a science contract, compatibility checks, and committed run reports.
Mechanistic evaluation of SAE-based activation interventions for correcting distractor-induced errors in RAG.
Retrieval-augmented generation (RAG) feeds a language model retrieved documents next to a question. When one of those documents is misleading (a distractor), the model often abandons the correct answer it would otherwise give. Lat-Defuse is a published method that repairs this failure by adjusting the model's internal sparse-autoencoder features until the correct answer wins again. This repository builds a faithful adaptation of that method for Gemma-3-12B and then studies what the repair actually does inside the model.
The reference implementation is the official code of the ACL 2026 Findings paper "The Mechanics of Interference: Defusing Distractors in RAG via Sparse Autoencoder Interventions" by Christian Giannetti and coauthors: at commit eff2cdfe664bc38d9de9ec3fb047b25d471826df (MIT). We do not copy its code; we reproduce its behavior. See docs/upstream-notes.md.
docs/ the science contract, upstream notes, dataset survey
configs/ experiment configuration files
scripts/ runnable entry points
data/ datasets and curated examples, never committed
results/ experiment outputs, never committed
reports/ tracked run reports, one per real run
src/latdefuse/ the package
data/ example schema, prompts, curated-example loader
model/ model loading, activation capture, activation replacement
sae/ SAE loading and compatibility checks
steering/ the Lat-Defuse optimizer and stopping rules
tests/ unit tests, runnable without a GPU
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest -q
src/latdefuse/. It defines the numbers and rules the sciMechanistic evaluation of SAE-based activation interventions for correcting distractor-induced errors in RAG.
Similar projects matched by category, topics, and programming language.
A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.
Deltafin is a research project that runs the 2.8-trillion-parameter Mixture-of-Experts model Kimi K3 on a single Apple Silicon Mac (e.g., M1 Max with 64 GB) at about 16 seconds per token, using exact, reproducible inference with local or streaming expert loading.

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.