Reinforcement Learning from Human Feedback (RLHF) has been widely applied to Large Language Model (LLM) post-training to align model outputs with human preferences. Recent models, such as DeepSeek-R1, have also shown RLHF's potential to improve LLM reasoning on complex tasks. In RL, inference and training co-exist, creating dynamic resource demands throughout the workflow. Compared to traditional RL, RLHF further challenges training efficiency due to expanding model sizes and resource consumption. Several RLHF frameworks aim to balance flexible abstraction and efficient execution. However, they rely on serverful infrastructures, which struggle with fine-grained resource variability. As a result, during synchronous RLHF training, idle time between or within RL components often causes overhead and resource wastage. To address these issues, we present RLHFless, the first scalable training framework for synchronous RLHF, built on serverless computing environments. RLHFless adapts to dynamic resource demands throughout the RLHF pipeline, pre-computes shared prefixes to avoid repeated computation, and uses a cost-aware actor scaling strategy that accounts for response length variation to find sweet spots with lower cost and higher speed. In addition, RLHFless assigns workloads efficiently to reduce intra-function imbalance and idle time. Experiments on both physical testbeds and a large-scale simulated cluster show that RLHFless achieves up to 1.35x speedup and 44.8% cost reduction compared to the state-of-the-art baseline.
Figures & tables
Figure 1. RLHF ’s dataflow in one training step, including the generation phase, preparation phase, and learning phase. Some details, like the use of the critic model, can vary depending on the specific algorithm used.
Figure 2. (a) RLHF ’s staged workflow causes idle time between components. (b) Idle components and (c) repeated calculation in RLHF lead to resource wastage.
Figure 3. Existing generation strategies ( Sheng et al., 2025 ; Hu et al., 2024 ; Zheng et al., 2024 ; Kwon et al., 2023 ) for sampling-heavy RLHF workloads, including (a) iterative generation, which introduces additional latency, and (b) parallel generation, which leads to (c) unnecessary KV recalculation.
Figure 4. Dynamic resource demands caused by: (a) significantly varying response lengths across and within different types of datasets, such as mathematical problems ( Maxwell Jia, 2025 ) , general scientific questions ( Rein et al., 2024 ) , and coding tasks ( Jain et al., 2024 ) ; (b) changing response lengths during RLHF training.
Figure 7. (a) RLHFless ’s prompt assignment design, and (b) the potential benefits that can be achieved under GRPO training with Qwen2.5-3B ( and: et al., 2025 ) model and GSM8k ( Cobbe et al., 2021 ) dataset.
Figure 8. RLHFless ’s cut-and-migrate strategy. RLHFless cuts unfinished underestimated responses and migrates them to available decode actors with open slots, which have been released by completed, overestimated responses.
Figure 9. RLHFless ’s locality-aware actor placement.
Figure 11. RLHFless ’s ablation study (DP: D eduplicated P refill; AS: A ctor S caling; PA: P rompt A ssignment). Each point shows the GPU cost and execution time of one training step. Points closer to the lower-left corner indicate lower cost and faster execution. Subfigure (a) shows RLHFless with all core features disabled. From (b) to (d), we enable one additional core feature at a time, illustrating the incremental benefits of each design.
Figure 12. Effectiveness of RLHFless ’s prompt assignment. (DP: D eduplicated P refill; AS: A ctor S caling; PA: P rompt A ssignment.)
Figure 13. Effectiveness of RLHFless ’s (a) actor scaling and (b) deduplicated prefill. (DP: D eduplicated P refill; AS: A ctor S caling; PA: P rompt A ssignment.)
Figure 14. Sensitivity analysis of RLHFless ’s response length prediction.
Figure 15. RLHFless hyperparameter sensitivity: (a) EWMA window size for length prediction, (b) cut-and-migrate threshold τ , and (c) actor scaling weight λ .
Figure 16. RLHFless scalability analysis. (a) Execution time for response generation with lengths from 2k to 8k tokens, along with scheduling overhead, under different cluster sizes. (b) Average normalized performance improvement from large-scale simulation experiments.
Figure 17. RLHFless ’s latency breakdown in a training step, including the preparation, generation, and learning phases, as well as deduplication latency, scaling latency (response-length prediction and cost/time estimation), and I/O latency.
Reinforcement learning (RL) has been a critical paradigm for improving large language model (LLM) reasoning and agentic capabilities, but its efficiency remains a major bottleneck. Existing RL systems commonly rely on asynchronous execution to overlap rollout generation with policy optimization for enhanced efficiency. However, this approach faces inherent limitations: mild policy staleness offers only limited training efficiency gains, whereas aggressive asynchrony can degrade model quality and yields diminishing efficiency gains. The dynamic nature of LLM RL and multi-turn agentic workloads further challenges RL system design, as resource demands shift over time, making static resource allocation and generation strategy inefficient. This paper presents ReFlow, a system-algorithm co-designed RL framework for efficient LLM post-training. Its key insight is that, unlike existing RL frameworks which consume each trajectory only once, experience replay of recent trajectories enables effective sample reuse, thereby amortizing the high cost of rollout generation without incurring excessive policy staleness. To fully exploit this opportunity, ReFlow adopts a decoupled and adaptive architecture with three key designs: a dual replay data cycle supports efficient experience reuse while balancing training throughput and optimization stability; an elastic resource pool enables dynamic resource placement to accommodate evolving RL workloads; an adaptive scheduler coordinates generation strategies and resource allocation to improve resource utilization and boost generation throughput. Experiments across representative single-turn reasoning and multi-turn agentic RL tasks show that ReFlow improves training throughput by up to 2.06× over state-of-the-art synchronous and asynchronous RL systems, while maintaining comparable or better model performance.
Yukun Tian, Junwei Su, Haofeng Xu +6
The University of Hong Kong · Alibaba Group · University of Science and Technology of China +1
Reinforcement learning (RL) has become a pivotal technology in the post-training phase of large language models (LLMs). Traditional task-collocated RL frameworks suffer from significant scalability bottlenecks, while task-separated RL frameworks face challenges in managing complex dataflows and resolving resource idling. Furthermore, most existing frameworks are tightly coupled with LLM training or inference engines, making them difficult to support custom-designed engines. To address these challenges, we propose AsyncFlow, an asynchronous streaming RL framework tailored for efficient post-training. Specifically, we introduce a distributed data storage and transfer module that provides panoramic data management and fine-grained scheduling capabilities in a fully streamed manner. This architecture inherently enables automated pipeline overlapping among RL tasks and dynamic load-balancing. Moreover, we propose an asynchronous producer-consumer workflow, which is engineered to minimize computational idleness by strategically deferring the parameter update process within staleness thresholds. Finally, the core capabilities of AsyncFlow are architecturally decoupled from underlying training and inference engines and encapsulated by service-oriented user interfaces, offering a modular and customizable user experience. Extensive experiments demonstrate an average throughput of 1.59x compared to the state-of-the-art baseline. The architecture presented in this work provides actionable insights for designing next-generation RL training systems.
Reinforcement Learning from Human Feedback (RLHF) has become a key post-training paradigm for improving model quality. However, the synchronous three-stage RLHF pipeline is often bottlenecked by the generation stage, where response-length skew causes the effective batch size to shrink rapidly during decoding, leaving GPUs underutilized while a few long responses remain unfinished. Mainstream frameworks employ a static tensor parallelism (TP) configuration that cannot adapt to changing batch characteristics, leaving substantial performance headroom unexplored. We propose PAT, an adaptive TP method that dynamically reconfigures TP during the generation stage of each RLHF iteration. PAT introduces two key techniques. First, a predictor-guided online reconfiguration method decides both the reconfiguration point and the target TP configuration based on offline profiling, triggering reconfiguration only when the predicted latency benefit outweighs the reconfiguration overhead. Second, a lightweight online reconfiguration mechanism updates only the states and layouts affected by TP changes: it adapts unfinished decoding states through a cost-model-based choice between KV-cache migration and recomputation, performs in-place weight resharding, and reuses cached communication groups. We implement PAT on top of SGLang and integrate it with the VeRL framework. Evaluations on LLaMA3.1-8B and Qwen3-14B using DeepScaleR show that PAT reduces generation latency by up to 34.6% and end-to-end RLHF training iteration latency by up to 27.2% compared to the original VeRL setup.
Long Zhao, Qinghe Wang, Jiaan Zhu +5
Anhui University · Institute of Artificial Intelligence, Hefei Comprehensive National Science Center · University of Science and Technology of China +2