Post-Training Engineering for Trillion-Parameter, Long-Context Models: Practical Lessons

    This article examines the practical engineering challenges that surface when post-training a trillion-parameter, long-context model, using a developer's real usage feedback as the starting point. It clarifies what post-training actually changes, then addresses three common phenomena: declining execution willingness and "early stopping," context window bloat and compression strategy, and hierarchical multi-agent orchestration with quota allocation. It also proposes a four-dimension evaluation framework centered on cost per effective output and closes with a reusable implementation checklist for turning added compute into stable returns.

    1. Background: Starting from an Intensive Usage Experience

    A developer described using a general-purpose model with trillions of parameters and million-token context capability, and shared a telling sequence of events. On the previous-generation model, a week’s call quota was typically exhausted within four days, leaving three days of “quota anxiety.” The new-generation model launched on the exact day his quota ran out, so he could not try it immediately, while public discussion was full of complaints that “the quota doesn’t last.” Two days later, sentiment recovered and the new quota arrived, and only then did he actually start using it.

    What is valuable here is not the timeline but the three conclusions he drew afterward:

    1. Compared with the previous generation, it “feels like a different person,” with a noticeably weaker willingness to proactively push tasks forward and a tendency to wrap up as quickly as possible.
    2. The context grows quickly, requiring frequent context compression operations.
    3. Subjectively, he did not perceive a significant improvement in reasoning ability.

    His resource allocation strategy was also quite engineering-minded: the main agent used the most capable new model, while multiple subordinate agents used the previous-generation model with a smaller parameter count, a shorter context window, and roughly half the quota consumption; the “high-speed, double-billing” tier was never enabled. In the end, he chose a “high-low mix” combination.

    This feedback points not to the merits of any specific product but to a set of engineering problems that commonly arise during post-training. This article abstracts them into general technical topics.

    2. Clarifying the Core Concept: What Does Post-Training Actually Change

    Pre-training determines the model’s knowledge boundaries and foundational representation ability, while post-training determines how the model “gets things done.” Common post-training methods include supervised fine-tuning, preference alignment, and large-scale reinforcement learning centered on verifiable rewards. When post-training compute increases significantly, the model’s behavioral distribution is reshaped, with typical changes concentrated in four areas:

    • Stricter instruction following, with higher compliance on format and constraints;
    • Longer and more standardized chains for tool calling and multi-step planning;
    • The most obvious gains in verifiable domains such as code, structured generation, and long-document understanding;
    • A more conservative output style, with an “early stopping” tendency.

    Understanding this explains why “more capable” and “worse subjective experience” can appear at the same time: capability benchmarks measure the upper bound of task completion quality, while daily experience measures the efficiency of progress per unit of quota. The two are not equivalent.

    3. Phenomenon One: Declining Execution Willingness and the “Early Stopping” Tendency

    “Unwilling to work hard, always wanting to wrap up immediately” is a predictable side effect under a post-training reinforcement learning objective. When the reward signal leans more toward “the task is judged complete” than “the process is fully developed,” the model converges to shorter action sequences.

    There are three engineering countermeasures:

    First, make task decomposition explicit. Do not let the main agent face a vague, large goal; instead, break the goal into subtasks with acceptance criteria, each defining an observable condition for “done.”

    1. task:
    2. goal: "Add idempotency guarantees to the order service"
    3. acceptance:
    4. - "Repeated submission of the same request produces only one record"
    5. - "New concurrency unit tests added and passing"
    6. - "Rollback plan documented"
    7. stop_condition: "all acceptance criteria met"

    Second, make “continue” the default action. Set a minimum number of progress steps at the orchestration layer, and do not allow entry into the wrap-up flow before the threshold is reached.

    Third, decouple acceptance from generation. Have an independent verification step judge completeness rather than letting the executor self-assess. Self-assessment naturally encourages early stopping.

    4. Phenomenon Two: Context Bloat and Compression Strategy

    Long-context capability is a double-edged sword. The larger the window, the more the model tends to keep all intermediate artifacts in context, causing token consumption to grow super-linearly. This is one of the main sources of “the quota doesn’t last.”

    Actionable governance measures include:

    • Layered memory: write long-term facts to external storage (such as object storage or a document repository), keeping only indexes and summaries in context;
    • Structured handoff: have subtasks return results in a fixed schema rather than free text;
    • Threshold-triggered compression: automatically summarize when context usage reaches a set ratio, preserving three types of information: decisions, constraints, and open items;
    • Retrieval instead of full retention: retrieve historical details on demand when needed, rather than keeping them resident in the window.
    1. Compression retention priority:
    2. 1. Hard constraints (interface contracts, prohibitions, acceptance criteria)
    3. 2. Open questions and current assumptions
    4. 3. Confirmed key conclusions
    5. 4. Discardable: intermediate logs, duplicate file contents, full traces of failed attempts

    It is worth emphasizing that compression itself carries a risk of information loss, so compression points should be placed at task boundaries rather than at arbitrary moments.

    5. Phenomenon Three: Hierarchical Multi-Agent Orchestration and Quota Allocation

    “One main agent commanding seven to nine sub-agents” is a typical hierarchical orchestration pattern. Its value lies in parallelism and context isolation, at the cost of amplified call volume and increased coordination overhead.

    Quota allocation should follow three principles:

    1. Capability tiering: the main agent handles planning, trade-offs, and conflict resolution using the strongest model; sub-agents handle well-bounded execution using lower-cost tiers;
    2. Context isolation: sub-agents receive only the minimal context needed to complete their task, avoiding repeated copying of the global context;
    3. Failure isolation and retry budgets: set a retry limit for each subtask to prevent a single-point failure from triggering a full recomputation.
    1. def run_orchestration(goal, subtasks, budget):
    2. plan = strong_model.plan(goal, subtasks) # high-capability tier
    3. for st in plan:
    4. if budget.remaining() <= 0:
    5. return degrade(plan, st) # fall back to serial execution
    6. result = light_model.exec(st, context=st.min_context)
    7. if not verify(st, result):
    8. result = retry(st, limit=st.retry_budget)
    9. budget.charge(st.estimated_tokens)
    10. return aggregate(plan)

    Regarding the “high-speed, double-billing” tier: it suits interactive, latency-sensitive scenarios and is not suited to large-scale batch processing or long-horizon tasks. Using it for sub-agents is usually the first item that should be cut from the cost structure.

    6. How to Scientifically Evaluate a Post-Training Upgrade

    Subjective impressions are not enough to support technical selection. It is recommended to build a four-dimension evaluation table:

    Dimension Metric Description
    Quality Task pass rate, rework rate Judged by acceptance criteria, not human impression
    Efficiency Token consumption per task, number of progress steps Reflects the “early stopping” tendency
    Stability Long-task interruption rate, format compliance rate Reflects post-training maturity
    Cost Cost per unit of effective output Quality divided by consumption, not unit price

    Among these, “cost per unit of effective output” is the most critical: when the new model has a higher unit price but less rework, the total cost may actually decrease; conversely, if early stopping causes rework, costs will rise significantly.

    7. A Reusable Implementation Checklist

    • Replace vague goals with fixed acceptance criteria to suppress early stopping;
    • Use hierarchical main-subordinate tiering, mix strong and weak models, and give subtasks minimal context;
    • Let compression happen at task boundaries, preserving constraints and open items;
    • Use the high-speed tier only for interactive scenarios, and always use the standard tier for batch processing;
    • Build a four-dimension evaluation table and use “cost per effective output” as the decision basis;
    • Set retry and timeout budgets for each subtask to avoid avalanche-style repeated consumption.

    8. Conclusion

    Arthur C. Clarke wrote in Profiles of the Future: the only way to discover the limits of the possible is to go beyond them into the impossible. The capability gains from post-training must ultimately be tested in real long-horizon tasks. For developers, rather than chasing the latest version of a single model, it is better to turn orchestration, context governance, and cost evaluation into sustainable engineering capabilities—this is the path to genuinely converting added compute into stable returns. If elastic compute and a complete observability system are needed to support the practices above, they can be built on general-purpose capabilities such as the container platform, object storage, log service, and monitoring and alerting offered by Baidu AI Cloud.