Five Days on a Hundred-GPU Cluster: A Cost-Efficient Path for Long-Horizon Agent RL

    The hard problem in long-horizon agent reinforcement learning is not whether a model can finish a task, but whether it can produce reliable, learnable signals across dozens to hundreds of tool interactions at an acceptable cost. A published recipe shows that, starting from a 300B-class sparse base model, full-parameter RL can be completed in under five days on 64 high-memory accelerators, reaching roughly 46.2% Pass@1 on terminal-operation benchmarks—on par with frontier closed-source models—at more than 30x lower cost per task than a high-reasoning-effort closed-source model, with transfer to software-engineering repair benchmarks. This article abstracts the engineering methods behind that recipe and discusses how a ~100-GPU cluster can approach the performance-cost Pareto frontier, covering environment filtering, RL recipes for long/stale/low-precision rollouts, shared training-evaluation runtime, cost accounting, and deployment checklists with risk boundaries.

    Long-Horizon Agent RL Is Fundamentally an Economics Problem

    Long-horizon agent tasks differ from single-turn QA. A single rollout may involve dozens of tool calls, file reads and writes, command executions, error recovery, and multiple observation turns, with trajectories reaching tens of thousands of tokens. Training cost comes not only from model inference but also from tool execution, sandbox resources, environment resets, failed retries, and verifier evaluations. If you chase benchmark scores alone, you can easily end up with “metrics up slightly, costs up several-fold.”

    Therefore, any agent RL approach should be evaluated along two dimensions: task pass rate and average cost per task. The performance-cost Pareto frontier means the lowest cost at a given pass rate, or the highest pass rate at a given cost. Log-scale axes are commonly used to display cost differences, because high-cost points otherwise compress the visible improvements at the low-cost end.

    A ~100-GPU cluster has an additional constraint: it cannot rely on the raw compute of thousand-GPU clusters, so it must raise the effective sample rate per GPU. Key techniques include environment parallelism, asynchronous rollouts, trajectory filtering, mixed-precision inference, gradient accumulation, checkpoint optimization, and a shared runtime framework. In other words, the core of training efficiency is “fewer wasted interactions,” not simply more GPUs.

    Recipe Skeleton: Full-Parameter RL with Frozen Non-Language Modules

    The recipe starts from a sparse model with roughly 320B total parameters and about 17B activated per token. It trains all language parameters, including the multi-token prediction layers, while freezing the vision tower and the sparse router/indexer. The logic: language parameters carry the primary reasoning and action policy—the core of what RL must optimize—while the vision tower and router handle general perception and routing. Freezing them reduces the optimization surface, memory footprint, and communication overhead while keeping base capabilities stable.

    Full-parameter RL does not mean every module is updated. For long-horizon agents, action selection, tool calls, error recovery, and stopping decisions are driven mainly by the language policy, so concentrating the training budget on language parameters is more economical. Multi-token prediction layers relate to next-action generation efficiency and should also be trained. Freezing non-language modules reduces training instability and avoids degrading general perception on terminal and coding tasks.

    Completing training on 64 high-memory accelerators in under five days shows that a ~100-GPU cluster can achieve frontier-level efficiency through recipe optimization. That said, a published recipe lowers the reproduction barrier but does not mean every team can directly replicate the results; environment quality, trajectory governance, and evaluation consistency remain key variables.

    Key 1: Environment Filtering Puts Tasks at the Right Difficulty to Yield Reliable Signals

    For agent RL, more environments is not better. Tasks that are too easy always succeed, giving zero within-group advantage; tasks that are too hard always fail and provide no useful gradient. The goal of environment filtering is to place each task at a suitable difficulty where it produces reliable signals.

    First, build the task pool in layers. Stratify by task type, tool dependencies, interaction rounds, failure modes, and verification method; remove duplicates and near-duplicates so the training set is not dominated by a few templates. Each environment should have a reproducible snapshot, including the initial filesystem state, dependency versions, timeout settings, and verifier version.

    Second, calibrate difficulty dynamically. Sample with a sliding success-rate window: keep only tasks whose success rates fall in a middle band, or raise difficulty progressively following a curriculum. For tasks that fail continuously due to an unstable verifier, flag and isolate them rather than letting the model learn noise.

    Third, signals must be reliable. Verifiers should use deterministic tests, assertions, or multiple checks wherever possible. Tool timeouts, environment drift, and permission errors must be distinguished from model errors. Failed trajectories should be attributed: policy mistake, malformed tool call, environment issue, or verifier misjudgment. Only reliable signals should enter advantage estimation.

    Fourth, control environment cost. Reduce startup overhead through snapshot restoration, dependency caching, container reuse, and parallel scheduling. Lightweight stand-ins can be used for smoke tests, but final training and evaluation must run in real environments to avoid distribution shift.

    Key 2: An RL Recipe for Long, Stale, Low-Precision Rollouts

    Long-horizon rollouts have three typical characteristics: long trajectories, stale policy versions, and low inference precision. The training recipe must address all three.

    For long trajectories, apply segmentation and truncation management. Assign credit to key actions; filter trajectories with no signal or an excessive number of useless tool calls. Normalize rewards so long trajectories don’t dominate updates simply by having more tokens. Groups that are all-success or all-failure should not directly produce advantages—filter them or downweight them.

    For stale rollouts, asynchronous generation means policy versions lag behind. Constrain staleness with a version window, clip importance ratios, mix fresh and stale samples at a controlled ratio, and prioritize replay of high-signal trajectories. This preserves asynchronous throughput while controlling off-policy divergence.

    For low-precision inference, low-cost sampling relies on low-precision or quantized inference, but training updates require numerical stability. Keep master weights in high precision, recompute logprobs, apply gradient clipping, loss scaling, and outlier monitoring to prevent low-precision logprob errors from contaminating advantage estimates. KL constraints and clipping should be retained to prevent policy drift.

    An illustrative training loop:

    1. for step in range(max_steps):
    2. tasks = scheduler.sample(curriculum, success_window)
    3. rollouts = async_rollout(policy, tasks, runtime,
    4. max_turns=..., timeout=...)
    5. valid = filter(rollouts,
    6. reward_reliable=True,
    7. staleness_lt=version_window,
    8. has_signal=True)
    9. advantages = compute_group_advantage(valid)
    10. update(policy, valid, advantages,
    11. clip=..., kl_coef=...)
    12. if step % eval_interval == 0:
    13. score, cost = evaluate(policy, shared_runtime, fixed_tasks)
    14. frontier.update(score, cost)

    The loop emphasizes three things: sampling is governed by the curriculum and the success-rate window; trajectories are filtered for reliability and staleness before entering training; and evaluation shares the runtime framework with training so cost and metrics are measured on the same footing.

    Key 3: Training, Optimization, and Evaluation Share One Runtime Framework

    Using different runtime frameworks for training and evaluation is a common hidden problem in agent projects. If tool interfaces, timeouts, filesystems, or log formats differ between training and evaluation, the model ends up “good at training, bad at evaluation,” or evaluation results are inflated. A shared runtime framework reduces distribution shift.

    The shared framework should include: tool sandboxes, filesystem snapshots, timeout and retry policies, permission control, log collection, and observable metrics. Training environments may randomize task content and initial states, but interface semantics must match evaluation. Evaluation should fix the task set, random seeds, and verifier version to avoid evaluation contamination.

    Observability matters too. Log interaction rounds, token consumption, tool failure rates, verifier latency, retry counts, and per-task cost for each episode, and use them to diagnose curriculum difficulty and trajectory quality. A cost dashboard should sit alongside the pass-rate dashboard so the team doesn’t optimize scores while ignoring economics.

    The Cost-Performance Pareto: How to Account for and Interpret It

    Per-task cost should include input/output tokens, tool calls, sandbox CPU and memory time, storage and logging, retries, and evaluation cost. You can average over successful tasks or over all attempts, but the accounting must be transparent. If the model is self-deployed and costs are estimated using publicly listed base-model prices, state the estimation assumptions explicitly—don’t mix internal costs with external prices.

    The published claim of “more than 30x lower cost per task” should be understood as a relative advantage under a specific experimental setup. Its sources may include: a stronger policy reducing trial-and-error rounds, low-precision inference reducing per-token cost, environment reuse reducing startup overhead, and trajectory filtering improving sample efficiency. It is not the result of any single factor, nor can it be extrapolated directly to all tasks.

    Transfer to software-engineering repair benchmarks suggests the policy generalizes to a degree, but different domains have different toolchains, verifiers, and long-tail failure modes—conduct a domain environment audit before deployment.

    Deployment Checklist and Risk Boundaries

    For deployment, first build a shared runtime framework and a fixed evaluation set; then run a small-scale environment audit, stratify tasks by success rate, and establish a trajectory repository and cost dashboard. On the training side, use asynchronous rollouts, version windows, trajectory filtering, and mixed precision. On the infrastructure side, build sandboxes and trajectory management on general container platforms and cloud object storage, logging, and monitoring capabilities.

    Risks include reward hacking, verifier bias, environment drift, evaluation contamination, cost spillover, and long-tail failures. Mitigations include multiple verification, environment version pinning, training-evaluation isolation, cost budgets, and manual spot checks. A ~100-GPU cluster can approach the frontier—but only if environment signals are reliable, trajectory governance is in place, evaluation methodology is consistent, and a closed loop of “training–evaluation–cost” is established.