Stanford CS336: Language Modeling from Scratch

I was recommended Stanford CS336 (Spring 2026) as a way to learn the fundamentals behind LLMs and get some hands-on experience. This series is where I keep my notes, implementation details, and experiment results to organize my understanding and for future reference.

This class reminds me of a joke from college in 2020:

  • Q: “What’s the most important class a CS student should take?”
  • A: “Intro to Deep Learning. Not enough to become a deep learning researcher, good enough to know who’s bluffing.”

Posts in This Series

The posts combine lecture notes with the assignments.

  1. Building a Transformer Language Model

  2. Making Training Efficient

  3. Data and Scaling Laws

  4. Post-training and Reinforcement Learning

  5. Inference and Evaluation