Mainstream LLM Architectures Compared: From Parameter Scale to Hardware Constraints

    This article compares the structural trade-offs in mainstream large language models, covering total and active parameter counts, attention design, expert routing, and numerical precision. It explains how these choices reflect shared constraints on compute, memory access, and communication, and what those constraints suggest about future model designs.

    Ten years have passed since the Transformer was introduced, and many survey papers have already covered its architectural evolution. This article does not repeat the basics. It focuses on a narrower question: what structural trade-offs do current mainstream large language models make, and what shared logic lies behind them?

    1. Why Discuss Architecture Separately

    The changes made by different model teams may look scattered. Some deepen the network, some refine expert routing, and some switch attention variants. However, when these changes are placed in the same frame of reference, they point to the same set of hardware constraints: compute, memory access, and communication.

    This appears in three evolutionary trends that seem contradictory but are in fact consistent:

    • Total parameters keep growing, while active parameters have stayed flat for a long time. Total parameter counts have grown from hundreds of billions to several trillion. However, the number of parameters activated in each forward pass has remained in the tens of billions. This is not technical conservatism. It is a rational choice driven by memory bandwidth and inference cost.
    • Context windows keep expanding, while KV caches are repeatedly compressed. Context length has grown from 128K to 1M tokens or more. Longer sequences increase the pressure on the key-value cache, which pushes models to keep simplifying their multi-head attention variants.
    • More experts, with finer routing granularity. The number of experts in mixture-of-experts (MoE) layers has risen from around 256 to roughly 896. Each expert is smaller than before. Routing has moved from coarse-grained selection toward fine-grained designs, and some models combine shared experts with fine-grained experts.

    Understanding how these three trends connect is more useful than memorizing the configuration of any single model. It helps readers anticipate where next-generation models are heading and leaves room for planning inference accelerators.

    2. Parameter Scale: Dividing Total and Active Parameters

    2.1 Sparsity Makes Large-Scale Growth Possible

    Early dense models followed a roughly linear relationship: more parameters meant more compute. Training and inference costs rose in step with parameter count. When the target moved from hundreds of billions to trillion-parameter scale, dense architectures became economically impractical. MoE architectures offer a compromise. They split the feed-forward layer into multiple experts, and each token activates only a small subset of them.

    A typical MoE layer can be sketched conceptually as follows:

    1. # Conceptual example: MoE forward pass
    2. gate_scores = softmax(router(hidden), dim=-1) # Compute routing scores
    3. topk_experts = topk(gate_scores, k=8) # Activate a small set of experts
    4. output = sum(gate_scores[i] * experts[i](hidden)
    5. for i in topk_experts)

    In this design, total parameters set the model’s upper bound on knowledge capacity, while active parameters determine the compute and memory cost of each inference step. Once these two are decoupled, growth in capacity no longer translates directly into inference cost.

    2.2 Fine-Grained Experts Become Mainstream

    As the number of experts grows, the size of each expert shrinks. Coarse-grained large experts have a limited number of possible routing combinations, so the load across tokens can easily become uneven. Fine-grained small experts expand the combination space. Paired with shared experts that handle general knowledge, they can deliver better expressive efficiency at the same activation volume.

    The cost is that routing computation and communication between experts become more frequent. This is especially true for all-to-all communication in large-scale parallel deployments. This is a clear example of how communication constraints shape model structure.

    3. Attention: The Trade-off Between Long Context and KV Cache

    3.1 The KV Cache Is the Real Bottleneck for Long Context

    During autoregressive decoding, the model reads the key-value cache of all previous tokens to generate each new token. The memory footprint of the KV cache grows linearly with context length. At a 1M-token context, the cache can exceed the memory used by the model weights, even when the model has only tens of billions of active parameters.

    3.2 Common Compression Approaches

    The industry commonly uses the following approaches. Most mainstream models combine several of them:

    1. Multi-head latent compression: Keys and values are projected into a low-dimensional latent space and expanded during inference, which directly reduces cache size.
    2. Grouped-query attention: Multiple query heads share one set of key-value heads, so the cache shrinks proportionally.
    3. Sparse or sliding-window attention: Full attention is kept only within a local window. Distant tokens interact through a small number of anchor layers.
    4. Hybrid layer design: A few layers use full attention, while most layers use linear attention or lightweight variants. This balances accuracy and cache overhead.

    These approaches share a common goal. They turn the context length problem from a memory problem into a compute problem. Only when the cache no longer grows linearly with sequence length does long-context deployment become practical.

    4. Numerical Formats: Lowering Precision from Training to Inference

    Numerical formats have changed more sharply than any other dimension in the past two years. On the training side, mixed precision is now standard. BF16 is the primary format, and precision-sensitive steps keep higher precision. On the inference side, the industry is moving toward lower-bit formats:

    • Weights and forward computation use 8-bit or even 4-bit formats, which substantially reduces memory footprint and memory traffic.
    • Partial accumulations and key layers keep higher precision to prevent low-bit errors from accumulating over long sequences.
    • Scaling and quantization-aware training keep the accuracy loss of low-bit inference within an acceptable range.

    Lowering numerical precision is also a way to relieve memory bottlenecks. When reading weights becomes the main cost in the decoding phase, reducing the bits per parameter yields a direct and roughly linear benefit.

    5. Structural Convergence Under Shared Constraints

    Taken together, these three dimensions give a clear framework for evaluating design decisions:

    Design Dimension Evolution Direction Corresponding Hardware Constraint
    Parameter scale Total parameters grow, active parameters stay fixed Compute utilization and memory bandwidth
    Attention Compressed KV cache, hybrid attention layers Memory capacity and bandwidth
    Expert structure More experts, finer granularity Cross-device communication (all-to-all)
    Numerical format BF16 for training, low-bit for inference Memory access volume and memory footprint

    Although the names, versions, and specific configurations of different model series vary, their structural decisions map to one of the rows in this table. This convergence does not come from copying. It is the expected result when physical constraints push different designs toward similar solutions.

    6. Outlook

    Based on this framework, the following predictions for next-generation models are reasonable:

    1. Active parameters will not grow significantly. Until single-chip memory capacity and interconnect bandwidth make a leap in scale, active size will stay stable. Capacity growth will continue to come from more experts and larger total parameter counts.
    2. Attention layers will become more heterogeneous. The share of full attention layers will keep falling, and the mix of linear and sparse attention will increase. KV cache memory may become roughly decoupled from context length.
    3. Low-bit inference will become the default. 4-bit weight and cache formats will shift from optional optimizations to a baseline for deployment. Precision strategies in training will adjust accordingly.
    4. Communication will become the new primary bottleneck. Once structural optimizations absorb most of the compute and memory pressure, communication overhead from expert parallelism will dominate the efficiency of large-scale inference clusters. Model structures will likely shift further toward reducing cross-node routing frequency.

    Conclusion

    As the old Chinese saying goes, one must hear a thousand tunes before truly judging sound, and see a thousand swords before recognizing good blades. The same applies to understanding model architecture. Only by dissecting many real designs can one distill the actual evolutionary patterns from a stream of version updates. The framework in this article, which covers structural trade-offs under compute, memory, and communication constraints, is meant to help readers build this kind of analytical ability. Regardless of how future models are named or iterated, the direction of structural evolution can be anticipated as long as the hardware constraints hold.