Evaluating MoE Coding Models with Fixed Tasks: Methods and Costs

    A fixed-task evaluation offers a practical way to assess mixture-of-experts coding models beyond parameter counts and token prices. This article examines a script-to-HTML test, its observed strengths and failure modes, and a repeatable framework for measuring instruction following, output stability, engineering quality, and task costs.

    1. Why Evaluate MoE Coding Models?

    Mixture-of-experts (MoE) architectures use a large pool of model parameters but activate only a small subset for each inference. Consider a model with 295 billion total parameters, 21 billion active parameters per inference, and a 256K-token context window. This design aims to reduce inference costs while retaining the capabilities of a much larger model.

    For developers, two changes are particularly relevant:

    1. Lower inference costs. Pricing tiers cited for this class of model include approximately CNY 1 per million input tokens, CNY 4 per million output tokens, and CNY 0.25 per million cached input tokens—roughly an order of magnitude below some earlier models.
    2. Longer context windows. A 256K-token window can accommodate multiple source files, long documents, or complete API specifications in a single request. This is especially useful for code generation, refactoring, and document conversion.

    Specifications and price lists, however, do not establish whether a model works well in practice. That requires testing it on real tasks. The following sections walk through one evaluation, its observations, and a framework for repeating the process.

    2. Test Design: Fixed Tasks, Not a Blind Benchmark

    Perceived differences between coding models can easily reflect differences in testing conditions. If the task and prompt change between runs, the results are difficult to compare. This evaluation followed three principles.

    Keep the Task Fixed

    The task was to convert a structured script file, script.md, derived from a technical article, into an HTML presentation page.

    This task has several useful properties:

    • Clear input: The script contains headings, paragraphs, and image references.
    • Verifiable output: It is straightforward to inspect whether the page renders and whether its structure is complete.
    • Local assets: An image in the project directory makes it possible to check whether the model references local files correctly.

    Keep the Toolchain and Prompt Fixed

    All tests used the same AI coding tool, skill configuration, and prompt template. This helps reduce variation caused by context engineering or tool wrappers, making model behavior easier to assess.

    Inspect the Process, Not Just the Result

    Loading the appropriate skill, discovering project files, and interpreting the user’s intent are intermediate steps that matter for reliability in larger projects.

    This was not a blind evaluation. The original records did not include the full model name, client version, or complete prompt. The findings therefore describe observations from a single test sample, not a ranking of models.

    For reproducibility, record at least:

    • Model name and version
    • Client version
    • Configured skills
    • Complete prompt text
    • Number of output truncations per run
    • Screenshots of the results

    3. Test Execution: Observations from One Sample

    Environment Setup

    The procedure was to install the relevant AI coding client, create a clean project directory, place script.md and its image in that directory, and submit exactly the same instructions used in earlier tests.

    Intent Recognition and File Discovery

    The execution logs showed that the model handled the preliminary steps adequately:

    • It loaded the skill configured for HTML generation.
    • It scanned the project directory and identified both script.md and the image file.
    • It correctly interpreted the request as converting the script into a web page, rather than summarizing or translating it.

    These observations suggest usable instruction-following and tool-calling behavior for this sample. Some sparse models can skip tool calls or pass incorrect arguments during multistep workflows; neither issue appeared here.

    Problems During Code Generation

    Three issues emerged during HTML generation:

    • Output truncation: The longer HTML output was not completed in one response and required multiple continuations.
    • Inconsistent asset paths: Image references sometimes used relative paths and sometimes pointed to nonexistent placeholder locations.
    • Styling discrepancies: The page structure was complete, but spacing, visual hierarchy, and layout rhythm did not consistently reflect the script’s semantic structure.

    A quick command can help identify missing local image references. Assuming the page is named index.html and the images are in the same directory, run:

    1. grep -o 'src="[^"]*"' index.html | sed 's/src="//;s/"$//' | while read p; do [ -f "$p" ] || echo "Missing: $p"; done

    Under these assumptions, the command lists references that do not resolve to existing files.

    Checking whether the file ends with </html> also provides a basic truncation check. A missing closing tag is a warning that the generated output may be incomplete.

    4. A Selection Framework: Four Dimensions and Their Metrics

    One sample is not enough to support a general conclusion. It can, however, help define a repeatable evaluation framework for future models.

    Dimension What to Evaluate Suggested Metrics
    Instruction following Does the model follow the prompt without adding or removing requirements? Number of deviations per run
    Long-output stability Can it produce hundreds of lines without truncation or degradation? Truncation rate = truncations / total runs; pass rate for outputs assembled from continuations
    Engineering quality Are paths, dependencies, edge cases, and error handling correct? Asset-path accuracy = correct references / total references; manual score from 1 to 5
    Overall cost What does a real task cost? Per-task cost, calculated below

    Estimating Per-Task Cost

    Token costs can be estimated with:

    1. Per-task cost ≈
    2. (input tokens × input price + output tokens × output price) / 1,000,000

    The input and output prices must be expressed per million tokens in the same currency.

    For example, consider a project-level generation task with 20K input tokens and 8K output tokens. At CNY 1 per million input tokens and CNY 4 per million output tokens:

    • Input: 20,000 × 1 / 1,000,000 = CNY 0.02
    • Output: 8,000 × 4 / 1,000,000 = CNY 0.032
    • Total: approximately CNY 0.052 per task

    At 20 similar tasks per day over 30 days, the monthly cost would be approximately CNY 31.

    These figures use the pricing tier cited above and retain its original currency; they are not a claim of globally available pricing. Prices can change, so check the current official price list before estimating deployment costs.

    When Cached Pricing Applies

    The cited cached-input price of approximately CNY 0.25 per million tokens applies only under specific conditions. Prefix content, such as system prompts and skill instructions, must be repeated within the cache’s validity period, and the prefix must match exactly.

    If the prefix changes with every request, do not assume cached pricing when calculating costs.

    5. Practical Recommendations

    1. Start with free or trial credits where available. Test real tasks from your team’s workflow rather than relying only on official demonstrations.

    2. Build an internal benchmark set. Maintain 5–10 tasks covering create, read, update, and delete operations, documentation generation, refactoring, and debugging. Run the same set whenever a new model becomes available to build comparable results over time.

    3. Choose models by workload. Use lower-cost models for simple questions and switch to higher-quality models for complex engineering tasks.

    4. Log request details. For enterprise deployments, record the model version, input and output token counts, latency, and hashes of generated files for each request. These records support cost reconciliation and help trace an output back to the model version that produced it.

    6. Conclusion

    Newer MoE coding models offer meaningful improvements in inference cost and context length, but low prices do not guarantee practical reliability.

    In this single sample, intent recognition was solid, while long-output truncation and asset-path errors remained concerns requiring further testing. A more useful evaluation should include at least five tasks, each run three times, before calculating truncation rates and asset-path accuracy.

    For developers, a benchmark built around their own workloads is a more dependable basis for model selection than any single score or reputation.