Long-Horizon Agent RL on a 100-GPU Cluster: Engineering the Cost Down
This article examines how long-horizon agent reinforcement learning can be run on a roughly 100-GPU budget instead of thousands of accelerators. It summarizes a public technical report that trained a 321B-total-parameter open base model (about 17.4B activated parameters per token) with full-parameter RL on 64 next-generation accelerators in under five days, reaching around 46% Pass@1 on terminal benchmarks at a reported per-task cost more than 30x lower, with gains transferring to two software engineering benchmarks. The focus is on the reusable engineering practices: environment filtering, an algorithm recipe built for long and stale rollouts at low precision, a shared agent harness for training and evaluation, resource isolation with bounded weight staleness, and a clear boundary on which parameters to train or freeze. A deployment checklist is included.
1. Background: Long-Horizon Agents Changed the Cost Structure of RL
Long-horizon agents are moving beyond single-step tasks such as fixing one bug toward continuous terminal operations and software engineering work that runs for hours. Longer tasks do not raise cost linearly; they amplify it combinatorially. A single training sample can be a complete attempt lasting hours and containing hundreds of tool calls, and a failure at any intermediate step wastes hours of compute.
That creates a harsh contrast: frontier labs can scale reinforcement learning across thousands of accelerators, while most teams have a budget in the range of a hundred GPUs. Producing usable training results under that constraint is not about adding more cards. It is about squeezing out every form of hidden waste in the training pipeline.
A recent public technical report offers a sample worth studying: starting from an open base model at the 300B scale, with roughly 321B total parameters and about 17.4B activated parameters per token, the authors ran full-parameter RL on 64 next-generation accelerators and finished training in under five days. Pass@1 on terminal benchmarks reached about 46%, on par with the strongest closed-source approaches, while per-task cost was significantly lower (reported as more than 30x lower), and the improvement transferred to two additional software engineering benchmarks. This article does not restate the report’s product narrative; it abstracts the genuinely reusable engineering methods.
2. Why a 100-GPU Budget Can Approach the Pareto Frontier: Three Pillars
The report attributes the efficiency to three points, and these apply to most resource-constrained teams:
- Environment filtering: keeping every task in a band where difficulty is appropriate and the signal is reliable. Tasks that are too hard fail permanently and contribute zero gradient; tasks that are too easy provide no discrimination.
- An algorithm recipe for long trajectories and stale data: long rollouts, old weights, and low precision are the normal state of long-horizon agent RL, so the algorithm must be designed for that rather than assuming ideal conditions.
- A shared agent harness for training and inference: model optimization, rollout generation, and evaluation all run on the same framework, avoiding the systematic bias where something runs during training but fails during evaluation.
3. Engineering Breakdown of Five Key Areas
3.1 Infrastructure: Do Not Wait for the Slowest Attempt
Rollout length variance is extremely high for long-horizon tasks, and synchronous waiting causes severe compute idling. Practical measures include:
- Isolating training and rollout resources: a dedicated card group for each, avoiding interference in memory and scheduling.
- Tolerating weight staleness: allowing policies that lag several weight versions behind to generate data (the report uses up to 6 versions behind), turning “wait for the latest weights” into “generate and train at the same time.”
- Accelerating decoding: using structures such as multi-token prediction to raise decoding throughput and shorten the wall-clock time of long-tail trajectories.
Illustrative configuration logic (pseudocode, expressing the idea only):
# Resource and version-tolerance policy sketchtrainer = Trainer(gpu_group="train_pool")actors = [Actor(gpu_group="rollout_pool") for _ in range(N)]max_staleness = 6 # maximum allowed weight version lagfor step in range(total_steps):batch = []for a in actors:if trainer.version - a.version <= max_staleness:batch += a.rollout(tasks=sample_tasks())batch = filter_by_reward_variance(batch) # drop zero-gradient samplestrainer.update(batch)if step % sync_every == 0:for a in actors: a.load_weights(trainer.latest())
3.2 Environment Design: Treat a Reliable Signal as a First-Class Citizen
Environment filtering is not simply sorting by difficulty; it means ensuring the reward is attributable. Key practices:
- Verifiable terminal outcomes: prefer tasks with automated tests or explicit acceptance criteria, reducing noise from human or model scoring.
- Difficulty tiers and dynamic sampling: maintain a task difficulty distribution and reweight dynamically by the current policy’s pass rate, concentrating compute in the 20%–70% pass-rate band.
- Diagnosable failures: keep complete trajectories and intermediate artifacts so it is possible to tell whether the cause is an environment defect, tool misuse, or a policy problem.
3.3 Algorithm Recipe: Making Room for Long, Stale, and Low-Precision
- Long: the longer the trajectory, the higher the variance of advantage estimation. The common approach is segmented or hierarchical credit assignment, propagating sparse terminal rewards back to key decision points.
- Stale: stale policies are off-distribution relative to the current policy, so importance sampling correction and clipping are needed to keep one large update from destabilizing training.
- Low precision: the rollout side commonly trades precision for throughput, while the training side keeps higher precision; numerical consistency checks between the two prevent reward and log-probability drift.
A simplified objective skeleton:
# Policy update with staleness correction and clipping (sketch)ratio = exp(logp_new - logp_old)ratio = clip(ratio, 1 - eps_low, 1 + eps_high) # control shift from stale policiesloss = -min(ratio * adv, clip(ratio, 1-eps, 1+eps) * adv).mean()loss += beta * kl_penalty(policy, ref_policy) # suppress long-horizon drift
3.4 A Shared Harness for Training and Evaluation: Eliminating Two Realities
A common real-world problem for many teams: a task that runs in the training environment fails in the evaluation framework because of tool versions, timeout settings, or filesystem differences. Sharing one agent harness and standardizing the following significantly reduces invalid comparisons:
- tool interfaces and return formats;
- timeouts, retries, and maximum number of turns;
- container/sandbox images and dependency versions;
- logging and trajectory persistence formats.
3.5 Scoping Full-Parameter Training
The report trains all language parameters (including the multi-token prediction layer) and freezes the vision encoder and index structures. The lesson for most teams: be explicit about which parameters must move and which must stay frozen, which controls both memory and communication overhead and avoids damaging the base model’s existing multimodal and retrieval capabilities.
4. Deployment Checklist
- Are rollout and training resource-isolated, and is there synchronous long-tail waiting?
- Is weight staleness allowed, and is the staleness limit configurable and monitored?
- Is the share of zero-gradient samples in the task pool continuously reduced?
- Are rewards automatically verifiable, and are failed trajectories diagnosable?
- Do training and evaluation share the same harness and the same image?
- Is the numerical gap between low-precision inference and high-precision training validated periodically?
5. Conclusion
Producing frontier-level agents on a 100-GPU cluster is fundamentally about systematically removing three kinds of waste: waiting, noise, and inconsistency. Environment filtering determines signal quality, the algorithm recipe determines stability, a unified harness determines how trustworthy the conclusions are, and the resource and version strategy sets the throughput ceiling. To bring this approach onto your own platform, container platforms can handle environment isolation, object storage can hold trajectories, and logging services with monitoring and alerting can diagnose long tails, bringing per-task cost into an acceptable range without adding GPUs.
