AI ENGINEERING
Part 8 of the Reinforcement Learning course is available now.
It covers PPO, the algorithm that laid the foundation for everything we are seeing right now in LLM alignment and modern RL. RLHF for ChatGPT was built on PPO.
GRPO, DPO, and every major alternative that followed were designed in direct response to it.
You can read Part 8 of the course here →
It covers:
- Why large policy updates can cause irreversible collapse
- How trust regions keep updates safe
- The clipped surrogate objective
- How the full PPO algorithm works
- The KL-penalty variant used in LLM alignment like PPO
- Practical diagnostics for spotting unhealthy training runs
- A from-scratch implementation trained on LunarLander
- How PPO connects to RLHF for language models
Everything is covered from scratch, so no RL background is required.
You can read Part 8 of the course here →
Why care?
PPO is the algorithm that started the current era of LLM alignment.
When OpenAI first aligned language models with human preferences, the RL algorithm underneath was PPO.
Every major alternative that came after was designed with PPO as the reference point.
- DPO was introduced specifically to avoid the complexity of running PPO’s RL loop.
- GRPO modified the advantage estimation to remove the need for a learned critic.
- Constitutional AI restructured the reward signal but kept the same trust-region optimization underneath.
You cannot fully understand any of these methods without understanding the algorithm they are all responding to.
Beyond language models, PPO remains the go-to algorithm across robotics, game-playing, and agentic systems.
It earned that position by being simple enough to implement in a few hundred lines of PyTorch and robust enough to handle a remarkably wide range of problems with minimal tuning.
This chapter is also the convergence point of the series. Every idea we have covered so far (value functions, policy gradients, actor-critic, GAE) comes together here into one working system.
Here’s what we have covered so far:
Just like the MLOps course, each chapter will clearly explain necessary concepts, provide examples, diagrams, and implementations.
👉 Over to you: What topics would you like us to cover in this RL series?