
GPT in 60 Lines of NumPy
Date : 2023-01-30
Introduction
In this post, Jay Mody implements a Generative Pre-trained Transformer from scratch in just 60 lines of numpy. He then loads the trained GPT-2 model weights released by OpenAI into the implementation and generates some text.
This post assumes familiarity with Python, NumPy, and some basic experience training neural networks. This implementation is missing tons of features on purpose to keep it as simple as possible while remaining complete. The goal is to provide a simple yet complete technical introduction to the GPT as an educational tool.
Read blog post here
Recently on :
Artificial Intelligence
Information Processing | Computing
PITTI - 2026-03-05
Scaling Trust : a Missing Piece in Multi-Agent Worlds
Humanity’s ability to build complex civilizations relies on an "invisible infrastructure" - the shared culture, institutions, a...
PITTI - 2026-01-14
Cultural, Ideological and Political Bias in LLMs
Transcription of a talk given during the work sessions organized by Technoréalisme on December 9, 2025, in Paris. The talk pres...
WEB - 2025-11-13
Measuring political bias in Claude
Anthropic gives insights into their evaluation methods to measure political bias in models.
WEB - 2025-10-09
Defining and evaluating political bias in LLMs
OpenAI created a political bias evaluation that mirrors real-world usage to stress-test their models’ ability to remain objecti...
WEB - 2025-07-23
Preventing Woke AI In Federal Government
Citing concerns that ideological agendas like Diversity, Equity, and Inclusion (DEI) are compromising accuracy, this executive ...