Abstract
Reinforcement learning (RL) has become a pivotal technology in the post-training phase of large language models (LLMs). Traditional task-colocated RL frameworks suffer from significant scalability bottlenecks, while task-separated RL frameworks face challenges in complex dataflows and the corresponding resource idling and workload imbalance. Moreover, most existing frameworks are tightly coupled with LLM training or inference engines, making it difficult to support custom-designed engines. To address these challenges, we propose AsyncFlow, an asynchronous streaming RL framework for efficient post-training. Specifically, we introduce a distributed data storage and transfer module that provides a unified data management and fine-grained scheduling capability in a fully streamed manner. This architecture inherently facilitates automated pipeline overlapping among RL tasks and dynamic load balancing. Moreover, we propose a producer-consumer-based asynchronous workflow engineered to minimize computational idleness by strategically deferring parameter update process within staleness thresholds. Finally, the core capability of AsynFlow is 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 of 1.59 throughput improvement compared with state-of-the-art baseline. The presented architecture in this work provides actionable insights for next-generation RL training system designs.
Introduction
Reinforcement learning techniques, such as Reinforcement Learning from Human Feedback (RLHF) and Group Relative Policy Optimization (GRPO), are essential for developing reasoning capabilities in modern AI agents. However, engineering efficient RL post-training pipelines is notoriously difficult. These pipelines involve distinct, computationally heavy tasks: generating responses (actor rollout), evaluating them (reference/reward inference), and updating the model weights (actor/critic updates).
Existing frameworks typically follow one of two paradigms, both of which have significant drawbacks. Task-collocated frameworks run all tasks on the same GPUs, leading to memory bloat and frequent model "resharding" when switching modes. Task-separated frameworks assign tasks to dedicated GPUs, which solves memory issues but introduces "pipeline bubbles"—periods where GPUs sit idle waiting for upstream tasks to synchronize and deliver full data batches.
System Architecture
AsyncFlow addresses these bottlenecks by adopting a task-separated architecture enhanced with asynchronous data routing and off-policy optimization. The framework is designed to be backend-agnostic, allowing it to interface with various training and inference engines through a service-oriented adapter layer.
As shown in the architecture overview, AsyncFlow separates the high-level RL algorithm logic from the low-level execution engines. This decoupling allows researchers to use a unified API while infrastructure engineers can swap out backends (like DeepSpeed or vLLM) to maximize hardware utilization.
The TransferQueue and Asynchronous Workflow
The core innovation of AsyncFlow lies in its data management and workflow scheduling:
- TransferQueue (Distributed Streaming Dataloader): Inspired by Software-Defined Networking (SDN), this module separates the control plane (metadata and scheduling) from the data plane (tensor storage). Instead of waiting for full batches, TransferQueue streams micro-batches to downstream tasks as soon as they are ready, enabling continuous pipeline overlapping.
- Asynchronous Off-Policy Workflow: Traditional RL requires the actor to stop generating until weights are updated. AsyncFlow utilizes a producer-consumer model with a delayed parameter update. The actor continues generating responses using slightly stale weights (typically a one-step delay) while new weights are loaded in the background.
This asynchronous approach accepts a small amount of staleness in exchange for massive gains in hardware efficiency. Empirical tests confirm that a one-step delay in algorithms like GRPO has negligible impact on convergence or final reward scores, but it effectively eliminates the idle time associated with synchronization barriers.
Experimental Evaluation
The framework was evaluated on Huawei Ascend NPU clusters (ranging from 32 to 1024 chips) using Qwen2.5 models (7B to 32B parameters) and the GRPO algorithm. The DeepScaleR dataset, containing over 40,000 mathematical reasoning pairs, served as the primary benchmark.
Key Results
- Throughput Gains: AsyncFlow achieved an average 1.59x throughput improvement over
verl, a state-of-the-art task-collocated framework. In specific large-scale configurations (256 NPUs, 7B model), the speedup reached 2.03x. - Scalability: The system demonstrated strong scaling linearity (0.65 to 0.88) across a 16-fold increase in cluster size.
- Ablation Studies: Introducing the TransferQueue alone doubled throughput (2.01x) compared to a vanilla task-separated baseline. Adding the asynchronous delayed-update workflow further increased the multiplier to 2.74x.
Conclusion and Future Work
AsyncFlow demonstrates that centralized data management and strategic asynchrony can significantly accelerate RL post-training for LLMs. By treating data transfer as a dynamic routing problem and allowing controlled staleness, the framework maximizes hardware utilization without sacrificing algorithmic stability. Future work will focus on expanding support for complex algorithms like PPO and implementing sub-step asynchrony to further reduce synchronization overhead across individual inference instances.
Summary updated