Post-Training Scaling: Unlocking Model Coding and Defense Capabilities
This article examines post-training scaling as a controlled experiment: with the base model and architecture fully frozen, how far can environment scaling, automated verification, and reinforcement learning infrastructure push agentic capabilities? It breaks down long-horizon environment design, layered verifier architecture, reward-hacking countermeasures, and RL training infrastructure, then offers an evaluation checklist for teams assessing a "same base, post-training only" roadmap. The core takeaway: the base model sets the capability ceiling, environments determine trainability, verifiers determine signal quality, and infrastructure determines output per unit of compute.
1. The Question: Why “No More Parameters” Still Deserves a Serious Look
For the past two years, the default industry narrative around capability growth has been stacking parameters and compute: larger total parameter counts, more activated parameters, longer pretraining corpora. That curve is now steepening, with diminishing marginal returns and rising inference costs arriving at the same time. So a new question is on the table: with the base model completely frozen, can post-training alone deliver a perceptible, verifiable leap in capability?
A leading Chinese model team recently answered with a textbook controlled-variable experiment: the new version shares an identical base and architecture with the previous generation — a sparse mixture-of-experts structure with roughly 753B total parameters, about 40B activated per token, 78 layers, an attention design centered on multi-head latent attention and sparse attention, and the same context index sharing scheme as its predecessor. The context window stays in the million-token range, with a single continuous output limit of about 128K tokens on the API side, and the full feature set is present: thinking mode, streaming output, function calling, context caching, structured output, and open protocol support. The only variable that changed is post-training: the environment pool grew by roughly an order of magnitude or more, reinforcement learning compute scaled up accordingly, and the training cycle stretched to about a month.
This article does not review any specific product. Instead, it abstracts the release into a general technical proposition: where are the boundaries of post-training scaling’s returns, and how do you implement it in engineering terms.
2. Core Finding: Capability Gains Come from Scaling the “Environment–Verification–Policy” Loop
Abstracted from this experiment, the conclusion fits in one sentence: when the base model is capable enough, the ceiling on agentic capability is determined by the quantity and quality of interactive environments and the reliability of verification signals — not by parameter count.
The evidence is a set of synchronized gains across task domains: on a real terminal task benchmark, scores jumped from single digits to nearly 30%, roughly six times the previous generation; on repository-level real-world software engineering tasks, improvement exceeded 20 percentage points; on vulnerability reproduction and exploitation benchmarks, the model ranks near the top with a success rate above 80%, with some attack-and-defense benchmarks more than doubling versus the previous generation. Notably, these gains are not evenly distributed — they concentrate on tasks that require multi-step operations, interaction with real environments, and long feedback chains, while pure knowledge Q&A and single-turn code completion improved only marginally. That distribution is itself the evidence: what post-training scaling buys is not knowledge, but behavioral policy and long-horizon execution capability.
3. Long-Horizon Environment Scaling: Turning “Tasks” into Trainable Terrain
3.1 What Counts as a Long-Horizon Environment
Long-horizon environments are interactive scenarios in which the model must execute dozens or even hundreds of consecutive steps and revise its plan mid-course based on feedback: locating and fixing a build failure in a real operating system, completing a cross-file refactor in a large codebase, verifying a vulnerability in a controlled range. Their shared trait is sparse reward — you only learn whether you succeeded at the very last step.
3.2 Three Dimensions of Scaling
Scaling environments is not simply “spin up a few more containers.” It typically expands along three dimensions at once:
- Breadth: covering different language stacks, build systems, dependency shapes, and failure modes, so policies do not overfit to a handful of task templates;
- Depth: extending the shortest solution path for a single task from a dozen steps to over a hundred, forcing the model to learn intermediate state maintenance and plan revision;
- Diversity: providing multiple viable solutions and multiple failure paths for the same task, so the reward signal can distinguish “succeeded by luck” from “succeeds reliably.”
3.3 Environments Are Infrastructure
Once the environment count reaches the thousands, the environment itself has to be built as a distributed system: image layering and pre-warming, dependency cache reuse, automatic attribution of failed tasks, resource quotas and timeout governance, and observability instrumentation. A common pitfall in practice is noisy rewards caused by environment instability, and the damage far outweighs having too few environments — it systematically biases the policy gradient. So while scaling up, you must also establish environment health metrics (startup success rate, task solvability rate, verdict consistency rate) and wire them into daily monitoring and alerting.
4. Automated Verifiers: The Real Bottleneck of Post-Training Scaling
Reinforcement learning needs rewards, and rewards come from verifiers. Hand-written verification logic cannot support a tenfold-plus expansion of environments, so verifiers must be generated and checked automatically.
A practical layered design:
- Execution-layer verification: objective signals such as exit codes, test pass rates, and build artifact hashes serve as the first gate;
- State-layer verification: assertions on key intermediate states, for example the table schema after a database migration or the health check response after a service starts;
- Regression-layer verification: ensuring a fix introduces no new breakage, using the existing test suite and static checks as a backstop;
- Consistency checks: the same task is judged by two independently implemented verifiers, and conflicting samples go into a human review queue.
Pseudocode sketch:
def verify(task, trajectory):env = sandbox.restore(task.snapshot)for step in trajectory:env.apply(step)hard = env.exit_code() == 0 and env.tests_passed()state = env.assert_invariants(task.invariants)regress = env.run_regression_suite() >= task.baselineif hard and state and regress:return reward(1.0, bonus=step_efficiency(trajectory))return reward(0.0, reason=diagnose(env))
What deserves emphasis is the adversarial co-evolution of verifier and policy: the policy will actively hunt for verifier loopholes (for instance, rewriting test files directly or skipping validation steps). Engineering countermeasures include hidden test sets, isolating verification logic from the task description, manual spot-checks of suspicious trajectories, and tracking the “cheat rate” as a core quality metric over time.
5. Reinforcement Learning Infrastructure: Throughput, Stability, Reproducibility
Compute utilization in post-training scaling is ultimately decided by training infrastructure. Mature industry practice boils down to four points:
- Decoupling sampling from training: an inference cluster handles large-scale trajectory sampling while a training cluster handles parameter updates, with queues and parameter synchronization between them so neither side waits on the other;
- Long-tail governance: trajectory length variance is enormous for long-horizon tasks, so bucket scheduling by length is needed to keep a few extremely long samples from tanking whole-batch throughput;
- Checkpoint resume and data versioning: environment snapshots, sampled data, and verifier versions are bound to a shared version number so experiments stay reproducible;
- Reward normalization: raw reward scales differ markedly across task domains, so normalize within each domain before mixing, otherwise one domain dominates the gradient.
A simplified training loop:
for step in range(total_steps):batch = sampler.sample(env_pool, n=rollouts, temperature=1.0)batch = verifier.filter_and_score(batch) # Filter out cheating and noisebatch = normalize_by_domain(batch)loss = policy_loss(batch) + kl_penalty(policy, ref)trainer.update(loss)if step % eval_interval == 0:metrics = evaluate(holdout_tasks) # Holdout set guards against environment overfitting
The holdout set is especially critical: once the environment pool scales up, the most common failure mode is the model memorizing task-specific solutions from the training environments with no real gain on the actual distribution.
6. Capability Transfer: Terminal Control, Real Software Engineering, and Security Defense
All three capability gains share the same mechanism but differ in emphasis.
Terminal control tests state awareness and error correction: diagnosing failed commands, locating path and permission problems, extracting key information from long outputs. The gains come mainly from expanding environments along the depth dimension.
Real software engineering tests cross-file reasoning and regression awareness: locating defects, assessing blast radius, keeping changes minimal, and ensuring existing tests do not regress. The gains come mainly from more complete regression-layer verification.
Security defense tests bidirectional understanding of attack and defense. The boundary must be stated clearly here: related training should happen inside isolated ranges and within authorized scope, and the output should serve vulnerability fixing, detection rule generation, and hardening validation. Before a model is released, red-team evaluation, abuse risk assessment, and protection hardening must be completed. This is also the standard process for responsibly releasing weights: assess first, then harden, then publish.
7. How to Evaluate a “Same Base, Post-Training Only” Roadmap
A checklist for technical decision-makers:
- Attribution of gains: is there a control group with the base held constant, and are the gains reproducible;
- Distribution realism: the gap between training environments and real business scenarios, and how the model performs on the holdout set;
- Verification reliability: cheat rate, verdict consistency rate, human review pass rate;
- Cost structure: the share of environment compute versus sampling compute, and the marginal cost per unit of capability gained;
- Engineering support: whether observability, canary release, and rollback mechanisms are in place;
- Compliance and security: whether evaluation and hardening before weight release are complete.
To reproduce this roadmap in your own business, you can build the loop on general-purpose cloud capabilities: a container platform to host a large elastic environment pool, object storage to hold environment snapshots and sampled data, a message queue to decouple sampling from training, and logging plus monitoring and alerting to track environment health and cheat rate. Baidu AI Cloud offers corresponding capabilities in these general infrastructure categories and can serve as one option for the foundation of a post-training loop.
8. Conclusion
The greatest value of this experiment is not any single score. It turns post-training scaling from experience into a measurable engineering problem: the base model sets the capability ceiling, environments determine trainability, verifiers determine signal quality, and infrastructure determines output per unit of compute. When all four scale together and form a closed loop, parameters can stay fixed and still yield significant gains in real-world scenarios. For most teams, rather than chasing a parameter race, it pays to first build the three foundations — the environment pool, the verifiers, and the training loop. Their compounding effect often lasts longer than swapping the base model.
