SmolLM-135M inference in pure SQLite SQL: tokenizer, transformer, KV cache and all
cneuralnetwork · x · 2026-11-07
Highlights
- Full pipeline in SQL: Unicode pretokenizer → byte-level BPE → embedding → 30 transformer layers → final norm → 49,152 logits, all implemented as SQLite statements, views and triggers, including KV caching and greedy decoding with a streaming CLI.
- Zero host language: Official HuggingFaceTB/SmolLM-135M weights are loaded from safetensors directly into SQLite; no Python, JavaScript or extensions — the sqlite3 CLI is just the SQL runner.
- The cost is speed: 40 seconds per token, output capped at 1–8 tokens — an extreme engineering feat rather than a practical tool.
Ships with a dashboard UI for prompt input and live output; open-sourced on GitHub.
Related event: Developer Runs SmolLM-135M Entirely Inside SQLite Using Pure SQL(2 posts)→
More from Fun
- The AI agent to-do list meme: fix a bug, solve the Riemann hypothesis, cure cancer — fofrAI · 2026-11-07
- fofr shares weekend Argon hacking: model outputs frame-invariant spectroscopy derivations — fofrAI · 2026-11-07
- Hand-drawn AI timeline predicts open-source AI crosses closed-source capabilities around today — victormustar · 2026-11-07
- Indie dev shares AI-generated action RPG concept with top-down and first-person modes — Dimillian · 2026-11-07
- Yudkowsky jokes Dath ilan compensates for weak computers with self-referential LeanRustLisp — burny_tech · 2026-11-07
- Canva layoffs spark wave of cringe farewell posts on Australian LinkedIn, drawing mockery — gaganghotra_ · 2026-11-07