Welcome to the course!
How do machines learn to understand and generate human language? In this course, we build the answer from the ground up: from tokenization and statistical language models, through neural networks and the Transformer, to pretraining, fine-tuning, alignment, and the frontiers of large language models.
There is no official textbook, but we will use the following resources for reference:
Additional readings (research papers) are listed per lecture in the schedule below.
Four assignments, done individually. Each assignment is released on Friday of its release week and is due on Friday at 11:59 PM Eastern Time of the due week. The universal 72-hour grace period applies (see Late Policy).
| Assignment | Topic | Weight | Released | Due |
|---|---|---|---|---|
| Assignment 1 | Data, Tokenization & Statistical Language Models | 9% | Fri, Sep 25 | Fri, Oct 9, 11:59 PM ET |
| Assignment 2 | Training Neural Language Models | 9% | Fri, Oct 9 | Fri, Oct 23, 11:59 PM ET |
| Assignment 3 | Probing and Interpreting Pretrained Transformers | 9% | Fri, Oct 30 | Fri, Nov 13, 11:59 PM ET |
| Assignment 4 | Finetuning, Alignment & Modern LM APIs | 8% | Fri, Nov 20 | Fri, Dec 4, 11:59 PM ET |
Lectures are held Tuesdays and Thursdays. No lectures during Reading Week (October 10–18). Slides will be made available before each lecture.
| Week | Tue | Thu |
|---|---|---|
| Part I: Foundations (Weeks 1–4) | ||
| 1 | No lecture: UW classes begin Wed, Sep 9 |
Lecture 1 (Thu, Sep 10)
Introduction & Fundamentals What is NLP? A brief history from Shannon to GPT. What is a language model? Probability review (chain rule, Bayes' theorem). Information theory: entropy, cross-entropy, perplexity. [Slides: PDF] |
| 2 |
Lecture 2 (Tue, Sep 15)
Words: Tokenization and Morphology What is a word? Morphological typology (isolating, agglutinative, fusional). BPE from scratch. WordPiece, Unigram LM tokenizer. Cross-lingual considerations: vocabulary sharing, low-resource scripts. [Reading: Sennrich et al., 2016] [Reading: Kudo, 2018] [Slides: PDF] [Colab Notebook] |
Lecture 3 (Thu, Sep 17)
Distributional Semantics and Word Embeddings Distributional hypothesis. Count-based methods (PMI, SVD). Word2Vec (skip-gram, CBOW, negative sampling). [Reading: SLP 3, Chapter 5] [Slides: PDF] |
| 3 |
Lecture 4 (Tue, Sep 22)
Supervised Learning Foundations From embeddings to predictions. Feature engineering vs. learned representations. Logistic regression, loss functions, SGD. Motivation for neural approaches. [Slides: PDF] |
Lecture 5 (Thu, Sep 24)
Statistical Language Models N-gram models: Markov assumption, MLE, Laplace smoothing. Text generation and evaluation: perplexity, bits-per-character. [Reading: SLP 3, Chapter 3] [Slides: PDF] |
| Part II: The Core Engine (Weeks 4–7) | ||
| 4 |
Lecture 6 (Tue, Sep 29)
Neural Network Foundations MLPs, backpropagation, activations. RNNs. LSTMs/GRUs and the vanishing gradient problem. [Slides: PDF] |
Lecture 7 (Thu, Oct 1)
Transformers from Scratch Attention (Q/K/V), multi-head attention, positional encoding. Layer norm, residual connections, FFN. Full encoder-decoder walkthrough. [Slides: PDF] |
| 5 |
Lecture 8 (Tue, Oct 6)
Neural Language Models RNN LMs. Transformer decoder (GPT-style). Training: teacher forcing, cross-entropy loss. Building a character-level LM from scratch. [Reading: Bengio et al., 2003] [Reading: Mikolov et al., 2010] [Reading: Radford et al., 2018] [Optional reading: Karpathy et al., 2016] [Slides: PDF] |
Lecture 9 (Thu, Oct 8)
Masked LMs and Pretraining Objectives Autoregressive vs. masked LMs. BERT (MLM + NSP). Comparison of pretraining objectives. [Reading: BERT: Devlin et al., 2019] [Reading: RoBERTa: Liu et al., 2019] [Reading: GPT: Radford et al., 2018] [Reading: LLaMA: Touvron et al., 2023] [Reading: T5: Raffel et al., 2020] [Slides: PDF] |
| Reading Week (Oct 10–18): No classes | ||
| 6 |
Midterm exam (Tue, Oct 20)
11:30AM–12:50PM, DC 1351 Exam held during class time, covering Lectures 1–9 (up to reading week). A Non-programmable calculator is allowed but is not necessary. [Midterm Practice A: PDF | Solution PDF] [Midterm Practice B: PDF | Solution PDF] |
Lecture 10 (Thu, Oct 22)
Pretraining at Scale Data pipelines (web crawl, filtering, dedup, mixing). Scaling laws (Chinchilla). Optimization (AdamW, LR schedules, warmup). Mixed precision. [Reading: Radford et al., 2018] [Reading: Brown et al., 2020] [Slides: PDF] |
| Part III: Understanding and Improving (Weeks 7–11) | ||
| 7 |
Lecture 11 (Tue, Oct 27)
Syntax and Context-Free Grammars Now that we've built powerful LMs, what do they learn about language structure? Constituency vs. dependency. CFGs: rules, derivations, parse trees. PCFGs: generative model, string probability, inside algorithm. [Reading: SLP 3, Chapter 19] [Reading: SLP 3, Chapter 20] [Slides: PDF] |
Lecture 11 (cont.) (Thu, Oct 29)
Syntax and Context-Free Grammars (Continued) [Slides: PDF] |
| 8 |
Lecture 12 (Tue, Nov 3)
Probing Neural LMs I: Syntactic Knowledge Subject-verb agreement tests. Targeted syntactic evaluation. Structural probes. BLiMP. [Reading: Belinkov, 2022] [Slides: PDF] |
Lecture 13 (Thu, Nov 5)
Mechanistic Interpretability Circuits, induction heads, superposition. Activation patching, sparse autoencoders. [Reading: Olsson et al., 2022] [Slides: PDF] |
| 9 |
Lecture 14 (Tue, Nov 10)
Evaluation and Benchmarking Perplexity vs. downstream evaluation. Benchmarks: MMLU, GPQA, HELM, BIG-Bench. Contamination, calibration, statistical significance. LM-as-judge, Chatbot Arena. Generation metrics: BLEU, ROUGE, BERTScore and their failure modes. [Reading: Liang et al., 2022] [Reading: Zheng et al., 2023] [Reading: Ma, Saxon, and Yue, 2025: The Science of Benchmarking (NeurIPS tutorial)] [Slides: PDF] |
Lecture 15 (Thu, Nov 12)
Decoding Strategies Greedy, beam search, nucleus/top-k/temperature sampling. Repetition and degeneration. [Slides: PDF] |
| 10 |
Lecture 16 (Tue, Nov 17)
Supervised Fine-tuning Pretraining→finetuning paradigm. Instruction tuning: data formats, templates. Parameter-efficient methods: LoRA, adapters. [Reading: Zhou et al., 2023] [Slides: PDF] |
Lecture 17 (Thu, Nov 19)
RLHF and Alignment Bradley-Terry model, REINFORCE, PPO, DPO, GRPO. [Reading: Schulman et al., 2017] [Reading: Ouyang et al., 2022] [Reading: Rafailov et al., 2023] [Slides: PDF] |
| Part IV: The Frontier (Weeks 11–12) | ||
| 11 |
Lecture 17 (cont.) (Tue, Nov 24)
RLHF and Alignment (Continued) Policy updates in PPO and GRPO; comparison with DPO. [Slides: PDF] |
Lecture 18 (Thu, Nov 26)
Reinforcement Learning with Verifiable Rewards (RLVR) Using a verifier to select an answer vs. using its score to train a reasoning model. Group-relative advantages in GRPO; DeepSeek-R1-Zero and DeepSeek-R1. [Reading: Wei et al., 2022] [Reading: Yao et al., 2022] [Reading: Lightman et al., 2023] [Reading: Shao et al., 2024] [Reading: Chen et al., 2026] [Slides: PDF] |
| 12 |
Lecture 19 (Tue, Dec 1)
RAG, Agents, and Responsible Deployment Retrieval-augmented generation and grounded answers. Tool use, planning, and permissions. Safety and bias: privacy, data provenance, and moderation error rates across language varieties. Watermarking, multilingual retrieval, and the cost of extra tool calls. [Reading: Lewis et al., 2020] [Reading: Bender et al., 2021] [Reading: Carlini et al., 2021] [Reading: Kirchenbauer et al., 2023] [Reading: Jimenez et al., 2024] [Reading: Xie et al., 2024] [Slides: PDF] |
Lecture 20 (Thu, Dec 3)
Multimodality and Grounding From pixels to tokens: image patches, discrete visual tokens. Contrastive image–text alignment: CLIP; zero-shot transfer. Visual instruction tuning: LLaVA; Flamingo, BLIP. Natively multimodal and any-to-any models (Gemini, Chameleon). Multimodal generation: text-to-image/video/audio. The symbol grounding problem; visual, spatial, and embodied grounding. [Reading: Radford et al., 2021] [Reading: Liu et al., 2023] [Slides: PDF] |
Assignments: 35%. Four assignments, done individually. Each assignment includes quantitative evaluation on held-out test data and a graded analysis write-up.
Midterm exam: 25%. Held during class time on Tue, Oct 20; covers Lectures 1–9.
Final exam: 40%. Comprehensive exam covering the full course.
All assignments are due at 11:59 PM Eastern Time on the specified due date. A universal 72-hour grace period applies to all assignment deadlines:
Extensions beyond the grace period are considered only for medical emergencies: a valid Verification of Illness Form (VIF) must be submitted before the original due date, and it must cover both the original due date and the entire grace period.