Skip to main content
For the best experience, view on desktop
Topics
← Back to home

[1hr Talk] Intro to Large Language Models


A large language model consists of two files: parameters and code; Llama 2 70B has 70 billion parameters stored in a file.

Andrej Karpathy, known for his work at Tesla and OpenAI, delivered an hour-long talk aimed at making large language models (LLMs) accessible to a general audience. Instead of diving into commercial black‑box systems, he chose Meta’s open‑weight Llama 2 70B to boil down the technology to its absolute essentials. His opening argument was as simple as it was bold: an LLM is really just two files—one containing the parameters, the other containing the run code. By dissecting a real, widely available model, he stripped away the mystique surrounding AI chatbots.

His timing matters. In an era dominated by closed models like ChatGPT, where interaction happens through APIs or web interfaces, most users never see the internals. Karpathy deliberately picked Llama 2 precisely because its 70 billion weights, architecture, and training recipe are fully public. His goal was to show that there is no magic; the system is a transparent bundle of numbers and computation that anyone can inspect, download, and even run on their own hardware.

The core of his argument rests on two concrete artifacts. The parameters file for Llama 2 70B weighs in at 140 GB—each of the 70 billion parameters is stored as a 2‑byte float16. These numbers constitute the model’s entire knowledge base, extracted from trillions of words of text through an extremely expensive training process. They encode grammar, facts, reasoning patterns, and stylistic nuance in a vast neural network. The run file, astonishingly, is only about 500 lines of C code with zero external dependencies. No Python interpreter, no deep‑learning framework, no internet connection needed. The code does one thing: it reads your input, converts it into vectors, pushes them through layers of matrix multiplications and non‑linearities, and produces a probability distribution over the next possible token. By sampling from that distribution and feeding the new token back in, the model generates coherent text, phrase by phrase. Plug both files into a computer with enough RAM to hold 140 GB, compile the C code, and you have a fully offline conversational AI that runs locally. This self‑contained simplicity is what makes his demonstration so powerful.

However, such a minimal portrayal invites several valid criticisms. First, while inference is cheap, training is anything but. Producing that 140 GB file required thousands of GPUs running for weeks, processing petabytes of curated data, at a cost only a few tech giants can afford. The open weights are the end product; the production line remains firmly out of reach. Second, the hardware barrier is real: a typical consumer laptop cannot hold 140 GB in memory; you need a high‑end workstation or a specialized GPU, or you must resort to techniques like quantization that degrade quality. Third, open‑weight models may lack the rigorous safety alignment that proprietary systems achieve through expensive processes like reinforcement learning from human feedback (RLHF). A publicly available Llama 2 checkpoint can be fine‑tuned to produce harmful content—misinformation, harassment, or worse—with little oversight. Fourth, the “two files” abstraction glosses over the messy realities of practical use: prompt engineering, hallucination suppression, bias mitigation, and output controllability remain active areas of engineering research that go far beyond the raw model files.

Karpathy’s talk succeeds as a philosophical reduction: it demystifies AI and champions a democratized vision where core technology leaves the data center and enters the hands of curious individuals. Yet, by exposing the bare‑bones core, it also highlights the enduring challenge. The real work lies not in parsing the 500 lines of C, but in shaping those 140 billion numbers to produce outputs that are truthful, safe, and aligned with human intent. That is the frontier the industry will be wrestling with for years to come.

More from Andrej Karpathy