Generative AI and LLMs for Developers: How They Actually Work
1h 38mBeginner2026-07-30
Authors

Laurence Moroney
Course details
Generative AI tools like ChatGPT and Stable Diffusion can feel like magic, but under the hood, they follow clear and understandable patterns. In this course, instructor Laurence Moroney shows you how generative AI actually works, without getting lost in heavy math or academic theory. Break down the core building blocks of modern AI systems, including tokens, embeddings, attention, transformers, and diffusion models. Learn how text and images are generated step by step, from predicting the next token to transforming noise into visual content. By the end of this course, you’ll be equipped with a practical mental model for reasoning about how these systems behave, why they make certain mistakes, and how to work with them more effectively. This course is an ideal fit for software developers, engineers, technical product managers, and data professionals.
Learning objectives
Explain how generative AI models produce outputs using next-token prediction and probabilistic sampling.
Describe how text is converted into tokens, embeddings, and numerical representations for model processing.
Explain how attention and transformer architectures enable models to understand context and relationships in data.
Compare how text models (transformers) and image models (diffusion) generate outputs using different approaches.
Apply a practical mental model to reason about how modern generative AI systems behave and perform.
Learning objectives
Explain how generative AI models produce outputs using next-token prediction and probabilistic sampling.
Describe how text is converted into tokens, embeddings, and numerical representations for model processing.
Explain how attention and transformer architectures enable models to understand context and relationships in data.
Compare how text models (transformers) and image models (diffusion) generate outputs using different approaches.
Apply a practical mental model to reason about how modern generative AI systems behave and perform.
Concepts
Introduction
- Cracking open the generative AI black box
Framing the Landscape
- What generative actually means
- A very short history - From n-grams to foundation models
How Text Becomes Math
- Tokens - Turning text into integers
- Embeddings - Giving tokens meaning
- Vector space intuition
- Positional encoding - Teaching order to a bag of vectors
Attention and the Transformer
- The core problem - Context-dependent meaning
- Attention in plain English
- Self-attention - Step by step
- Multihead attention
- The full transformer block
Training and Generating Text
- Next-token prediction as a training objective
- Sampling - How a probability distribution becomes text
- From base model to assistant - Fine-tuning and RLHF
Diffusion Models
- A different problem - Generating images
- The core idea - Learn to denoise
- The U-Net - The workhorse behind the magic
- Text-to-image - Guiding diffusion with language
- Latent diffusion - Why Stable Diffusion is fast
Conclusion
- Putting it all together
- Where to go next