Skip to main content

Large Language Models: Foundations, Training, and Inference (364-0-20)

Instructors

Lizhen Shi

Meeting Info

555 Clark B03: Mon, Wed 3:30PM - 4:50PM

Overview of class

Large Language Models (LLMs) power modern AI systems such as chatbots, code assistants, and domain-specific foundation models. Rather than treating LLMs as a single architectural breakthrough, this course presents them as the result of an evolution in language modeling, representation learning, and scalable training. The course begins with the historical foundations of language modeling, including words, tokens, and embeddings. We then examine the limitations of traditional statistical approaches and study how attention mechanisms and transformer architectures enabled the development of scalable language models. Building on this foundation, we explore modern LLM pipelines, including pretraining objectives, tokenization, scaling laws, instruction tuning, preference alignment, prompting, and inference-time decoding.

The course emphasizes conceptual understanding over framework-specific details: students learn not only how LLMs work, but also why key design choices succeed, what trade-offs they introduce, and where current models still fail. Students complete three coding assignments in Python and PyTorch and a final project applying course concepts to an applied or research-oriented problem. The course is designed for a mixed audience of advanced undergraduate, master's, and PhD students; all students share a common conceptual core, while the expected depth of analysis, independence, engagement with research literature, and final project scope scale by academic level.

Registration Requirements

Prior coursework in machine learning, linear algebra, and probability/statistics, and programming experience in Python:

Machine learning: STAT 362-0, COMP SCI 349-0, STAT 415-0, or equivalent.

Linear algebra: MATH 240-0, MATH 281-3, MATH 285-1, MATH 290-1, MATH 291-1, GEN ENG 205-1, GEN ENG 206-1, or equivalent.

Probability/statistics: STAT 320-1, STAT 383-0, MATH 310-1, MATH 311-1, MATH 314-0, MATH 385-0, ELEC ENG 302-0, IEMS 302-0, or equivalent.

Students with comparable preparation may enroll with permission of the instructor.

Learning Objectives

At the completion of this course, students should be able to:
Explain the historical evolution of LLMs from statistical language modeling to transformers.
Describe how transformer-based language models work and why scaling matters.
Understand the end-to-end LLM pipeline: tokenization, pretraining, post-training, and inference.
Evaluate trade-offs, limitations, and failure modes of modern LLMs.
Apply course concepts in coding assignments and a final project grounded in research literature.

Teaching Method

In-class lectures emphasizing conceptual understanding and system-level reasoning about large language models, combined with interactive assessment and feedback through Poll Everywhere (concept checks, reading-based or reflection questions, and short surveys). Pre-class preparation, coding assignments, paper readings, and quizzes are listed on weekly course pages. Questions are handled through Ed Discussion and virtual office hours.

Evaluation Method

Coding Assignments (three): 45%
Final Project: 30%
In-Class Assessments: 16%
Participation (surveys, Ed Discussion participation, attendance): 9%

All students are assessed on the same grading categories and learning goals. Graduate students are held to higher expectations for independence, depth of analysis, engagement with research literature, and technical communication. On coding assignments they receive less scaffolding and complete additional analysis or reflection components, and graduate final projects must include a research-oriented question, a literature-grounded comparison, an extension of an existing method, or a more substantial empirical evaluation.

Class Materials (Required)

Daniel Jurafsky and James H. Martin, Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition with Language Models, Third Edition draft. Freely available online from the authors (no cost; no ISBN, as this is a pre-publication draft).
A laptop capable of running Python, VS Code, uv, and Quarto (all free software).

Class Materials (Suggested)

Additional readings, including selected research papers and online materials, will be posted on Canvas (no cost).

Class Notes

Python is the primary programming language; students will use PyTorch and related libraries. Setup instructions for VS Code, uv, and Quarto will be provided on Canvas. Some assignments are submitted as Quarto-rendered HTML files.

Class Attributes

SoC Individual and Social Behavior Distro
SoC Mathematics, Science, and Technology Distro

Enrollment Requirements

Enrollment Requirements: Prerequisites: STAT 362-0, COMP_SCI 349-0, or STAT 415-0; and MATH 240-0/281-3/285-1/290-1/291-1, GEN_ENG 205-1, or GEN_ENG 206-1; and STAT 320-1, STAT 383-0, MATH 310-1/311-1/314-0/385-0, ELEC_ENG 302-0, IEMS 302-0, or equivalent.