🎯 Загружено автоматически через бота:
🚫 Оригинал видео:
📺 Данное видео принадлежит каналу «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
2 months ago 01:55:57 5
[Andrej Karpathy] Building makemore Part 3: Activations & Gradients, BatchNorm
2 months ago 01:55:23 12
[Andrej Karpathy] Building makemore Part 4: Becoming a Backprop Ninja
2 months ago 00:56:21 4
[Andrej Karpathy] Building makemore Part 5: Building a WaveNet
2 months ago 01:56:19 72
[Andrej Karpathy] Let’s build GPT: from scratch, in code, spelled out.
2 months ago 00:59:47 11
[Andrej Karpathy] [1hr Talk] Intro to Large Language Models
2 months ago 04:01:25 13
[Andrej Karpathy] Let’s reproduce GPT-2 (124M)
2 months ago 02:13:34 2
[Andrej Karpathy] Let’s build the GPT Tokenizer
2 months ago 00:03:19 1
How To Study Hard - Richard Feynman
2 months ago 00:27:14 1
How large language models work, a visual intro to transformers | Chapter 5, Deep Learning
2 months ago 00:26:10 1
Attention in transformers, visually explained | Chapter 6, Deep Learning
3 months ago 00:27:13 10
But what is a GPT? Visual intro to transformers | Chapter 5, Deep Learning
4 months ago 00:44:17 1
No Priors Ep. 80 | With Andrej Karpathy from OpenAI and Tesla
4 months ago 00:18:11 67
НОВОСТИ ИИ: Подписка на ChatGPT за 2000$
4 months ago 00:06:53 1
Elon Musk says losers use LiDAR. [Explanation video]
5 months ago 00:47:27 1
Projeto Secreto da OpenAI: Descubra as Últimas Inovações da IA e Fique Super Atualizado no IA News#6
5 months ago 00:07:41 1
Educação 100% com IA, FBI invade celular, Hype das IA no fim, e muito mais
8 months ago 00:40:08 1
The Most Important Algorithm in Machine Learning
8 months ago 00:08:29 1
CATL’s sodium hybrid battery will be 30% cheaper & revolutionise the world
8 months ago 00:08:55 1
Tesla reveals timelline for massive electric Semi production at $ factory
10 months ago 00:26:53 1
Vedal & Neuro Build A Language Model From Scratch
10 months ago 00:16:39 1
Phi-1: A ’Textbook’ Model
11 months ago 00:20:13 1
GPT-5: Everything You Need to Know So Far
1 year ago 00:14:07 1
“Что в имени тебе моем?“ Учимся генерировать новые имена у звездного разработчика Tesla и OpenAI.
1 year ago 00:59:48 22
Введение в большие языковые модели от Andrej Karpathy