This course provides a practical introduction to using transformer-based models for natural language processing (NLP) applications. You will learn to build and train models for text classification using encoder-based architectures like Bidirectional Encoder Representations from Transformers (BERT), and explore core concepts such as positional encoding, word embeddings, and attention mechanisms.

Early bird sale! Unlock 10,000+ courses from Google, Microsoft, and more for £160/year. Save now.


Generative AI Language Modeling with Transformers
This course is part of multiple programs.



Instructors: Joseph Santarcangelo +2 more
11,077 already enrolled
Included with
(85 reviews)
Recommended experience
What you'll learn
Explain the role of attention mechanisms in transformer models for capturing contextual relationships in text
Describe the differences in language modeling approaches between decoder-based models like GPT and encoder-based models like BERT
Implement key components of transformer models, including positional encoding, attention mechanisms, and masking, using PyTorch
Apply transformer-based models for real-world NLP tasks, such as text classification and language translation, using PyTorch and Hugging Face tools
Skills you'll gain
- Category: Text Mining
- Category: Large Language Modeling
- Category: Machine Learning Methods
- Category: PyTorch (Machine Learning Library)
- Category: Natural Language Processing
- Category: Generative AI
- Category: Deep Learning
- Category: Applied Machine Learning
Details to know

Add to your LinkedIn profile
6 assignments
Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate

There are 2 modules in this course
In this module, you will learn how transformers process sequential data using positional encoding and attention mechanisms. You will explore how to implement positional encoding in PyTorch and understand how attention helps models focus on relevant parts of input sequences. You'll dive deeper into self-attention and scaled dot-product attention with multiple heads to see how they contribute to language modeling tasks. The module also explains how the transformer architecture leverages these mechanisms efficiently. Through hands-on labs, you’ll implement these concepts and build transformer encoder layers in PyTorch. Finally, you'll apply transformer models for text classification, including building a data pipeline, defining the model, and training it, while also exploring techniques to optimize transformer training performance.
What's included
6 videos4 readings2 assignments2 app items1 plugin
In this module, you will learn how decoder-based models like GPT are trained using causal language modeling and implemented in PyTorch for both training and inference. You will explore encoder-based models, such as Bidirectional Encoder Representations from Transformers (BERT), and understand their pretraining strategies using masked language modeling (MLM) and next sentence prediction (NSP), along with data preparation techniques in PyTorch. You will also examine how transformer architectures are applied to machine translation, including their implementation using PyTorch. Through hands-on labs, you will gain practical experience with decoder models, encoder models, and translation tasks. The module concludes with a cheat sheet, glossary, and summary to help consolidate your understanding of key concepts.
What's included
10 videos6 readings4 assignments4 app items2 plugins
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructors

Offered by

Why people choose Coursera for their career




Learner reviews
85 reviews
- 5 stars
75.58%
- 4 stars
13.95%
- 3 stars
3.48%
- 2 stars
1.16%
- 1 star
5.81%
Showing 3 of 85
Reviewed on Nov 17, 2024
need assistance from humans, which seems lacking though a coach can give guidance but not to the extent of human touch.
Reviewed on Jan 18, 2025
Exceptional course and all the labs are industry related
Reviewed on Dec 30, 2024
This course gives me a wide picture of what transformers can be.
Frequently asked questions
It will take only two weeks to complete this course if you spend 3–5 hours of study time per week.
It would be good if you had a basic knowledge of Python and a familiarity with machine learning and neural network concepts. It would be beneficial if you are familiar with text preprocessing steps and N-gram, Word2Vec, and sequence-to-sequence models. Knowledge of evaluation metrics such as bilingual evaluation understudy (BLEU) will be advantageous.
This course is part of the Generative AI Engineering Essentials with LLMs PC specialization. When you complete the specialization, you will prepare yourself with the skills and confidence to take on jobs such as AI Engineer, NLP Engineer, Machine Learning Engineer, Deep Learning Engineer, and Data Scientist.