ZigFormer
An LLM implemented in pure Zig
Details
- External ID
- 46070676
- Source
- HN
- Company
- —
- Product
- —
- Website domain
- —
- Launched
- Nov. 27, 2025
- Cohort
- —
- Upvotes
- 22
- Upvotes percentile
- 0.712882096069869
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Description
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
Enrichment
- Theme
- ML inference and model optimization
- Vertical
- Horizontal
- Function
- Model & infra
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- llm implementation in zig
- Manually corrected
- False
Could you build this?
Partial Implementing a basic transformer forward/backward pass from scratch in Zig is vibe-codeable with AI assistance, but training and getting competitive performance without external ML frameworks requires deep systems and ML systems engineering.
What it would actually take: A functional LLM engine in pure Zig requires custom tensor data structures, BLAS-level matrix multiplication routines (SIMD intrinsics, memory tiling), manual backpropagation, and custom BPE tokenizers. Training requires numerical stability techniques, gradient accumulation, and custom memory management to avoid overhead. A production version demands expertise in low-level systems programming, hardware-level CPU/GPU optimization, and deep learning mathematical foundations.
Discussion
4 comments analyzed.
Competitors mentioned: GGML, OpenBLAS
Concerns raised: Limited practical usefulness beyond education, Cannot run production models like Qwen3, Avoids external linear algebra libraries makes it less extensible
Feature requests: Support for running established LLM models, Integration with mature linalg/tensor library for Zig, Build on top of GGML for better extensibility
Competitors
Other products that read as similar to this one — 63 launches clear the similarity bar, closest 8 shown.
Attention rank: #20 of 64 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 17 days after the earliest competitor.
- LLM-Gateway · hn · 2026-03-27 · 7 upvotes · similarity 0.41
- hk · github · 2026-09-13 · 17 upvotes · similarity 0.41
- Zig parser in ~70 lines of JavaScript · hn · 2026-01-17 · 10 upvotes · similarity 0.40
- Excel Custom Functions in Zig · hn · 2025-11-19 · 5 upvotes · similarity 0.40
- I built a tiny LLM to demystify how language models work · hn · 2026-04-06 · 915 upvotes · similarity 0.39
- LocalLLM · hn · 2026-04-23 · 16 upvotes · similarity 0.38
- GLM-5.3 · ph · 2026-08-15 · 253 upvotes · similarity 0.38
- Docker Model Runner Integrates vLLM for High-Throughput Inference · hn · 2025-11-20 · 7 upvotes · similarity 0.37
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a model & infra tool for Fintech yet.