Course Overview
Generative AI is transforming how machines create images, text and multimodal content. This course gives you both the conceptual foundations and the practical coding experience needed to understand how these systems work, moving step by step from foundational neural networks and GANs to multimodal AI, visual LLM exploration and modern LLM fine-tuning techniques.
Build and Understand Generative AI with Python and PyTorch
Understand the foundations of machine learning, deep learning and generative modelling
Compare GANs, autoregressive models (LLMs), variational autoencoders (VAEs), diffusion models and flow-based models
Build basic and advanced generative adversarial networks from scratch with Python and PyTorch
Understand adversarial training, generators, discriminators, loss functions and latent representations
Explore latent spaces, representation learning, interpolation and creative generation
Understand CLIP and the foundations of multimodal AI
Fine-tune open-source LLMs using LoRA and QLoRA
Visually explore large language models (LLMs), including attention mechanisms, token relationships and internal model behaviour
Follow the code line by line while connecting every implementation choice to the underlying theory
The course begins with a broad introduction to Generative AI, covering its major architecture families, machine learning foundations, applications, ethical challenges and future possibilities.
We then move into hands-on coding. Two sections are dedicated to building and understanding generative adversarial networks: first a foundational GAN architecture and then a more advanced system. These projects allow you to understand adversarial training, generators and discriminators, loss functions, latent spaces and the practical challenges involved in training generative neural networks.
From there, the course expands beyond GANs into other areas of the Generative AI ecosystem. You will explore CLIP and multimodal AI, work with architectures that connect images, text and semantic representations, and study practical applications such as image generation, segmentation and the modification of visual elements such as a person’s clothing.
The modern LLM sections take you inside transformer-based language models through visual explorations of attention, token relationships and internal model behaviour. You will then move from visualization and conceptual understanding to practical application by preparing data and fine-tuning open-source language models with LoRA and QLoRA.
The course also includes an optional deeper journey into latent spaces and representation learning, together with distinctive visual and guided experiences—including an origami-based section designed to make AI processes more intuitive and memorable.
At the beginning of each section, I explain the key concepts in depth. After that, we work through the implementations together in Python and PyTorch. You will not simply run finished notebooks: the goal is to understand what every component does, why it is needed and how the complete system fits together.
By the end of the course, you will have a broad understanding of the Generative AI ecosystem and practical experience building GANs, working with CLIP and multimodal AI, visually exploring LLMs and fine-tuning language models using LoRA and QLoRA.
What a time to be alive! We are able to code and understand architectures that bring us home, home to our own human nature, capable of creating and imagining. Together, we will make it happen. Let's do it!
FAQ
FAQ area empty
Course curriculum
Chương 1 Introduction to Generative AI 10 bài · 58 phút
- The roadmap, from basic to advanced and beyond Học thử 2:57
- Javier sends greetings from his spacecraft Học thử 1:08
- Generative modelling, Evolution of Generative AI and Overview of applications Học thử 6:44
-
Building Blocks of Machine Creativity: Machine Learning Foundations for Gen AI 12:21
- Architectures of Machine Imagination, from GANs to Diffusion, LLMs and beyond Học thử 13:26
-
Machine Creativity Meets Real-World Impact - Applications of Generative AI 6:49
- The Ethics of Machine Creativity: Challenges and Considerations in Generative AI Học thử 4:40
- Worlds Reimagined: Visions of the Future with Generative AI Học thử 6:43
- Summary and closing thoughts about this intro of GenAI Học thử 3:22
-
Review Quiz
Chương 2 Optional: A Deeper Journey into the Latent Spaces of Generative AI 4 bài · 25 phút
-
Latent spaces and representation learning 8:54
-
Navigating latent spaces 9:10
-
Coming home: generative AI and human nature 4:21
-
Javier sings a song dedicated to generative AI 2:07
Chương 3 Coding a basic generative architecture 16 bài · 1 giờ 51 phút
-
Javier introduces section 3 from his spacecraft 0:27
-
Understanding the battle between generator and discriminator 8:58
-
Understanding Cross Entropy in depth 10:23
-
Understanding the equation to calculate the discriminator loss 5:19
-
Understanding the equation to calculate the generator loss 3:05
-
(Optional) Google Colab Tutorial 12:20
-
Coding: importing libraries and declaring a visualization function 13:48
-
Coding: hyperparameters and the DataLoader 9:15
-
Coding: the generator class 8:17
-
Coding: the discriminator class 6:34
-
Coding: the optimizer and testing the generator 7:35
-
Coding: the loss values of generator and discriminator 8:52
-
Coding: main training loop, discriminator part 6:12
-
Coding: main training loop, generator and stats 7:08
-
Coding: running the training 1:18
-
Coding: results and conclusions 1:03
Chương 4 Coding an advanced generative architecture 25 bài · 2 giờ 53 phút
-
Javier introduces section 4 from his spacecraft 0:54
-
Challenges and issues of the basic GAN 6:54
-
The Wasserstein Loss 7:31
-
The Gradient Penalty 5:26
-
Coding: setting up libraries and parameters 13:27
-
Coding: Login and setup of the Wandb stats library 4:47
-
Coding: Beginning the generator 4:36
-
Coding: Understanding convolutions 13:18
-
Coding: The generator class 13:39
-
Coding: The critic class 13:08
-
Coding: Alternative way to initialize parameters (optional) 3:19
-
Coding: Loading the CelebA dataset 7:00
-
Coding: Declaring dataset, dataloader and optimizers 17:29
-
Coding: the gradient penalty 6:53
-
Coding: saving and loading checkpoints 7:05
-
Coding: training loop - critic training 5:18
-
Coding: training loop - generator training 1:31
-
Coding: stats and fixing issues 10:27
-
Coding: reviewing the code before running the training 5:25
-
Coding: running the training 4:16
-
Coding: results after a few epochs 3:11
-
Coding: results after a few more epochs 1:30
-
Coding: results getting better and better 2:07
-
Coding: morphing between points in latent space 12:01
-
Coding: more morphing 1:35
Chương 5 Generating images from text by combining two advanced architectures 19 bài · 2 giờ 20 phút
-
Javier introduces section 5 from his spacecraft 0:58
-
Multimodal generation, an incredible adventure 12:01
-
Coding: importing the libraries 5:26
-
Coding: helper functions and hyperparameters 7:26
-
Coding: Setting up the CLIP model 3:20
-
Coding: Setting up the Generative transformer model 11:47
-
Coding: Setting up the latent space parameters to be optimized 6:35
-
Coding: encode the text prompts through CLIP 11:40
-
Coding: creating crops from the generated image 10:17
-
Coding: a function to display generated images and crops 3:30
-
Coding: optimizing the latent space parameters 8:49
-
Coding: the training loop 6:13
-
Coding: running the training 13:27
-
Coding: interpolating between points in the latent space 8:23
-
Coding: creating a video of the interpolations and general review 10:47
-
Coding: creating variations of the code 6:45
-
Coding: Davinci Sfumato: Tweaking the code to create a new kind of texture 7:21
-
Coding: Davinci Sfumato: reflecting about the process 4:24
-
Final greetings from the spacecraft 0:53
Chương 6 Editing people's clothes by combining segmentation and generative AI models 9 bài · 1 giờ 14 phút
-
Intro: people's clothes replacement and editing using Generative AI 12:55
-
Coding: Setting up libraries and the segmentation model 10:16
-
Coding: Setting up the Stable Diffusion generative model 5:34
-
Coding: Loading a picture and running the segmentation process to produce masks 9:40
-
Coding: Visualizing the generated masks 7:28
-
Coding: Inpainting, running and experimenting with the Stable Diffusion model 12:26
-
Coding: Guide the segmentation process with text prompts 9:14
-
Coding: run the generative model in this alternative setup 6:07
-
Ending of the section 0:30
Chương 7 Inside ChatGPT: A Visual Journey into How Generative LLMs Understand Language 9 bài · 1 giờ 6 phút
-
Into the AI matrix: Introducing our journey to the core of LLMs 0:57
-
Advanced visualizations of LLM cores: a trailer 1:29
-
Deep dive: attention matrices at the start of LLM training 16:40
-
Tracking peak attention between a specific pair of tokens 9:25
-
Tracking peak attention between semantically meaningful connections 5:16
-
Exploring a set of semantic and structural connections through the training 7:06
-
Visualizing the capture of local sequential dependencies 3:13
-
The importance of understanding the attention matrix 2:21
-
Long-term evolution of attention pattern dynamics 19:29
Chương 8 Add New Skills to LLMs with QLoRA (Practical Fine-Tuning) 12 bài · 2 giờ 14 phút
-
Introduction: Adding New Skills to LLMs with QLoRA 3:22
-
Environment Setup for the QLoRA Project 6:03
-
Setup (Part 2): Model Access and Project Files 5:24
-
Imports, Configuration, and Weights & Biases Logging 7:16
-
Key Hyperparameters Explained (The Config Deep Dive) 16:05
-
Loading Model + Tokenizer, Applying LoRA/QLoRA 13:50
-
Prompt Formatting and Tokenization for Training 7:40
-
Preparing the training parameters 12:10
-
Building the LoRA Dataset (Train/Validation Pipeline) 13:07
-
Launching the QLoRA Fine-Tuning 6:01
-
Evaluate Results: Base Model vs LoRA Model 26:25
-
Evaluation + Validator Pipeline (How We Score Quality) 16:10
Chương 9 Bonus: Journey to the latent space of a Neural Network 13 bài · 54 phút
-
In Search of the Magical Mappings of Creativity 0:44
-
The Search for the Perfect Mapping: datasets and dimensionality 5:50
-
From Linearity to Complexity: Neural Networks and the Nonlinearities of Life 5:24
-
Bending the Rules: Non-Linear transformations and the key to complexity 11:23
-
Not Too Tight, Not Too Loose - Finding the perfect fit 3:23
-
How increasing the dimensionality impacts the latent complexity of the network 4:53
-
The Power of Depth: Creating Sophisticated Mappings with AI networks 5:07
-
From high dimensional manifolds to dynamic and ever changing latent spaces 6:04
-
Advanced digital representations of the latent complexity of neural networks 1:37
-
Visualizing the Journey: Loss Landscapes and the Search for Optimal Weights 4:26
-
Example of the dynamic Loss Landscape of a generative adversarial network 1:23
-
Lucy - Real Time Visualization of the changing weights of a neural network 2:49
-
Charting the hidden depths: a recap of our transformative latent space journey 0:34
Chương 10 Bonus: Activating the Generative Model of your own mind 11 bài · 1 giờ 20 phút
-
A guided visualization experience to exercise the generative model in your head 5:25
-
Intro to the journey to the center of the neuron 4:43
-
The container, the salty ocean and the 150000 cortical columns 7:58
-
Visualizing the pyramidal neuron 17:49
-
The Synapse, visualizing the input-output interface 6:01
-
Biological vs Artificial Neurons: Inputs, Outputs, Speed, etc 8:37
-
Learning in biological and artificial neurons 7:54
-
Planning, decision making and world models 12:32
-
Efficiency: sparsity in biological vs artificial networks 3:08
-
Consciousness: within the neurons 2:50
-
The future, towards AGI / ASI 2:51
Requirment
-
Basic knowledge of python. It's enough with the very basics, as we will code every little thing together, line by line
-
Access to an internet connection, as we will use the free online Google Colab service to code together
-
Plenty of enthusiasm as we will go deep into every little detail, let's do it! :)
Outcomes
-
How to code generative A.I architectures from scratch using Python and Pytorch
-
How generative architectures work, in great depth, from GANs to multimodal A.I and large language models (LLMs), understanding every little detail
-
In addition to the coding, every section begins with an in-depth review of the key concepts related to these architectures
-
Examples: We will code a generative network that produces human faces, and also combine two advanced networks to transform text prompts into amazing images.
-
Examples: We will learn to edit the clothes of a person in a picture by combining a segmentation architecture with the Stable Diffusion generative model
-
Visual Exploration of Large Language Models (LLMs) : Dive inside models like ChatGPT and understand their attention mechanisms
-
Practical fine-tuning of open-source Large Language Models using QLoRA including data preparation, training, evaluation and validation
-
Special Bonus Section: Journey to the latent space of a neural network, learn in depth how the networks that power Generative AI learn their mappings
-
Special Bonus Section: Experience a guided visualization to exercise the generative model in your head while you learn many things about neural networks
0 Student
1 Course
0 review