Post-training alignment has shifted from offline preference tuning to large-scale, online reinforcement learning. Modern post-training loops for reasoning models, agentic workflows, and conversational alignment require coordinating multiple distinct neural network roles simultaneously. Under standard Proximal Policy Optimization (PPO), an RL infrastructure pipeline must manage up to four distinct model instances: the Actor (the active policy undergoing gradient updates), the Critic (the value model estimating expected cumulative reward), the Reference Model (a frozen copy of the initial policy providing a Kullback-Leibler divergence penalty), and the Reward Model (scoring task outputs).
Managing these four models in a distributed cluster introduces severe systems bottlenecks. The operational demands of generation (rollout) and gradient optimization (training) are fundamentally asymmetric. Autoregressive rollout decoding is memory-bandwidth bound, demanding high tensor parallelism, continuous batching, and dynamic KV cache allocation via inference runtimes such as vLLM or SGLang. Conversely, policy and value model training are compute-bound GEMM workloads, requiring distributed training frameworks like PyTorch FSDP, DeepSpeed ZeRO-3, or Megatron-LM with 3D parallelism.
Three primary open-source frameworks have emerged to orchestrate distributed RL post-training: OpenRLHF, verl (Volcano Engine Reinforcement Learning, based on the HybridFlow architecture), and Hugging Face's TRL (Transformer Reinforcement Learning). Understanding the underlying resource scheduling, memory topologies, and weight synchronization mechanics of each framework is critical for engineering stable, cost-effective post-training clusters.
The Multi-Model Distributed Bottleneck
In a classical distributed training job (such as pre-training or supervised fine-tuning), all worker nodes execute identical forward and backward passes over partitioned mini-batches. Online reinforcement learning breaks this symmetry.
- The Four-Model Memory Footprint: Allocating the Actor, Critic, Reference, and Reward models across a GPU cluster quickly exhausts high-bandwidth memory (HBM). For a 70-billion parameter model in 16-bit precision, storing base weights alone requires 140 GB per model instance. Adding optimizer states (such as 8-byte FP32 Adam states under ZeRO-3 or FSDP) expands the Actor memory requirement to over 560 GB before accounting for activations and rollout KV caches.
- Computational Asymmetry: During each RL iteration, the Actor generates long response trajectories given a set of prompts. Generation latency dominates wall-clock time, often consuming 70% to 85% of each training iteration. Once trajectories are generated, the Reference model evaluates log-probabilities, the Reward model assigns scalar values, and the Actor/Critic models execute forward-backward passes over token sequences.
- Parallelism Incompatibilities: Optimal rollout throughput requires Tensor Parallelism (TP) across a small number of GPUs to minimize inter-node communication latency during autoregressive token sampling. Conversely, model training achieves optimal scaling via Data Parallelism (DP) paired with Fully Sharded Data Parallelism (FSDP/ZeRO-3) or Pipeline Parallelism (PP) across dozens or hundreds of nodes.

Framework Architectural Blueprints
The three frameworks resolve these architectural conflicts through distinct abstraction layers, scheduler integrations, and execution graphs.
OpenRLHF: Ray Placement Groups and Module Deconstruction
OpenRLHF utilizes Ray as its distributed orchestration backbone. The architecture decouples the post-training workflow into discrete PPORayActorGroup instances running on remote Ray workers:
- Ray Placement Groups: OpenRLHF divides cluster resources into explicit placement groups. The Driver process coordinates remote worker pools for the Actor, Critic, Reference, and Reward models.
- Dedicated Rollout Workers: Generation is handled by
LLMRayActorinstances, which wrap standalone vLLM engines. The framework can allocate rollout workers to dedicated GPU pools or share GPUs with the training engine via dynamic memory scheduling. - DeepSpeed ZeRO-3 Integration: Training workers execute standard Hugging Face checkpoints sharded via DeepSpeed ZeRO-3 and RingAttention for sequence parallelism. Weights are synchronized from the Actor training workers to the vLLM rollout workers over CPU memory or direct Ray object store transfers at the end of each policy update step.
- Multi-Turn and Agentic Support: OpenRLHF provides a unified token-in-token-out abstraction, allowing multi-turn conversational RL, tool-use trajectory optimization, and rule-based verifiable reward computation (RLVR) without modifying core algorithm logic.
verl (HybridFlow): 3D-HybridEngine and Dynamic Resharding
verl (developed by ByteDance and Volcano Engine) models distributed RLHF as a specialized dataflow graph called HybridFlow. Its core innovation is the 3D-HybridEngine, which addresses the mismatch between training and inference parallelism:
- Unified Worker Architecture: Instead of dedicating separate physical nodes to training and rollout, verl co-locates the training engine (FSDP or Megatron-LM) and the rollout engine (vLLM or SGLang) on the exact same physical GPUs.
- Zero-Redundancy Dynamic Resharding: During the rollout phase, GPU memory is allocated to vLLM using Tensor Parallelism (e.g., TP=4 or TP=8). Once rollouts complete, verl executes an in-place weight transformation, converting the sharded tensor-parallel weights into FSDP/ZeRO partitions for the training step. This avoids duplicate model copies in physical memory and bypasses inter-node weight serialization over the network.
- Decoupled Controller Flow: verl separates execution control from data storage. A lightweight controller coordinates asynchronous actor execution across compute nodes, maximizing GPU compute utilization during alternating rollout and backward phases.
Hugging Face TRL: Primitives and Ecosystem Interoperability
Hugging Face's TRL (Transformer Reinforcement Learning) is built directly on top of torch.distributed and Hugging Face Accelerate:
- Synchronous Accelerate Pipeline: TRL traditionally implements PPO, DPO, and GRPO as single-process or multi-GPU Accelerate training loops. The Actor, Critic, and Reference models run within the standard PyTorch DDP/FSDP harness.
- External vLLM Rollout Hooks: Recent versions of TRL support decoupling rollouts by querying external vLLM server instances over HTTP or shared memory endpoints.
- Ecosystem Cohesion: TRL provides tight integration with the Hugging Face Hub,
datasets,transformers, andpeft(LoRA/QLoRA), making it the standard entry point for single-node prototyping, LoRA-based alignment, and direct preference optimization (DPO).
Rollout-Training Co-Location and Memory Swapping
A critical architectural decision in distributed RL infrastructure is whether to run rollout and training disaggregated (on distinct GPU pools) or colocated (time-multiplexed on the same GPUs).
Disaggregated Topology
In a disaggregated setup, Node Pool A runs vLLM rollout inference, while Node Pool B runs FSDP/Megatron training.
- Advantages: No memory swapping overhead. Rollout engines keep their KV cache memory pools permanently mapped in HBM. Training engines keep optimizer states permanently allocated.
- Disadvantages: Substantial resource idling. While Node Pool A is generating rollouts, Node Pool B sits idle waiting for trajectory data. After generation, Node Pool A sits idle while Node Pool B executes gradient backward passes. Additionally, updated policy weights must be broadcast over the data center network (e.g., InfiniBand or RoCEv2) from Node Pool B to Node Pool A at every iteration.
Colocated Topology with In-Memory Resharding
In a colocated setup (pioneered by verl and supported in OpenRLHF), all GPUs participate in both generation and training.
- Weight Resharding Overhead: When switching from vLLM rollout (TP=8) to FSDP training (DP=64, FSDP-sharded), parameters must be rearranged in local GPU memory. Using CUDA IPC and optimized intra-node memory transfers, this resharding step takes between 200 milliseconds and 1.5 seconds for a 70B model, representing less than 1% of the total iteration time.
- Memory Management Strategies: During the rollout phase, optimizer states can be offloaded to host CPU RAM or retained in reserved memory regions while vLLM occupies up to 80% of remaining GPU memory for large-batch KV caching. During the training phase, KV cache blocks are freed to allow dynamic activation memory growth during backward GEMMs.
Algorithmic Evolution: From PPO to GRPO and RLVR
The complexity of multi-model RL infrastructure has driven rapid adoption of critic-free policy optimization methods, most notably Group Relative Policy Optimization (GRPO) utilized in reasoning pipelines like DeepSeek-R1 and Reinforcement Learning with Verifiable Rewards (RLVR).
- Elimination of the Critic Model: Standard PPO requires training a separate Value Network of equal or comparable parameter size to the Actor to estimate baseline states () and compute Generalized Advantage Estimation (GAE). Critic training is notoriously unstable, prone to value loss divergence, and consumes 25% to 35% of total cluster memory and compute.
- Group Baseline Estimation: GRPO eliminates the Critic entirely. For each input prompt , the policy generates a group of candidate outputs . The advantage for each candidate is computed directly by normalizing rewards across the group:
- Infrastructure Implications: In GRPO and RLVR pipelines, the distributed graph collapses from four models to two (Actor and frozen Reference) or even one (when the Reference model is replaced by an empirical KL penalty or strict rule-based verification). The primary system bottleneck shifts entirely to rollout generation throughput and parallelized execution of external verifiers (such as sandboxed Python code interpreters, formal math checkers, or unit tests).
Both OpenRLHF and verl provide native, highly optimized implementations of GRPO, allowing teams to scale reasoning models across thousands of GPUs without value-network synchronization overhead.
Production Decision Matrix
| Dimension | OpenRLHF | verl (HybridFlow) | Hugging Face TRL | | :--- | :--- | :--- | :--- | | Primary Architecture | Ray Actor Groups + DeepSpeed ZeRO-3 | 3D-HybridEngine + FSDP/Megatron-LM | PyTorch Accelerate / torch.distributed | | Rollout Engine | vLLM (LLMRayActor) | vLLM and SGLang | In-process PyTorch or External vLLM | | Rollout/Train Co-location | Supported via Ray Placement Groups | Native zero-redundancy in-place resharding | Disaggregated / External Server | | Parallelism Support | ZeRO-3, Tensor Parallelism, RingAttention | FSDP, Megatron-LM (TP, PP, CP, EP, SP) | DDP, FSDP, DeepSpeed | | Scale Ceiling | 100B+ parameters across hundreds of nodes | 100B+ parameters across thousands of GPUs | Single-node to small multi-node clusters | | Algorithm Support | PPO, GRPO, DPO, KTO, PRM, RLVR | PPO, GRPO, DPO, TRPA, Reinforce++ | PPO, GRPO, DPO, ORPO, KTO, SFT | | Best Used For | Heterogeneous clusters, conversational RL, Ray ecosystems | High-throughput reasoning RL (R1-style), 3D parallel scaling | Rapid experimentation, LoRA alignment, SFT/DPO workflows |
Implementation Recommendations
For engineering teams establishing post-training alignment infrastructure:
- Choose verl when training large-scale mathematical or coding reasoning models (GRPO/RLVR) where maximizing rollout token throughput on homogeneous GPU clusters (such as H100/H200/B200 nodes) with Megatron-LM or FSDP 3D parallelism is paramount.
- Choose OpenRLHF when operating heterogeneous clusters (e.g., routing small reward models to separate nodes), deploying complex multi-turn or agentic RL loops, or integrating with existing Ray-based ML platform pipelines.
- Choose TRL for exploratory fine-tuning, parameter-efficient LoRA/QLoRA alignment, single-node experiments, or standard offline preference methods like DPO and ORPO where distributed orchestrator complexity introduces unnecessary operational overhead.
Sources
- OpenRLHF: An Easy-to-use, Scalable and High-performance RLHF Framework
- HybridFlow / verl: A Flexible and Efficient RLHF Framework
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (GRPO)
- vLLM: Efficient Memory Management for Large Language Model Serving with PagedAttention
- DeepSpeed: Extreme Scale Model Training for Deep Learning
- PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallel
- Ray: A Distributed Framework for Emerging AI Applications
- Hugging Face TRL Documentation and GitHub Repository



