Structure and Parameter Scaling in Modern Large Language Models: A Comprehensive Overview

    This article explores the structural trade-offs in modern Large Language Models (LLMs), examining how parameter scaling, context length extension, and architectural innovations like Mixture of Experts (MoE) and KV Cache compression impact inference costs and hardware planning. It details the three dimensions of parameter scale, the evolution of attention mechanisms, MoE standardization, numerical format divergence, and hardware deployment constraints to help developers understand the trajectory of next-generation LLMs.

    Structure and Parameter Scaling in Modern Large Language Models: A Comprehensive Overview

    1. Why We Need to Re-examine LLM Structures

    Since the introduction of the Transformer architecture over a decade ago, numerous reviews have covered its structural evolution. Instead of repeating this history, this article focuses on a more practical question: What structural trade-offs have the latest generation of LLMs made, and what do these trade-offs mean for parameter scaling, inference costs, and hardware planning?

    Over the past two years, mainstream LLMs have exhibited several intriguing divergence phenomena:

    • Total parameters have surged from hundreds of billions (B) to trillions (T), while activated parameters remain at the tens of B level. This indicates that the dense scaling route has largely given way to the sparse Mixture of Experts (MoE) route.
    • Context lengths have expanded from 128K to 1M tokens, yet the KV Cache has been repeatedly compressed. Longer contexts no longer lead to linear growth in memory usage, thanks to the widespread application of technologies like Multi-head Latent Attention (MLA) and sparse attention.
    • The number of experts has grown from 256 to 896, with increasingly fine-grained routing. Fine-grained experts combined with shared experts reduce individual expert size while exponentially increasing combination possibilities, thereby achieving stronger expressive power at the same activation cost.

    Understanding the internal connections among these three trade-offs helps predict the direction of next-generation models and leaves room for inference accelerators and compute resource planning.

    2. Three Dimensions of Parameter Scale

    When discussing the scale of large models, it is crucial to distinguish among three easily confused concepts:

    2.1 Total Parameters

    Total parameters determine the upper limit of a model’s knowledge capacity. Current flagship models generally have hundreds of B to T-level total parameters, with the vast majority concentrated in the expert networks (FFN layers). Note that in this context, B and T represent billion and trillion parameters, respectively.

    2.2 Activated Parameters

    Activated parameters determine the actual cost of a single forward pass. By routing each token to only a small number of experts (commonly 6 to 8), MoE models typically keep activated parameters at just 5% to 10% of the total. This is the key to why “total parameters are massive, yet inference is not slow.” For deployment teams, activated parameters are the core metric for estimating FLOPs and compute requirements, while total parameters dictate the lower bound of weight memory usage.

    2.3 Layers and Hidden Dimensions

    Flagship models typically feature dozens to a hundred Transformer layers, with hidden dimensions ranging from several thousand to tens of thousands. Deeper layers and larger dimensions impose higher demands on tensor parallelism and pipeline parallelism partitioning strategies, which must be factored into hardware planning well in advance.

    3. Evolution of Attention Mechanisms: From MHA to KV Compression

    Structural changes in the attention component primarily revolve around KV Cache memory usage:

    1. MHA (Multi-Head Attention): The early standard scheme where the KV Cache grows linearly with the number of heads, resulting in massive overhead for long contexts.
    2. GQA (Grouped-Query Attention): Multiple query heads share a group of KV heads, achieving several times KV Cache compression with minimal precision loss. It has become the mainstream baseline.
    3. MLA (Multi-head Latent Attention): Projects KV into a low-dimensional latent space. During inference, only the compressed latent vectors need to be cached. Combined with matrix absorption techniques, the KV Cache can be compressed to less than one-tenth of traditional schemes. New-generation flagship models widely adopt this latent compression approach.
    4. Sparse and Hybrid Attention: In ultra-long context scenarios (e.g., 1M tokens), a common practice is layering “full attention + sliding window/sparse attention.” A few key layers retain global attention to maintain long-range retrieval capabilities, while the rest use local windows to reduce complexity.

    This evolution indicates that the competition over context length has shifted from “whether it fits” to “whether it is affordable.” KV Cache compression efficiency has become the primary constraint for long-context models.

    4. Mixture of Experts: Fine-grained + Shared Experts as the De Facto Standard

    The typical configuration of modern MoE structures can be summarized as follows:

    • Fine-grained experts: The size of individual experts is reduced (e.g., hidden dimensions drop from several thousand to one or two thousand), while the total number of experts increases to several hundred. This exponentially expands the routing combination space, equivalent to “trading finer granularity for more flexible knowledge combinations.”
    • Shared experts: A few experts are constantly activated for all tokens, handling general computation and reducing knowledge redundancy among experts.
    • Routing strategies: Most models use token-level Top-K routing, combined with load balancing auxiliary loss or auxiliary-loss-free bias adjustments, to mitigate expert collapse and load imbalance. Some models introduce multi-head routing, allowing a single token to be processed by multiple groups of experts based on different criteria, further enhancing the expressive power of sparse activation.

    The takeaway for deployment teams is that the number of experts, Top-K, and individual expert size jointly determine the activated parameters. When evaluating MoE models, one cannot look solely at total parameters.

    5. Numerical Formats: Divergence Between Training and Inference

    Regarding numerical precision, new-generation models show a clear divergence between training and inference:

    • Training generally uses mixed precision, with mainstream choices being primarily BF16 and FP8 for large-scale pre-training. FP8 training demands high hardware support, loss scaling strategies, and numerical stability, but it can significantly reduce training costs.
    • Inference is increasingly adopting FP8 weights and activations as the default configuration for flagship models. Some models provide INT4/AWQ quantization references in their deployment guides to serve local deployment scenarios with limited memory. The challenge of low-bit inference lies not in compressing weights to a few bits, but in the holistic co-design of the quantization scheme with the attention and MoE computation graphs.

    6. Constraints on Hardware and Deployment

    Synthesizing the above structural trends, several hardware planning-level constraints can be identified:

    1. The contradiction where memory capacity takes precedence over bandwidth is easing: KV Cache compression drastically reduces the memory pressure of long-context inference. However, hundreds of B in total parameters still require multi-card or even multi-node tensor parallelism, making weight partitioning and communication topologies the bottleneck.
    2. MoE load balancing impacts actual throughput: Uneven routing can cause some devices to idle, and All-to-All communication accounts for an increasing proportion in expert parallelism, requiring coordinated optimization of network and computation.
    3. Sparse activation favors batch inference: Fixed activated parameters mean that compute utilization can easily be pushed high under large batches, making it suitable for cloud-based, high-concurrency service deployment. Conversely, low-latency, small-batch scenarios rely more on operator fusion and speculative decoding technologies.

    7. Trend Predictions

    Overall, the structural evolution of next-generation LLMs will likely continue along the following trajectory: total parameters will march toward the T-level while activated parameters remain restrained; context lengths will keep expanding supported by KV compression technologies; the hybridization and fine-grained nature of attention and expert structures will deepen further; and low-bit numerical formats will permeate fully from inference into training. For developers and compute planners, understanding the interplay among the four key elements—“total parameters, activated parameters, KV Cache, and numerical format”—holds more long-term value than memorizing the parameter sheet of any single model.