This tool provides a comprehensive, visually-driven walkthrough of how large language models (LLMs) like ChatGPT are built, from raw internet text to a conversational assistant. Based on Andrej Karpathy's technical deep dive, it explains the entire pipeline using representative figures from frontier models circa 2024, emphasizing that scale is the point rather than precision.
The journey begins with data collection: organizations like Common Crawl have indexed billions of web pages since 2007. This raw data is filtered into high-quality datasets like FineWeb, aiming for large quantity, high quality, and diverse documents. After aggressive filtering, you end up with about 44 terabytes of text—roughly 10 consumer hard drives—representing ~15 trillion tokens.
Neural networks cannot process raw text, so tokenization converts text into numbers. The tool explains Byte Pair Encoding (BPE), which breaks text into sub-word chunks called tokens. GPT-4 uses a vocabulary of 100,277 tokens. BPE starts with individual bytes (256 symbols) and iteratively merges the most frequent adjacent pairs, compressing sequence length while expanding vocabulary.
The Transformer neural network is initialized with random parameters—billions of knobs. Training adjusts these knobs to improve next-token prediction. Each training step samples a window of tokens, feeds it to the network, compares the prediction to the actual next token, and nudges parameters slightly in the right direction. This repeats billions of times, with the loss—a single number measuring prediction error—falling steadily as the model learns statistical patterns of human language.
Once trained, the network generates text autoregressively: given a sequence of tokens, it produces a probability distribution over all 100K possible next tokens, samples one, appends it, and repeats. This process is stochastic, meaning the same prompt can yield different outputs. The tool allows clicking on any stage to read more detail, making it ideal for students, developers, and AI enthusiasts seeking a clear, intuitive understanding of LLM architecture and training.
AI researchers, machine learning engineers, data scientists, students, technical educators, software developers
CanIRun.ai is a free, browser-based tool that instantly analyzes your computer's hardware to determi...
Free
Teammately is an AI agent specifically designed for AI engineers, streamlining the development, depl...
Freemium
Featherless is a serverless LLM hosting platform that enables effortless deployment of any open AI m...
Free trial