Introduction
Reinforcement Learning (RL) is a critical step in the post-training of modern Large Language Models (LLMs). Recently, the field has shifted toward agentic RL, where models act as autonomous agents interacting with environments over multiple turns—such as using tools, solving complex coding tasks, or playing games.
However, multi-turn interactions cause the context length to grow rapidly as an episode progresses. This "context explosion" creates two major system-level bottlenecks:
- Memory Inflation: As context grows, memory usage spikes (particularly due to the KV cache), frequently triggering Out-of-Memory (OOM) failures.
- Communication Bottlenecks: Intermediate tensors, such as tokens, log probabilities, and rewards, accumulate linearly with context length. Moving this massive volume of data across GPUs between the rollout and training stages becomes a crippling bottleneck. In industrial settings, transferring 1 TB of intermediate data can take over 20 minutes per iteration.
Existing frameworks typically address these issues by imposing hard limits or penalties on context length. While this prevents OOMs, it artificially caps the model's reasoning and performance potential.
The EARL System
To solve these bottlenecks, we introduce EARL, a scalable system built on top of the open-source ROLL framework. EARL introduces two novel components designed to handle the dynamic nature of agentic RL workloads.
Parallelism Selector
Static parallelism is inefficient for RL because a configuration optimized for short contexts at the start of an episode becomes an OOM liability as the context grows. EARL's Parallelism Selector profiles system throughput at the start of training and monitors the average context length in real-time. It automatically adjusts the Tensor Parallelism (TP) degree, allowing the system to maximize throughput during early turns while scaling up to prevent crashes as interactions become more complex.
Data Dispatcher
Traditional RL systems gather all intermediate data to a single central controller node before scattering it back to training workers. This centralized aggregation is a "silent killer" at scale, creating massive bottlenecks. EARL replaces this with a layout-aware, decentralized all-to-all communication mechanism. By sending data directly from where it is computed to where it is needed, EARL drastically reduces synchronization overhead and data movement volume.
Evaluation and Results
EARL was evaluated on a 16-node cluster equipped with 128 NVIDIA H100 (80GB) GPUs. The system was used to train a Qwen2.5-72B-Instruct model on the multi-turn game Connect Four.
- Throughput and Stability: By dynamically switching from TP=4 to TP=8 as context grew, EARL maintained a 31% throughput advantage at shorter contexts and successfully avoided OOM failures at 32K context lengths—a point where the static TP=4 baseline consistently crashed.
- Data Dispatch Speedup: The decentralized data dispatcher reduced transmission latency by 9.7x at 8K context lengths and up to 11.2x at 32K context lengths compared to the baseline centralized approach.
Conclusion
EARL demonstrates that context growth in agentic RL should be treated as a feature to be supported rather than a bug to be constrained. By employing dynamic parallelism and decentralized data movement, EARL enables the training of high-performance agents with massive context windows. Future work will focus on fully asynchronous RL systems and extending the decentralized communication patterns to all intermediate tensors, including rewards and advantages.
Summary updated