Structural Evolution and Parameter Scaling Trends in Modern Large Language Models

    This article examines how modern large language models make structural trade-offs under hardware constraints, covering the distinction between total and activated parameters, KV cache compression techniques, and the shift toward fine-grained mixture-of-experts routing. Readers will learn how compute, memory bandwidth, and communication jointly shape model design decisions.

    Why Model Architecture Deserves a Closer Look

    Since the Transformer architecture was introduced, plenty of surveys have covered its fundamentals. This article skips the basics and instead focuses on the structural trade-offs made by today’s mainstream models, and the hardware constraints behind them.

    The design directions taken by different teams may look scattered: some increase the number of experts, some compress attention caches, some adjust numerical formats. But ultimately, all of these changes come down to three classes of resources. Compute determines single-step throughput, memory bandwidth determines how fast weights and caches can be read, and communication determines the efficiency of multi-GPU and multi-node coordination. The three constrain each other—once one bottleneck is relieved, pressure typically shifts to the other two.

    Therefore, evaluating structural choices requires looking at model capability, inference cost, and hardware overhead simultaneously. Focusing on a single metric easily leads to one-sided conclusions.

    Two Ways to Measure Parameter Scale

    Total parameters and activated parameters are the two fundamental measures of model scale.

    Total parameters determine the model’s knowledge capacity, as well as the weight footprint that must fit in GPU memory or RAM. Activated parameters are the ones actually involved in computation when processing a single token, directly affecting the per-token compute cost.

    Recent trends show a clear divergence. Total parameters have grown from hundreds of billions into the trillions, while activated parameters have remained in the tens of billions. This divergence comes from sparsity-based design: as models expand total capacity, routing mechanisms ensure each token only passes through a small fraction of the parameters, keeping inference costs under control.

    A hypothetical example illustrates this. Suppose a model has 1T total parameters and 40B activated parameters. The activation ratio per token is roughly 4%. If all parameters participated in computation, the per-token compute would be about 25 times that of the sparse version—a direct benefit of sparse design. However, this only saves compute; memory still needs to hold all 1T parameters. Stored in BF16, the weights would occupy roughly 1×10¹² × 2 bytes, or 2 TB.

    Sparse design, in other words, mainly relieves compute pressure, not storage pressure. When planning deployments, the two measures need to be budgeted separately.

    Attention Mechanisms: Cache Compression Is the Main Thread

    As context lengths extend from 128K to 1M, the KV Cache grows linearly with sequence length and becomes the dominant memory cost in long-context inference. Consequently, mainstream designs focus on reducing the cache per token. Common approaches include:

    • Grouped Query Attention: multiple query heads share a smaller set of key-value heads, directly shrinking cache size.
    • Low-dimensional latent compression: keys and values are projected into a low-dimensional space for storage, then reconstructed during computation—or the projection matrices are absorbed into the computation—trading minimal storage overhead for significant cache savings.
    • Local-global hybrid attention: most layers attend only to tokens within a sliding window, while a few layers keep global attention, balancing long-range dependencies against memory usage.
    • Hybrid linear or state-based attention layers: reduce computational complexity for long sequences and curb state overhead that grows with sequence length.

    KV Cache size can be estimated with the following formula:

    1. kv_bytes_per_token = 2 * num_layers * num_kv_heads * head_dim * bytes_per_element
    2. total_kv_bytes = kv_bytes_per_token * context_len * batch_size

    As an illustrative configuration: 60 layers, 8 key-value heads, head dimension 128, stored in BF16. The cache per token is about 245,760 bytes, or roughly 240 KB. A single 128K-context sequence requires about 30 GiB of cache, growing to roughly 240 GiB at 1M context. These numbers show that without cache compression, long contexts quickly exhaust a single GPU’s memory. This configuration is only for demonstrating the calculation method, not the parameters of any specific model.

    Mixture of Experts: From Coarse-Grained to Fine-Grained Routing

    Mixture-of-experts architectures split the feed-forward layer into multiple experts, with a router selecting only a few of them for each token. Expert counts have grown from hundreds to nearly a thousand, and routing granularity has become correspondingly finer. The basic flow can be expressed in pseudocode:

    1. def moe_forward(x, gate, experts, top_k):
    2. scores = softmax(gate(x)) # score for each expert
    3. idx = argsort(scores)[-top_k:] # pick the top_k experts by score
    4. weights = normalize(scores[idx]) # renormalize weights of selected experts
    5. return sum(w * experts[i](x) for w, i in zip(weights, idx))

    Fine-grained routing allows experts to specialize more precisely, so the same number of activated parameters can hold more domain knowledge. But it also brings three costs.

    First, routing overhead increases.