pirmber / transformer-from-first-principles
git clone https://github.com/pirmber/transformer-from-first-principles.git
A GPT-style Transformer built entirely from scratch with NumPy, featuring manual forward/backward propagation through attention, LayerNorm, softmax, residuals, GELU, and cross-entropy. Includes Adam, gradient checking, visualization, and autoregressive text generation—without autograd or deep-learning frameworks.
+0
stars, 24h · #69,214
+~0
stars, 7 days · #68,076
+~0
stars, 30 days · #67,292
25
★ total
0
forks · 0 open issues
Star history (as recorded here)
LanguagePython
License—
Created2026-09-17 (1mo ago)
Last push1mo ago
OwnerUser
Links
- GitHub: github.com/pirmber/transformer-from-first-principles
- Releases · Issues · Hacker News mentions
README
Loading README…