← Back to Week 10

Week 10: Introduction to Large Language Models

Discussion Topics — Use these prompts for class discussion, online forums, or personal reflection.

Analysis

1. The Transformer Revolution: Why Did Self-Attention Displace RNNs?

Recurrent architectures like LSTMs were the dominant approach to sequence modeling before the transformer's introduction in 2017. The self-attention mechanism — computing Attention(Q, K, V) = softmax(QK^T / sqrt(d_k))V — enabled a fundamentally different way of relating tokens in a sequence. Within just a few years, transformers became the default architecture for virtually all large-scale language modeling.

  • What specific limitations of RNNs and LSTMs does self-attention directly address (consider parallelism, long-range dependency capture, and gradient flow)?
  • The attention formula scales with O(n^2) in sequence length. How does this compare to the computational profile of a recurrent model, and what trade-offs does it introduce?
  • Are there any task types or data modalities where you think recurrent architectures might still have an advantage over transformers?

Try: Draw a side-by-side diagram on the whiteboard showing token processing in an RNN versus a transformer, then ask students to annotate which steps can run in parallel and where information bottlenecks occur in each architecture.

Evaluation

2. Scaling Laws and the Economics of Intelligence

Empirical scaling laws show that model performance follows a power law relationship with model size, compute budget, and dataset size. The progression from GPT-1 (117M parameters) to GPT-3 (175B parameters) exemplifies this trend. However, the compute and energy costs of training these models are enormous, and the returns are not unlimited — performance gains diminish as scale increases.

  • If you had a fixed compute budget for training a language model, how would you decide how to allocate it between model size and dataset size?
  • What are the broader societal and environmental implications of continually scaling up model training? Who bears these costs, and who benefits?
  • Do you think there is a limit to what can be achieved purely through scaling, or do you believe emergent capabilities will continue to appear at larger scales indefinitely?

Try: Run a live poll asking students to allocate a hypothetical $10M training budget between model parameters, data collection, and compute infrastructure, then compare results and discuss the reasoning behind different allocation strategies.

Knowledge/Comprehension

3. Pre-training Objectives: What Does an LLM Actually Learn?

Foundation models are pre-trained on web-scale datasets using self-supervised objectives like next token prediction and masked language modeling. The pre-training process requires enormous data curation efforts — deduplication, language filtering, content filtering — because the model's downstream capabilities are directly shaped by what it sees during training.

  • Next token prediction seems like a simple objective. Why do you think it gives rise to such rich and general capabilities in the resulting model?
  • The textbook notes that web-scale datasets contain "noise, irrelevant content, and biases." What types of biases do you think are most likely to be absorbed during pre-training, and how might they manifest in model behavior?
  • If you were designing a pre-training dataset from scratch for a model intended for use in healthcare, what sources would you include or exclude, and why?

Try: Have small groups each design a data curation checklist for a different target domain (healthcare, law, education, creative writing), then share and compare what each group chose to include or exclude and the reasoning behind those decisions.

Application

4. Hallucinations, Reasoning Gaps, and the Limits of Fluency

LLMs can generate text that is grammatically impeccable and stylistically convincing while being factually wrong — a phenomenon called hallucination. Additionally, despite impressive surface-level performance, LLMs often exhibit reasoning gaps when faced with multi-step logical problems. These limitations raise important questions about how and when to trust model outputs.

  • Why do you think a model trained purely on next-token prediction is prone to hallucination? What would need to change in the training process to reduce this tendency?
  • In what high-stakes domains (medicine, law, finance, engineering) would hallucinations be most dangerous? What mitigation strategies would you recommend for deploying LLMs in those domains?
  • Is fluency a good proxy for correctness? How should end-users be educated to interact with LLMs in a way that accounts for their limitations?

Try: Show the class two LLM-generated paragraphs on a factual topic — one accurate and one containing plausible-sounding hallucinations — and ask students to identify which is which and explain the signals they used to make their judgment.

Synthesis/Creation

5. Emergent Capabilities and the Unpredictability of Scale

One of the most surprising findings from LLM research is the emergence of qualitatively new capabilities at certain scale thresholds — abilities that were essentially absent in smaller models and then appeared suddenly with sufficient size. Examples include few-shot reasoning, code generation, and arithmetic. This unpredictability has profound implications for both opportunity and risk.

  • Why might capabilities emerge discontinuously rather than smoothly as model size increases? What does this tell us about how knowledge is encoded in model weights?
  • If emergent capabilities cannot be reliably predicted in advance, what implications does this have for AI safety and the responsible development of increasingly large models?
  • PaLM demonstrated impressive zero-shot learning — performing tasks with no examples at all. How do you think a model acquires this ability from pre-training, and what kinds of tasks do you think will remain beyond zero-shot capability regardless of scale?

Try: Ask student pairs to design a hypothetical capability evaluation benchmark for a model that is 10x larger than GPT-3, predicting which tasks would show emergent improvement and which would not, then debate their predictions as a class.

Discussion Facilitation Tips

  • When discussing self-attention versus RNNs, use the analogy of reading a sentence: an RNN reads word by word and must remember earlier words, while self-attention reads all words simultaneously and can directly compare any two. This makes the parallelism and long-range dependency advantages concrete for students who have not yet worked through the math.
  • The scaling laws discussion often becomes abstract. Ground it with actual numbers: GPT-3 required roughly 3.14 x 10^23 floating point operations to train and cost an estimated $4-12 million. Asking students what else that budget could fund (research labs, clinical trials, public datasets) tends to sharpen the ethical dimension of the conversation.
  • For the hallucination topic, consider having students interact with a live LLM and deliberately prompt it for obscure facts or complex multi-step reasoning. Observing failures in real time is far more persuasive than describing them abstractly, and it gives students concrete intuition about where the model breaks down.
  • On emergent capabilities, remind students that "emergent" does not mean "magical." Encourage them to think about what combinations of sub-capabilities (pattern matching, syntactic understanding, world knowledge) might compose into a higher-level ability like arithmetic, and where those sub-capabilities come from in the pre-training data.