🎯 Загружено автоматически через бота:
🚫 Оригинал видео:
📺 Данное видео принадлежит каналу «Andrej Karpathy» (@AndrejKarpathy). Оно представлено в нашем сообществе исключительно в информационных, научных, образовательных или культурных целях. Наше сообщество не утверждает никаких прав на данное видео. Пожалуйста, поддержите автора, посетив его оригинальный канал.
✉️ Если у вас есть претензии к авторским правам на данное видео, пожалуйста, свяжитесь с нами по почте support@, и мы немедленно удалим его.
📃 Оригинальное описание:
We reproduce the GPT-2 (124M) from scratch. This video covers the whole process: First we build the GPT-2 network, then we optimize its training to be really fast, then we set up the training run following the GPT-2 and GPT-3 paper and their hyperparameters, then we hit run, and come back the next morning to see our results, and enjoy some amusing model generations. Keep in mind that in some places this video builds on the knowledge from earlier videos in the Zero to Hero Playlist (see my channel). You could also see this video as building my nanoGPT repo, which by the end is about 90% similar.
Links:
build-nanogpt GitHub repo, with all the changes in this video as individual commits:
nanoGPT repo:
llm.c repo:
my website:
my twitter:
our Discord channel:
Supplementary links:
Attention is All You Need paper:
OpenAI GPT-3 paper: - OpenAI GPT-2 paper: The GPU I’m training the model on is from Lambda GPU Cloud, I think the best and easiest way to spin up an on-demand GPU instance in the cloud that you can ssh to:
Chapters:
intro: Let’s reproduce GPT-2 (124M)
exploring the GPT-2 (124M) OpenAI checkpoint
SECTION 1: implementing the GPT-2
loading the huggingface/GPT-2 parameters
implementing the forward pass to get logits
sampling init, prefix tokens, tokenization
sampling loop
sample, auto-detect the device
let’s train: data batches (B,T) → logits (B,T,C)
cross entropy loss
optimization loop: overfit a single batch
data loader lite
parameter sharing wte and lm_head
model initialization: std , residual init
SECTION 2: Let’s make it fast. GPUs, mixed precision, 1000ms
Tensor Cores, timing the code, TF32 precision, 333ms
float16, gradient scalers, bfloat16, 300ms
, Python overhead, kernel fusion, 130ms
flash attention, 96ms
nice/ugly numbers. vocab size 50257 → 50304, 93ms
SECTION 3: hyperpamaters, AdamW, gradient clipping
learning rate scheduler: warmup cosine decay
batch size schedule, weight decay, FusedAdamW, 90ms
gradient accumulation
distributed data parallel (DDP)
datasets used in GPT-2, GPT-3, FineWeb (EDU)
validation data split, validation loss, sampling revive
evaluation: HellaSwag, starting the run
SECTION 4: results in the morning! GPT-2, GPT-3 repro
shoutout to llm.c, equivalent but faster code in raw C/CUDA
summary, phew, build-nanogpt github repo
Corrections:
I will post all errata and followups to the build-nanogpt GitH
13 views
0
0
3 months ago 04:01:25 15
[Andrej Karpathy] Let’s reproduce GPT-2 (124M)
1 year ago 03:28:47 32
Andrej Karpathy Tesla AI, Self-Driving, Optimus, Aliens, and AGI Lex Fridman Podcast #333
9 years ago 00:38:45 251
Visualizing and Understanding Recurrent Networks (Andrej Karpathy)
5 years ago 00:11:11 67
PyTorch at Tesla - Andrej Karpathy, Tesla
5 years ago 00:30:09 338
Andrej Karpathy - AI for Full-Self Driving
3 months ago 00:27:13 10
But what is a GPT? Visual intro to transformers | Chapter 5, Deep Learning
1 year ago 00:59:48 22
Введение в большие языковые модели от Andrej Karpathy
4 years ago 00:27:39 61
Tesla AI Andrej Karpathy on Scalability in Autonomous Driving
13 years ago 00:03:58 18
«карпати» под музыку Рада Рай и Андрей Бандера - Пой, моя гитара.... Picrolla
4 years ago 00:28:51 18
Scalability in Autonomus Driving Workshop | CVPR’20 Keynote | Andrej Karpathy | Tesla
4 months ago 00:18:11 70
НОВОСТИ ИИ: Подписка на ChatGPT за 2000$
4 years ago 01:30:56 1
Recent Breakthroughs in AI with Andrej Karpathy and Lex Fridman
4 years ago 00:24:15 58
Andrej Karpathy Talking about AI and Neural Networks at Tesla for Full Self Driving
9 years ago 00:15:47 62
Andrej Karpathy, Research Scientist, OpenAI - RE•WORK Deep Learning Summit 2016 #reworkDL
2 years ago 03:28:48 22
Andrej Karpathy: Tesla AI, Self-Driving, Optimus, Aliens, and AGI | Lex Fridman Podcast #333
8 years ago 01:25:17 44
Deep Learning for Computer Vision (Andrej Karpathy, OpenAI)
5 years ago 00:09:16 10
Tesla Neural Network Multi-Task Learning Summarized | Andrej Karpathy
3 years ago 00:37:47 1
Andrej Karpathy (Tesla): CVPR 2021 Workshop on Autonomous Vehicles
4 months ago 00:44:17 1
No Priors Ep. 80 | With Andrej Karpathy from OpenAI and Tesla
5 years ago 00:10:32 29
AI for Full-Self Driving by Andrej Karpathy in 10 Minutes
7 years ago 00:15:11 72
Heroes of Deep Learning: Andrew Ng interviews Andrej Karpathy
3 years ago 00:15:11 2
’s Heroes of Deep Learning: Andrej Karpathy
13 years ago 00:03:49 15
«Карпаты =2011» под музыку Рада Рай и Андрей Бандера - Бабье лето. Picrolla
3 years ago 00:23:47 10
Self-driving from VISION ONLY - Tesla’s self-driving progress by Andrej Karpathy (Talk Analysis)