HN 精选

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

Andrej Karpathy
14 人推荐 · 跨 8 个月 · 2023–2025
大语言模型与生成式 AI机器学习与深度学习
Let's build GPT: from scratch, in code, spelled out.

中文导读

前 OpenAI 研究员兼特斯拉 AI 总监 Andrej Karpathy 用两小时手把手教学,基于 PyTorch 从零手写实现 GPT。对照经典论文《Attention Is All You Need》与 GPT-2/3 架构,层层拆解自注意力机制与大模型核心机理。

为什么 HN 推它

理解 Transformer 和大语言模型底层逻辑的首选必看视频,Karpathy 行云流水的代码讲解将抽象理论讲得清晰透彻。

「关于这个主题,我至今看过的最棒的视频,没有之一。」HN 网友原话:the best video I have seen on the topic
英文原摘要(HackerTube / Claude 整理)

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.

HN 上的提及

rec amrb · 2023-01 · HN 原文
I recommend this video on the subject.
strong_rec yonz · 2023-01 · HN 原文
Andrej Karpathy's GPT video is a must have companion for this
reference sebastianconcpt · 2023-01 · HN 原文
Karpathy discusses a challenging part.
strong_rec durdn · 2023-02 · HN 原文
I was blown away
rec qazpot · 2023-03 · HN 原文
I would highly recommend watching and working though the code (if possible) of NanoGPT by Andrej Karpathy.

相关视频