Hugging FaceAmine Dirhoussi, Quentin Gallouédec, Kashif Rasul, Lewis Tunstall, Edward Beeching, Albert Villanova del Moral, Nouamane Tazi, Leandro von Werra, Sergio PaniegoBenchmark
Keep the Tokens Flowing: Lessons from 16 Open-Source RL Libraries
Summary
At-scale reinforcement-learning training is constrained by long, variable data-generation workloads that leave training GPUs idle, especially for reasoning and agentic models. The surveyed architecture separates inference and training onto distinct GPU pools, connects them through a rollout buffer, and synchronizes weights asynchronously so both stages can proceed concurrently. Sixteen open-source libraries are compared across orchestration, buffering, weight synchronization, staleness, partial rollouts, LoRA, and distributed backends; Ray appears in 8 of 16 orchestration implementations, while NCCL broadcast is the default weight-transfer method. The proposed TRL async trainer favors a lightweight bounded queue with per-token model_version metadata, packed NCCL transfers, and experimental support for prefix-resume or abort-and-retry handling of rollouts interrupted by weight updates.
Context
Synchronous reinforcement-learning loops leave training GPUs idle while long or variable rollouts are generated. Reasoning models can produce lengthy sequences, GRPO may require multiple rollouts per prompt, and agentic workloads introduce multi-turn trajectories with highly variable latency, making batch and synchronization barriers costly.
Approach / What changed
The work surveys 16 open-source asynchronous RL libraries across seven axes, then proposes design choices for TRL: lightweight orchestration, a bounded queue with per-token model_version tags, packed NCCL weight broadcasts, and partial-rollout strategies including prefix-resume and abort-and-retry.
Takeaways
Ray is used by 8 of the 16 surveyed distributed-computing libraries for orchestration, and NCCL broadcast is the default model-weight transfer method.
Staleness handling ranges from dropping outdated samples to importance-sampling correction; the proposed TRL design records model_version per token to enable token-level admission gating and correction.
Partial rollouts are addressed experimentally through prefix-resume, which preserves KV-cache work but needs inference-engine support, or abort-and-retry, which is simpler but can waste computation.
Source and freshness
- Source
- huggingface.co
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.