GregoryKanevsky retweeted
Hack by popular demand!
Open-Source Agent #Hackathon with @AndrewYNg & @DeepLearningAI at @agihouse_org Saturday, *August 24th*
Stellar schedule planned w/ secret guest speakers, alongside co-hosts, @GroqInc & @langchain.
Reserve your spot now --> eu1.hubs.ly/H0bJRt70
GregoryKanevsky retweeted
📽️ New 4 hour (lol) video lecture on YouTube:
"Let’s reproduce GPT-2 (124M)"
youtu.be/l8pRSuU81PU
The video ended up so long because it is... comprehensive: we start with empty file and end up with a GPT-2 (124M) model:
- first we build the GPT-2 network
- then we optimize it to train very fast
- then we set up the training run optimization and hyperparameters by referencing GPT-2 and GPT-3 papers
- then we bring up model evaluation, and
- then cross our fingers and go to sleep.
In the morning we look through the results and enjoy amusing model generations. Our "overnight" run even gets very close to the GPT-3 (124M) model. This video builds on the Zero To Hero series and at times references previous videos. You could also see this video as building my nanoGPT repo, which by the end is about 90% similar.
Github. The associated GitHub repo contains the full commit history so you can step through all of the code changes in the video, step by step.
github.com/karpathy/build-na…
Chapters.
On a high level Section 1 is building up the network, a lot of this might be review. Section 2 is making the training fast. Section 3 is setting up the run. Section 4 is the results. In more detail:
00:00:00 intro: Let’s reproduce GPT-2 (124M)
00:03:39 exploring the GPT-2 (124M) OpenAI checkpoint
00:13:47 SECTION 1: implementing the GPT-2 nn.Module
00:28:08 loading the huggingface/GPT-2 parameters
00:31:00 implementing the forward pass to get logits
00:33:31 sampling init, prefix tokens, tokenization
00:37:02 sampling loop
00:41:47 sample, auto-detect the device
00:45:50 let’s train: data batches (B,T) → logits (B,T,C)
00:52:53 cross entropy loss
00:56:42 optimization loop: overfit a single batch
01:02:00 data loader lite
01:06:14 parameter sharing wte and lm_head
01:13:47 model initialization: std 0.02, residual init
01:22:18 SECTION 2: Let’s make it fast. GPUs, mixed precision, 1000ms
01:28:14 Tensor Cores, timing the code, TF32 precision, 333ms
01:39:38 float16, gradient scalers, bfloat16, 300ms
01:48:15 torch.compile, Python overhead, kernel fusion, 130ms
02:00:18 flash attention, 96ms
02:06:54 nice/ugly numbers. vocab size 50257 → 50304, 93ms
02:14:55 SECTION 3: hyperpamaters, AdamW, gradient clipping
02:21:06 learning rate scheduler: warmup + cosine decay
02:26:21 batch size schedule, weight decay, FusedAdamW, 90ms
02:34:09 gradient accumulation
02:46:52 distributed data parallel (DDP)
03:10:21 datasets used in GPT-2, GPT-3, FineWeb (EDU)
03:23:10 validation data split, validation loss, sampling revive
03:28:23 evaluation: HellaSwag, starting the run
03:43:05 SECTION 4: results in the morning! GPT-2, GPT-3 repro
03:56:21 shoutout to llm.c, equivalent but faster code in raw C/CUDA
03:59:39 summary, phew, build-nanogpt github repo
GregoryKanevsky retweeted
Artificial Intelligence: The Good, The Bad and The Ugly - Free public lecture on May 24 by Professor Abu-Mostafa of @Caltech to explain the science of AI in plain language and assess extreme scenarios.
work.caltech.edu/watson
#MachineLearning #ArtificialIntelligence #AI #chatGPT
GregoryKanevsky retweeted
India needs Oxygen - We will help by distributing oxygen concentrators for people in their homes in major cities. Please help us with your valuable donations.gofundme.com/f/o2-for-india?…
GregoryKanevsky retweeted
#H2OWave is a #Python development framework that makes it fast and easy for #datascientists, #machinelearning engineers & software #developers to develop real-time interactive #AI apps with sophisticated #visualizations.
👉 Check it out on #Github today: h2oai.github.io/wave/
GregoryKanevsky retweeted
During the #COVID19 pandemic, our communities face an unprecedented challenge with an urgent need to help our citizens. Read more about H2O.ai’s response: h2o.ai/blog/it-is-a-privileg… #AI #machinelearning #healthtech
GregoryKanevsky retweeted
Team @h2oai got busy serving the #healthcare #community in response to covid-19. In my writing to @KDnuggets this am Gregory pointed his survey put H2O AutoML / DriverlessAI as most used #AutoML platform. Thank you Community #teamwork #ai #OpenSource kdnuggets.com/2020/03/poll-a…
GregoryKanevsky retweeted
Happy #InternationalWomensDay to all the amazing women making contributions to their communities around the globe. And a special shoutout to all the amazing female makers at H2O.ai helping further our mission to #democratizeAI! #IWD2020
GregoryKanevsky retweeted
H2O raises $72.5 million to simplify enterprise AI deployment wp.me/p8wLEc-aAnl by @Kyle_L_Wiggers
GregoryKanevsky retweeted
We are very proud to announce our Series D funding led by @GoldmanSachs and @pingan_group to continue and expand our mission of democratizing AI! Read more details: h2o.ai/company/news/h2o-ai-r… teapawt.net/h2oai/status/116375674…
GregoryKanevsky retweeted
The contrast between Ukrainians voting in free and fair elections last weekend and Russians getting arrested for wanting free and fair elections this weekend is striking.
GregoryKanevsky retweeted
Now easier to setup/use! (and thus free-er?!) #Python @xgboost @h2oai explainable/interpretable #MachineLearning tutorial through H2O's Aquarium: github.com/jphall663/interpr… (We'll try to keep this open/free as long as people behave...) #XAI #FATML #DataScience
GregoryKanevsky retweeted
Google, the company who’s motto is “don’t be evil” does a deal with Russian government to ban websites that Putin doesn’t like, including anti corruption exposes, from its searches. That seems pretty evil to me. dailymail.co.uk/news/article…
GregoryKanevsky retweeted
Congrats to H2O @h2oai h2o.ai Winner of Best Technical Tool or Framework for AI #AwardsAI @Awards_AI
GregoryKanevsky retweeted
datatable 0.7 is released!
- multi-column sorting, grouping, and joining;
- performance enhancements;
- Jupyter Lab integration;
- bug fixes, and much more:
github.com/h2oai/datatable/r…
GregoryKanevsky retweeted
Comment here completing the sentence “I'd love to attend #H2OAIWorld London because….” and tag 1 friend you'd take with you. The most creative answer will win 2 tickets for the conference. Participants must follow us to be eligible ;) Trip expenses are not included.























