Large Language Model Architectures and Parameter Scale Explained

    This article breaks down how large language model architectures evolve under three hardware constraints: compute, memory bandwidth, and interconnect. It presents a five-step analysis framework covering scale and layer configuration, attention, mixture of experts, numerical precision, and hardware limits, then summarizes four shared patterns across major model families: decoupling total from activated parameters, compressing KV Cache alongside attention sparsification, finer routing granularity, and lower precision throughout. Readers will learn to judge where the bottleneck of a decoding workload falls and how to translate architectural choices into capacity and deployment planning.

    1. Why Architecture Deserves Its Own Discussion

    Ten years have passed since the Transformer was introduced, and surveys of its architectural evolution are hardly rare. Most of them, however, stop at the level of “which attention variant a given lab adopted,” without a single thread that ties the scattered changes together. This article tries to supply that thread: every seemingly isolated structural change ultimately lands on the same set of hardware constraints — compute, memory bandwidth, and communication.

    Three pairs of apparently contradictory observations illustrate the point:

    • Total parameters have grown from hundreds of B to several T, yet the parameters actually activated per token have stayed in the tens of B range for a long time.
    • Context windows have expanded from 128K to 1M, yet the KV Cache has been compressed again and again.
    • The number of experts has risen from 256 to nearly a thousand, while routing granularity keeps getting finer.

    Put side by side, these observations lead to a clear conclusion: model architecture is not a matter of stacking “bigger is better,” but a reallocation among the three constraints under a fixed hardware budget. Only after untangling this relationship can we judge where the next generation of models is heading and leave headroom for accelerator planning.

    Convention: in this article B means one billion parameters and T means one trillion parameters. The unit of measurement is uniformly token, without a plural suffix.

    2. Analytical Framework: Four Threads and Shared Terminology

    To avoid the fragmentation that comes from listing vendors one by one, we fix a set of analytical dimensions first. Every family below is broken down in the same order: scale and layer configuration → attention → mixture of experts → numerical format → hardware constraints.

    Scale and layer configuration concerns three quantities: total parameters, activated parameters, and layer count. Total parameters determine memory footprint and weight-loading cost, activated parameters determine the compute per token, and layer count affects how flexibly pipeline parallelism can be split.

    The attention part concerns three things: whether it is standard multi-head attention, whether low-rank compression or sparsification is introduced, and the per-token KV Cache cost. In long-context scenarios, the KV Cache often becomes the bottleneck before the weights do.

    The mixture-of-experts part concerns routing granularity, the share of shared experts, and the load-balancing strategy. Fine-grained routing raises parameter utilization under the same activation budget, but amplifies All-to-All communication pressure.

    The numerical-format part concerns what precision weights, activations, and the KV Cache each use, and whether mixed precision and stochastic rounding are present. Low precision is the most direct way to cut memory-access cost.

    Schematically, the cost of one decoding layer can be written in the following form, which makes it easy to estimate which side the bottleneck falls on:

    1. # Illustrates order-of-magnitude relationships only, not any specific implementation
    2. per_token_flops = 2 * activated_params + 2 * layers * kv_dim * seq_len
    3. per_token_bytes = weight_bytes(activated_params) + kv_cache_bytes(seq_len)
    4. # If per_token_bytes / bandwidth clearly exceeds per_token_flops / compute, the workload is memory-bound

    3. Structural Common Ground Across Mainstream Families

    Aligning a dozen or so families side by side yields four shared traits.

    First, decoupling total parameters from activated parameters has become the default. Sparsification is no longer an experimental option for a minority; it is the mainstream way to separate “capacity” from “compute”: capacity is built up with total parameters, compute is held down with activated parameters.

    Second, KV Cache compression and attention sparsification advance together. The diminishing returns from longer context make vendors more willing to spend budget on compressing the cache than on blindly stretching the window.

    Third, routing granularity is refined. As the number of experts rises, each individual expert becomes smaller, which is equivalent to trading finer “parameter shards” for higher effective utilization, at the cost of more communication.

    Fourth, low precision has penetrated everywhere. Precision steps down from weights to activations and then to the cache, with block-level scaling factors keeping error accumulation in check.

    4. How Each Family Is Broken Down

    The following chapters all follow one template. Here are the observation points for each category, provided for side-by-side reading.

    Scale and layer configuration: first check whether activated parameters grow in proportion to total parameters. If they clearly do not, the design goal is to control per-token compute rather than to chase a capacity ceiling.

    Attention: focus on whether the per-token KV cost accumulates linearly with layer count, and whether low-rank projection or multi-query sharing compresses the cache to a constant level.

    Mixture of experts: check whether shared experts carry general capability, whether routed experts are divided by modality or by layer, and whether load balancing is backstopped by an auxiliary loss or by a capacity factor.

    Numerical format: look for an asymmetric design of “high-precision weights, low-precision activations.” Such combinations typically pay off most in memory-bound scenarios.

    Hardware constraints: convert the conclusions above into three kinds of demand — compute demand, bandwidth demand, and communication demand — then judge which one hits the ceiling first at deployment time.

    5. Three Implications for Compute Planning and Deployment

    First, select hardware by memory access rather than by compute. Most decoding scenarios are memory-bound, so when evaluating accelerator cards, look at bandwidth and cache capacity first and peak compute second.

    Second, leave headroom for communication. Fine-grained expert routing shifts the bottleneck from computation to interconnect, and in multi-machine deployments interconnect bandwidth often matters more than single-card compute.

    Third, include the cache in the capacity budget. In long-context serving, the KV Cache and the weights compete for the same memory, so capacity planning must account for both, together with common techniques such as paged management and prefix reuse to improve utilization.

    6. Summary

    The essence of architectural evolution is dynamic reallocation among compute, memory access, and communication. Master the five-step method — scale, attention, experts, precision, hardware — and you can make order-of-magnitude-correct judgments about new models even without first-hand material. In general-purpose compute and containerized environments such as those offered by Baidu AI Cloud, these judgments can be applied directly to capacity estimation and resource allocation.