Open-Source LLM Architecture Rollback: Why MQA Replaces MLA

    This article summarizes a public technical report on a new-generation open-source large language model. It covers gains in math reasoning, code generation, and agent instruction execution, the cost effects of parameter growth and cached input pricing, and the model's switch from MLA back to MQA attention. It also explains the main infrastructure challenges of million-token context, including KV Cache memory management and distributed caching.

    The competition among open-source large models has shifted from who releases a model first to who can run it affordably and reliably. A recent public technical report discloses details of a new-generation open-source model across three areas: capabilities, cost, and underlying architecture. The move of the attention mechanism from MLA back to MQA, and the way million-token context is deployed, are the points developers should watch most closely. This article follows the report’s main content along these three lines.

    1. What Capabilities Improved?

    The report states that the new-generation model improves on its predecessor in math reasoning, code generation, and agent instruction execution. It also says that hallucinations in generated content are controlled to some degree. The directions are clear, but the size of each gain depends on the benchmarks. The same benchmark score can vary widely with different prompt templates, sampling parameters, and grading methods. Readers should first confirm the evaluation conditions before judging whether an improvement applies to their own use case.

    On code ability, the report is restrained. It says the model still trails some leading closed-source models but performs at a level similar to other mainstream open-source models. For developers, a more practical question is whether the model can reliably complete multi-step tasks, such as reading files, calling tools, modifying code, and running tests. These tasks depend on stable logical reasoning, symbolic processing, and long-horizon planning. A single code generation accuracy figure is not enough to judge them.

    2. How Do Parameter Growth and Cost Add Up?

    The report discloses that the parameter count of the new-generation model has grown noticeably compared with the previous generation. More parameters raise the ceiling on model capability, but inference also requires loading more weights and cache. Memory usage and the cost per request typically rise as a result. There is a direct trade-off between model capability and deployment cost, so parameter count alone is not a sufficient measure.

    The report also mentions a Pro version and offers a lower price for the cached-input portion of requests. A cache hit means that the prefix of a request matches a previous request. The server can then reuse the KV Cache it has already computed and skip recalculating that prefix. As a result, the largest savings occur in scenarios with high call frequency, fixed system prompts, or long multi-turn conversations. When estimating cost, first measure the prefix reuse rate in your own workload, then apply the price list. If requests share almost no common prefix, the cache discount will have little effect on total cost.

    3. Why Return from MLA to MQA?

    Understanding this change requires distinguishing several attention mechanisms.

    Standard multi-head attention (MHA) assigns each head its own Query, Key, and Value. The model’s quality is stable, but during long-sequence inference the KV Cache consumes a large amount of memory. Each generated token requires reading a large volume of cached data, so memory bandwidth can easily become the bottleneck.

    Multi-query attention (MQA) lets all Query heads share a single set of Key and Value. The KV Cache shrinks substantially, and the bandwidth pressure during inference drops. The cost is that some models may lose a degree of accuracy.

    Grouped-query attention (GQA) sits between the two. It divides Query heads into groups, and each group shares one set of Key and Value. It balances cache savings against accuracy, which is why many models use it.

    Multi-head latent attention (MLA) goes further. It does not cache full Keys and Values directly. Instead, it projects them into a low-dimensional latent vector, caches that vector, and decompresses it during inference. This preserves the expressive power of multi-head structures while achieving a higher KV Cache compression ratio than MQA. For some time, many mainstream open-source models adopted MLA.

    The report’s model moved from the MLA design used in the second and third generations back to MQA. This is a notable choice. Public information about the reasons behind it is limited, so the following are only possible explanations. First, MLA requires extra projection and decompression computation when compressing the cache. In large-scale distributed training or inference, this computation and its data flow may add communication and scheduling complexity. Second, low-dimensional projection causes some information loss, and this loss may be amplified in long-text and high-precision tasks. Third, the MQA structure is simpler, so it is cheaper to adapt to existing inference frameworks and parallelism strategies, which makes deep optimization easier for engineering teams.

    This rollback does not mean the MLA direction was wrong. It shows that the benefits of an attention architecture must be evaluated against specific hardware topology, parallelism methods, and deployment scale. The same mechanism can perform very differently on a single machine for inference than across a thousand GPUs for training.

    The table below compares these mechanisms at a glance.

    Mechanism KV Cache Footprint Implementation and Adaptation Complexity Accuracy Risk Typical Use Cases
    MHA High Low Low Medium-to-short context, ample training resources
    GQA Medium Medium Low General deployment that balances quality and cost
    MQA Low Low Medium High-concurrency, memory-constrained inference services
    MLA Low High Depends on projection dimension Long context, teams with dedicated optimization resources

    The table is qualitative. Actual figures should be measured on your own models and hardware.

    4. What Makes Million-Token Context Hard to Deploy?

    As context grows from tens of thousands to millions of tokens, the size of the KV Cache grows linearly with sequence length, and the cost of attention computation rises quickly. Changing the attention structure alone cannot solve every problem. The underlying inference system typically needs to handle the following four areas well.

    First, memory management. The traditional approach reserves a contiguous block of memory for each request. When short and long requests are mixed, this creates fragmentation and lowers memory utilization. PagedAttention splits the KV Cache into fixed-size blocks and allocates and reclaims them on demand. This reduces fragmentation and increases concurrent throughput. The block size should be tuned to the inference framework and the actual distribution of request lengths. A common default is 16 tokens, but no universal optimum exists, so the value should be determined through load testing.

    Second, distributed KV Cache. A single GPU has limited memory, so very long contexts often require storing the cache across multiple GPUs or even multiple machines. At that point, network quality determines whether the approach is viable. If transferring the KV Cache between nodes takes longer than recomputing it, the