Sparse Attention LLMs Compared: Coding Ability Benchmark of Two Next-Gen Models

    Two next-generation large language models built on different sparse attention architectures were put through a three-layer evaluation covering architecture analysis, a long-horizon 3D racing game coding task, and routine automation tasks. This article compares their token efficiency, planning persistence, and tool-calling stability, and offers practical model selection guidance for different workloads.

    1. Evaluation Background and Methodology

    As LLM context windows scale from tens of thousands to millions of tokens, controlling inference cost without sacrificing quality has become the central tension in model iteration. Two recently released next-generation models (referred to below as Model A and Model B) take different sparse attention approaches, and both claim significant improvements in long-context performance and coding ability. To verify real-world behavior, we designed a three-layer evaluation framework:

    1. Architecture layer: analyze the attention mechanism design of each model and estimate per-token inference cost;
    2. Long-horizon task layer: use a complex coding task requiring multi-round autonomous planning to test sustained execution capability;
    3. Routine task layer: use everyday automation tasks with pre-written skill scripts to compare tool-calling stability.

    It is important to emphasize that an architectural cost advantage does not directly translate into lower actual usage cost. The real token consumption of a task depends heavily on the model’s execution efficiency and whether it repeatedly retries after failures—which is exactly why the evaluation must cover the application layer.

    2. Architecture Comparison: Two Sparse Attention Approaches

    Model A: Index-Based Sparse Attention

    Model A adopts a sparse attention scheme (the DSA approach) built on Multi-head Latent Attention (MLA) combined with a lightweight indexer. The core idea: a low-cost indexing module quickly locates the small set of key positions in the full token history that are relevant to the current query, and attention computation focuses only on those selected positions. Compared with the previous generation’s dense attention model, this design achieves substantial cost compression in large-context scenarios, with a noticeably slower KV cache growth curve.

    Model B: Two-Level Compression Sparse Attention

    Model B takes a different route: it interleaves two sparse attention modules with different compression ratios (heavy compression and light compression) across layers. Light-compression layers retain more detailed information for fine-grained local modeling, while heavy-compression layers aggressively compress distant history to maintain global context. According to official figures, at a 1M-token context, per-token inference computation is only about 27% of the previous generation, and KV cache usage is about 10%.

    Looking at architecture alone, Model B’s token cost control is more aggressive. But as noted earlier, theoretical cost is only one dimension. Actual spending depends on how many tokens the model consumes to complete a task—a model with low execution efficiency that requires many retries can produce a higher total bill even at a lower per-token price.

    3. Long-Horizon Coding Task: Recreating a 3D Racing Game

    Long-horizon tasks are the touchstone for distinguishing a model’s combined ability to research, plan, execute, and self-verify. The evaluation task asked each model to search online for reference material and then autonomously build a 3D game inspired by a classic racing title, completing the full loop of “autonomous planning → execution → multiple rounds of self-testing → delivery.”

    Model A’s Performance

    Model A completed the process relatively thoroughly: it implemented key gameplay elements including track design, game modes, item systems, jump platforms, and boost pads, and the deliverable had basic playability. More importantly, it persisted in finding and fixing problems across multiple test rounds rather than converging prematurely.

    Model B’s Performance

    Model B’s implementation was noticeably more rudimentary. One noteworthy behavioral pattern: during the early online research and multi-round testing phases, it tended to wrap up tasks quickly and reduce interaction rounds, delivering something closer to demo quality. Its much-touted 1M context capability did not translate into an advantage in the long task.

    Conclusion: Model A delivers a better experience on long-horizon coding tasks, which is consistent with the two models’ relative rankings on long-horizon software engineering benchmarks (such as long-span bug-fixing evaluations).

    4. Routine Tasks: Scenarios with Mature Skill Scripts

    The second category covers high-frequency daily automation tasks for which mature skill scripts already exist—for example, periodically collecting information from a specified website. These tasks are characterized by fixed workflows, a single tool-calling pattern, and low demands on long-horizon planning.

    The results showed little difference between the two models: both reliably completed basic tool calls and terminal operations, which corroborates Model B’s stronger results on terminal-operation benchmarks. Since Model B has a lower per-token cost, it offers better cost-effectiveness for this type of routine task. However, once a task demands stronger planning ability and longer research chains, Model A’s experiential advantage re-emerges.

    5. Model Selection Recommendations

    Combining the three rounds of evaluation, a practical selection principle emerges:

    • Long-horizon, planning-heavy scenarios (complex engineering deliverables, multi-round autonomous research, large-scale refactoring): prioritize models with strong execution resilience that do not converge prematurely, even at a higher unit price;
    • High-frequency, lightweight, fixed-workflow scenarios (information collection, format conversion, simple script generation): choose the model with more thorough cost compression, and reserve the saved budget for scaled-up invocation;
    • Mixed workloads: route traffic by task type at the gateway layer—send routine traffic to the low-cost model and long-horizon traffic to the strong-planning model.

    6. Conclusion

    The biggest takeaway from this comparison is: evaluating LLMs cannot rely solely on architectural parameters and benchmark scores—you must observe execution behavior in real workflows. A theoretical token cost advantage can be offset by inefficient execution habits, and a small benchmark lead can diverge from actual experience. Building a three-layer evaluation framework of “architecture analysis + long-horizon hands-on testing + routine task verification” is the key for technical teams to avoid being misled by marketing numbers and to make rational model selection decisions.