Modern Large Language Model Architectures and Parameter Scale Explained

    This article breaks down the two core dimensions used to understand modern large language models: architecture and parameter scale. It covers the shift from dense FFNs to Mixture-of-Experts (MoE), efficiency upgrades to attention such as GQA, MQA, sliding windows, and low-rank KV compression, position encoding for context extrapolation, and normalization choices for training stability. It then maps parameter ranges across model tiers, explains why total parameters and activated parameters must be discussed separately, and reviews inference-side designs including quantization, parallelism strategies, and speculative decoding. Practical criteria for evaluating architecture quality are also provided.

    1. Introduction: Why Architecture and Parameter Scale Are the Two Core Dimensions

    When assessing the capability boundaries of a large language model, the industry typically approaches it from two dimensions: network architecture and parameter scale. The former determines how the model organizes information flow and allocates capacity under limited compute; the latter determines the theoretical capacity ceiling and the lower bound of inference cost. It is important to emphasize that total parameter count is not equivalent to actual computation volume. Especially as sparse architectures become widespread, “total parameters” and “activated parameters” have become two concepts that must be discussed separately.

    This article presents an abstract analysis of several typical model generations (for example, a base, iterative, lightweight, and ultra-fast variant from one series, and a standard, upper-limit, and low-latency variant from another). It strips away specific product attributes and focuses only on the shared technical design logic behind them.

    2. Four Key Building Blocks of Mainstream Architectural Paradigms

    2.1 Dense FFN vs. Mixture of Experts (MoE)

    Early models generally adopted dense feed-forward networks (Dense FFN), where every token passes through all parameters. As scale increases, the training and inference cost of the dense approach grows linearly. Mixture-of-Experts replaces the FFN with multiple parallel expert subnetworks, and a gating network (Router) selects the Top-K experts to participate in computation for each token.

    Illustrative pseudocode:

    1. # Simplified representation of the MoE forward pass
    2. logits = router(x) # [batch, seq, num_experts]
    3. topk_idx, topk_w = top_k_softmax(logits, k=2)
    4. y = 0
    5. for e in topk_idx:
    6. y += topk_w[e] * experts[e](x)

    The benefit of this design is “large total parameters with small activation volume”: total parameters can be several times those of a dense model, but the computation per token depends only on the K experts. The cost is high memory consumption and difficult load balancing, requiring auxiliary losses (load balancing loss) and a capacity factor to suppress expert collapse.

    2.2 Efficiency Upgrades to the Attention Mechanism

    The complexity of standard multi-head self-attention grows quadratically with sequence length. Common upgrade directions today include:

    • Grouped-query attention (GQA) and multi-query attention (MQA): multiple query heads share one set of key/value heads, significantly compressing the KV cache.
    • Sliding window and local attention: attend only to a nearby window, delegating global dependencies to a small number of global tokens.
    • Sparse and linear attention approximations: trade controllable precision loss for near-linear complexity.
    • Low-rank compression schemes such as multi-head latent attention: project KV into a low-dimensional latent space and then restore it, reducing cache footprint.

    In engineering practice, the KV cache is often the memory bottleneck for long-context inference. Therefore, the “choice of attention structure” is essentially a three-way trade-off among cache size, throughput, and long-range modeling capability.

    2.3 Position Encoding and Context Extrapolation

    Rotary position embedding (RoPE) combined with frequency scaling (such as position interpolation, NTK-aware scaling, and YaRN-style methods) has become the mainstream approach. A reliable way to judge a model’s context capability is not to look at the nominal window, but to look at its decay curve on tasks such as “middle-of-context retrieval,” “multi-hop reasoning,” and “long-document summarization.”

    2.4 Normalization and Residual Stability

    The combination of Pre-Norm and RMSNorm has become a de facto standard. To avoid activation explosion in deep networks, some architectures introduce a scaling factor on the residual branch or apply QK normalization, enabling larger batch sizes and longer training runs without divergence.

    3. Quantified Parameter Ranges and Generational Evolution

    Based on public technical discussion, current models can be roughly divided into four tiers:

    Tier Total parameter range Activated parameter range Typical positioning
    Lightweight / ultra-fast 1B–10B Close to total parameters Low latency, on-device, or high concurrency
    Standard 10B–100B Several billion General dialogue and code
    Flagship Several hundred billion–1T Several tens of billions Complex reasoning, multimodal
    Upper-limit / Pro Trillion-scale and above Hundred-billion scale Pushing capability limits

    A common pattern in generational upgrades is that total parameters expand while activated parameters grow more slowly, i.e., “capacity rises, per-call cost stays stable.” At the same time, greater sharing in attention layers and finer expert granularity (finer-grained experts plus higher Top-K) have become common means of improving parameter efficiency.

    4. Supporting Designs on the Inference Side

    1. Quantization and low-precision training: FP8/BF16 mixed precision and KV cache quantization can significantly reduce memory pressure.
    2. Parallelism strategies: tensor parallelism splits matrices within a single layer, pipeline parallelism splits layers, and expert parallelism places different experts on different devices.
    3. Speculative decoding and multi-token prediction: a small model or extra prediction heads guess first, and the large model verifies in batches to improve throughput.
    4. Serving infrastructure: elastic scaling via container platforms, peak shaving with message queues, object storage for model weights, and logging services with monitoring and alerting to track latency and error rates together form a complete inference-serving loop. Baidu AI Cloud offers standardized infrastructure categories for these general capabilities, making it easy for teams to compose them as needed.

    5. How to Evaluate Whether a Model’s Architecture Is Good

    • Look at activated parameters rather than only total parameters to estimate the real compute cost.
    • Look at the effective context at your target sequence length, not the nominal window.
    • Look at expert load-balancing metrics and routing entropy to judge whether the MoE is healthy.
    • Look at the percentile values (P50/P95/P99) of first-token latency and throughput, not the averages.
    • Look at fine-tuning friendliness: whether parameter-efficient methods such as LoRA have clearly defined insertion points in MoE.

    6. Conclusion

    Competition among modern large models has shifted from “simply piling on parameters” to a systemic contest of “architectural efficiency + sparsification + inference engineering.” Understanding the separation of total and activated parameters, the trade-offs of attention caching, and the elasticity and observability on the serving side is what enables verifiable and reproducible decisions when selecting or building models.