Async GRPO with LoRA across HF Jobs: a bucket, a proxy, and no NCCL
TRL 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.
Related posts
- No GPU left behind: Unlocking Efficiency with Co-located vLLM in TRL
Hugging Face hardMasterTRL v0.18.0 can run vLLM co-located with the training job on the same GPUs. vLLM's external_launcher executor puts it inside the torch.distributed process group, replacing the separate HTTP server that left training and inference GPUs idle in turn during GRPO's frequent generation steps. Benchmarks show up to 1.43× throughput for a 1.5B model with larger batches and up to 1.73× for a 7B model with higher tensor parallelism, though extra TP hurts small models. Qwen2.5-Math-72B trained ~1.26× faster on fewer GPUs with matching rewards and Math500 scores, using vLLM level-2 sleep to free memory and DeepSpeed ZeRO-3 with CPU optimizer offload. The write-up also covers debugging a TP seed-determinism regression, a buffer-restore bug after sleep and a remaining shutdown segfault.
- 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.
- Keep the Tokens Flowing: Lessons from 16 Open-Source RL Libraries
Hugging Face hardMasterAsync 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.
- 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.
- 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.