Repository navigation
v2.48.0: run LLMPPO actor and critic as separate or fused passes, picked by memory estimate
Features
-
run LLMPPO actor and critic as separate or fused passes, picked by memory estimate
LLMPPOruns the actor (policy and KL loss) and the critic (value loss) as separate forward/backward passes per micro-batch, so peak activation memory is one batch of rows, not two. This covers both the Liger and unfused loss paths.- New
fuse_actor_critic_pass: bool | None = NoneonLLMPPOandLLMPPOSpec.Trueruns one fused pass,Falseruns two.Nonefuses when theagilerl.arena.memoryestimate of the fused pass fits the GPU, and fuses on non-CUDA devices. The choice is re-resolved on checkpoint load. - On the Liger path the critic pass runs under the critic adapter, so the value loss trains the critic LoRA.
- The critic adapter stays trainable after FSDP2 replaces the model's parameters.
- With
activation_offload=True, the split Liger actor pass also offloads saved activations to CPU. - The fused-pass memory estimate uses the packed-expert LoRA path the model actually runs.
- PPO
learnreports actor and critic gradient norms before and after clipping. agilerl-arenamemory estimator:TrainingSettingsgainsfuse_actor_critic_pass(PPO only) andmicro_batch_size.agilerlnow requiresagilerl-arena>=1.18.0.
Full Changelog: v2.47.0...v2.48.0