Topic guide · 15 recordings · 24 verbatim quotes

Andrej Karpathy on LLMs

Karpathy sees LLMs as probabilistic token predictors that compress a huge amount of human text into weights, become useful through careful prompting and tooling, and point toward a new way to build software.

In short
  • LLMs predict the next token, and that simple objective scales into broad capabilities.
  • They are not persistent minds; they restart from their weights and current context window each time.
  • Using them well means managing context carefully, choosing the right model, and giving tools when needed.
  • Prompting is becoming a real programming interface, which Karpathy frames as a new software paradigm.
  • Today’s LLMs are powerful but still incomplete foundations for reliable agents.
Watch: Karpathy on llmsThe key moments, back to back, in his own words
2 moments · 1 min
1 / 2
“…think of the tokens in the context window as a precious resource…”
Talk / online presentation, June 2023 · 17:37

LLMs are next-token predictors, not little people in a box

Karpathy explains LLMs from first principles as systems that generate text by predicting one token after another. The core model underneath GPT-style systems is the Transformer, which does the main computational work that turns context into the next-token probabilities.1

He pushes against anthropomorphic intuitions. An LLM is best understood as a learned mathematical object with weights and the code that runs them, not as a stable inner self with continuous awareness.

That framing matters for both trust and product design. If you think of the model as a probabilistic generator over token sequences, its strengths and failures become easier to reason about.6

Pretraining compresses internet text into usable knowledge

A central Karpathy idea is that pretraining acts like compression: vast amounts of text are distilled into parameters. After training, generation is the reverse-looking process, where the network can produce text that reflects patterns it absorbed from large corpora.7

He argues that next-token prediction is richer than it looks. To keep predicting well over long stretches of text, the model has to pick up facts, concepts, styles, and many regularities about the world embedded in language.

At the same time, this does not mean the model contains a clean symbolic database or perfect truth. Its knowledge is embedded in weights and activated through context, which is why answers can be fluent yet still wrong or outdated.

The context window is the model’s working memory

Karpathy repeatedly emphasizes that current LLMs operate through the token window in front of them. What the model can do right now depends heavily on which tokens are present, relevant, and recent in that context.1011

This leads to a very practical rule: treat context tokens as scarce. He advises against stuffing chats with irrelevant material, because excess context can make performance worse as well as more expensive.1112

He also recommends resetting conversations when the task changes, because the model does not carry over a stable internal session memory in the human sense. Each run starts from the weights plus the current prompt, so fresh chats often improve clarity and control.1314

Andrej Karpathy, Talk / online presentation, June 2023
“…think of the tokens in the context window as a precious resource…”
Talk / online presentation, June 2023 · full transcript →

Good LLM use is about orchestration, not just asking a question

Karpathy treats LLMs as tools that need to be used with judgment. For ordinary tasks, a chat interface may be enough, but harder tasks often require switching to stronger reasoning-oriented models or adding external tools.6

His practical advice is straightforward: use search for fresh information, use computation tools for math and code-adjacent checks, and avoid assuming the model’s built-in knowledge is complete. This is one of his clearest themes: capability comes from model plus context plus tools, not model alone.

This way of working scales from everyday prompting to more advanced systems. It is also the bridge to agents, where the challenge becomes maintaining useful context, invoking the right tools, and supervising longer chains of action.

Prompting turns LLMs into a new kind of software platform

Karpathy argues that LLMs are not just another API; they change what programming looks like. He frames modern computing as moving from hand-written code toward learned systems and now toward natural-language control over those systems.

That is why he says prompting functions like programming. In his view, prompts specify behavior for a new kind of computer, which makes English itself part of the programming interface.

The implication is practical, not just philosophical. Building with LLMs means managing prompts, context, evaluation, tools, and human oversight as first-class parts of the product, not afterthoughts.

LLMs are powerful foundations, but reliable agents still need more

Karpathy is bullish on where LLMs are headed, but he does not think today’s systems are finished products. He places agents on a longer timeline and argues that making them truly dependable will take sustained work rather than a single breakthrough.

Part of the gap is architectural and product-level. Current systems lack durable memory, continual learning, and enough robustness to behave like dependable coworkers across messy real tasks.14

Even so, he sees the direction clearly. LLMs are the best foundation yet for more autonomous systems, and the next phase is learning how to wrap them in memory, tools, interfaces, and supervision so they can act usefully over longer horizons.

Karpathy on llms, in his own words

“…think of the tokens in the context window as a precious resource…”
Talk / online presentation, June 2023
“A lot of the issues that may look like just issues with the neural network architecture or the large language model itself are actually issues with the tokenization…”
Talk / tutorial presentation, 2019

Where to watch

  1. Andrej Karpathy on Large Language Models: from pretraining to agents2024 · 60 min · full transcriptBest concise overview of what an LLM is, how pretraining works, and how base models become assistants.
  2. Andrej Karpathy on Using LLMs: Tools, Models, and Workflows2023 · 131 min · full transcriptMost practical guide to using LLMs well: context windows, model choice, tools, and workflows.
  3. Andrej Karpathy on Large Language Models: How ChatGPT Works2022 · 211 min · full transcriptBroad, intuitive walkthrough of the full LLM pipeline from data to inference.
  4. Andrej Karpathy on Software 2.0 to 3.0: AI Changes Everything2024 · 121 min · full transcriptBest for understanding why Karpathy thinks LLMs create a new software paradigm.
  5. Andrej Karpathy on GPT From Scratch: How ChatGPT Works2022 · 116 min · full transcriptBest technical intuition-builder for the Transformer and autoregressive text generation.
  6. Andrej Karpathy on Agents and AI Progress: why it’s a decade2024 · 146 min · full transcriptBest for Karpathy’s forward-looking view on LLMs as the basis for future agents.

Questions people ask

Go deeper · free courseThe Andrej Karpathy Course13 chapters on everything Karpathy taught, with a certificate at the end.Start learning →

Sources

Every quote above, word for word from the transcripts. Numbers match the text.

1
“Transformer is the neural net that actually does all the heavy lifting under the hood…”
Conference keynote, 2022
6
“…use it as a tool in a toolbox…”
Deep Dive into LLMs like ChatGPT, 2022
7
“…this network then dreams internet documents…”
Intro to Large Language Models, YouTube interview, 2024
10
“…the answer is already created, it's already in the token window…”
Deep Dive into LLMs like ChatGPT, 2022
11
“…think of the tokens in the context window as a precious resource…”
Talk / online presentation, June 2023
12
“…don't overload it with irrelevant information…”
Talk / online presentation, June 2023
13
“…if it is the case that those tokens are not any more useful to your next query, I encourage you to do this…”
Talk / online presentation, June 2023
14
“These models, when you boot them up and they have zero tokens in the window, they're always restarting from scratch where they were. So I don't know in that worldview what it looks like. Maybe making some analogies to humans—just because I think it's roughly concrete and interesting to think through—I feel like when I'm awake, I'm building up a context window of stuff that's happening during the day. But when I go to sleep, something magical happens where I don't think that context window stays around. There's some process of distillation into the weights of my brain. This happens during sleep and all this stuff. We don't have an equivalent of that in large language models. That's to me more adjacent to when you talk about continual learning and so on as absent.”
Dwarkesh Patel interview, September 2024answer page →

How this guide was made: drafted with AI from the full transcripts of the recordings cited, then checked: every quotation must match a transcript word for word and be the speaker's own words, and an independent review gates accuracy. Methodology and corrections.

All 15 recordings of Andrej Karpathy on LLMs

Andrej Karpathy on Large Language Models: How ChatGPT Works3:31:24

Andrej Karpathy on Large Language Models: How ChatGPT Works

2022 · 10M views

Karpathy explains how ChatGPT-like models are built, trained, and used, plus their limits and implications. Deep Dive into LLMs like ChatGPT, 2023.

Andrej Karpathy on GPT From Scratch: How ChatGPT Works1:56:20

Andrej Karpathy on GPT From Scratch: How ChatGPT Works

2022 · 8.3M views

Karpathy builds a GPT-style Transformer from first principles, explains tokenization, attention, and how ChatGPT differs from pretraining and fine-tuning, in a 2022 keynote.

Andrej Karpathy on Artificial Intelligence: Aliens, AGI, and Exploits3:28:48

Andrej Karpathy on Artificial Intelligence: Aliens, AGI, and Exploits

2024 · 6.6M views

Karpathy discusses neural nets, AGI, self-driving, Tesla, aliens, and the idea that physics may have exploits in Lex Fridman Podcast #333.

Andrej Karpathy on Large Language Models: from pretraining to agents59:48

Andrej Karpathy on Large Language Models: from pretraining to agents

2024 · Interview · 4.4M views

Karpathy explains how LLMs work, how they’re trained and fine-tuned, and where tools, multimodality, and agents are headed in 2024.

Andrej Karpathy on Using LLMs: Tools, Models, and Workflows2:11:12

Andrej Karpathy on Using LLMs: Tools, Models, and Workflows

2023 · 2.9M views

Karpathy shows practical ways to use LLMs for writing, research, coding, search, and diagrams in an online talk from June 2023.

Andrej Karpathy on Software 2.0 to 3.0: AI Changes Everything2:01:04

Andrej Karpathy on Software 2.0 to 3.0: AI Changes Everything

2024 · 2.8M views

Karpathy argues software is shifting from code to neural nets to prompts, and explains what that means for LLM apps and AI tooling.

Andrej Karpathy on Agents and AI Progress: why it’s a decade2:26:08

Andrej Karpathy on Agents and AI Progress: why it’s a decade

2024 · Interview · 1.5M views

Karpathy explains why agents will take a decade, what’s missing today, and how LLMs, pre-training, and education are shaping AI progress on Dwarkesh Patel.

Andrej Karpathy on Character-Level Language Modeling: Building makemore1:57:45

Andrej Karpathy on Character-Level Language Modeling: Building makemore

2020 · Interview · 1.3M views

Karpathy builds a character-level language model from scratch, from bigrams and sampling to loss, smoothing, and a neural-net version, in makemore (2020).

Andrej Karpathy on Tokenization: Building GPT's Tokenizer2:13:35

Andrej Karpathy on Tokenization: Building GPT's Tokenizer

2019 · 1.3M views

Karpathy explains how LLM tokenizers work, why they cause odd behavior, and how GPT-2/GPT-4 tokenization differs in a tutorial presentation.

Andrej Karpathy on GPT-2 Reproduction: Rebuilding 124M From Scratch4:01:26

Andrej Karpathy on GPT-2 Reproduction: Rebuilding 124M From Scratch

2022 · 1.2M views

Karpathy rebuilds GPT-2 124M from scratch, explaining the architecture, training setup, and speedups like Torch Compile and Flash Attention at an OpenAI talk in 2022.

Andrej Karpathy on Code Agents: The Loopy Era of AI1:06:32

Andrej Karpathy on Code Agents: The Loopy Era of AI

2023 · 1.1M views

Karpathy explains how coding, research, and home software are becoming agent-driven, from auto research to Dobby-style automation, on No Priors in 2023.

Andrej Karpathy on MLPs for Language Modeling: makemore1:15:40

Andrej Karpathy on MLPs for Language Modeling: makemore

2020 · 617K views

Karpathy builds makemore with an MLP, showing embeddings, cross-entropy, minibatches, and sampling from a character model.

Andrej Karpathy on AI and Robotics: Models, Agents, and Education44:17

Andrej Karpathy on AI and Robotics: Models, Agents, and Education

2024 · Interview · 244K views

Karpathy discusses self-driving, humanoid robots, LLMs, synthetic data, and education in a No Priors interview from Feb. 2024.

Andrej Karpathy on Recurrent Neural Networks: LSTMs and Captioning1:09:54

Andrej Karpathy on Recurrent Neural Networks: LSTMs and Captioning

2017 · 131K views

Karpathy explains RNNs, LSTMs, and image captioning with practical intuition, code, and demos in CS231n Lecture 10.

Andrej Karpathy on AI Engineering: Programming Is Changing Fast1:08:31

Andrej Karpathy on AI Engineering: Programming Is Changing Fast

2024 · 6K views

Karpathy explains software 1.0, 2.0, and 3.0, prompt engineering, and why LLMs are changing programming, in a Stanford lecture from 2024.

Search every transcript
Open the full search page →