Large language models such as GPT-3.5, which powers ChatGPT, are changing how humans interact with computers and how computers can process text. This course will introduce the fundamental ideas of natural language processing and language modelling that underpin these large language models. We will explore the basics of how language models work, and the specifics of how newer neural-based approaches are built. We will examine the key innovations that have enabled Transformer-based large language models to become dominant in solving various language tasks. Finally, we will examine the challenges in applying these large language models to various problems including the ethical problems involved in their construction and use.
Through hands-on labs, we will learn about the building blocks of Transformers and apply them for generating new text. These Python exercises step you through the process of applying a smaller language model and understanding how it can be evaluated and applied to various problems. Regular practice quizzes will help reinforce the knowledge and prepare you for the graded assessments.
This module introduces the concept of language modelling, which is the foundation of models like GPT.
What's included
6 videos1 reading4 assignments3 ungraded labs
Show info about module content
6 videos•Total 24 minutes
Course and Instructor Introductions•2 minutes
What is a Language Model?•4 minutes
N-gram Language Models•6 minutes
Evaluating Language Models•6 minutes
Generating Text•6 minutes
Summary of Module•1 minute
1 reading•Total 120 minutes
Optional Reading•120 minutes
4 assignments•Total 60 minutes
Module 1 Lesson 1 Practice Quiz•10 minutes
Module 1 Lesson 2 Practice Quiz•10 minutes
Module 1 Lesson 3 Practice Quiz•10 minutes
Module 1 Quiz•30 minutes
3 ungraded labs•Total 80 minutes
Building Your Own N-Gram Language Model•30 minutes
Calculating Perplexity from an N-Gram Language Model•20 minutes
Building a Simple Text Generator•30 minutes
Transformers and GPT
Module 2•4 hours to complete
Module details
This module describes the technical background for neural language models and an overview of how they are used to generate text.
What's included
10 videos1 reading4 assignments4 ungraded labs
Show info about module content
10 videos•Total 54 minutes
Introduction to Week•2 minutes
Representing text with numerical vectors•6 minutes
Words, tokens or sub-tokens•7 minutes
Neural language models•4 minutes
The Transformer architecture•8 minutes
How are Transformers trained?•7 minutes
GPT and BERT•7 minutes
Using GPT•5 minutes
The ethical challenges of large language models•7 minutes
Wrap-up of the module•2 minutes
1 reading•Total 30 minutes
On the Dangers of Stochastic Parrots•30 minutes
4 assignments•Total 60 minutes
Module 2 Lesson 1 Practice Quiz•10 minutes
Module 2 Lesson 2 Practice Quiz•10 minutes
Module 2 Lesson 3 Practice Quiz•10 minutes
Module 2 Quiz•30 minutes
4 ungraded labs•Total 70 minutes
Tokenization•20 minutes
Language Modelling with Transformers•15 minutes
Calculating perplexity•15 minutes
Language Generation with Transformers•20 minutes
Applications and Implications
Module 3•4 hours to complete
Module details
This module discusses considerations that are necessary when using GPT and similar models in real-world contexts, specifically discussing the risks of using these models and approaches to mitigating these risks.
What's included
7 videos12 readings4 assignments1 ungraded lab
Show info about module content
7 videos•Total 57 minutes
Introduction to the Module•3 minutes
Hallucinations in LLMs•10 minutes
Chatbots, RLHF, and ChatGPT•10 minutes
Academic conduct•12 minutes
Creativity and copyright•9 minutes
Regulation and risks•10 minutes
Course Recap•2 minutes
12 readings•Total 140 minutes
Optional: ChatGPT Lawyer details•10 minutes
Required: OpenAI blog post about ChatGPT and RLHF•10 minutes
Required: Research about AI detectors and non-native speakers•10 minutes
Optional: Ouyang et al. (2022) paper about InstructGPT•10 minutes
Optional: News stories about the humans in RLHF•10 minutes
Optional: Russell Group and University of Glasgow Principles on AI in Education•10 minutes
Required: Scientific American article on AI risks•10 minutes
Optional: AI-generated e-books and journalism•30 minutes
Optional: Generative AI, copyright, and Hollywood strikes•10 minutes
Optional: Open letters•10 minutes
Optional: Information on draft legislation•10 minutes
Optional: One Hundred Year Study on Artificial Intelligence•10 minutes
4 assignments•Total 60 minutes
Module 3 Lesson 1 Practice Quiz•10 minutes
Module 3 Lesson 2 Practice Quiz•10 minutes
Module 3 Lesson 3 Practice Quiz•10 minutes
Module 3 Quiz•30 minutes
1 ungraded lab•Total 5 minutes
Basic Chatbot•5 minutes
Instructors
Instructor ratings
Instructor ratings
We asked all learners to give feedback on our instructors based on the quality of their teaching style.
The University of Glasgow has been changing the world since 1451. It is a world top 100 university (THE, QS) with one of the largest research bases in the UK.
We are a member of the prestigious Russell Group of leading UK Universities with annual research income of more than £179m.
The University’s #TeamUofG community is truly international with over 8000 staff and 28,0000 students from more than 140 countries.
A 2019 Time Out survey placed Glasgow in the top ten cities in the world. Ranked between Berlin and Paris, Glasgow was voted number one for both friendliness and affordability.
Right now our dedicated community of staff, students and alumni is working to address the challenges of Covid-19 and understand how we can make life safer for everyone.
When will I have access to the lectures and assignments?
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
What will I get if I purchase the Certificate?
When you purchase a Certificate you get access to all course materials, including graded assignments. Upon completing the course, your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Is financial aid available?
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.