Post-Training Scaling vs. Trillion-Parameter Foundation Models: When Existing Models Still Have Room to Improve

    This article compares two approaches to improving coding and AI agent models: keeping an existing foundation model and aggressively scaling post-training, or training a new trillion-parameter foundation model. It explains how pretraining establishes capability potential while post-training determines how much of that potential is realized, why verifiable rewards and long-horizon task environments matter, and how teams should evaluate models and choose between these two routes. It also provides engineering guidance for building a post-training pipeline, including task environments, reward design, reinforcement learning optimization, and evaluation practices.

    1. Introduction: Two Ways to Push the Same Boundary

    Two recent model updates have sparked discussion because they took clearly different directions.

    One update appeared suddenly and was described as the highest-ranked open-source model currently available, with claims that its coding experience surpassed other Chinese models. The other update was a new foundation model with nearly 3 trillion parameters, also focused on coding and AI agents, and also released as open source.

    Looking at the longer timeline, both routes have coexisted:

    • Route 1: Keep the base unchanged and push it to the limit. The foundation model remains unchanged, and intelligence is improved mainly by aggressively scaling post-training.
    • Route 2: Rebuild from scratch and bet on a new base. A new foundation model with a much larger parameter count is trained from scratch, directly raising the starting level of capability.

    These two approaches can be compared to automotive development. The first is like upgrading the suspension, tuning the chassis, and recalibrating the electronic control systems on the same car. The second is like redesigning the engine, chassis, and overall vehicle architecture. Which approach is more cost-effective depends on two variables: how much untapped potential remains in the existing base, and how many real-task successes can be obtained per unit of compute.

    This article first explains the principle and engineering levers behind the “push the existing base to the limit” route. It then compares capability differences and evaluation methods. Finally, it offers recommendations for developers on model selection and building their own evaluations.

    2. Principles: Pretraining Sets the Foundation; Post-Training Raises the Ceiling

    2.1 The base model defines potential; post-training determines realization

    There is a long-standing implicit hierarchy in the industry: changing the base model counts as a real upgrade, while changing post-training is often seen as mere tuning. This view is only half right, and it misses a crucial factor: the realization rate of capability.

    A model’s potential cannot be fully released at the end of pretraining. Pretraining exposes the model to massive amounts of data and teaches it to predict the next token given context. However, there is a large gap between being able to predict correct code and being able to complete multi-step operations reliably and autonomously in complex engineering tasks.

    Model capability can be compared to a student’s knowledge base:

    • The pretraining stage is like classroom learning. It determines how much the student has read and how broad their knowledge is.
    • The post-training stage is like doing projects, entering a laboratory, and receiving real-world training. It determines whether the student can turn knowledge into the ability to solve complex problems.

    A student with broad knowledge but no engineering practice may perform very differently from a student with slightly narrower knowledge but extensive experience with real projects. This is the underlying logic behind why expanding post-training without replacing the base can lead to significant capability improvements.

    2.2 Post-training: from next-token prediction to verifiable behavioral policy

    A large model is fundamentally a system that predicts the next token based on context. In general conversation, a small amount of demonstration data plus human preference alignment is often enough to teach the model politeness, formatting, and instruction following.

    Coding and agent scenarios, however, impose much stricter correctness requirements:

    • Correctness can be automatically verified: code can be checked by unit tests, compilation, and static analysis; commands can be checked for successful execution; tool calls can be checked for expected results.
    • The process is very long: a real software engineering task often requires the model to read and write files, execute commands, inspect logs, locate issues, and make iterative changes across multiple rounds.
    • The format is highly structured: when calling tools or parsing results, even a single formatting error may interrupt the entire task chain.

    These characteristics make such scenarios naturally suitable for optimization through reinforcement learning driven by verifiable rewards. Once automated acceptance criteria are defined for a task, the model can repeatedly attempt many real tasks and learn planning, debugging, recovery, and trade-offs through a cycle of trial, feedback, and correction.

    This is the fundamental reason why post-training can continuously raise the capability ceiling of a model.

    3. Pushing the Existing Base to the Limit: What Post-Training Actually Scales

    The post-training approach can be summarized as “keep the base unchanged and dig deeper into its potential.” In practice, this scaling happens along three dimensions.

    3.1 Environments: tens of times more long-horizon tasks

    The essence of post-training is to make the model repeatedly practice on a task distribution. The number and length of training environments directly determine how large and complex the “battlefields” the model has seen are.

    In coding and AI agent domains, an environment usually includes:

    • An executable code repository or working directory;
    • A set of natural language task descriptions;
    • Automatically verifiable acceptance criteria, such as unit tests, build artifacts, or execution results.

    For example, pairing historical issues with their corresponding fix commits in open-source repositories creates an environment for “given a requirement, let the model autonomously complete the fix.”

    The more such environments exist and the longer the task chains become, the more failure modes the model encounters, such as:

    • Fixing problem A but breaking problem B;
    • Ignoring implicit dependencies;
    • Repeatedly getting stuck on the same error.

    Through repeated reinforcement learning, the model gradually learns engineering habits such as:

    • Locate before acting;
    • Run tests before submitting;
    • Solve the problem with minimal changes.

    Scaling the number of environments by tens of times matters because the model no longer sees only correct solutions under ideal conditions. It sees many real scenarios with constraints, traps, reasoning requirements, and trial-and-error. Generalization and robustness improve accordingly.

    3.2 More diverse environment types

    A single type of task can cause the model to develop path dependence. Real development work covers far more than writing code:

    • Terminal environments: completing system configuration, debugging scripts, and troubleshooting environments through the command line. The model must understand command semantics, file systems, and process state.
    • Repository environments: performing cross-file refactoring, dependency analysis, and version control operations within a complete project context. The model must understand project structure and relationships between modules.
    • Cross-tool collaboration environments: switching among search, file reading and writing, command execution, and other tools, then integrating information from multiple sources to complete a task.
    • Security scenarios: including code auditing, vulnerability analysis, attack-chain reconstruction, and defensive hardening. These place extremely high demands on rigorous reasoning.

    The more diverse the environment types, the more general the capabilities the model learns, and the better it can transfer those capabilities to unfamiliar tasks.

    This also helps explain why models can score similarly on the same benchmark but feel different in real use. Environment coverage determines how many kinds of “worlds” the model has seen, while a benchmark reflects only a small part of that world.

    3.3 Much longer post-training: a brute-force compute addition

    Post-training scaling may look simple and brute-force: just add more training compute. In engineering practice, however, this is not easy, for three reasons:

    • Training and inference are tightly coupled: reinforcement learning requires the model to generate massive numbers of trajectories, which are then used to optimize the model. As training rounds increase, early generated data gradually loses value, and the model must face increasingly difficult tasks. Sample selection and difficulty scheduling must keep up.
    • Execution overhead is high: every trajectory requires commands to be executed, code to be compiled, and tests to be run in a real sandbox. The longer the task chain, the greater the compute and execution cost per sample. Large-scale parallel training also increases the difficulty of scheduling, isolation, and stability.
    • The time span is long: post-training can last for weeks or even months. Any mistake in training strategy may waste weeks of compute. This places high demands on verifier reliability and the observability of process metrics.

    The common challenges behind long-duration, highly parallel tasks can be summarized as follows: failures must be diagnosable, resources must be elastic, and processes must be traceable.

    When building such systems in the cloud, several general infrastructure capabilities are usually combined:

    • Containerized sandboxes to isolate execution environments and ensure reproducibility and non-interference between runs;
    • Elastic resource scheduling to handle workload fluctuations where training and inference are interleaved;
    • Object storage for intermediate artifacts, making offline review and data reuse easier;
    • Logging, monitoring, and alerting services to detect anomalies such as training divergence and task timeouts in real time.

    Baidu AI Cloud provides standardized cloud infrastructure capabilities across these general categories and can serve as one reference choice for such engineering implementations.

    4. Capability Breakdown: Where Each Route Excels

    4.1 Coding and agents: capability is a composite skill

    The real experience of using a model is rarely determined by a single capability. It is usually the result of multiple capabilities stacking together:

    Capability dimension What it looks like in practice Main dependency
    Code generation Completion, function implementation, script writing The base model’s language and code representation
    Code understanding Cross-file localization, dependency and call relationship analysis Base model knowledge plus long-context capability
    Tool use Selecting the right tool, constructing arguments, understanding returned results Agent trajectories from post-training
    Long-horizon planning Breaking down tasks, anticipating risks, and making steady progress Long-horizon task environments from post-training
    Self-correction Adjusting the plan based on errors and test results Reinforcement learning driven by verifiable rewards
    Stability Correct formatting, no interruptions, fewer hallucinations Environment diversity and training sufficiency

    The “keep the base unchanged” route mainly affects the last four rows. When the base already has sufficient code knowledge and representation capability, it is a reasonable strategy to significantly improve agent behavior and long-horizon execution through post-training.

    4.2 The new base route: advantages and costs

    Training a new base from scratch also has real advantages:

    • A higher knowledge ceiling: increasing parameter scale can bring stronger general knowledge, more complex reasoning, and longer context handling capacity.
    • More room for post-training: because the new base has a higher starting point, post-training has more space to explore.
    • Long-tail scenario performance: in rare languages, niche frameworks, or highly specialized domains, a larger new base often performs more comfortably.

    However, the costs are also obvious:

    • Extremely high training cost: pretraining a trillion-parameter base may require thousands or even tens of thousands of accelerators running continuously for months. It is a high-investment, high-risk, long-cycle engineering project.
    • Complex migration and adaptation: the new base’s toolchain, fine-tuning workflow, and inference deployment methods all need to be re-adapted. Existing evaluation systems and engineering assets may not be directly reusable.
    • Returns are not necessarily linear: doubling parameter count does not necessarily mean target-task capability improves by the same proportion. It may also introduce new problems such as training instability and higher inference costs.

    4.3 A unified view: post-training as a capability converter

    A simplified formula can describe capability composition:

    1. Total capability ≈ Base potential × Post-training realization rate
    • Base potential is determined by data quality, parameter scale, and training strategy. It can be viewed as the “upper limit.”
    • Post-training realization rate is determined by task environment scale, diversity, the quality of verifiable rewards, and training sufficiency. It can be viewed as “conversion efficiency.”

    Under this formula:

    • Keeping the base unchanged and pushing post-training to the limit means pushing the realization rate toward its maximum.
    • Training a new base from scratch raises the overall upper limit, while the realization rate can still be improved through more sufficient post-training.

    Both routes ultimately aim at the same goal: making the model perform better on real tasks. When the potential of the existing base has not been exhausted, deep post-training is often the more cost-effective choice.

    5. Designing Evaluations: Do Not Let Benchmarks Decide for You

    The most easily misread part of model comparison is the evaluation itself.

    5.1 Limitations of static benchmarks

    • Data contamination: training data may already contain solutions to benchmark problems. A high score does not necessarily mean strong capability.
    • Distribution bias: single-file function completion and multi-file engineering tasks are two completely different tests.
    • Environment differences: most benchmarks run in ideal sandboxes, which differ greatly from real development environments in terms of network access, permissions, and dependency constraints.
    • Single dimension: pass rate alone cannot reflect key metrics such as token consumption, latency, and stability.

    5.2 Where the perceived quality gap comes from

    The phrase “feels good” usually refers to comprehensive performance on real tasks: high completion rate, concise steps, fewer deviations, less repetitive looping, and generated code that can be merged directly.

    These indicators are difficult to capture in static benchmarks, but they are precisely what post-training focuses on optimizing. The direct goal of long-horizon task environment training is to teach the model how to complete tasks efficiently and robustly, not just to score well on a single function.

    5.3 Evaluation recommendations for developers

    Build an evaluation set that is close to your own business:

    1. Task stratification: include function-level completion, file-level implementation, cross-file refactoring, multi-step issue fixing, and complete AI agent tasks.
    2. Unified acceptance: use objective criteria such as compilation, unit tests, and static analysis as pass conditions to reduce subjective judgment.
    3. Record process metrics: track token consumption per step, number of tool calls, average latency, and overall cost.
    4. Run multiple repetitions: execute each task multiple times to observe stability and variance, avoiding conclusions based on a single run.
    5. Closed-loop feedback: turn real production failures into evaluation samples so that the evaluation set evolves with the business.

    6. Engineering Implementation: How to Build a Post-Training Pipeline

    If a team wants to reproduce the “push the base to the limit” approach on its own foundation model, the following layered design can be used as a reference.

    6.1 Environment layer: build automatically verifiable task sandboxes

    1. # Illustrative code: task environment abstraction and verification logic (framework-agnostic)
    2. from dataclasses import dataclass
    3. from typing import Callable
    4. @dataclass
    5. class TaskSpec:
    6. task_id: str # Unique task identifier
    7. repo_id: str # Associated code repository or project
    8. prompt: str # Task description, such as issue content or requirement
    9. verify_cmd: list[str] # Verification commands, such as running a specified test suite
    10. max_steps: int = 40 # Maximum allowed number of interaction steps
    11. class TaskEnv:
    12. def __init__(self, spec: TaskSpec, workspace: str):
    13. self.spec = spec
    14. self.workspace = workspace # Each round of interaction is executed in an isolated container
    15. def run(self, model: "PolicyModel") -> "Episode":
    16. obs = self.spec.prompt
    17. transcript = []
    18. for step in range(self.spec.max_steps):
    19. action = model.generate(obs) # Model output: command, code modification, or tool call
    20. obs = self._execute(action) # Execute in sandbox and return execution result
    21. transcript.append((action, obs))
    22. if obs.terminated:
    23. break
    24. passed = self._verify() # Run verification commands
    25. return Episode(transcript, passed)

    6.2 Data layer: mine tasks from real repositories

    • Collect issues and their corresponding fix commits to construct “requirement–fix” pairs.
    • Sample tasks in a stratified manner by repository size, programming language, and task complexity to keep the distribution balanced.
    • Assign difficulty levels to tasks to support curriculum learning: start with easier tasks and gradually move to harder ones.

    6.3 Reward design: outcome rewards and process constraints

    1. # Illustrative code: reward composition (weights need to be tuned experimentally)
    2. def compute_reward(ep: Episode) -> float:
    3. if not ep.passed:
    4. # Not passed: provide a partial process reward to avoid sparse signals causing training stagnation
    5. return 0.1 * ep.progress_score
    6. # Passed: use the main reward as the primary signal, with efficiency constraints to avoid long and meaningless steps
    7. return 1.0 - 0.01 * ep.step_count - 0.005 * ep.token_usage

    Reward design is the part of post-training that usually requires the most iteration:

    • Rewarding only “pass” can make the training signal too sparse in the early stage.
    • Over-rewarding intermediate steps may cause the model to learn to game the number of steps.
    • In engineering practice, a common combination is: pass as the main reward + step and cost penalties + verifiable intermediate signals.

    6.4 Training layer: reinforcement learning optimization

    Mainstream reinforcement learning algorithms such as PPO, GRPO, and DAPO share a similar core idea: sample multiple trajectories for each task, update the policy based on reward differences, and increase the probability of high-reward behaviors.

    Based on this, several common industry improvements can be applied:

    • Group sampling and intra-group reward normalization: sample multiple trajectories for each task and estimate advantages from reward differences within the group, reducing the cost of training an additional value model.
    • Dynamic sampling: prioritize samples with moderate difficulty and a reasonable pass rate to maintain training signal quality.
    • Difficulty grading: gradually move from simple tasks to complex tasks, making training more stable.

    6.5 Training monitoring: avoid divergence and overfitting

    • Monitor curves such as training reward, response length, and pass rate for abnormal behavior.
    • Periodically evaluate on an independent validation set to prevent overfitting to the training set.
    • Apply fault isolation and retries to sandbox execution environments to avoid environment instability contaminating training data.

    7. Selection Guidance: Which Path Fits Which Team

    Dimension Better suited to deep post-training Better suited to a new foundation model
    Compute budget Limited, but with spare inference and training resources Sufficient to support long-term pretraining
    Existing base Already validated on target tasks Clearly struggling on target tasks
    Iteration rhythm Requires fast iteration and quick deployment Can accept long-term investment
    Target scenarios Coding and agents with strong verification General capability, long-tail knowledge, and ultra-long context
    Ecosystem compatibility Wants to reuse existing toolchains and deployment methods Willing to bear migration and adaptation costs

    A simple summary:

    • Most teams: prioritize an existing base that is stable on target tasks, and invest resources in environment construction, verifier design, and post-training scaling. This is usually more pragmatic.
    • A small number of teams with long-term compute reserves and clear base bottlenecks: betting on a new base can be a reasonable choice, but migration, evaluation, and cost factors should be planned in advance.
    • When evaluating open-source models: pay attention to three things: whether the weights are open, whether the license allows commercial use, and whether inference deployment costs are controllable. In addition, lightweight fine-tuning can be used to adapt the model to existing toolchains and coding standards, bringing it closer to real-world usage.

    8. Conclusion: The Competition Moves into a More Refined Phase

    Returning to the original question: can pushing an existing base to the limit through extreme post-training beat a trillion-parameter new foundation model?

    The answer depends on whether you are asking “which one is more advanced” or “which one works better in your scenario.”

    From a technical perspective, neither route has absolute superiority:

    • Deep post-training proves that squeezing out every bit of base-model potential can also produce a significant leap. It is more controllable in cost, faster to iterate, and places a heavier test on the team’s engineering skills in environment construction, verifier design, and training scheduling.
    • A rebuilt new base model represents a route where compute and scale still hold decisive power. Once successful, its benefits are more comprehensive, but the risks and barriers are also higher.

    For developers, there is no need to get stuck in the route debate. What is truly worth investing in is an evaluation system that can objectively measure real model capability, allowing data rather than slogans to decide model selection.

    The model competition has moved beyond the stage of “who has more parameters.” It is entering a more refined phase: “who can deliver reliably on real tasks.” Whoever can turn model capability into reproducible, measurable, and sustainable business value truly holds the next ticket.