Large Language Models, Spring 2025
ETH Zürich: Course catalog
Course Description
Large language models have become one of the most commonly deployed NLP inventions. In the past half-decade, their integration into core natural language processing tools has dramatically increased the performance of such tools, and they have entered the public discourse surrounding artificial intelligence. In this course, we start with the probabilistic foundations of language models, i.e., covering what constitutes a language model from a formal, theoretical perspective. We then discuss how to construct and curate training corpora, and introduce many of the neural-network architectures often used to instantiate language models at scale. The course discusses privacy and harms, as well as applications of language models in NLP and beyond.
Pre-requisites: While there are no formal pre-requisites for taking the course, we count on you being comfortable with probability theory, linear algebra, computational complexity, and machine learning.
Syllabus and Schedule
On the Use of Class Time
Lectures
There are two lecture slots for LLM each week:
In-person and Zoom
Both lectures will be given in person and live broadcast on Zoom; the password is available on the course Moodle page.
Recordings: Lectures will be recorded—links to the Zoom recordings will be posted on the course Moodle page.
Tutorials
Tutorials will take place Thursdays 16-18 in NO C 60 and on Zoom.
Syllabus
Tutorial Schedule
Week | Date | Topic | Teaching Assistant | Material |
---|---|---|---|---|
1 | 20. 2. 2025 | Course Logistics (1 hour) | Anej Svete | Introduction Slides |
2 | 27. 2. 2025 | Fundamentals of Natural Language Processing and Language Modeling, Measure Theory, Generation |
Exercises, Exercises with solutions | |
3 | 6. 3. 2025 | Classical Language Models: $n$-grams and Context-free Grammars | Exercises, Exercises with solutions | |
4 | 13. 3. 2025 | RNN Language Models | Exercises, Exercises with solutions | |
5 | 20. 3. 2025 | Transformer Language Models | Exercises, Exercises with solutions, Jupyter Notebook | |
6 | 27. 3. 2025 | Tokenization and Generation | Exercises, Exercises with solutions, Slides | |
7 | 3. 4. 2025 | Assignment 1 Q&A | TAs | |
8 | 10. 4. 2025 | Common pre-trained language models, Parameter-efficient fine-tuning | Google Colab Notebook, Transformer Architecture Drawing | |
9 | 17. 4. 2025 | Retrieval-augmented generation | Google Colab Notebook, Slides | |
10 | 1. 5. 2025 | Prompting, Chain-of-Thought Reasoning | Exercises, Exercises with solutions | |
11 | 8. 5. 2025 | No Tutorial | ||
12 | 15. 5. 2025 | Decoding and Watermarking | Exercises, Exercises with solutions | |
13 | 22. 5. 2025 | Assignment 2 Q&A | TAs | |
14 | 29. 5. 2025 | Assignment 3 Q&A | TAs |
Organization
Moodle as a Communications and Questions-answering Platform
We will use the course Moodle page for course communications and as a place where you can ask questions to the teaching staff. There are several forums you can use to ask specific questions and we encourage you to take advantage of that. We aim to response quickly.
Course Notes
We prepared an extensive set of course notes for the course last semester. We will be improving them as we go this semester as well. Please report all errata you find in the course notes to the teaching staff in the Errata Google document linked on the course Moodle page.
Links to the course notes:
Other useful literature:
- ESSLLI 2023 Tutorial on the Expressivity of Neural Networks
- ESSLLI 2024 Tutorial on the Expressivity of Transformers
- Introduction to Natural Language Processing (Eisenstein)
- Deep Learning (Goodfellow, Bengio and Courville)
- AFLT Course Notes
Grading
Marks for the course will be determined by the following formula:
- 50% Final Exam
- 50% Assignments
Exam
The final exam is comprehensive and should be assumed to cover all the material in the slides and class notes. The date is determined by the ETH examinations office centrally and will be announced towards the end of the semester.
Remote exams: ETH offers a centralized system for taking exams remotely if you are an exchange student or under specific circumstances for ETH students as well. To find out more and arrange a remote exam, please follow the instructions on remote examinations here.
Exam review: After the grades have been announced, you will be able to sign up to the exam review session, which we will offer sometime in the first three weeks of the semester. During the session, you will have the opportunity to review your exam and assignments and understand how they were graded. You will also be able to take notes about the exam and solution, but no copies or photos can be taken. To sign up, we will publish a Google form after the grading conference. Note that we offer only one review session, so individual (or remote) sessions are not possible. See also here for more information about exam reviews in general.
Assignments
There will be three larger assignments in the course. Assignments are individual work, and you are expected to submit your own solutions—solutions that you wrote up yourself and did not copy from any of your peers. Each assignment might, however, follow a different policy on collaboration when it comes to discussing the problems with your peers—please refer to the specific assignment instructions for details.
We require the solutions to be properly typeset.
We recommend using LaTeX
(with Overleaf
; see a submission template below), but markdown
files with something like MathJax
for the mathematical expressions are also fine.
Important: The overleaf template includes a declaration of originality which you should copy into your submission, so make sure you check out the submission template even if you don’t use it for your submission!s
The first assignment will be of more theoretical nature and will be released shortly after the start of the semester. Assignments 2 and 3 will be of more practical nature and will be released in the second half of the semester.
Each of the three assignments contribute 1/3 to the final assignment grade (that is, the assignment grade will be the average of the three individual assignment grades; see the individual assignment instructions for the grading scales).
Assignment instructions:
- Assignment 1 Instructions (last year)
- Assignment 1 Submission Template.
While not strictly necessary, we highly advise you use this template when preparing your submission. It also includes a large number of LaTeX macros which can make your writing faster and easier to read.
Important: Even if you don’t use this template, you should copy the Declaration of originality from the front page into your own submission!
- Assignment 2 Instruction (last year)
- Assignment 3 Instructions (last year)
Assignment Deadlines
You will submit your assignments via Moodle.
- Assignment 1 is due on Wednesday, April 30th at 23:59.
Please be proactive with your time management and start early. Barring exceptional circumstances that do not only affect the last two weeks before the deadline (e.g., prolonged illness, family emergency, or severe mistakes in the assignment setup), we will not accept requests for deadline extensions—neither individual nor group requests. Late submissions will not be graded.