Andrej Karpathy

Building makemore Part 5: Building a WaveNet

Andrej Karpathy

Summary

A detailed exploration of a character-level language model architecture unfolds as the discussion shifts to implementing a more complex neural network design inspired by the WaveNet model. The speaker, currently in Kyoto, outlines the transition from a simple multi-layer perceptron that predicts the next character based on three preceding characters to a more sophisticated model that utilizes a hierarchical structure to progressively fuse information from multiple characters.

The new architecture aims to enhance performance by increasing the input context from three to eight characters, allowing for a richer dataset of 182,000 examples. This change is expected to improve the model's ability to generate more coherent and name-like outputs. The speaker emphasizes the importance of organizing the layers effectively, implementing batch normalization, and ensuring that the model can handle three-dimensional inputs correctly. The discussion also highlights the challenges of maintaining the state of batch normalization during training and evaluation phases.

As the implementation progresses, the speaker notes improvements in validation loss, dropping from 2.10 to 1.99, indicating a successful enhancement in model performance. The conversation touches on the necessity of an experimental harness for systematic hyperparameter tuning and the potential for further optimization. The speaker concludes by inviting listeners to experiment with the model, suggesting that there are still opportunities to refine the architecture and improve results.

More from Andrej Karpathy

See all episodes →