karpathy/minGPT
A minimal PyTorch re-implementation of the OpenAI GPT (Generative Pretrained Transformer) training observed · 2026-10-19
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2255
- days_rel: n/a
- days_push: 797
- n_releases_24m: 0
Adoption not part of the score
24956 stars · 3332 forks observed · 2026-10-19
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A minimal, clean PyTorch re-implementation of OpenAI's GPT covering both training and inference in roughly 300 lines of code. It is designed primarily for education and interpretability, and is now semi-archived in favor of the author's nanoGPT rewrite.
Use cases
- learn how the GPT transformer model works internally
- train a small GPT model from scratch in PyTorch
- implement a character-level language model on a text file
- load a pretrained GPT-2 and generate text from a prompt
- study a readable reference implementation of a transformer
- train GPT on toy tasks like integer addition
When to choose
- you want a small, readable codebase to understand GPT architecture
- you need a hackable starting point for transformer experiments
- you are teaching or learning about language model training
When to avoid
- you need state-of-the-art performance or recent features - use nanoGPT instead
- you want to fine-tune large production-grade models
- you need active maintenance and community support
Facets
library · maturity maintenance
llm-training deep-learning machine-learning large-language-models deep-learning education machine-learning python gpt transformer pytorch educational language-model minimal-implementation gpu
1 source
- readme: https://github.com/karpathy/minGPT · fetched 2026-10-19 · ad81f8f2df88
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| karpathy/minGPT | main | 32 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem