Training frontier foundation models does not end with autoregressive pre-training. Aligning models to follow instructions safely and avoid generating toxic or harmful content requires Reinforcement Learning from Human Feedback (RLHF).
Unlike standard distributed pre-training (which streams text batches through a single model replica), distributed RLHF is an unprecedented distributed systems challenge: it requires coordinating four separate deep neural network models simultaneously across GPU clusters:
- The Actor (Policy) Model: Generates rollouts and updates weights via gradient descent.
- The Reference Model: Frozen base model enforcing KL-divergence safety boundaries.
- The Reward Model: Evaluates rollout responses and outputs scalar reward scores.
- The Critic (Value) Model: Estimates expected returns for Generalized Advantage Estimation (GAE).
This module deconstructs the distributed infrastructure powering RLHF:
- Four-Model GPU Topology: Colocating vs. disaggregating inference rollouts and training backpropagation.
- PPO vs. DPO: Why Direct Preference Optimization eliminates the Critic and Reward models, reducing memory footprints by .
- Distributed Ray Orchestration: Managing GPU memory migrations, actor placement groups, and streaming tensors between vLLM inference and Megatron/DeepSpeed training engines.