Papers
Topics
Authors
Recent
Search
2000 character limit reached

RollPacker: RL Post-Training Optimization

Updated 12 July 2026
  • RollPacker is a synchronous RL post-training system for LLMs that uses tail batching and dynamic scheduling to reduce GPU idle time by consolidating long-tail rollouts.
  • It partitions rollout steps into fast short rounds and controlled long rounds, ensuring strict on-policy synchronization and improved throughput compared to asynchronous methods.
  • The system integrates parallelism planning, reward scheduling, and stream training to deliver up to 2.56x speedup without compromising training accuracy.

Searching arXiv for the RollPacker paper and closely related packing / rollout-scheduling work to ground the article in the current literature. RollPacker is a synchronous RL post-training system for LLMs that targets GPU underutilization caused by long-tail rollouts. It introduces tail batching, a rollout scheduling strategy that consolidates prompts leading to long responses into a small number of long rounds while keeping the majority of rollout steps as balanced short rounds, and it couples this mechanism with elastic parallelism adaptation for rollout, dynamic resource allocation and scheduling for reward, and stream-based training. In the reported evaluations, the system preserves strict on-policy synchronization while reducing end-to-end training time by 2.03×2.03\times2.56×2.56\times relative to veRL and by up to 2.24×2.24\times relative to RLHFuse for the Qwen2.5 family on up to 128 H800 GPUs (Gao et al., 25 Sep 2025).

1. Problem setting and motivation

RollPacker addresses synchronous, on-policy RL post-training in which each training step is organized as rollout \rightarrow reward \rightarrow training. In this setting, the actor LLM is given P0P_0 prompts and generates R0R_0 responses per prompt, and the system cannot advance to reward and training until the slowest response in the batch has finished. The reported bottleneck is the rollout stage itself: rollout occupies approximately 66%72%66\%-72\% of step time across math, code, and LLM-as-a-Judge tasks, whereas reward occupies 5%13%5\%-13\% and training 21%23%21\%-23\% (Gao et al., 25 Sep 2025).

The underlying cause is a long-tail distribution of response lengths. Most responses have moderate length, with 2.56×2.56\times0 around 755–1.1k tokens, while a small fraction extends to the maximum context, such as 16k or 32k tokens; the longest responses can be 2.56×2.56\times1 longer than medium responses. Because synchronous rollout imposes a barrier, GPUs that finish shorter responses early become idle and remain in “bubbles” until the tail responses complete. The paper characterizes this behavior through SM utilization traces in which utilization starts near 2.56×2.56\times2 and then drops to zero on GPUs that finish early (Gao et al., 25 Sep 2025).

Many RL systems mitigate these bubbles by relaxing synchronization, for example through one-off pipelines, partial rollouts, or fully asynchronous RL. RollPacker is defined against that design choice. Its central objective is to retain strict step-level synchronization and newest-weight rollout generation, rather than accepting stale samples in exchange for throughput. This suggests that RollPacker is best understood not merely as a scheduling heuristic, but as a systems response to the tension between throughput and on-policy correctness in reasoning-oriented RL.

2. Tail batching

The core mechanism is tail batching, which partitions rollout steps into short rounds and long rounds. In a conventional synchronous setup, each step launches exactly 2.56×2.56\times3 prompts and exactly 2.56×2.56\times4 responses per prompt, so any tail prompt can stall the entire step. Tail batching instead uses speculative over-sampling in short rounds and defers slow prompts into a long-prompt queue, which is later drained through long rounds (Gao et al., 25 Sep 2025).

In a short round, RollPacker launches 2.56×2.56\times5 prompts and 2.56×2.56\times6 responses per prompt, with 2.56×2.56\times7; the reported setting is 2.56×2.56\times8. It then keeps only the first 2.56×2.56\times9 fast completions and aborts the rest. Prompts whose responses are aborted are moved into a long-prompt queue. When that queue reaches size 2.24×2.24\times0, RollPacker executes a long round with exactly those 2.24×2.24\times1 prompts and no speculation, allowing full-length responses up to the maximum context (Gao et al., 25 Sep 2025).

This construction changes ordering rather than distribution. The paper emphasizes that tail batching does not drop prompts; all prompts still eventually produce 2.24×2.24\times2 responses and participate in the same RL objective. The result is that the majority of rollout steps are short, balanced, and largely free of severe tail effects, while the minority of steps absorb the expensive responses in a controlled way. For Qwen2.5-14B on a code dataset with 2.24×2.24\times3, over a period of five steps, four short rounds reduced maximum response length by up to 2.24×2.24\times4 relative to veRL, and tail batching alone reduced end-to-end training time by 2.24×2.24\times5 in that setup; in the 32B/32k setting, tail batching contributes up to 2.24×2.24\times6 speedup (Gao et al., 25 Sep 2025).

A plausible implication is that tail batching reframes synchronous RL rollout as a packing problem over latency distributions. The system does not attempt to eliminate long responses; it isolates them so that short responses no longer dominate average step inefficiency.

3. Architectural components

RollPacker is organized around three system components layered on top of tail batching: a parallelism planner for rollout, a reward scheduler for reward, and a stream trainer for training. The paper describes this as a holistic optimization of all three RL stages (Gao et al., 25 Sep 2025).

Component RL stage Reported function
Tail batching Rollout Forms short rounds and long rounds
Parallelism planner Rollout Adapts TP to workload and preemptions
Reward scheduler Reward Pipelines reward and budgets compute per sample
Stream trainer Training Streams completed responses and repurposes idle GPUs

The parallelism planner addresses the fact that short rounds increase concurrency and thereby increase KV-cache pressure. In vLLM or SGLang, this pressure produces preemptions, and many preemptions reduce throughput. RollPacker profiles prefilling and decoding throughput offline under different TP sizes, batch sizes, and sequence lengths, then adapts TP online. The heuristic increases TP when preemptions suddenly rise above 2.24×2.24\times7 the previous value and decreases TP when preemptions remain zero for four consecutive steps, with TP groups constrained within a server. In the reported experiment for Qwen2.5-14B as response length increases from 8k to 32k, TP is adjusted from 1 to 2 to 4, yielding up to 2.24×2.24\times8 rollout speedup relative to fixed TP2.24×2.24\times9; with maximum length fixed at 32k and initial TP\rightarrow0, short-round preemption count is reduced by about \rightarrow1, and rollout time is reduced by \rightarrow2–\rightarrow3 (Gao et al., 25 Sep 2025).

The reward scheduler has two principal roles: asynchronous reward computation and dynamic compute budgeting. Completed responses are dispatched to reward workers as soon as they finish so that reward overlaps with rollout. For code reward, RollPacker uses an adaptive timeout based on the maximum observed execution time among correct responses for a test case:

\rightarrow4

with \rightarrow5, \rightarrow6, and \rightarrow7. If execution exceeds \rightarrow8, the run is terminated and assigned zero reward. For LLM-as-a-Judge reward, the system colocates the judge LLM with the actor on the same GPUs, enables NVIDIA MPS, and uses a layer-wise pipeline that offloads judge weights to CPU memory and streams parameters over PCIe in sync with activation computation. The reported effect is up to \rightarrow9 step-time reduction from MPS in judge setups and up to \rightarrow0 speedup at 32k sequence length from pipelined judge execution (Gao et al., 25 Sep 2025).

The stream trainer addresses residual bubbles in long rounds. It monitors rollout progress, scales down rollout by repurposing about half of rollout GPUs when enough responses have completed, migrates unfinished requests by recomputing KV cache on the remaining rollout GPUs, and begins gradient computation on the streamed completed responses without applying updates. Scaling is considered when the completed fraction satisfies \rightarrow1 and \rightarrow2. Reported gains are up to \rightarrow3 speedup from adaptive GPU scaling relative to no scaling and up to \rightarrow4 reduction in step time from asynchronous fetching relative to fixed batch fetching (Gao et al., 25 Sep 2025).

4. Synchronization and training semantics

RollPacker is evaluated in a synchronous on-policy RL regime using GRPO, with Qwen2.5 actor and reference models and a strict barrier between steps. The reported configuration uses \rightarrow5 prompts per step and \rightarrow6 responses per prompt. Reward sources include rule-based logic for math, a code sandbox for code, and LLM-as-a-Judge for alignment-style tasks (Gao et al., 25 Sep 2025).

The defining correctness claim is that RollPacker preserves on-policy semantics despite introducing speculative execution, request abortion, GPU reassignment, and streamed gradient computation. Tail batching only reorders prompts between short and long rounds; it does not drop them. The stream trainer computes gradients early but does not update weights during rollout. After rollout finishes, buffered and newly computed gradients are aggregated, local gradients are renormalized by the number of samples processed by each replica, DP averaging is performed, and then one synchronized update is applied to the actor. Updated weights are broadcast back to rollout workers only after step completion (Gao et al., 25 Sep 2025).

This design is explicitly positioned against asynchronous alternatives in which long responses are generated with staler weights than short ones. RollPacker instead keeps rollout and parameter updates aligned at the step boundary. The paper reports that validation score curves for RollPacker and veRL are essentially overlapping, with slightly faster early-stage convergence under RollPacker. The authors attribute this to more balanced rollout batches and reduced variance. This suggests that RollPacker’s contribution is not only performance engineering but also a particular systems formulation of synchronous RLHF and GRPO in which efficiency improvements are constrained to remain mathematically equivalent to canonical step-synchronous training.

5. Implementation and empirical results

RollPacker is implemented in approximately 6.6k lines of Python on top of ROLL. Rollout uses vLLM v0.8.4 and extends vLLM with abort_request(request_id) and add_request(request) to support speculative abortion, long-prompt resubmission, and migration. Reward workers use Ray via ray.remote. Training is built on Megatron-LM v0.12.2 with standard DP/TP/PP/CP combinations; the reported training configurations are rollout TP\rightarrow7, training \rightarrow8 for 7B, rollout TP\rightarrow9, training P0P_00 for 14B, and rollout TPP0P_01, training P0P_02 for 32B. Evaluations run on up to 128 NVIDIA H800 GPUs across 16 nodes with 8 GPUs per node and 400 Gbps InfiniBand (Gao et al., 25 Sep 2025).

The evaluation uses Qwen2.5-7B with 8k context, Qwen2.5-14B with 16k context, and Qwen2.5-32B with 32k context. The tasks include DeepMath-103k, KodCode, and multi-subject QA or alignment-style tasks with LLM-as-a-Judge. Baselines are veRL and RLHFuse. The reported end-to-end speedups are summarized below (Gao et al., 25 Sep 2025).

Model Speedup vs veRL Speedup vs RLHFuse
Qwen2.5-7B / 8k P0P_03 P0P_04
Qwen2.5-14B / 16k P0P_05 P0P_06
Qwen2.5-32B / 32k P0P_07 P0P_08

Component-wise ablations show that tail batching is the dominant source of improvement, with the reward scheduler, parallelism planner, and stream trainer supplying additional gains. For Qwen2.5-32B/32k, short rounds achieve up to P0P_09 speedup in average rollout time. For Qwen2.5-14B/16k with batch size scaled from 128 to 512 and GPUs up to 128, RollPacker maintains approximately R0R_00 throughput over veRL, while doubling resources yields approximately R0R_01 throughput under RollPacker because training time grows with batch size. The reported accuracy result is that validation scores remain essentially unchanged relative to veRL, which is the basis for the claim of speedup without observable accuracy loss (Gao et al., 25 Sep 2025).

RollPacker assumes a workload with long-tail rollout lengths. If response lengths are uniform, the benefit of tail batching diminishes. The system is designed for synchronous on-policy RL, and its heuristics are tuned for multi-GPU clusters using vLLM serving, NVLink or InfiniBand networking, and NVIDIA GPUs that support MPS and efficient TP. The paper also notes that speculative over-sampling can be constrained when memory is very tight or KV-cache management is poor, that the parallelism planner currently focuses on TP rather than expert parallelism, that MPS does not provide error isolation between actor and judge processes, and that the relative benefit of tail batching decreases when reward or training dominates step time (Gao et al., 25 Sep 2025).

Within the supplied literature, the name “RollPacker” also appears as a useful analogy rather than a fixed proper noun. In “Scheduling Cutting Process for Large Paper Rolls,” the problem of choosing how many jumbo-reels to cut and how to schedule order widths is described as what a system like “RollPacker” would need to do in one-dimensional paper-roll cutting (Aydin et al., 2013). In “Collaborate sim and real: Robot Bin Packing Learning in Real-world and Physical Engine,” CoPack is presented as a physics-aware hybrid RL framework whose ideas are described as informative for or related to a system like RollPacker in robotic 3D bin packing (Zhang et al., 25 Nov 2025). In “Tactile-Reactive Roller Grasper,” a tactile-guided roller-grasper is described as a template for a roller-based system aimed at robust packing and in-hand adjustment (Yuan et al., 2023).

The dominant technical meaning in current arXiv usage, however, is the LLM training system introduced in 2025. In that sense, RollPacker denotes a synchronous RL post-training architecture that “packs” rollouts into short and long rounds so that strict on-policy training approaches the efficiency usually associated with asynchronous systems, while preserving the step barrier and the newest-weight sampling discipline that its design treats as essential (Gao et al., 25 Sep 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to RollPacker.