Discord · Lectures · Course Website
This repo will be updated weekly, as the online version of CMU's Intro to Modern AI progresses. Join the discussion forum to learn with peers.
This is a companion repo to Intro to Modern AI, a class by CMU professor Zico Kolter that teaches you how to train your own LLM from scratch using PyTorch — no prior experience with machine learning or AI required.
In this repo, you will find:
concepts/: marimo notebooks that illustrate key concepts from lecture videos, with code and UI elementshomework/: notebooks that test your understanding of the material and work up to training your own LLM
Running notebooks online. The easiest way to run the notebooks in this repo is with molab; just click the links in this README.
Running notebooks locally. To run locally with the marimo library, install
uv, download the notebook you want to run from concepts/ or homework/, then run
uvx marimo edit --sandbox <notebook>For example, uvx marimo edit --sandbox hw0.py.
Each concept notebook is associated with a lecture.
| Lecture | Notebook |
|---|---|
| Lecture 2: Intro to supervised machine learning | |
| Lecture 3: Linear Algebra |
- HW 0: Autograding and programming basics
- HW 1: Introduction to linear algebra and PyTorch
- HW 2: Automatic differentiation and training a linear model
- HW 3: Training a neural network
- HW 4: Implementing a transformer
Intro to Modern AI is a course by CMU professor Zico Kolter. From the course website:
This course provides an introduction to how modern AI systems work. By “modern AI”, we specifically mean the machine learning methods and large language models (LLMs) behind systems like ChatGPT, Gemini, and Claude. Despite their seemingly amazing generality, the basic techniques that underlie these AI models are surprisingly simple: a minimal LLM implementation leverages a fairly small set of machine learning methods and architectures, and can be written in a few hundred lines of code.
This course will guide you through the basic methods that will let you implement a basic AI chatbot. You will learn the basics of supervised machine learning, large language models, and post-training. By the end of the course you will be able to write the code that runs an open source LLM from scratch, as well as train these models based upon a corpus of data.
