Modern Large Language Model Architectures and Parameter Scaling Explained
This article examines the common architectural trends shaping modern large language models, including the rise of Mixture-of-Experts designs, KV cache optimization, and low-precision computation. It explains the relationship between total and active parameters, shows how attention mechanisms are evolving for long-context inference, and highlights the hardware and deployment constraints that guide these design choices.
Modern Large Language Model Architectures and Parameter Scaling Explained
1. Why Architecture Deserves Separate Attention
Since the introduction of self-attention, the Transformer architecture has dominated the large language model field for nearly a decade. At first glance, model improvements may appear highly fragmented: some focus on attention, others on feed-forward layers, normalization placement, or numerical precision. From a hardware perspective, however, these changes are responses to the same fundamental constraints: computation, memory access, and communication.
This article does not catalog the implementation details of individual models. Instead, it abstracts the common architectural trends shared by today’s leading large language models and addresses three core questions:
- What network structures are most commonly used in modern large language models?
- What order of magnitude do their parameter counts reach, and how are total parameters related to active parameters?
- What hardware considerations drive these architectural choices?
Understanding these questions can directly support model selection, inference optimization, and infrastructure planning.
2. The Overall Trend: Growing Total Parameters, Controlled Active Parameters
A clear pattern has emerged among many models released over the past two years:
- Total parameter counts have grown from hundreds of billions to the trillion-parameter range.
- Active parameters per forward pass, however, have generally remained in the tens-of-billions range rather than growing at the same rate.
The technical foundation of this “rapidly growing total parameters, controlled active parameters” pattern is the widespread adoption of sparse Mixture-of-Experts (MoE) architectures.
2.1 How MoE Works
The core idea behind MoE is to replace the feed-forward network (FFN) in a Transformer with a large number of parallel “expert” subnetworks. For each token, a routing module selects only a small number of experts to perform the computation.
A typical MoE layer can be represented as follows:
# Illustrative pseudocodedef moe_layer(x, experts, router, top_k):weights = router(x) # Compute routing scoresidx, w = top_k_select(weights, top_k) # Select the top-k expertsout = sum(w[i] * experts[idx[i]](x) for i in range(top_k))return out
The direct result is that model capacity—the ability to store knowledge and represent different patterns—can grow roughly with the total number of experts, while the computation for each token depends primarily on the number of activated experts. MoE decouples computational cost from total model capacity, which is the fundamental reason it remains practical to train and run models with trillions of parameters.
2.2 The Evolution of Expert Counts and Routing Granularity
The number of experts in leading models has increased from dozens or hundreds in earlier systems to hundreds or nearly a thousand in some newer designs. At the same time, routing has become more fine-grained, with several important engineering improvements:
- Fine-grained expert partitioning: Each expert is made smaller, allowing top-k combinations to provide a richer expression space.
- Shared experts: A group of experts is activated for every token to capture general-purpose knowledge and reduce redundancy among routed experts.
- Load-balancing mechanisms: Auxiliary losses or bias-adjustment methods without auxiliary losses help prevent expert collapse and uneven workloads across devices.
Load balancing is especially important. In large-scale distributed training, severely skewed routing can cause certain devices to receive too many tokens for their experts. This creates computational hotspots and communication congestion, directly reducing overall throughput. Load balancing is therefore not only an accuracy concern but also a cluster-efficiency concern.
3. The Evolution of Attention: A Competition to Compress the KV Cache
If MoE primarily addresses computation, recent advances in attention have largely focused on memory access, with the KV cache at the center of the problem.
3.1 Why the KV Cache Becomes a Bottleneck
During autoregressive inference, each newly generated token must attend to the Keys and Values of all previous tokens. To avoid recomputing them, historical Keys and Values are stored in memory. This stored data is known as the KV cache.
Its memory consumption can be approximated as:
KV cache size ≈ number of layers × sequence length × number of KV heads× head dimension × 2 (K and V) × bytes per element
When the context window expands from 128K to around one million tokens, using conventional multi-head attention (MHA) can make the KV cache unacceptably large. In long-context scenarios, inference therefore shifts from being primarily compute-bound to being constrained by memory capacity and bandwidth.
3.2 Major Compression Approaches
The industry has developed several complementary approaches:
- Grouped-query attention (GQA): Multiple Query heads share a group of Key and Value heads. This directly reduces KV cache size according to the grouping ratio and is currently the most common compromise.
- Multi-query attention (MQA): An extreme form of GQA in which all Query heads share a single set of Key and Value heads. It provides the highest compression ratio but may reduce representational capacity to some extent.
- Latent-space compressed attention: Keys and Values are projected into lower-dimensional latent vectors for caching and reconstructed when needed. This can achieve substantial cache compression at a relatively small accuracy cost.
- Linear and sparse attention: The attention computation itself is redesigned so that computation and storage costs grow less than quadratically for long sequences, making these approaches suitable for extremely long contexts.
In practice, leading models often combine several of these techniques with engineering methods such as sliding windows, block-based processing, and KV quantization. The overall direction is clear: context windows continue to expand, while the KV cache cost per token is repeatedly compressed.
4. Numerical Formats: From FP16 to FP8 and Below
A third common trend is the continued reduction of numerical precision:
- Training: Mixed-precision training has become standard. Some large-scale training workloads use FP8 matrix multiplication together with fine-grained scaling factors to maintain numerical stability, bringing the throughput per unit of compute closer to twice that of higher-precision approaches.
- Inference: Weight quantization to INT8, FP8, and even 4-bit formats has become relatively mature. Quantizing the KV cache can further reduce memory pressure in long-context scenarios.
- Risk management: Low precision is not free. Precision-sensitive components—including attention scores, normalization layers, and routing logits—typically continue to use higher-precision computation. This produces a hybrid strategy in which sensitive paths remain high precision while dense computation uses lower precision.
Numerical-format choices also map directly to hardware. The throughput of low-precision matrix-multiplication units and the efficiency of memory-bandwidth utilization can determine how the same model performs across different accelerators.
5. Implications for Hardware and Engineering Practice
Taken together, these three trends reveal the infrastructure constraints imposed by modern large language models:
| Architectural characteristic | Primary hardware pressure | Engineering response |
|---|---|---|
| Extremely large total parameter count through MoE | Memory capacity and expert-parallel communication | Expert parallelism and load balancing |
| Long context windows | Memory bandwidth and KV cache capacity | KV compression, quantization, and sparse attention |
| Low-precision computation | Compatibility with compute units | FP8 and INT8 kernel optimization |
| Fine-grained routing | Communication frequency and irregularity | Overlap communication with computation and optimize routing |
For teams deploying inference services in the cloud, model selection should not be based solely on total parameter count. It is also necessary to evaluate:
- the active parameters that determine computation per forward pass;
- the KV cache requirements that determine memory consumption; and
- the MoE routing behavior that determines the communication pattern.
On general-purpose cloud infrastructure, teams can combine container orchestration with elastic scaling and monitoring and alerting systems to track memory usage and throughput. Deployment can then be adapted to traffic patterns by selecting either dense or sparse model architectures.
6. Conclusion
The evolution of modern large language model architecture can be summarized in three points:
- MoE decouples model capacity from computation.
- Attention variants decouple context length from memory usage.
- Low-precision formats decouple throughput from cost.
Total parameter counts are moving toward the multi-trillion range, active parameters remain in the tens-of-billions range, context windows are approaching the million-token scale, and KV caches continue to shrink through architectural and engineering optimizations. These seemingly contradictory developments are rational responses to the same set of hardware constraints.
Recognizing this underlying pattern makes it easier to assess the architectural characteristics and deployment costs of new models, supporting better technology selection and more resilient compute planning.
