zaki-chan
GPT Language Model From Scratch
Tiny GPT-style transformer written from scratch in NumPy, with no deep learning framework, to understand how language models work from the inside.
- ›Embeddings, causal multi-head attention, layer norm, and feed-forward blocks written by hand
- ›Hand-written backpropagation for every layer, verified against numeric gradients
- ›NumPy/CuPy backend so the same code trains on CPU or an NVIDIA GPU (Colab T4)
- ›Character-level models trained on Shakespeare (loss 4.4 → 1.56) and Moroccan Darija
