# jaymody/picoGPT

An unnecessarily tiny implementation of GPT-2 in NumPy.

Repository: https://github.com/jaymody/picoGPT
Canonical: https://ross.abutalabs.com/products/picogpt
Language: Python
License: MIT
License Family: permissive
Topics: deep-learning, gpt, gpt-2, large-language-models, machine-learning, neural-network, python, nlp
Last push: 2023-04-24T20:05:53+00:00

## Health v2 (maintenance only)
Score: 31/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 94
- inputs: {"age_days": 1320, "days_push": 1227, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3473, forks 455 (observed 2026-08-28T04:08:06.055946+00:00)

## What it is
A tiny, minimal implementation of GPT-2 inference in plain NumPy, with the forward pass in ~40 lines of code. It is an educational companion to a blog post explaining GPT from scratch, with no training support.

## Use cases
- understand how GPT-2 works internally
- learn transformer forward pass from scratch
- run GPT-2 text generation without PyTorch or TensorFlow
- teach a deep learning class about language models
- read a minimal GPT implementation in NumPy

## When to choose
- you want to learn how GPT-2 inference works line by line
- you need a dependency-light NumPy-only GPT-2 forward pass
- you want readable code to accompany a from-scratch tutorial

## When to avoid
- you need training or fine-tuning of GPT models
- you need fast, batched, or production inference
- you need sampling controls like top-k, top-p, or temperature

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: llm-inference, machine-learning, nlp
- domain: large-language-models, deep-learning, education
- platform: python, cross-platform
- tags: gpt-2, numpy, minimal-implementation, educational, transformer, inference-only, natural-language-processing

## Member repositories
- jaymody/picoGPT (main) score 31

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:06.055946+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:36:34.078205+00:00, confidence not recorded.
  - readme: https://github.com/jaymody/picoGPT (fetched 2026-08-28T04:08:06.055946+00:00, sha 943493f86c57)
- Data as of 2026-08-30T08:39:29.467469+00:00.
