The Evolution of Modern LLM Architectures: A Breakdown of Parameter Scale
This article examines the internal network structure of current mainstream large language models (LLMs), covering layer configuration, attention patterns, Mixture-of-Experts (MoE) routing, and numerical precision strategies. It explains why total parameters and activated parameters have decoupled, how KV Cache is compressed as context windows grow, and how finer MoE routing reshapes communication costs. Readers will find a clear mapping from structural choices to hardware constraints—compute, memory access, and interconnect—along with capacity estimation examples and practical model selection advice.
1. Introduction: Why Structure Deserves Its Own Discussion
The Transformer architecture is now ten years old, and its structural evolution has already been covered extensively in survey papers. This article does not repeat that history. Instead, it narrows the focus to the concrete network structure of today’s mainstream large language models (LLMs), breaking down their layer configuration, attention patterns, Mixture-of-Experts (MoE) routing, and numerical precision strategies one by one.
Structure is worth discussing on its own because, although each vendor’s modifications look scattered on the surface, they all point to the same set of hardware constraints: compute, memory access, and communication. Looking at how parameters and configurations have shifted over the last few generations, four parallel trends emerge:
- Total parameters have grown from hundreds of B to several T, while activated parameters per token have stayed in the tens of B range;
- Context windows have expanded from 128K to 1M, yet KV Cache has been compressed repeatedly;
- The number of experts has risen from 256 to nearly 900, while routing has become increasingly fine-grained;
- Numerical formats have gradually moved from 16-bit floating point to lower-bit-width mixed floating-point and integer schemes.
Once the trade-offs behind these choices are clear, it becomes possible to judge where the next generation of models is heading and to leave headroom in planning for accelerators, memory capacity, and interconnect bandwidth. Throughout this article, B and T denote billion and trillion parameters, and all counts are measured in tokens.
2. Overall Framework: What a Single Forward Pass Computes
Before diving into details, it helps to establish a unified view. A typical modern LLM forward pass can be abstracted into four stages:
input tokens -> embedding layer -> N × (attention sublayer + FFN/MoE sublayer) -> normalization and output head -> logits
Three of these determine hardware behavior:
- Attention sublayer: determines KV Cache size and memory access pressure;
- FFN or MoE sublayer: determines parameter count and how compute is distributed;
- Numerical format: determines throughput per unit of compute and memory footprint.
Every section that follows revolves around these three points.
3. Parameter Scale: Decoupling Total and Activated Parameters
The most important structural change in modern models is the separation of “total parameters” from “activated parameters.”
- Dense models: every token passes through all parameters, so total parameters ≈ activated parameters, typically in the tens of B;
- Sparse MoE models: total parameters can reach hundreds of B to several T, but each token activates only a small subset of experts, keeping activated parameters in the tens of B.
The direct consequence of this decoupling: memory capacity is determined by total parameters, while per-token compute is determined by activated parameters. During deployment, both metrics must be evaluated together; looking at only one will distort capacity planning.
A simplified capacity estimation example:
# Illustrative only: weight memory ≈ parameter count × bytes per parameterdef weight_memory_gb(total_params_b, bytes_per_param):return total_params_b * 1e9 * bytes_per_param / (1024 ** 3)# 900B total parameters, 4-bit weightsprint(weight_memory_gb(900, 0.5)) # roughly 419 GB
4. Attention Evolution: From Full KV to Compressed KV
As context grows from 128K to 1M, standard multi-head attention would make KV Cache expand linearly to an unacceptable size. Mainstream solutions therefore focus on reducing the cost of storing and moving KV:
- Grouped-Query Attention (GQA): multiple query heads share one group of key-value heads, directly reducing the number of KV heads;
- Multi-Query Attention (MQA): the extreme case, where all query heads share a single group of key-values;
- Low-rank compressed KV: projecting keys and values into a lower-dimensional latent space and reconstructing them at inference time, significantly reducing cache footprint;
- Sliding window and local attention: keeping full attention only within a nearby window, with distant context handled by sparse or global tokens;
- Decoupling attention from positional encoding: injecting position information through mechanisms such as rotary positional encoding, which eases length extrapolation.
The engineering conclusion is that context length itself is not the bottleneck; KV Cache memory access is. This also explains why “larger window, smaller cache” appears so often.
5. Mixture-of-Experts and Routing: Finer Grains, Sparser Activation
Three parameters define a MoE: the total number of experts, the number of experts activated per token (top-k), and the routing strategy.
The evolution can be summarized as “more experts, finer routing”:
- Expert counts have climbed from the 256 level to nearly 900;
- top-k stays small (for example, 2 to 8), keeping activated parameters stable;
- Routing has moved from simple token-level selection toward finer-grained group routing constrained by load-balancing losses.
The benefit of fine-grained routing is higher specialization with controllable per-token compute; the cost is increased routing computation and expert-parallel communication overhead. Under expert parallelism (EP) deployment, tokens must be rearranged across devices, making communication volume a new bottleneck. Locality and balance in routing therefore need to be optimized at the same time.
6. Numerical Formats: The Dual Benefit of Lower Bit Widths
The shift in numerical formats is not simply about saving memory; it affects both compute and bandwidth:
- 16-bit floating point: the baseline for training and early inference;
- 8-bit floating point and integers: mainstream for inference, balancing accuracy and throughput;
- 4-bit and mixed precision: compression on the weight side, with activations kept at higher precision;
- Block-wise scaling and per-channel quantization: maintaining numerical stability at low bit widths.
The practical recommendation is to handle this in layers: use low bit widths for weights, medium bit widths for KV Cache, and retain higher precision for critical normalization and output layers, balancing accuracy against throughput.
7. Concrete Hardware Constraints: Compute, Memory Access, and Communication
Combining the previous sections yields a clear constraint mapping:
| Structural choice | Primary pressure | Planning guidance |
|---|---|---|
| Larger total parameters | Memory capacity | Estimate weight footprint from total parameters and bit width |
| Fixed activated parameters | Per-token compute | Estimate FLOPs from activated, not total, parameters |
| Longer context | KV memory access | Prioritize compressed KV and GQA |
| More experts | Interconnect communication | Reserve high-bandwidth interconnect and expert-parallel headroom |
| Lower bit width | Numerical stability | Use mixed precision and block-wise scaling |
When deploying in the cloud, this can map to a container platform hosting inference services, object storage holding model weights, and monitoring, alerting, and logging services observing throughput and latency, forming a complete deployment loop.
8. Common Pitfalls and Selection Advice
- Looking only at total parameters: overestimates compute needs and underestimates memory needs;
- Looking only at context length: overlooks the memory access cost of KV Cache;
- Looking only at expert count: overlooks routing and communication overhead;
- Looking only at bit width: overlooks the risk of accuracy regression.
The recommended evaluation order is: first determine activated and total parameters, then confirm the KV compression strategy, and finally check numerical formats and interconnect conditions. Following this order significantly narrows the margin of error in capacity and performance planning.
9. Conclusion
The structural changes in modern LLMs are essentially a continuous rebalancing among compute, memory access, and communication. Rising total parameters, stable activated parameters, expanding context with compressed cache, and more experts with finer routing—these four opposing trends together define the design grammar of current architectures. Understanding this grammar is what enables verifiable judgments in model selection, inference deployment, and hardware planning, rather than being led by a single metric.
