Source

Andrej Karpathy Stanford Lecture: Delete Everything, Keep Graph

Watch on YouTube

Karpathy teaches that programming has progressed from explicitly designing algorithms, to designing datasets for neural networks, to designing natural-language prompts that configure large language models at runtime. He presents transformers as general-purpose, expressive, optimizable, and hardware-efficient computers, explaining attention as data-dependent message passing over a directed graph.

- Software 1.0 designs algorithms, Software 2.0 iterates on datasets, and Software 3.0 designs prompts that condition large language models to perform tasks. - Examples in a prompt can condition a model into a template, such as question-and-answer, enabling in-context learning without gradient-based fine-tuning. - Prompt design matters because a next-word predictor otherwise imitates an average slice of its internet training data rather than the specific behavior a user wants. - Transformers provide a flexible architecture across text, images, speech, reinforcement learning, and other domains by chunking inputs into tokens and letting attention determine communication. - Attention is the transformer's communication phase, while the multilayer perceptron is its per-node computation phase. - Transformers became successful by combining expressive computation, easy optimization, and efficient parallel execution on GPUs.

Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.

Supports these rules

Quotes from this video

“Basically, to me, attention is kind of like the communication phase of the transformer.”

“it's really just a data dependent message passing on directed graphs”

“the communication phase of the transformer. And the transformer interlees two phases. Uh the communication phase, which is the multi-headed attention, and the computation stage, which is uh this multilio perceptron or p2.”

“you program them slightly differently. So you program them by accumulating data sets and iterating on them. something that I call data engine.”

“with more examples given in the context the accuracy improves”

“you really have to like narrow in on the slice of the prediction that you want it to perform otherwise it's just going to imitate the average case.”

“prompt engineering prompt design goes a long way.”

“when you ask it to uh think step by step it gets to break down the problem and it's not thinking too much per token and so it has more tokens and it has more time to think”

“you spin the cycle over and over again and so I call this the data engine.”

“let's work this out in a step-by-step way to be sure we have the right answer.”

“it simultaneously optimizes three properties that I think are very desirable.”

“Number one, the transformer is very expressive in the overpass.”

“basically you condition the model into this Q&A template and it sort of um in its training documents probably had many many things that looked like it”

Topics