Mainstream MoE LLM Architecture Convergence and Training Optimization in Practice

    Leading MoE large models are converging on similar base architectures, while still making different trade-offs in sparsity and attention head counts. This article compares DeepSeek-V3 and Kimi K2, then covers training-stability controls such as QK-Clip and Muon, plus data-efficiency practices for synthetic data, including provenance, filtering, deduplication, and decontamination.

    Why Mainstream MoE Architectures Are Converging

    The tension between large-model parameter scale and compute cost is becoming more pronounced. Mixture-of-Experts (MoE) architectures alleviate this tension through sparse activation. Total model parameters can reach the trillion level, but each token passes through only a small subset of experts, and the number of activated parameters during inference is typically in the tens of billions.

    Several leading models have highly similar base structures. DeepSeek-V3 (2024 technical report) is often used as a reference point. Shared characteristics include a hidden dimension of 7168, an expert hidden dimension of 2048, and multi-head latent attention (MLA). MLA projects attention computation into a low-dimensional latent space, significantly compressing KV cache memory usage during inference. This benefit is most visible in long-context scenarios, so multiple models have adopted it.

    Note that “convergence” refers to similar base designs; it does not mean that the models are identical.

    Trade-offs Between Sparsity and Attention Head Count

    On the same base architecture, each model adjusts configurations according to its own data and compute conditions. Kimi K2 (2025 technical report) is a typical example. Its total parameter count is 1.04T, with 32B activated parameters. DeepSeek-V3 has 671B total parameters and 37B activated parameters.

    K2’s adjustments can be summarized as “one increase and one decrease”:

    1. Increase sparsity: the number of routed experts increases from 256 to 384. More experts allow finer specialization and more precise routing, but routing computation and communication overhead also increase.
    2. Reduce attention heads: the number of attention heads decreases from 128 to 64. This change offsets the extra computation introduced by more experts and reduces compute pressure during inference.

    The table below lists key configurations for both models, based on their respective technical reports:

    Configuration DeepSeek-V3 Kimi K2
    Total parameters 671B 1.04T
    Activated parameters 37B 32B
    Routed experts 256 384
    Attention heads 128 64
    Hidden dimension 7168 7168

    The following suggestions can be used during selection:

    • Increasing the number of experts usually requires stronger expert parallelism and communication bandwidth. Before deployment, confirm the cluster’s interconnect conditions.
    • Reducing attention heads affects attention capacity. Validate the effect with your own long-context, code, and math evaluations.
    • When comparing configurations, use output quality at the same activated compute as the criterion, rather than looking only at total parameter count.

    Managing Training Instability

    AdamW has long been the default optimizer for pretraining. The Muon optimizer orthogonalizes weight updates, which can help improve token utilization. However, in large-scale training, attention logits may keep growing, causing loss spikes and, in severe cases, training divergence.

    QK-Clip is a method used in the Kimi K2 report to suppress this problem. After each parameter update, it monitors the maximum logit of each attention head. When a head exceeds the threshold, it scales down the Query and Key projection weights corresponding to that head proportionally, bringing subsequent logits back into a controllable range. The threshold in the K2 report is 100; the specific value needs to be determined through backtesting based on training scale and monitoring data. QK-Clip aims to suppress oversized logits; it does not solve the vanishing gradient problem.

    The following code is only for illustrating the principle and cannot be used directly for production training:

    1. import math
    2. def qk_clip_sketch(w_q, w_k, max_logit, tau=100.0):
    3. """
    4. For illustration only; not a production implementation.
    5. w_q, w_k: Query and Key projection weights for a single attention head
    6. max_logit: maximum attention logit measured for that head in the most recent step
    7. tau: clipping threshold; needs backtesting based on training scale
    8. """
    9. if max_logit <= tau:
    10. return w_q, w_k
    11. # Q and K each take half of the scaling; after multiplication, the logit is scaled to tau / max_logit
    12. gamma = tau / max_logit
    13. scale = math.sqrt(gamma)
    14. return w_q * scale, w_k * scale

    When introducing Muon or adjusting the clipping strategy, prepare the following monitoring and rollback practices:

    • Record the maximum logit of each head, the loss curve, and gradient norms.
    • Set alert thresholds for logits and loss. When consecutive spikes occur, pause training and roll back to the most recent checkpoint.
    • Reproduce the optimizer configuration on a small-scale model first, and scale up only after confirming stability.
    • When switching from AdamW to Muon, adjust hyperparameters such as the learning rate at the same time; do not replace the optimizer directly.

    Data Efficiency and Synthetic Data

    The growth of high-quality human text has slowed, making token efficiency a key constraint on model scaling. K2 pretraining used 15.5T tokens, and DeepSeek-V3 used 14.8T tokens. For both, the focus is not only data volume but also data quality and training methods.

    Synthetic data is often used to supplement instruction, reasoning, and code data. When introducing it, follow these steps:

    1. Provenance: save versions of the generative model and prompts so that problematic samples can be traced.
    2. Quality filtering: use rules and quality classifiers to remove low-quality samples.
    3. Deduplication: perform both exact deduplication and near deduplication to avoid repeated samples amplifying bias.
    4. Decontamination: compare item by item against evaluation sets to prevent benchmark contamination.