HackerTube

Let's build GPT: from scratch, in code, spelled out.

Andrej Karpathy14 HN recommenders · recommended in 8 months, 2023–2025
YouTube
tutorial · intermediate · evergreen · 2023–2025 on HN

Andrej Karpathy builds a GPT from scratch in code, following Attention Is All You Need and GPT-2/3, in about two hours using PyTorch. He connects it to ChatGPT and assumes familiarity with his earlier makemore videos.

It is the go-to recommendation for learning how transformers and LLMs actually work, praised for its clarity and Karpathy's teaching.

12 comments from Hacker News

@villedespommes2024-01 · in “Implementing a ChatGPT-like LLM from scratch, step by step”

+1, Andrey is an amazing educator! I'd also recommend his ▶ this video and checking out his github repos. MinGPT, for example, implements a small gpt model that's compatible with HF API, whereas more modern nanoGPT shows how to use newer features such as flash attention. The quality of every video, every blog post is just so high.

Strongly recommends View on HN
@wesammikhail2023-05 · in “Google DeepMind CEO Says Some Form of AGI Possible in a Few Years”

Andrej Karpathy, the director of AI at tesla, published an AMAZING video about how the current models are built which I think everyone in the tech space should watch. It is intuitive, easy to follow and quite frankly the best video I have seen on the topic. Here is the link: ▶ this video If you conclude, after watching this, that this is all intelligence is - namely cascading optimization and data structure problems chained in a row, then you and a fair number of people here wont ever find common ground. That is not to say that you're wrong, it just seems as if there is a missing component here that we haven't yet discovered.

Strongly recommends View on HN
@durdn2023-02 · in “GPT in 60 Lines of NumPy”

Very impressive. Recently I watched this really amazing lecture on building GPT from scratch from Karpathy, I was blown away: ▶ this video

Strongly recommends View on HN
@yonz2023-01 · in “The Transformer Family”

Great compilation, would be great to see Vision Transformer (ViT) included. Andrej Karpathy's GPT video is a must have companion for this ▶ this video I was going nuts trying to grok Key, Query,Position and Value until Andrej broke it down for me.

Strongly recommends View on HN
@yreg2024-12 · in “A ChatGPT clone, in 3000 bytes of C, backed by GPT-2 (2023)”

Attention is all you need and GPT-2 were well known at that point. Many might doubt whether this approach leads to "general" intelligence – depends on the definition. BTW, Karpathy has a nice video tutorial about building an LLM: ▶ this video

Recommends View on HN