
Deep Dive into LLMs like ChatGPT
About this video
Andrej Karpathy's three-hour-plus general-audience deep dive into how ChatGPT-style LLMs are built, covering the full training stack from pretraining to post-training. It also gives mental models for their quirks, like hallucination, and how to use them well.
Why it appears in the archive
HN's most frequent recommendation for a clear, approachable foundation in how LLMs work without heavy math.
AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.
From the Hacker News discussion
I think you'll get a lot of use from this video from Andrej Karpathy: [VIDEO] It is long, but don't get scared off. He goes over a ton of different stuff related to model training, but makes it very easy to understand.
Read original comment ↗Depending on how much time you have, the first thing I would recommend is to watch Karpathy's 'deep dive into LLMs' video ( [VIDEO] ). It is 3.5 hours but it will give you so much instinctive understanding of how these things work and will likely save you a lot of time. Purely from a technical standpoint, things aren't that difficult really. I'd recommend get yourself an API account with all major providers (because each frontier LLM evidently has their own strengths and weaknesses) and start experimenting with your data. The feeling you'll get when you first get an API response will keep you going! :) Having said that, a caveat is, LLMs do hallucinate from time to time. If your data needs accuracy, definitely don't do the "throw everything at LLMs and let them do the work" but I'm sure you'll figure it out from trial and error. Good luck!
Read original comment ↗Since you're posting here, you're looking for the shortcut. The shortcut is Karpathy's "Let's Build GPT: from scratch, in code, spelled out" video: [LINK] Then there is a good video that dives into LLMs and how they work that is quite approachable: [VIDEO] From there, flesh out knowledge with his other videos, where he goes both extremely light and extremely deep: [LINK] Anyway, I really like's Karpathy's video because he's very good at explaining LLMs at every level.
Read original comment ↗This is like the LLM era version of the search bubble that prevented people from having the same search results for ostensibly identical searches. Also keep in mind that LLMs are stochastic by design. If you haven't seen it, Karpathy's excellent "deep dive into LLMs like chatgpt" video[0] explains and demonstrates this aspect pretty well: [0] [VIDEO]
Read original comment ↗I highly recommend Andrej Karpathy's Deep Dive into LLMs like ChatGPT: [VIDEO] . It's a 3.5 hour general intro to the topic that I think does a great job of making sense of the tech and how it works under the hood, without needing to build up a foundation of math and programming.
Read original comment ↗Even if you have some basic understanding of how LLMs work, I highly recommend Karpathy’s intro to LLMs videos on YouTube. - [VIDEO] - [LINK]
Read original comment ↗> The models still _generate_ response token-by-token, but they pick tokens _not_ based on tokens that maximize probabilities at each token. This is also not how base training works. In base training the loss is chosen given a context, which can be gigantic. It's never about just the previous token, it's about a whole response in context. The context could be an entire poem, a play, a worked solution to a programming problem, etc, etc. So you would expect to see the same type of (apparent) higher-level planning from base trained models and indeed you do and can easily verify this by downloading a base model from HF or similar and prompting it to complete a poem. The key differences between base and agentic models are 1) the latter behave like agents, and 2) the latter hallucinate less. But that isn't about planning (you still need planning to hallucinate something). It's more to do with post-base training specifically being about providing positive rewards for things which aren't hallucinations. Changing the way the reward function is computed during RL doesn't produce planning, it simply inclines to model to produce responses that are more like the RL targets. Karpathy has a good intro video on this. [VIDEO] In general the nitpicking seems weird. Yes, on a mechanical level, using a model is still about "given this context, what is the next token". No, that doesn't mean that they don't plan, or have higher-level views of the overal structure of their response, or whatever.
Read original comment ↗There is a very good intro on how LLM work by Kharpaty. It's [VIDEO] and it's 3.30 hours, so way below the 100 hours mark :)
Read original comment ↗