Structural Evolution and Parameter Scaling in Modern Large Language Models
This article examines how mainstream large language models (LLMs) trade off network structure and what those choices mean for hardware. It breaks down the common decoder-only Transformer skeleton, explains why total parameters and activated parameters keep diverging under sparsification, and reviews KV Cache compression, fine-grained Mixture-of-Experts (MoE) routing, position encoding, and normalization. It also maps structural traits to parallelism strategies, outlines a four-step capacity planning process, and lists common misconceptions to check before deployment.
1. Why Structure Deserves Its Own Discussion
It has been about ten years since the Transformer was introduced, and many surveys already cover its structural evolution. This article does not repeat that history. Instead, it narrows the focus to one question: what trade-offs do today’s mainstream large language models (LLMs) make in network structure, and what do those trade-offs mean on hardware?
On the surface, the changes across model families look scattered—some modify attention, some modify the feed-forward layer, some modify position encoding, and some modify normalization placement. But put them on the same hardware ledger, and they point to only three sets of constraints:
- Compute: the scale, precision, and utilization of matrix multiplications;
- Memory access: bandwidth consumed by weights and the KV Cache;
- Communication: cross-card and cross-node data exchange caused by parallel partitioning.
A few trends summarize the current state: total parameters have grown from hundreds of B to several T, while the parameters activated in a single forward pass have stayed in the tens of B; context windows have expanded from 128K to 1M, yet the KV Cache has been compressed repeatedly; the number of experts has risen from 256 to hundreds or even nearly a thousand, while routing granularity keeps getting finer. Connecting these seemingly contradictory phenomena makes it possible to judge the direction of next-generation structures and leave headroom for accelerator capacity planning.
Convention: in this article, B and T denote billion and trillion parameters respectively, and the unit of measurement is uniformly token, without a plural suffix.
2. The Overall Skeleton: Common Structure of Mainstream LLMs
Setting details aside, the vast majority of current LLMs still take the form of a “decoder-only Transformer plus several replacement modules.” From the bottom up, it can be decomposed into six layers:
- Token embedding layer: maps input tokens to vectors, usually weight-tied with the output layer to save parameters.
- Normalization layer: Pre-Norm is now mainstream, and RMSNorm-style implementations save more bandwidth by omitting the mean and bias.
- Attention sublayer: multi-head or grouped-query attention, combined with various KV compression and sparsification modifications.
- Feed-forward sublayer: dense FFN or sparse Mixture-of-Experts (MoE), the main source of parameter count and compute consumption.
- Position encoding: rotary position encoding and its various extrapolation/interpolation variants.
- Output head: projects to the vocabulary, combined with weight tying and sampling strategies.
Illustrative structure (pseudocode, expressing only the data flow and not pointing to any specific implementation):
for layer in range(num_layers):h = h + attn(rmsnorm(h), kv_cache) # attention sublayerh = h + ffn(rmsnorm(h)) # dense FFN or MoElogits = lm_head(rmsnorm(h)) # output head, weights can be tied to embeddings
3. Parameter Scale: Why Total and Activated Parameters Keep Diverging
This is the most important thread to understand right now. Sparsification decouples “capacity” from “compute”:
- Total parameters determine the model’s knowledge capacity and storage cost, landing on VRAM and memory;
- Activated parameters determine the compute per token, landing on compute and latency;
- Number of experts × width per expert determines the overhead structure of routing and communication.
This gives rise to the combination of “trillion-scale total parameters + tens of B activated.” Its engineering meaning is very direct: inference cost is approximately determined by activated parameters, while the deployment threshold is determined by total parameters. This also explains why the same generation of models often offers both a large cup and a lightweight cup: the former pushes the capacity ceiling, while the latter pushes down memory access and latency.
An approximate relationship for easy estimation (for capacity planning, not an exact formula):
VRAM usage ≈ total parameters × bytes per parameter+ num_layers × sequence_length × hidden_dim × kv_head_ratio × bytes_per_element × 2(K/V)+ activations and temporary buffers
4. Attention and KV Cache: Contexts Get Longer, Caches Get Smaller
In the process from 128K to 1M context, what often blocks deployment is not compute but the memory access of the KV Cache. Mainstream approaches fall into four categories:
- Grouped-query/multi-query attention: multiple query heads share one set of key-value heads, directly cutting the cache by a ratio;
- Low-rank or compressed cache: projects K/V into a low-dimensional latent space for storage and restores it when needed;
- Sparse and sliding-window attention: keeps only a local window and a few global tokens, reducing complexity from quadratic to near-linear;
- Cross-layer sharing: adjacent layers reuse the same key-values, further amortizing usage.
Three metrics to watch in engineering: the number of bytes in the cache, the amount of cache that must be moved per decoding step, and the share of attention memory access under long contexts. Together they determine “whether long text is usable,” not just “how large the nominal context window is.”
5. Feed-Forward Layers and MoE: The Cost and Benefit of Fine-Grained Routing
The core motivation for increasing experts from hundreds to nearly a thousand and making routing finer is to raise “the effective capacity per activated parameter.” The benefit of fine granularity is higher specialization; the cost is more fragmented routing and communication:
- Load balancing: auxiliary losses or lossless balancing strategies are needed to avoid a few experts overheating;
- Communication pattern: under expert parallelism, tokens must be globally exchanged according to routing results, and communication volume rises with granularity;
- Shared experts: a common practice is to keep a small number of always-active shared experts that carry general capabilities, letting routed experts focus on differentiated knowledge.
To judge whether an MoE structure is “worth it,” look at three ratios: the share of activated parameters in total parameters, the number of experts reached per token, and the share of communication under expert parallelism in end-to-end latency.
6. Position Encoding, Normalization, and Stability
Long-context extrapolation mainly relies on various scaling and interpolation schemes of rotary position encoding, combined with adjustments to attention temperature or scaling factors. Normalization generally adopts the root-mean-square form without mean or bias, removing one reduction and two sets of parameters. For training stability, common measures include scaling the residual branch, controlling initialization variance, and managing loss scaling under low-precision training. Individually, these changes look minor, but they determine whether convergence can be stable at ten-thousand-card scale.
7. From Structure to Deployment: Parallelism Strategies and Capacity Planning
Structure determines how to partition. A reusable mapping is:
| Structural trait | Preferred parallelism dimension | Main bottleneck |
|---|---|---|
| Dense-layer dominant | Tensor parallelism + pipeline parallelism | Intra-layer communication bandwidth |
| Sparse-expert dominant | Expert parallelism + data parallelism | Global exchange from routing |
| Ultra-long context | Sequence/context parallelism | KV Cache memory access |
| Small activation, large total parameters | Parameter sharding + recomputation | Parameter loading and VRAM |
In practice, they are usually combined: tensor parallelism within a single machine to exploit high-bandwidth interconnects, pipeline or expert parallelism across machines, and context parallelism added for long-text scenarios. If using general cloud capabilities, this can map to container platforms hosting inference instances, object storage hosting weights, logging services and monitoring/alerting tracking throughput and latency, and message queues for request peak shaving—these are general categories, and specific implementations should follow the official documentation.
Capacity planning is recommended in four steps:
- First estimate compute and latency from activated parameters;
- Then estimate VRAM and instance specs from total parameters;
- Use the target context length and concurrency to estimate KV Cache and bandwidth;
- Finally, verify communication overhead with the number of experts and parallelism degree, leaving more than 20% headroom.
8. Common Misconceptions and a Checklist
- Looking only at total parameters: overestimates inference cost and underestimates the deployment threshold;
- Looking only at the nominal context value: ignores the cache compression scheme, so real long-text performance falls short;
- Looking only at the number of experts: ignores routing balance and communication, so throughput may drop instead of rise;
- Looking only at single-card metrics: ignores cross-machine communication, so end-to-end latency is dominated by communication.
Before going live, check: the activated/total parameter ratio, KV bytes per token, experts reached per token, whether the parallel partitioning matches interconnect bandwidth, and the peak VRAM under long contexts.
9. Trend Judgment
Overall, structural evolution will continue along three lines: capacity will keep sparsifying while activated parameters stay restrained; caches will keep compressing, pushing the cost of long contexts into an operable range; routing will keep refining, while shared experts and balancing strategies hold up stability. For users, what truly matters is not a model’s nominal parameters, but the three measurable and accountable quantities—activated parameters, cache bytes, and communication volume. They are the real line items on the compute, memory-access, and communication ledger.
