Stanford Root

Schedule

Stanford Root

Schedule

CS 336

Language Modeling from Scratch

UNITS:3-5
GRADING:Letter or Credit/No Credit
LEVEL:Graduate
GER:—

Language models serve as the cornerstone of modern natural language processing (NLP) applications and open up a new paradigm of having a single general purpose system address a range of downstream tasks. As the field of artificial intelligence (AI), machine learning (ML), and NLP continues to grow, possessing a deep understanding of language models becomes essential for scientists and engineers alike. This course is designed to provide students with a comprehensive understanding of language models by walking them through the entire process of developing their own. Drawing inspiration from operating systems courses that create an entire operating system from scratch, we will lead students through every aspect of language model creation, including data collection and cleansing for pre-training, transformer model construction, model training, and evaluation before deployment. Application required, apply at http://cs336.stanford.edu/

Syllabus for selected term:
View Spring 2027 Syllabus

Sections

1 Term
Lecture 1Open
ID: 2014
0 / 100 enrolled
DAYS:Monday, Wednesday
TIME:3 PM – 4:20 PM
LOCATION:TBD
INSTRUCTOR:
Liang, Percy, Hashimoto, Tatsunori, Cao, Steven, Roed, Marcel, Brunborg, Herman
units

CS 336: Language Modeling from Scratch

3-5 units · Letter or Credit/No Credit

Language models serve as the cornerstone of modern natural language processing (NLP) applications and open up a new paradigm of having a single general purpose system address a range of downstream tasks. As the field of artificial intelligence (AI), machine learning (ML), and NLP continues to grow, possessing a deep understanding of language models becomes essential for scientists and engineers alike. This course is designed to provide students with a comprehensive understanding of language models by walking them through the entire process of developing their own. Drawing inspiration from operating systems courses that create an entire operating system from scratch, we will lead students through every aspect of language model creation, including data collection and cleansing for pre-training, transformer model construction, model training, and evaluation before deployment. Application required, apply at http://cs336.stanford.edu/

Offered in Spring 2027 at Stanford University.

Spring 2027 sections

  • Lecture — Monday Wednesday 3:00 PM – 4:20 PM — Liang, Percy, Hashimoto, Tatsunori, Cao, Steven, Roed, Marcel, Brunborg, Herman (Graduate)

More CS courses

  • CS 329T: Trustworthy Machine Learning: Building and evaluating agentic systems
  • CS 329X: Human Centered NLP (CS 129X)
  • CS 329Z: Engineering AI Agents
  • CS 331X: AI for Algorithmic Reasoning and Optimization (MS&E 331)
  • CS 333: Algorithms for Interactive Robotics
  • CS 334: Robots and Arts: Creative Applications and Projects (TAPS 334R)
  • CS 337: AI-Assisted Care (BIOE 277, MED 277, PSYC 278)
  • CS 338: Aligning Superintelligence (MS&E 338)
  • CS 339R: Collaborative Robotics (ME 326)
  • CS 340LX: Advanced Operating System Lab: Accelerated (II)
  • CS 340R: Rusty Systems
  • CS 342: Building for Digital Health (MED 253)

All CS courses · All departments