Benchmarking the Coding Abilities of Chinese Open-Source LLMs: A Practical Selection Guide

    How should you evaluate the coding capabilities of Chinese open-source large language models? This article explains why coding is a reliable benchmarking dimension, covers the strengths and limitations of public benchmarks such as data contamination and small task granularity, provides a step-by-step method for building a reproducible side-by-side comparison using your own project tasks, and outlines the key capabilities to examine—root-cause analysis, large-scale refactoring, long-context consistency, and tool use—along with practical selection criteria based on budget, data compliance, and latency requirements.

    Benchmarking the Coding Abilities of Chinese Open-Source LLMs: A Practical Selection Guide

    Why Coding Is a Key Benchmarking Dimension

    Large language models can be evaluated along many dimensions, and coding is one of the easiest to verify objectively. Whether a piece of code compiles, passes test cases, or fixes a known defect can all be judged against relatively clear criteria. For this reason, coding tasks are frequently used to compare the real-world productivity of different models.

    Over the past year, Chinese open-source models have made noticeable progress on coding tasks. On some public benchmarks and certain internal tasks, their results are now approaching those of the previous generation of closed-source flagship models. However, such conclusions typically hold only for specific tasks and specific evaluation methodologies. As task complexity increases, the gap between the two widens considerably. Before making any decision, you should validate results against your own project data rather than relying solely on any single leaderboard.

    This article covers three topics: how to design a reproducible comparison evaluation, which capabilities deserve the most attention, and how to make a selection based on budget, data compliance, and latency requirements.

    What Public Benchmarks Can and Cannot Tell You

    Commonly used coding benchmarks in the industry mostly rely on unit test pass rates as the core metric. They are objective and reproducible, making them suitable for initial screening. But there are three important caveats.

    First, data contamination. Test problems may already exist in a model’s training corpus, inflating its scores. Ways to check for this include: verifying whether problems overlap with training data, prioritizing newer problems released after the model’s training cutoff, or reserving a portion of hidden test cases that are never published.

    Second, task granularity is too small. Scores on single-function completion say little about whether a model is reliable in real-world engineering work that spans multiple files and modules.

    Third, only final outcomes are measured. Benchmarks rarely record how a model understands requirements, decomposes tasks, or discovers and corrects its own mistakes—process capabilities that matter greatly in actual development.

    Public leaderboards are therefore useful for building a candidate list, but they should not be your only selection criterion.

    Building Your Own Comparison Evaluation

    A method that better reflects production conditions is to run the same tasks side by side on two models. The steps are as follows:

    1. Select 20 to 50 tasks from real projects, including confirmed bugs, features to be developed, and test completion work. Every task must have clear acceptance criteria.
    2. Fix the prompt version. All models receive exactly the same task description and context.
    3. Give the same task to both candidate models, driving the same AI coding assistant so that the tooling layer stays constant and does not become a variable.
    4. Score against unified dimensions, and record the model version, date, and reviewer for every run.
    5. For multi-turn tasks, record how well the model maintains agreed-upon conventions and corrects errors during the conversation.

    Below is an example structure for an evaluation record. Fields left blank must be filled in by the evaluator—they should not be left empty or set to default values.

    1. eval_record = {
    2. "task_id": "bugfix-017",
    3. "repo_commit": "<commit hash of the repository under test>",
    4. "model_name": "<model name and version>",
    5. "tool": "<AI coding assistant name and version>",
    6. "prompt_version": "v3",
    7. "eval_date": "<evaluation date>",
    8. "reviewer": "<reviewer>",
    9. "scores": {
    10. "requirement_understanding": None, # 0-3 points
    11. "edit_scope_precision": None, # 0-3 points
    12. "unit_test_pass": None, # 1 if passed, otherwise 0
    13. "regression_count": None, # number of new bugs introduced
    14. "turns_to_resolve": None, # conversation turns needed to resolve the issue
    15. },
    16. }

    Scoring requires anchors; otherwise, results from different reviewers cannot be compared. Here is an example for “requirement understanding accuracy”:

    Score Anchor description
    0 Misunderstands the task goal; makes changes in the wrong direction
    1 Grasps the general direction but misses key constraints
    2 Understands correctly, but one constraint is not covered
    3 Fully understands the task goal and all constraints

    Define anchors for the other dimensions in the same way. Each task should be scored independently by two reviewers; when scores diverge significantly, a third reviewer makes the final call. Since small-sample results fluctuate considerably, run each task three times and use the median as the final score.

    Capabilities Worth Examining Closely

    Complex bug localization. Give the model a production log containing only vague error messages, and see whether it can reason about the root cause using the surrounding code context. Track two metrics: whether the root-cause diagnosis is correct, and how much additional information a human must supply to reach a conclusion.

    Stability in large-scale refactoring. Have the model rename an interface or adjust parameters across dozens of files, then run the full test suite. Focus on whether behavior stays consistent and whether any call sites were missed.

    Long-context consistency. During extended collaboration sessions lasting several hours, check whether coding conventions, interface constraints, or files marked as off-limits agreed upon early on are still respected in later turns.

    Tool calling and autonomous task completion. Observe whether the model can end