Demystifying Open-Source LLM Architecture: MoE, MLA, and Sparse Attention

    This article breaks down the key architectural modifications and training methodologies of an open-source large language model based on a recent technical report. It explores the engineering impacts of Mixture of Experts (MoE), Multi-head Latent Attention (MLA), Multi-Token Prediction (MTP), and Dynamic Sparse Attention (DSA). Readers will gain actionable insights into model selection, deployment cost considerations, and a practical checklist for moving open-source models into production.

    Based on an open-source large language model technical report, this article outlines its architectural modifications and training methodologies, explaining the practical engineering impact of each design choice. The specific figures mentioned are derived from the report and its cited third-party evaluations.

    I. Total Parameters vs. Activated Parameters

    The core concept of Mixture of Experts (MoE) is that the model contains a massive number of parameters, but only a fraction is activated during each forward pass. The report reveals a configuration with approximately 744B total parameters and around 40B activated parameters per inference. The previous generation had about 355B total parameters and 32B activated. The model consists of 256 experts distributed across 80 network layers.

    These two metrics correspond to distinct costs. Total parameters determine how much VRAM the model weights occupy, as even unactivated experts must typically reside in VRAM or fast-access memory. Activated parameters dictate the compute required per token, directly affecting latency and throughput for a single generation. During model selection, focusing solely on activated parameters will underestimate deployment barriers, while looking only at total parameters will overestimate inference costs.

    The report also notes that pre-training data increased from 23T tokens in the previous generation to 28.5T tokens, comprising roughly 27T for pre-training and 1.5T for mid-training. While increased training data usually implies higher training costs, whether it translates to capability improvements depends on specific task evaluation results.

    Additionally, the report cites a third-party comprehensive intelligence index where the model scored 50, ranking first among open-source models. It also topped open-source blind tests for human preference in both text and code. However, such evaluations depend on scoring weights, benchmark versions, and test timing; leaderboard results may vary over time. These should be treated as reference signals, supplemented by your own testing.

    II. Multi-head Latent Attention: Compressing the KV Cache

    During text generation, the model must save the Key and Value for attention mechanisms for each historical token, known as the KV cache. Traditional Multi-head Attention (MHA) stores complete K and V for every head. As sequence length and concurrency increase, VRAM consumption grows significantly.

    Multi-head Latent Attention (MLA) projects K and V into a low-dimensional latent space, retaining only the compressed representation in the cache. During attention computation, it restores them to their original form. This reduces the cache size per token, alleviating VRAM pressure in long-context and high-concurrency scenarios, while also decreasing memory bandwidth demands during the decoding phase.

    The benefits have clear boundaries. KV cache savings are proportional to sequence length and concurrency. If your business primarily involves short Q&A of a few hundred tokens, the VRAM savings will be limited. Furthermore, compression and restoration add some computation; whether throughput ultimately improves depends on hardware and inference framework implementations.

    The report also mentions that introducing this new attention structure caused optimization challenges during training. The parameter update characteristics differed significantly across structures, so the team grouped parameters by structure and applied different optimization strategies and learning rates to each group. The original text describes this approach as “Muon Split.” While this is a training engineering detail most application developers need not replicate, it illustrates that architectural changes must often be designed in tandem with optimizers.

    III. Multi-Token Prediction: Training Signals and Speculative Decoding

    In traditional language model training, each position predicts only the next token, providing a single supervisory signal per step. Multi-Token Prediction (MTP) allows the model to simultaneously predict multiple subsequent tokens at each position, offering more supervisory information per sample. When training data is vast, this helps improve data utilization and accelerate convergence.

    MTP can also be used for inference acceleration. The extra prediction heads trained via MTP can quickly generate several candidate tokens, which are then verified in parallel by the main model. Verified tokens are directly accepted. This method is known as speculative decoding. The acceleration effect depends on the acceptance rate: a high acceptance rate means each verification confirms multiple tokens, significantly reducing end-to-end latency. A low acceptance rate means the extra overhead may offset the gains. Therefore, you should measure the acceptance rate and actual latency on your own business data before integration.

    IV. Dynamic Sparse Attention: Controlling Long-Context Computation

    Standard full-attention computation grows quadratically with sequence length. When the context window expands, this becomes a primary bottleneck. The idea behind sparse attention is to compute attention between a query and only a subset of keys.

    The Dynamic Sparse Attention (DSA) described in the report does not use fixed sliding windows or block patterns; instead, it dynamically determines which positions require attention based on content. Theoretically, this preserves long-range dependencies while reducing computation. Actual gains depend on two factors. First, selecting positions requires computation, so the selection overhead must be sufficiently low. Second, the selection process might miss positions relevant to the current question, degrading performance in multi-hop reasoning or exact retrieval tasks. Therefore, long-context capabilities should be validated using your own test sets—for example, by embedding key information in long documents for retrieval or designing questions that require cross-paragraph reasoning.

    V. Implications for Model Selection and Teams

    1. Evaluate both total and activated parameters: Total parameters affect VRAM scale, while activated parameters affect the compute cost of a single inference.
    2. Assess the value of long-context optimization: This depends on the actual length distribution of your business requests. If most requests are only a few thousand tokens, prioritize other bottlenecks.
    3. Focus on task-specific performance: Training-side changes affect model capabilities, but for application developers, performance on specific tasks matters most. Public leaderboards are best used for initial screening.
    4. Validate open-source against closed-source: Replacing closed-source models with open-source ones requires validation on specific tasks. A narrowed gap in a report reflects overall evaluation metrics, not a guarantee that results will transfer seamlessly to all scenarios.

    VI. Pre-Deployment Checklist

    • Quantization: Converting weights from BF16 to INT8 or FP8 roughly halves the weight size. The actual reduction in inference cost depends on hardware support for the corresponding precision and framework operator implementations. Precision loss must be confirmed using your own evaluation sets.
    • Context Limits: The KV cache grows linearly with request length. Set a maximum context length based on your business needs, and implement degradation or segmentation for excessively long requests.
    • Evaluation Baseline: Build an evaluation set using your own business data, covering primary task types. Record quality metrics, first-token latency, and P95 latency.
    • Stress Testing: Define target concurrency, sequence lengths, and hardware models. Test throughput and VRAM usage under conditions that approximate real traffic.
    • Infrastructure: Use container orchestration to manage inference instances and schedule via GPU resource pools. Store weights and intermediate artifacts in object storage, and track latency, VRAM, and error rates using logging and monitoring.
    • Rollback: Retain the previous model version and service configurations to enable quick switching in case of quality or stability issues.

    VII. Conclusion

    Understanding this technical report requires seeing which type of cost each design addresses. MoE controls single-pass computation, MLA shrinks the KV cache, MTP improves training efficiency and potentially accelerates inference, and DSA reduces attention overhead for long sequences. Aligning these designs with your own request lengths, concurrency, and quality requirements is the only way to determine if an open-source model is ready for production deployment.