Keep the Tokens Flowing: Lessons from 16 Open-Source RL Libraries
Async RL post-training libraries have converged on one architecture: disaggregate inference and training onto separate GPU pools, connect them with a rollout buffer, and push weights asynchronously so generation never stops and training never waits. A survey of 16 open-source libraries (verl, AReaL, SLIME, PRIME-RL, NeMo-RL and others) compares them on seven axes: orchestration, buffer design, weight sync, staleness management, partial rollouts, LoRA support and training parallelism. Ray dominates orchestration, NCCL broadcast is the default weight-transfer method, staleness handling ranges from dropping samples to importance-sampling correction, LoRA support is sparse, and distributed MoE support is emerging as the differentiator. Throughput math shows why this matters, with 32K-token rollouts on a 32B model taking hours per step on one H100. The findings shape TRL's new async trainer, which uses a bounded queue with per-token model versions, packed NCCL weight sync and partial rollout support.
Related posts
- Reinforcement learning is an infrastructure problem
Modal mediumAdept
RL post-training of LLMs is bottlenecked by infrastructure rather than algorithms: training engines, rollout inference and isolated environments must all scale together, and once training goes multi-node, trainer-to-rollout weight sync dominates. Measured estimates show RDMA cutting weight transfer roughly 60x versus TCP (e.g. GLM 4.7 from 115 s to 1.8 s per step), and delta compression shrinking WAN transfers for disaggregated setups by about 98%. Teams commonly struggle with glue code, cluster queueing and GPUs starved by environments; the guidance is to keep at least one sandbox per rollout plus headroom for failures. Modal recommends building on open-source frameworks like slime and verl, upstreams improvements such as delta compression, and introduces Modal Dojo, an experimental library for defining RL jobs in under 100 lines.
- Async GRPO with LoRA across HF Jobs: a bucket, a proxy, and no NCCL
Hugging Face hardMasterTRL v1.14's AsyncGRPOTrainer can train a LoRA adapter and sync only that adapter to vLLM, which lets the trainer and inference replicas run as separate Hugging Face Jobs on separate machines without NCCL. A rank-1 adapter for a 1.5B model is a few megabytes, so it travels through a Storage Bucket mounted at the same path in every Job, and vLLM loads it via /v1/load_lora_adapter. Versioned adapter names and max_staleness+2 adapter slots keep in-flight rollouts on their original policy and stop prefix-cache reuse across weight versions. A small proxy adds the auth header, broadcasts adapter loads, pause and resume to every replica, and routes the G=8 rollouts of each prompt to the replica holding their KV prefix using adapter-seeded chained block hashes. Using the AsyncGRPO metrics to find bottlenecks, five runs cut the same 500-step recipe from 3 h 27 min to 53 min.
- Shipping a Trillion Parameters With a Hub Bucket: Delta Weight Sync in TRL
Hugging Face hardMasterBetween consecutive RL optimizer steps, about 99% of bf16 weights stay bit-identical because Adam updates at RL learning rates fall below bf16's rounding threshold (|Δw| < |w|/256). TRL exploits this by detecting changed elements with optimizer pre/post-step hooks, encoding them as sparse safetensors deltas (int32 indices plus bf16 values), with full anchors every N steps, and pushing them to a Xet-backed Hugging Face Bucket that vLLM pulls from. On Qwen3-0.6B the per-step payload drops from 1.2 GB to 20–35 MB, and inference pauses for about a second instead of the full sync time. Because the bucket is the only shared channel, the trainer, vLLM server and environment can run on separate machines or Spaces with no shared cluster or RDMA.
- Scaling LLM Inference: Innovations in Tensor Parallelism, Context Parallelism, and Expert Parallelism
Meta Engineering hardMasterMeta scales LLM inference with three parallelism techniques aimed at latency targets of under 350ms time-to-first-token and under 25ms per incremental token. For tensor parallelism, custom direct-data-access allreduce algorithms (flat and tree) cut communication latency, beating RCCL by 10-50% on decode and bringing AMD MI300X to parity with H100. Context parallelism via ring attention, in Pass-KV and Pass-Q variants, enables 1M-token prefill in under a minute on one H100 host and near-linear scaling for Llama 3 405B (128K tokens in 3.8s over 16 nodes). Expert parallelism for MoE models relies on all-to-all token exchange that costs 10-30% of latency, and Meta is moving toward N-D parallelism with disaggregated prefill and decode tiers on heterogeneous hardware.
- PipelineRL
Hugging Face hardMasterPipelineRL resolves the tradeoff between inference throughput and on-policy data in LLM reinforcement learning by doing inflight weight updates: after each optimizer step, trainers broadcast new weights via NCCL to inference servers, which pause only long enough to receive them and then keep generating with existing KV caches. Trained on the Open-Reasoner-Zero dataset at 7B and 32B, it matches or beats Open-Reasoner-Zero on AIME 2024 and MATH 500 using a simplified GRPO with no value function, importance-weight clamping, KL penalty or entropy bonus. The modular design defines HTTP contracts for inference servers (init_process_group, request_weight_update, chat completion) and Python contracts for trainers, so engines like vLLM, SGLang, DeepSpeed or FSDP can be swapped in.