Save this video free

Building makemore Part 5: Building a WaveNet

Andrej Karpathy · 56:22 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Andrej Karpathy refactors the 'makemore' character-level language model to resemble a WaveNet architecture, increasing input context from 3 to 8 characters and implementing a hierarchical fusion of information. He introduces custom 'flatten' and 'sequential' modules, refines the Batch Norm 1D layer for multi-dimensional inputs, and demonstrates how this deeper, more structured approach, despite similar parameter counts, shows potential for improved performance, reaching a validation loss of 1.993 with larger embeddings.

Key takeaways

Chapters

0:00 Introduction to Complexifying the Character-Level Language Model
2:18 Review of Starter Code and Existing Layers
11:36 Improving Data Visualization and Loss Curve Plotting
15:17 Refactoring the Forward Pass with Custom Embedding and Flatten Layers
21:39 Introducing a Custom Sequential Container for Model Organization
25:42 Debugging Batch Norm 1D with Single-Example Batches
28:33 Baseline Performance with Increased Context Length
35:41 Debugging Tensor Shapes and Understanding Linear Layer Behavior
40:44 Leveraging PyTorch Linear Layer's Multi-Dimensional Input Handling
46:59 Implementing Hierarchical Fusion with Flatten Consecutive

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 hi everyone today we are continuing our implementation of make more our favorite character level language model now you'll notice that the background behind me is different that's because I am in Kyoto and it is awesome so I'm in a hotel room here now over the last few lectures we've built up to this architecture that is a multi-layer perceptron character level language model so we see that it receives three previous characters and tries to predict the fourth character in a sequence using a very simple multi perceptron using one hidden layer of neurons with 10ational neuralities so we'd like to do now in this lecture is I'd like to complexify this architecture in particular we would like to take more characters in a sequence as an input not just three and in addition to that we don't just want to feed them all into a single hidden layer because that squashes too much information too

0:46 quickly instead we would like to make a deeper model that progressively fuses this information to make its guess about the next character in a sequence and so we'll see that as we make this architecture more complex we're actually going to arrive at something that looks very much like a wavenet the witness is this paper published by the point in 2016 and it is also a language model basically but it tries to predict audio sequences instead of character level sequences or Word level sequences but fundamentally the modeling setup is identical it is an auto aggressive model and it tries to predict next character in a sequence and the architecture actually takes this interesting hierarchical sort of approach to predicting the next character in a sequence uh with the

1:33 street-like structure and this is the architecture and we're going to

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Andrej Karpathy.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.