Post-Training-Driven Capability Gains and Cost Optimization for LLMs

    This article examines how post-training optimization can deliver meaningful capability improvements without scaling up base model parameters, and how engineering teams can balance effective intelligence against unit cost. It covers why post-training has become a primary source of incremental capability, a three-layer evaluation framework for validating upgrades, and practical guidance for complex coding, defensive cybersecurity, and long-horizon tasks. It also outlines cost engineering techniques—tiered routing, context compression, caching, batching, and observability—along with a reference architecture for implementation on Baidu AI Cloud.

    1. Introduction: Capability Upgrades Are No Longer Just About More Parameters

    In mid-August, a Chinese model team released an API for its new-generation foundation model. Public information shows that it scored 60 on a third-party composite intelligence benchmark, placing it in the frontier model capability range. It tied for first place in the open-source category alongside another open model, and sits at the same level as several closed-source flagship models. What is more interesting for developers is the implementation path: the new version did not increase the base model size. Instead, it reused the same base as the previous generation and achieved the capability jump mainly through post-training optimization. It also emphasizes parameter efficiency and unit task cost, targeting three scenarios: complex coding, defensive cybersecurity, and long-horizon tasks.

    The real value of this information for engineering teams is not “who ranks first,” but that it validates an engineering judgment that is becoming a consensus: incremental frontier capability can increasingly come from data, training strategies, and inference-side optimization, rather than from simultaneous growth in parameters and compute. Setting aside specific product attributes, this article abstracts the topic into three actionable technical issues: how post-training produces capability gains, how to measure “effective intelligence per unit cost,” and cost engineering for large-scale invocation scenarios.

    2. Technical Background: Why Post-Training Has Become the Main Source of Increment

    2.1 Marginal Returns and Scale Constraints of Pre-Training

    The core goal of pre-training is to give the model broad world knowledge and language patterns. Its returns grow with parameters, data, and compute, but marginal returns diminish noticeably and are constrained by data quality and availability. When the base capability is already “good enough,” further scaling often brings capability gains that fail to cover the linear or even super-linear growth in inference cost.

    2.2 The Scope of Post-Training

    Post-training (including general methods such as supervised fine-tuning, preference alignment, rejection sampling, and reinforcement learning with verifiable rewards) does not add world knowledge. Instead, it reshapes the capability distribution: it stably elicits latent capabilities in the base model onto the output distribution of target tasks. It is good at solving the “can do it but not reliably” problem, such as instruction following, format constraints, multi-step consistency, tool-call compliance, and error recovery.

    2.3 Three Reusable Categories of Capability Levers

    • Data side: task stratification and difficulty mix, failure sample reflow, and automatic labeling and verification for verifiable tasks.
    • Training side: preference alignment reduces the proportion of outputs that “look reasonable but are actually wrong”; reinforcement learning with verifiable rewards yields significant gains on math, code, and logic tasks.
    • Inference side: decoding strategies, context management, tool orchestration, and result verification are “free increments” that can be obtained without changing weights.

    3. Capability Measurement: How to Tell Whether an Upgrade Is Real

    A single benchmark score is not enough to support a selection decision. A three-layer evaluation system is recommended.

    3.1 Layer 1: Public Composite Metrics for Coarse Screening

    A third-party composite intelligence index can serve as an initial filter. Check whether it enters the frontier range, but understand its limitations: the question distribution usually does not match your business distribution, and there is a risk of data contamination.

    3.2 Layer 2: Scenario-Specific Private Evaluation Sets

    Build a stratified evaluation set for your own business, covering difficulty gradients and real dirty data:

    1. Suggested evaluation set structure
    2. ├── L1 Basic correctness (single step, clear constraints) 30%
    3. ├── L2 Composite constraints (multiple constraints, strict format) 30%
    4. ├── L3 Long-horizon tasks (multi-file/multi-turn/rollback needed) 25%
    5. └── L4 Adversarial and security (inducement, privilege escalation, injection) 15%

    3.3 Layer 3: Business Metric Loop

    Map offline metrics to business metrics: first-pass rate, manual rework rate, average interaction turns, end-to-end task duration, and cost per task. Only when business metrics improve can a capability upgrade be considered valid.

    4. Practical Points for Complex Coding Scenarios

    The difficulty of complex coding is not “writing code,” but maintaining constraint consistency in long contexts and recovering from errors.

    1. Upfront and structured constraints: write interface contracts, dependency versions, and prohibited items as an explicit list to reduce the model’s room for improvisation.
    2. Small, verifiable steps: break the task into minimal units that can be compiled and tested, so each step has an objective feedback signal.
    3. Failure reflow: structure compile errors, test failures, and review comments and feed them back as fuel for post-training and prompt optimization.
    4. Context governance: inject only relevant snippets and summaries to avoid irrelevant information diluting attention. This is also a key means of cost control.

    Example prompt structure:

    1. [Task goal] One sentence describing the acceptance result
    2. [Hard constraints] Language/version/API signature/prohibited dependencies
    3. [Context] Relevant file summaries + key type definitions
    4. [Acceptance method] Compile command + test case scope
    5. [Output format] Patch + change notes + risk points

    5. Boundaries and Practices for Defensive Cybersecurity

    Defensive security emphasizes “identification and hardening,” not attack implementation. In engineering terms, the model should be positioned as an audit assistant: it reads configurations and code and outputs a risk list, remediation suggestions, and verification cases. High-risk operations require manual confirmation; sensitive data should be desensitized and injected minimally; audit logs should be retained across the full chain for traceability and review. Any automated fix should first go into a branch and a canary environment, and be merged only after passing tests.

    6. Long-Horizon Tasks: Consistency and Recoverability First

    The failure modes of long-horizon tasks are mainly “goal drift” and “state loss.” Practical approaches include: maintaining externalized task state (plan, completed items, items to verify), advancing only one verifiable sub-goal per round; setting budget limits (turns, tokens, time) and timeout rollback; introducing a result verifier to make objective judgments on outputs; and writing intermediate conclusions to a searchable logging service to avoid context bloat.

    1. # Pseudocode: long-horizon loop with budget and verification
    2. state = load_state()
    3. while not state.done and state.budget.left():
    4. step = plan_next(state) # Plan only one verifiable sub-goal
    5. result = run_tool(step) # Tool call; side effects must be rollbackable
    6. if verify(result): # Objective verification: tests/compile/rules
    7. state.commit(step, result)
    8. else:
    9. state.record_failure(result) # Failure reflow; adjust the next step
    10. state = checkpoint(state) # Externalize state to support recovery

    7. Cost Engineering: Turning “Effective Intelligence per Unit Cost” into the Bill

    Parameter efficiency and invocation cost ultimately show up on the bill. Optimization can start from five directions:

    • Tiered routing: simple requests go to small models or rules; only complex requests are escalated to flagship models.
    • Context compression: reranking retrieval snippets, summarization, and deduplication are usually the most direct cost-reduction measures.
    • Cache reuse: cache stable prefixes and repeated question-answer pairs to reduce repeated computation.
    • Batching and asynchrony: submit offline tasks in batches to improve throughput and smooth peaks.
    • Observability: use monitoring alerts and logging services to track token distribution, failure rate, and cost per task, forming a continuous optimization loop.

    A recommended measurement definition: cost per task = (input + output token consumption × unit price + tool call and retrieval cost) / number of successful tasks. Use “successful tasks” rather than “number of calls” as the denominator to avoid retries masking the true cost.

    8. Implementation Reference on Baidu AI Cloud

    To implement this on Baidu AI Cloud, you can use a combination of general product categories: a container platform to host inference and orchestration services, object storage to hold evaluation sets and intermediate artifacts, a message queue for task decoupling and peak shaving, and logging services with monitoring alerts to build cost and quality dashboards. The model access layer should be abstractly encapsulated so that the base model is replaceable, keeping the business unaffected during post-training iterations or version upgrades.

    1. Request → Access gateway (auth/rate limiting/routing)
    2. → Scenario classification (small model/rules first)
    3. → Orchestration layer (context governance + tool calls + verification)
    4. → Model service (container platform, elastic scaling)
    5. → State and artifacts (object storage / logging service)
    6. → Metric reflow (monitoring alerts + private evaluation set)

    9. Conclusion

    The combination of “same base + post-training optimization + cost constraints” is becoming the mainstream engineering paradigm for frontier model iteration. The takeaway for developers is clear: when selecting a model, do not look only at the composite score; also evaluate private-scenario pass rate, long-horizon stability, and cost per task. In implementation, treat verifiable feedback, state externalization, and context governance as three core pieces of infrastructure. Get these three things solid, and even with an unchanged base, you can continuously obtain measurable capability increments and room for cost optimization.