← all repositories

jaymody/picoGPT

A minimal NumPy implementation of GPT-2 demonstrating how transformer-based language models work.

3.5k stars Python Language ModelsLearning
picoGPT
Velocity · 7d
+2.8
★ / day
Trend
steady
star history

picoGPT implements GPT-2 entirely in NumPy with a focus on minimal, readable code. It includes a BPE tokenizer from OpenAI, code to download and load GPT-2 model weights, the transformer forward pass logic, and text generation. The project serves as an educational tool to understand how GPT models function by implementing the core architecture in under 60 lines of code, accompanied by a detailed blog post.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.