TL;DR
BiDiRL introduces a hybrid time-space multiplexing architecture that eliminates hardware idleness ("resource bubbles") during the reinforcement learning (RL) post-training of Large Language Models. By implementing a low-overhead "hot-switch" runtime, BiDiRL allows dedicated rollout (generation) and training (optimization) GPU pools to dynamically borrow idle resources from one another. This bidirectional scheduling improves end-to-end training throughput by up to 1.94× over state-of-the-art frameworks without altering model convergence.
What Problem Does This Paper Address?
Post-training LLMs via Reinforcement Learning (using algorithms like PPO or GRPO) is essential for enhancing their reasoning and coding capabilities. This process consists of two primary stages: rollout (generating responses using an inference engine) and training (computing losses and updating model weights).
To maximize throughput, modern high-performance frameworks use a disaggregated architecture, separating GPUs into independent rollout and training pools so they can run asynchronously. However, this fixed allocation suffers from severe resource underutilization, creating idle periods known as "resource bubbles."
These bubbles stem from two sources:
- Structural bubbles: Persistent rate mismatches caused by a rigid, sub-optimal static partition of GPUs.
- Residual bubbles: Transient idle windows arising from runtime dynamics (such as fluctuating response lengths as the model evolves), model-parallelism constraints, and staleness bounds that force one stage to wait for the other.
Existing frameworks either optimize only one side of the pipeline or rely on static partitioning, leaving substantial hardware performance on the table when workloads shift.
Methods
BiDiRL addresses these resource bubbles through a two-timescale scheduling architecture:
- Hot-Switch Runtime: A lightweight mechanism enabling GPU workers to rapidly swap roles (e.g., an idle rollouter temporarily acting as an auxiliary trainer) with negligible overhead. It avoids expensive process restarts or model resharding by enforcing compatible model layouts between primary and auxiliary roles.
- Scheduling-Aware Static Planner: Before training begins, this planner uses time-performance modeling to select an initial resource partition. It coarsely balances rollout and training durations while ensuring the chosen partition is strictly compatible with the hot-switch runtime's granularity constraints.
- Bidirectional Dynamic Scheduler: At runtime, when one pool becomes idle, the scheduler uses an online profiler to evaluate whether the predicted benefit of borrowing those GPUs exceeds the hot-switch overhead. If approved, it dynamically splits the workload. For the training-heavy direction, it employs a lazy-pull policy and a tail-splitting mechanism to handle variable execution times and minimize final tail imbalances.
Datasets
The authors evaluated BiDiRL using models from the Qwen3 family (ranging from 2B to 8B parameters, including multimodal variants) across two distinct workloads:
- GSM8K: A standard grade-school math text dataset, representing long-reasoning, rollout-heavy workloads.
- Geo3K: A multimodal geometry problem-solving dataset, representing short-response, training-heavy workloads.
Key Insights and Ideas
- Idle resources are two-sided: Depending on the task type (e.g., multimodal inputs vs. complex math reasoning) and the current training step, the bottleneck can easily flip between rollout and training. Schedulers must be bidirectional to capture all wasted slack.
- The Two-Timescale Problem: While structural mismatches can be mitigated offline, residual bubbles caused by evolving model behaviors—such as an LLM learning to generate longer, more detailed reasoning chains over time—must be handled dynamically online.
- Layout Compatibility > Pure Throughput: A static partition that looks perfectly balanced on paper is useless if it prevents quick role-swapping. BiDiRL prioritizes partitions where the GPU counts are cleanly divisible by the replica layouts of both stages, sacrificing a fraction of theoretical static balance for massive dynamic flexibility.
Key Results
BiDiRL was evaluated on two 32-GPU testbeds (NVIDIA A6000 and H100) against state-of-the-art baselines, including veRL, AReaL, and ROLL.
- Throughput Gains: BiDiRL achieved an end-to-end throughput speedup of 1.05× to 1.94× across various workloads, model scales, and staleness bounds.
- Platform Performance: It improved effective training throughput by 1.27×–1.68× on the 16-GPU A6000 testbed (reaching 1.94× with 32 GPUs) and achieved a 1.23×–1.53× improvement on the H100 testbed.
- Ablation Efficiency: Model-guided bidirectional borrowing outperformed "no borrowing" by 1.12×–1.71× and beat naive "opportunistic borrowing" (swapping whenever a pool is idle without checking overhead) by 1.02×–1.31×.
- Convergence: BiDiRL alters only the physical placement and timing of computation; it preserves the logical RL dataflow, resulting in identical training reward curves and convergence behavior.
Limitations and Future Work
- Rollout Granularity Constraints: When borrowing resources for rollouts, the scheduler dispatches prompts based on raw data-parallel capacity rather than predicting actual response lengths (which are unknown beforehand). If a borrowed window is interrupted, it can return partial generations. The authors suggest that future iterations could integrate early decoding signals or prompt features to better predict generation lengths.
- Trainer Chunk Sizing: The current chunk-level scheduling trades off execution efficiency for tail alignment. Because auxiliary trainers do not need to maintain optimizer states, the authors note that future implementations could exploit this saved memory to support more aggressive, adaptive chunk sizing.
Summary updated