ZigFormer – An LLM implemented in pure Zig
Hi everyone, I've made an early version of ZigFormer, a small LLM implemented in Zig with no dependencies on external ML frameworks like PyTorch or JAX. ZigFormer is modelled after a textbook LLM (like GPT-2 from OpenAI) and can be used as a Zig library as well as a standalone application to train a model and chat with it. This was mainly an educational project. I'm sharing it here in case others find it interesting or useful. Link to the project: https://github.com/CogitatorTech/zigformer
In plain words
ZigFormer is a small language model implemented entirely in Zig without external ML framework dependencies. Built as an educational project following textbook LLM architecture similar to GPT-2, it functions both as a standalone application for training and chatting and as a Zig library for developers. The implementation demonstrates how to build core LLM functionality from scratch using only the Zig programming language.
written from the facts on this page · September 2026
Does the same job
all alternatives →- IBI built a tiny LLM to demystify how language models workApr 2026 · github.com · ▲915
Built a ~9M param LLM from scratch to understand how they actually work. Vanilla transformer, 60K synthetic conversations, ~130 lines of PyTorch. Trains in 5 min on a free Colab T4. The fish thinks the meaning of life is food. Fork it and swap the personality for your own character.

- ZΜZ80-μLM, a 'Conversational AI' That Fits in 40KBDec 2025 · github.com · ▲514
How small can a language model be while still doing something useful? I wanted to find out, and had some spare time over the holidays. Z80-μLM is a character-level language model with 2-bit quantized weights ({-2,-1,0,+1}) that runs on a Z80 with 64KB RAM. The entire thing: inference, weights, chat UI, it all fits in a 40KB .COM file that you can run in a CP/M emulator and hopefully even real hardware! It won't write your emails, but it can be trained to play a stripped down version of 20 Questions, and is sometimes able to maintain the illusion of having simple but terse conversations…
- TVTiny-vLLM – high performance LLM inference engine in C++ and CUDAMay 2026 · github.com · ▲205


More ai this month
the category →
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com
Astute▲585Automate your B2B brand going viral, with new media creators
AI · 18d ago · company-app.joinastute.com


Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…
AI · 27d ago · cactuscompute.com


Launched alongside, November 2025
the whole month →
- IB
Life & fun · Nov 2025 · bitsnpieces.dev



- BBoing▲782
Life & fun · Nov 2025 · boing.greg.technology