Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 7 min read Announcement hardMaster

PipelineRL

PipelineRL 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.

Related posts

  • Putting RL back in RLHF

    Hugging Face hardMaster

    RLOO (REINFORCE Leave-One-Out) is now available as a trainer in Hugging Face TRL. It is an online RLHF algorithm that drops PPO's value model. It treats the whole completion as a single action, uses the REINFORCE loss, and computes each sample's baseline as the mean reward of the other k−1 completions for the same prompt. That cuts vRAM by roughly 50-70% and makes training 2-3x faster than PPO on Pythia 1B and 6.9B, while matching PPO's GPT-4-judged win rate (78.7% for 6.9B on TL;DR) and beating DPO. Code walkthroughs show the advantage computation and that REINFORCE is a special case of the PPO loss. There is a caveat: bf16 numerical mismatches between generation and training logprobs hurt RLOO more than PPO.

  • 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.

  • vLLM V0 to V1: Correctness Before Corrections in RL

    Hugging Face hardMaster

    Migrating PipelineRL's rollout generation from vLLM V0 (0.8.5) to V1 (0.18.1) caused training metrics (clip rate, KL, entropy, reward) to diverge. Matching the V0 reference took four backend fixes: setting logprobs-mode=processed_logprobs so returned logprobs reflect temperature and top-k/top-p processing, explicitly disabling V1's default prefix caching and async scheduling, reproducing V0's inflight weight-update semantics with pause_generation(mode="keep", clear_cache=False), and computing the lm_head in fp32 to match the trainer. Batch invariance and the logprob-mode fix alone did not close the gap. The broader recommendation is to restore inference-backend correctness before adding objective-side off-policy corrections such as truncated importance sampling, so those corrections don't hide backend bugs.

  • Open-weight models are fast on Neon AI Gateway. Here's why

    Neon mediumAdept

    Neon AI Gateway serves open-weight models through Databricks Foundation Model APIs, so it gets that stack's inference optimizations: continuous batching with PagedAttention-style KV-cache paging and overlapped prefill/decode, a TensorRT-LLM backend with fused and GroupGEMM kernels for MoE, tensor parallelism, FP8 quantization, and per-GPU tuning. Prompt caching matters most for agent loops that resend a stable system prompt and tool schema. On gpt-oss in a production batch pipeline it raised per-replica input-token throughput 2.5× and cut P50 latency 3× at a ~30% hit rate. FP8 on H100 gave about 2.2× throughput over FP16. To benefit, keep prompt prefixes stable and point an OpenAI-compatible SDK at the gateway.

  • Keep the Tokens Flowing: Lessons from 16 Open-Source RL Libraries

    Hugging Face hardMaster

    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.

The quest for software engineering knowledge.

Look:
Layout: