China's New Coding Models: Training Pipeline Breakdown and Hands-On Testing

    Coding assistants have evolved from single-line code completion into agents that understand repository structure and orchestrate multi-step tool calls. This article uses a recently released suite of coding models from a Chinese AI vendor as a technical sample, breaking down its three-stage training pipeline — capability-oriented mid-training, supervised and reinforcement fine-tuning, and efficiency-focused agentic reinforcement learning — and then testing it on a real development task: building an N-Back cognitive experiment page from scratch. It also discusses what to evaluate beyond public benchmarks and why competition in AI coding is shifting from raw model capability to engineering capability.

    China’s New Coding Models: From Training Pipeline to Real-World Testing

    Over the past year, coding assistant models have evolved from “completing single lines of code” into agents that can understand repository structure and execute multi-step tool calls. Many teams are investing heavily in model capability, training paradigms, and engineering integration around this direction. Using a recently released suite of in-house coding models from a Chinese AI vendor as a case study, this article breaks down the design of its training pipeline and observes how this class of models performs on a real development task through a complete requirement scenario.

    Note that this article discusses the general technical path of “code agent models”; the specific product involved serves only as a technical sample, not a selection recommendation.

    1. Model Tiering: Closed-Source Flagships Paired with Open-Source Lightweight Variants

    This model suite is clearly tiered to cover different usage scenarios:

    • Closed-source flagship: aimed at complex tasks and high-difficulty code scenarios, typically offered via API or subscription quota; suited to production environments that are quality-sensitive but relatively cost-insensitive.
    • Open-source lightweight variants: several variants of different parameter sizes. The smaller versions emphasize free access and a low barrier to entry, suitable for local deployment, teaching demos, and lightweight scripting tasks; the larger versions improve complex reasoning while remaining open source.

    This “closed-source pushes the ceiling, open-source spreads the width” combination has become a common product strategy in the coding model space. For developers, the practical implication is layered invocation: simple tasks can be handled by low-cost or even free small models, while complex refactoring or multi-file collaborative tasks are switched to stronger versions.

    2. Breaking Down the Training Pipeline: What Each of the Three Stages Solves

    Based on public technical descriptions, training of this model family can be summarized as three progressive stages, each with a different optimization objective.

    2.1 Mid-Training: From “Can Write Code” to “Can Do Tasks”

    Traditional code model pretraining focuses mainly on next-token prediction. Such models are good at completion but poor at following complex instructions, calling tools, and handling multi-turn interactions. The core of the mid-training stage is injecting agent-related capabilities, specifically:

    • Instruction following: stably understanding structured requirement descriptions instead of improvising;
    • Tool use: learning to invoke external capabilities during reasoning, such as reading and writing files, executing commands, and retrieving information;
    • Multi-turn interaction: maintaining contextual consistency across turns and avoiding dropped constraints midway;
    • Code knowledge injection: reinforcing mastery of common language features, framework conventions, and engineering practices;
    • Version control operations: understanding the semantics of commits, branches, merge requests, and other common workflows;
    • General and reasoning abilities: preventing the model from losing baseline reasoning by over-focusing on code.

    The value of this stage is that it determines whether a model is a “code completer” or a “task executor”. Many models perform well on single-file generation but expose instruction drift and tool misuse once cross-file edits and step-by-step verification are required. Mid-training is a systematic fix for exactly these weaknesses.

    2.2 Supervised and Reinforcement Fine-Tuning: Aligning Task Distribution with Real Demand

    In supervised fine-tuning (SFT), how training data is organized directly determines the model’s behavioral preferences. A reasonable approach is coverage along two dimensions: task type × code scenario.

    • Task type dimension: high-frequency developer operations, such as adding features, fixing bugs, writing tests, refactoring, explaining code, generating documentation, migrating interfaces, and performance optimization;
    • Code scenario dimension: different tech stacks and engineering forms, such as script tools, web services, data processing, concurrency logic, and configuration management.

    In reinforcement fine-tuning (RFT), a key engineering problem is the stability of the reward signal. A single reference answer easily causes the model to overfit to one particular coding style, while introducing multiple ground truths significantly improves sampling efficiency, allowing the model to learn the commonality across “multiple correct implementations” rather than memorizing a single style. This matters especially for code tasks, where the same functionality often has many reasonable implementations.

    2.3 Scaling Agentic RL: Treating Training Efficiency as a First-Class Citizen

    The cost of agentic reinforcement learning (Agentic RL) comes mainly from trajectory sampling: every step requires interaction with the environment, and long trajectories quickly amplify compute overhead. This model family applies two notable engineering techniques at this stage:

    (1) Entropy-guided tree pruning

    A large number of sampled trajectories are compressed into a prefix tree, so paths sharing the same prefix can reuse computation. Nodes are then ranked by entropy and visit probability, expanding high-signal nodes first within a given budget while pruning low-value branches directly. The intuition: the more the model “hesitates” at a decision point (higher entropy), the more that node deserves deeper exploration, while paths that have already been repeatedly validated need no repeated sampling.

    (2) Heterogeneous scheduling that decouples training from agent logic

    The training loop is fully separated from the agent execution logic, so cluster resources stay saturated and idle time waiting on environment responses is reduced. This kind of “zero-bubble” scheduling is especially critical for large-scale RL training, because the duration of agent tasks fluctuates far more than in conventional training.

    The scheduling idea, in pseudocode:

    1. # Pseudocode: entropy-guided trajectory pruning
    2. def expand(node, budget):
    3. if budget <= 0:
    4. return
    5. # Sort by entropy and visit probability; expand high-signal nodes first
    6. children = sorted(node.children, key=lambda c: (c.entropy, -c.visit_prob), reverse=True)
    7. for child in children:
    8. if budget <= 0:
    9. break
    10. rollout(child) # Sample only high-signal branches
    11. budget -= child.cost
    12. expand(child, budget) # Recursively expand

    3. Evaluation Perspective: What to Look at Beyond Leaderboards

    Public software engineering benchmarks typically cover tasks such as bug localization, patch generation, and repository-level understanding, and they do reflect a model’s overall level. But for actual usage, several dimensions that leaderboards do not capture deserve attention:

    • Tool compatibility: whether the model stably adapts to different agentic coding tools and CLI agents, rather than supporting only one invocation path;
    • Long-context stability: whether constraints get forgotten across multi-file, multi-turn edits;
    • Verifiability: whether generated code comes with runnable verification steps instead of conclusions only;
    • Failure modes: when requirements are ambiguous, does the model proactively ask for clarification or force out a fabricated answer?

    Judging by the recent iteration cadence, tool compatibility is a clear improvement direction — early versions had limited adaptation to some agentic coding tools, while newer versions expanded support within a short time. This kind of engineering adaptation often affects the daily experience more than a bump in benchmark scores.

    4. Hands-On Case: Building an N-Back Cognitive Experiment Page from Scratch

    To observe how the model handles a scenario where “requirements are clear but interaction details matter”, a psychology experiment paradigm is used as the test task.

    The Requirement

    Implement an N-Back experiment page. An image flashes every 1 second, and the user judges whether the current image matches the one shown N positions back — choosing “Yes” if it matches and “No” if it does not. The images are 10 common Chinese characters: 国、火、道、市、天、家、理、态、至、心. The UI must let the user choose the value of N at each start, with 2, 3, or 4 as the options.

    What Makes This Task Hard

    On the surface this is a simple front-end page, but it contains several easily overlooked details:

    1. Timing control: the 1-second interval must be stable, and browser timer throttling when the tab is switched away must be considered;
    2. History window maintenance: judging “N positions back” requires a sliding window of length N, with boundary cases (the first N trials cannot be judged) handled explicitly;
    3. State machine design: the start, running, and finished states must switch cleanly, so repeated clicks do not stack timers;
    4. Data recording: experiment-style pages typically record accuracy, reaction time, and similar metrics — not stated in the requirement, but a reasonable extension;
    5. Accessibility: flash frequency and key response need to accommodate different users.

    What to Watch in the Model’s Output

    On tasks like this, a coding model can be evaluated from the following angles:

    • Does it proactively clarify ambiguities: for example, how “N positions back” is handled at the start of the sequence, or whether reaction time should be recorded;
    • Is the code structure sound: whether state management is centralized and timers are cleaned up when the component unmounts;
    • Does it produce a runnable artifact: a single-file HTML page versus a project requiring a build step, depending on toolchain support;
    • Does it include verification instructions: for example, explaining how to verify timing accuracy in the browser.

    A well-structured implementation typically splits the core logic into three parts: sequence generation and window judgment, timer-driven control, and UI state rendering. A representative core-logic fragment:

    1. // Illustrative code: maintain a history window of length N and check for matches
    2. const CHARS = ["国", "火", "道", "市", "天", "家", "理", "态", "至", "心"];
    3. function createTrial(n) {
    4. const history = [];
    5. return function next() {
    6. const current = CHARS[Math.floor(Math.random() * CHARS.length)];
    7. const target = history.length >= n ? history[history.length - n] : null;
    8. const isMatch = target !== null && current === target;
    9. history.push(current);
    10. return { current, isMatch, judgeable: target !== null };
    11. };
    12. }

    The logic itself is not complicated, but engineering completeness — timer cleanup, mutually exclusive states, and result statistics — is what separates “runs” from “usable”.

    5. Is the AI Coding Assistant Track Already Too Crowded?

    Back to the opening question. On the surface, there are indeed many players in the coding model space, but “crowded” depends on the dimension:

    • General capability: gaps among top models on standard benchmarks are narrowing, leaving limited room for pure score competition;
    • Engineering integration: deep adaptation with agentic coding tools, version control, and CI pipelines still has plenty of white space; compatibility and stability determine user retention far more than scores do;
    • Vertical depth: task distributions differ widely across vertical domains, and general models still show clear weaknesses on specific engineering conventions and internal framework conventions;
    • Cost structure: tiered model strategies make “the right model for the right task” possible, and scheduling and routing is itself an engineering problem.

    The more accurate judgment, then, is that the track is not empty, but the center of competition is shifting from model capability to engineering capability — training pipeline efficiency, tool ecosystem adaptation, and verifiability on real tasks. For developers, the rational approach is not chasing a single strongest model, but building a layered invocation and verification mechanism: small models for high-frequency lightweight tasks, strong models for complex collaborative tasks, with human review and automated testing retained for generated results.

    That is also the signal most worth watching in this class of coding models: whether it solves the efficiency problem of agentic tasks at the training-paradigm level, whether it lowers integration cost through engineering adaptation, and whether it delivers verifiable, maintainable artifacts for real requirements. Scores will change, but these capabilities keep accumulating.