University of Maryland CMSC 723
Professor Iyyer · University of Maryland · 20 lectures with notes
Every lecture with its full transcript and chapters, and one search across all 20 lectures.
Tool use
Language models gain deeper reasoning through layer looping and broader capabilities through harnesses that connect them to tools.
Reasoning & looping
DeepSeek R1 Zero shows how answer-only reinforcement learning can elicit long reasoning traces and improve math performance.
RLHF
PPO reuses costly rollouts through clipped policy ratios, while its learned value function provides token-level baselines at substantial model-memory cost.
REINFORCE (cont'd)
REINFORCE trains language models by weighting rollout log-probabilities with reward, while GRPO centers and scales rewards across samples for each prompt.
Training language models with reinforcement learning
How policy gradients let language models learn from a single reward when generated tokens cannot be differentiated through.
On-policy distillation (cont'd)
On-policy distillation improves a student by using a teacher's token-level feedback on the student's own generated responses.
On-policy distillation
On-policy distillation trains on a model’s own rollouts, addressing exposure bias while using teacher probabilities to guide each token.
SFT and LoRA
LoRA adapts large language models by training small low-rank matrices instead of updating every pretrained weight.
In-context learning and instruction tuning
Pre-training builds broad capabilities; instruction tuning and other post-training methods teach models to use them to follow instructions.
Scaling laws + exam review
Chinchilla scaling laws balance model parameters and training tokens, with roughly 20 tokens per parameter as a compute-optimal rule of thumb.
Transformer configurations & tokenization
Attention masks trade context and inference efficiency, while BPE balances compact sequences with coverage of rare words.
Pretraining vs post-training
Pretraining builds broad language knowledge; post-training uses instruction data and loss masking to shape how models respond.
Mixture of experts language models
MoE transformers use token-level top-k routing to expand model capacity without activating every expert for every token.
Transformer language models
A Transformer combines masked multi-head attention and stacked layers, then uses a KV cache to decode efficiently one token at a time.
Attention mechanisms
Self-attention replaces RNN state bottlenecks with masked, parallel token-to-token information flow during Transformer training.
Training neural language models
Neural language models improve next-word predictions by minimizing cross-entropy with backpropagation and gradient-based parameter updates.
Composition and decoding in neural language models
How neural language models compose word embeddings and decode next-token distributions, from fixed windows and RNNs to transformer motivation.
Neural language models
Neural language models learn shared word representations and next-token probabilities by minimizing negative log likelihood.
Basics of language models
N-gram models introduce language-model probabilities, while NLL and perplexity show how to measure predictive quality and generalization.
Course introduction + history of NLP
NLP’s path from symbolic rules to neural language models explains why prediction, compression, data, and scale matter.