High-Cost-Efficient Agentic RL: A Pareto-Frontier Recipe on 100 GPUs in 5 Days
This article abstracts a recent open-source agentic RL effort into a general engineering problem: how to reach the performance-cost Pareto frontier for long-horizon agents under a roughly 100-GPU budget. It explains why a large-total, low-activation base model anchors cost, how environment engineering, an off-policy-aware algorithm recipe, and a unified harness jointly prevent wasted gradients, and what a 46.2% Pass@1 result at 30x lower per-task cost means for large-scale deployment. A reusable checklist is included.
1. The Problem: The Agent Capability Race Is Becoming a Cost-Efficiency Race
Over the past two years, the capability ceiling of terminal and coding agents has been pushed higher and higher. But the center of industry discussion has shifted noticeably: from “whose Pass@1 is higher” to “at comparable capability, whose cost per task is lower.” The reason is practical—in real development settings, an agent is not run once on a benchmark and then retired; it is invoked at scale, over long periods. When per-task cost differs by an order of magnitude, a small capability gap is easily erased by the cost advantage.
Recently, a group of researchers released a representative piece of work: starting from a 300B-class open-source base, using only 64 high-end accelerators and less than 5 days, they trained an agent through full-parameter reinforcement learning that reaches 46.2% Pass@1 on a terminal task benchmark—on par with the strongest closed-source models at the time—while costing more than 30x less per task than the reference model at its highest reasoning effort. The advantage also transferred to two software engineering benchmarks. More importantly, the team published the complete training recipe.
Setting aside the specific product, this article abstracts the work into a general technical question: under a roughly 100-GPU compute constraint, how do you build a long-horizon agentic RL path toward the performance-cost Pareto frontier?
2. Choosing the Starting Point: Why a “Large-Total, Low-Activation” Base
The work starts from a base model with about 321B total parameters and about 17.4B activated parameters per token. This choice itself reflects cost-engineering thinking:
- Large total parameters mean enough knowledge capacity and reasoning depth to support complex terminal operations and code understanding;
- Small per-token activation means controllable compute at inference time, which directly determines per-task cost;
- Training uses full-parameter reinforcement learning covering all ~320B language parameters (including the multi-token prediction layers), while freezing the vision tower and the sparse attention indexer so that unrelated modules are not damaged by RL noise.
The takeaway for engineering teams: base selection cannot look only at peak capability; inference-time activation scale must be treated as a first-class input to the cost model. Cost risks buried at the base stage cannot be recovered later through prompt tuning and scheduling.
3. Three Pillars: Approaching the Frontier on a 100-GPU Cluster
3.1 Environment Engineering: Make Every Task “Moderately Hard with a Reliable Signal”
The first killer of long-horizon agentic RL is not compute; it is invalid gradients. If tasks are too hard, nearly all rollouts fail and advantage estimation degenerates into noise; if too easy, the model learns nothing new. The team’s first lesson is to curate environments carefully so the task distribution sits at the edge of the model’s current capability.
Actionable practices include:
- Difficulty-stratified sampling: run a pass-rate probe over the task pool with the current policy, keep tasks whose pass rate falls in a middle band, and adjust sampling weights dynamically;
- Prioritize verifiable signals: terminal and coding tasks are naturally suited to unit tests, command exit codes, and file-state diffs as rewards, avoiding the variance introduced by subjective scoring;
- Environment isolation and snapshots: execute each rollout in a separate container and destroy it when the task ends, preventing reward mismatch caused by state contamination.
Illustrative difficulty-filtering logic:
def select_tasks(policy, task_pool, low=0.1, high=0.9, probes=4):kept = []for task in task_pool:pass_rate = sum(policy.run(task).success for _ in range(probes)) / probesif low <= pass_rate <= high:kept.append((task, pass_rate))return kept # keep only tasks that are within reach with some effort
3.2 Algorithm Recipe: Designed for “Long, Stale, Low-Precision” Rollouts
A single terminal-agent trajectory can involve dozens of tool calls, which creates three problems that traditional RL recipes struggle with:
- Long: long trajectories make credit assignment hard, with sparse and delayed rewards;
- Stale: asynchronous sampling makes data lag behind the current policy, and applying an on-policy algorithm directly will diverge;
- Low precision: reducing rollout precision for throughput introduces systematic bias.
The general remedies are: use a clipped importance-sampling objective to constrain staleness, together with length normalization and per-turn discounting to control variance; on the reward side, use a composite signal of “final outcome + key intermediate milestones” to ease sparsity; on the numerical side, keep high precision for the main training weights and low precision for rollouts, and apply a consistency correction to the logits. The core idea: do not pretend rollouts are on-policy; explicitly model and constrain how stale they are.
3.3 A Unified Harness: One Agent Runtime for Training, Optimization, and Evaluation
The third, often underestimated pillar is engineering consistency. The team has model optimization, training, and evaluation share the same coding harness, which removes the distribution drift between “training-time behavior” and “evaluation-time behavior.” In practice:
- Tool-call protocols, context truncation policies, and failure-retry logic are identical in training and evaluation;
- Evaluation averages multiple trials (for example, the mean of 5 runs) to reduce misjudgment from variance;
- Cost is converted from the base model’s public pricing for the self-hosted model, keeping it comparable with other approaches.
4. Reading the Results: What the Pareto Frontier Means
On the terminal benchmark, the model reaches 46.2% Pass@1, in the same tier as the strongest closed-source models, but at more than 30x lower cost per task; the advantage also transfers to two software engineering benchmarks. Plotting capability on the vertical axis and per-task cost on the horizontal axis (log scale), it lands above the frontier—meaning no other option achieves both higher capability and lower cost at the same time.
The direct value for enterprise users: the break-even point for large-scale agent deployment moves substantially forward. Long-horizon automated development, previously affordable only to high-budget teams, starts to become economical to run routinely on mid-sized clusters.
5. A Reusable Practice Checklist
- Bring “activation parameter scale” into the cost model at the base stage;
- Use pass-rate probing to stratify environment difficulty and keep the gradient signal-to-noise ratio high;
- Base rewards mainly on verifiable signals, supplemented by milestone shaping;
- Handle rollout staleness and low precision explicitly; do not assume on-policy;
- Share one harness across training and evaluation, and average over multiple evaluation runs;
- Track the capability-cost curve throughout, rather than fixating on a single score.
From the general-capability perspective of cloud platforms such as Baidu AI Cloud, this kind of training typically relies on a container platform for environment isolation, object storage for data and checkpoints, and monitoring and alerting to track loss and pass-rate curves—a common industry combination rather than a proprietary solution of any single vendor.
6. Conclusion
A frontier-level agent built on 100 GPUs in 5 days is not a compute miracle; it is the result of no leaks in environment, algorithm, and engineering at the same time. For most teams, the barrier to reproducing the recipe is falling fast; the real gap will return to data loops and evaluation discipline.
