An engineer rebuilt a transformer engine in C and learned the hard part is everything around it
RelevantShape3963 · reddit · 2026-07-22
A firmware engineer rebuilt a transformer engine in C from scratch
A firmware engineer spent 18 months of lunch breaks writing a transformer engine in C from scratch, ending up with about 15,000 lines of code that can run Gemma, Llama, GPT-2 and PaliGemma.
The biggest lesson was that the engine is only half the work. The other half is everything around it: tokenizer integration, chat templates, KV cache management and the rest of the plumbing that makes a model usable.
He also found that watching a model generate one token every few seconds makes its behavior much easier to understand. The project turned into a book-length field diary about the engine, the research rabbit holes and life with two toddlers.
He released the engine for free on GitHub and also published a free chapter plus a paid ebook.
More from coding & agent
- New agent-training livestream will teach GRPO with verifiers, reward hacking, and code-alongs — ben_burtenshaw · 2026-07-22
- OpenAI’s Codex beats Claude Code on interface and overall experience, user says — jxnlco · 2026-07-22
- User says t3code is the best browser automation tool they’ve used — tylerbruno05 · 2026-07-22
- Tldraw schedules its first hack night at a new office near Old Street — max__drake · 2026-07-22
- Open-source multAIplayer Alpha makes Codex a shared team coding workspace — jxnlco · 2026-07-22
- Full course on graph engineering shows how to build safer, faster AI agent workflows — EXM7777 · 2026-07-22