The labs are Jupyter notebooks, one per session. Every one runs offline on a
laptop CPU with fixed seeds — no GPU, no API key, no paid service. Clone the
course repository once and git pull before each session; the labs read helpers and data
from the folders beside them, so a notebook downloaded on its own will not run. Session 1's last
deck, The Workbench, walks through every step below.
Click Open in GitHub Codespaces. GitHub builds the environment from
.devcontainer/devcontainer.json and installs everything in
requirements.txt automatically (first launch takes a few minutes).
When VS Code opens in your browser, use the file explorer to open the notebook you
want under the labs/ folder, then run the cells.
When you finish, Stop or Delete the codespace
(github.com/codespaces) so it doesn't keep using your quota.
Quota. Any GitHub account can launch a codespace on this repository, and it
runs on your own free monthly allowance (120 core-hours + 15 GB storage on
a personal account) — nobody else is billed for your session. Stop idle codespaces and the
free tier comfortably covers the whole course.
Option 2 — run locally
Install Python 3.11, git and VS Code, then, in a terminal:
Then open the folder in VS Code, select the .venv kernel for the notebook, and
run its first cells: they print every package's version and say READY or what is
missing. On Windows and macOS the standard PyTorch install is already the CPU build.
Installing from China. The install line above already uses the Tsinghua (TUNA)
mirror, which is usually much faster than the default index. No Google or Colab access is needed
for any lab.
Session labs
One notebook per session, posted to the repository before the session meets; the
syllabus says what each one asks.
Session 1 — Orientation: Two Machines, One EnvironmentReleased before the session
Session 2 — Deep learning: From One Neuron to a Solved Growth ModelReleased before the session
Session 3 — Reinforcement learning: One Growth Model, Every Reinforcement-Learning MethodReleased before the session
Session 4 — Heterogeneous agents: Distributions as State, Solved Two WaysReleased before the session
Session 5 — Text and LLMs: Words as Data, and What a Language Model MeasuresReleased before the session
Session 6 — RAG and agents: An Agent You Can Audit, and the Retrieval It Reads FromReleased before the session
Notebooks from the Summer 2026 version
The labs of the ten-lecture version taught at Zhejiang University in Summer 2026 stay
available; the Summer 2026 page keeps the decks they went with.