VOOZH about

URL: https://www.coursera.org/learn/generative-ai-language-modeling-with-transformers

⇱ Generative AI Language Modeling with Transformers | Coursera


Generative AI Language Modeling with Transformers

Keep adding new skills with 10,000+ programs for $239 (usually $399). Save now.

Generative AI Language Modeling with Transformers

This course is part of multiple programs.

29,158 already enrolled

Included with

Ask Coursera

Gain insight into a topic and learn the fundamentals.
4.5

150 reviews

Intermediate level

Recommended experience

Flexible schedule
9 hours to complete
Learn at your own pace
90%
Most learners liked this course

Gain insight into a topic and learn the fundamentals.
4.5

150 reviews

Intermediate level

Recommended experience

Flexible schedule
9 hours to complete
Learn at your own pace
90%
Most learners liked this course

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

Details to know

Shareable certificate

Add to your LinkedIn profile

Assessments

6 assignments

Taught in English

Build your subject-matter expertise

This course is available as part of
When you enroll in this course, you'll also be asked to select a specific program.
  • 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

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.

The course covers multi-head attention, self-attention, and causal language modeling with GPT for tasks like text generation and translation. You will gain hands-on experience implementing transformer models in PyTorch, including pretraining strategies such as masked language modeling (MLM) and next sentence prediction (NSP). Through guided labs, you’ll apply encoder and decoder models to real-world scenarios. This course is designed for learners interested in generative AI engineering and requires prior knowledge of Python, PyTorch, and machine learning. Enroll now to build your skills in NLP with transformers!

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 items2 plugins

6 videosTotal 40 minutes
  • Course Introduction3 minutes
  • Positional Encoding7 minutes
  • Attention Mechanism7 minutes
  • Self-attention Mechanism7 minutes
  • From Attention to Transformers7 minutes
  • Transformers for Classification: Encoder9 minutes
4 readingsTotal 17 minutes
  • Course Overview5 minutes
  • Specialization Overview7 minutes
  • Optimization Techniques for Efficient Transformer Training 3 minutes
  • Summary and Highlights2 minutes
2 assignmentsTotal 45 minutes
  • Graded Quiz: Fundamental Concepts of Transformer Architecture30 minutes
  • Practice Quiz: Positional Encoding, Attention, and Application in Classification15 minutes
2 app itemsTotal 105 minutes
  • Hands-on Lab: Attention Mechanism and Positional Encoding45 minutes
  • Hands-on Lab: Applying Transformers for Classification60 minutes
2 pluginsTotal 7 minutes
  • Helpful Tips for Course Completion2 minutes
  • Reading: Beginner's Guide to Transformer Model Fundamentals5 minutes

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 items3 plugins

10 videosTotal 67 minutes
  • Language Modeling with the Decoders and GPT-like Models7 minutes
  • Training Decoder Models7 minutes
  • Decoder Models- PyTorch Implementation-Causal LM6 minutes
  • Decoder Models: PyTorch Implementation Using Training and Inference5 minutes
  • Encoder Models with BERT: Pretraining Using MLM6 minutes
  • Encoder Models with BERT: Pretraining Using NSP6 minutes
  • Data Preparation for BERT with PyTorch9 minutes
  • Pretraining BERT Models with PyTorch8 minutes
  • Transformer Architecture for Language Translation5 minutes
  • Transformer Architecture for Translation: PyTorch Implementation8 minutes
6 readingsTotal 9 minutes
  • Summary and Highlights1 minute
  • Summary and Highlights1 minute
  • Summary and Highlights1 minute
  • Course Conclusion2 minutes
  • Thanks from the Course team2 minutes
  • Congratulations and Next Steps2 minutes
4 assignmentsTotal 63 minutes
  • Graded Quiz: Advanced Concepts of Transformer Architecture30 minutes
  • Practice Quiz: Decoder Models12 minutes
  • Practice Quiz: Encoder Models12 minutes
  • Practice Quiz: Application of Transformers for Translation9 minutes
4 app itemsTotal 180 minutes
  • Hands-on Lab: Decoder GPT-like Models45 minutes
  • Hands-on Lab: Pretraining BERT Models60 minutes
  • Hands-on Lab: Data Preparation for BERT45 minutes
  • Lab: Transformers for Translation30 minutes
3 pluginsTotal 25 minutes
  • Reading: Getting Started with Advanced Concepts of Transformer Models7 minutes
  • Cheat Sheet: Language Modeling with Transformers15 minutes
  • Course Glossary: Language Modeling with Transformers 3 minutes

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

Instructor ratings
4.3 (32 ratings)
IBM
37 Courses2,497,133 learners

Offered by

Explore more from Machine Learning

Why people choose Coursera for their career

👁 Image

Felipe M.

Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
👁 Image

Jennifer J.

Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
👁 Image

Larry W.

Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
👁 Image

Chaitanya A.

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

Learner reviews

  • 5 stars

    74%

  • 4 stars

    13.33%

  • 3 stars

    4.66%

  • 2 stars

    2%

  • 1 star

    6%

Showing 3 of 150

RR
·

Reviewed on Sep 1, 2025

I loved this course. It is very informative and has a lot of examples. It will take some time to master all this information.

AB
·

Reviewed on Dec 29, 2024

This course gives me a wide picture of what transformers can be.

PA
·

Reviewed on Nov 4, 2025

Excellent course to understand about AI/ML/GenAI. The videos are not very detailed and just the right amount to skim through the details.

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.

Only a modern web browser is required to complete this course and all hands-on labs. You will be provided access to cloud-based environments to complete the labs at no charge.

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.

When you enroll in the course, you get access to all of the courses in the Certificate, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.

Financial aid available,