NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PipelineRL: Faster On-policy Reinforcement Learning for Long Sequence Generation

Alexandre Piché, Ehsan Kamalloo, Rafael Pardinas, Xiaoyin Chen, Dzmitry Bahdanau

TL;DR

This paper introduces PipelineRL, a novel approach to accelerate reinforcement learning (RL) for training large language models (LLMs) on long sequence generation tasks. By enabling "in-flight" weight updates during generation, PipelineRL significantly boosts hardware utilization and achieves up to 2x faster learning compared to conventional methods, all while maintaining high data on-policyness.

What Problem Does This Paper Address?

Training Large Language Models (LLMs) with Reinforcement Learning (RL) is a powerful technique for enhancing their reasoning and agentic capabilities. However, scaling these RL methods to be computationally efficient, especially for tasks involving long sequences (like complex problem-solving), is a major hurdle. The core challenge lies in effectively utilizing expensive AI accelerators (like GPUs) without generating "stale" or off-policy data. Standard RL algorithms perform best with data generated by the current policy. When training involves multiple optimization steps, the policy being trained (π) quickly outpaces the policy that generated the data (μ), leading to a lag. This lag, or off-policyness, can degrade learning effectiveness. Conventional methods try to mitigate this by generating large batches of data, but this leads to underutilization of accelerators as they wait for generation to complete before training can begin, or they accept a significant lag between data generation and training.

Methods

PipelineRL tackles this problem by introducing a concurrent, asynchronous approach to data generation and model training, building upon existing asynchronous RL ideas but with a crucial innovation: in-flight weight updates.

Here's how it works:

  • Concurrent Actor-Trainer Processes: PipelineRL separates the system into two main processes: an "Actor" responsible for generating data (sequences) and a "Trainer" responsible for updating the model weights. These run in parallel.
  • In-Flight Weight Updates: This is the key novelty. When the Trainer completes an optimization step and updates the model weights, these new weights are immediately sent to the Actor while it's still generating sequences. The Actor's generation engine briefly pauses to receive the updated weights and then continues generating tokens with the freshest model. This is unlike conventional methods where the entire generation process must finish before training can even start.
  • Asynchronous Communication: The Actor and Trainer communicate via a queue for training data and a high-bandwidth network for weight updates. This ensures minimal idle time for accelerators.
  • KV Cache Management: To handle the in-flight updates efficiently, PipelineRL retains the Key-Value (KV) cache from the previous model weights. This avoids the computationally expensive recomputation of the KV cache for every update, a design choice supported by experimental findings showing minimal impact on on-policyness.

Datasets

The paper evaluates PipelineRL on the OpenReasoner Zero dataset, which consists of math problems designed to test long-form reasoning capabilities. This dataset is chosen because the policy undergoes rapid changes during training, making it a good testbed for the importance of staying on-policy.

Key Insights and Ideas

  • The "In-Flight" Advantage: The ability to update model weights during sequence generation is the core innovation. This dramatically reduces the lag between the behavior policy and the training policy, leading to more on-policy data and faster learning.
  • Hardware Utilization is Key: The paper emphasizes that for efficient RL training, especially with LLMs, maximizing AI accelerator utilization is paramount. PipelineRL achieves this by keeping both generation and training components busy concurrently.
  • On-Policyness is Preserved: Despite the rapid weight updates and potential for stale KV caches, PipelineRL demonstrates that it can maintain a high degree of on-policyness, comparable to or better than conventional methods with carefully tuned parameters.
  • Trade-offs in Asynchronous RL: The paper highlights that while PipelineRL achieves higher throughput, there's a trade-off. Adding more accelerators can linearly increase throughput but might eventually impact learning effectiveness if not configured carefully.

Key Results

  • ~2x Faster Learning: PipelineRL achieves approximately twice the learning speed compared to conventional RL baselines on long-form reasoning tasks using 128 H100 GPUs.
  • High Throughput: The method demonstrates significantly higher throughput (tokens per flash) compared to conventional RL, especially as the number of accelerators increases. For example, in a specific case study, PipelineRL achieved 16.9 tokens/flash while conventional RL achieved 10.7 tokens/flash with a similar lag.
  • Comparable Sample Efficiency: PipelineRL achieves similar or better reward values for the same number of training samples as conventional RL methods.
  • Maintained On-Policyness: Metrics like Effective Sample Size (ESS) show that PipelineRL stays largely on-policy, even with high token lags, outperforming conventional RL methods that become increasingly off-policy as training progresses.
  • Open-Source Implementation: A scalable and modular implementation of PipelineRL is released, facilitating further research and adoption.

Limitations and Future Work

  • Lag Management: While PipelineRL allows for higher lags, extremely high lags can still impact learning effectiveness. The paper suggests that finding optimal configurations for (lag, throughput) is crucial and can be complex to solve analytically.
  • Hardware Dependence: The throughput advantage of PipelineRL might decrease in setups with very scarce or abundant compute resources, where other factors like generation latency or environment feedback might become bottlenecks.
  • Future Work: The authors suggest exploring:
  • Studying scenarios where the high lag of early tokens in PipelineRL might be detrimental.
  • Investigating the utility of recent low-lag tokens in PipelineRL.
  • Applying PipelineRL to agentic behaviors involving multiple LLM generations and environment interactions.
  • Further exploring the trade-offs between lag, throughput, and learning effectiveness.

Summary updated

BibTeX
@article{piche2026pipelinerl,
  author = {Alexandre Piché and Ehsan Kamalloo and Rafael Pardinas and Xiaoyin Chen and Dzmitry Bahdanau},
  title = {{PipelineRL: Faster On-policy Reinforcement Learning for Long Sequence Generation}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}

Loading related content...

Figure