Anatomy of Modern Large Language Model Architectures and the Evolution of Parameter Scale

    This article examines how the architectures of mainstream large language models make design trade-offs, and how those trade-offs map to three hardware constraints: compute, memory bandwidth, and interconnect. It outlines four parallel trends—expanding total parameters, stable activated parameters, growing context windows with compressed KV Cache, and finer expert granularity—then breaks down attention, mixture-of-experts, and numerical precision choices across twelve model families. It closes with operator-level decomposition, size estimation formulas, and three conclusions for capacity and cluster planning.

    Anatomy of Modern Large Language Model Architectures and the Evolution of Parameter Scale

    After playing a thousand tunes, one understands sound; after observing a thousand swords, one knows the weapon.

    1. Why Architecture Deserves Its Own Discussion

    Ten years have passed since the Transformer appeared, and the evolution at the architecture level has already been covered by numerous surveys. Rather than retracing that history, this article narrows the focus to a single question: where exactly do today’s mainstream large language models make trade-offs in their network architectures, and how do those trade-offs map onto three hardware constraints—compute, memory bandwidth, and interconnect communication?

    Four parallel trends can be distilled from publicly available technical specifications:

    • Total parameters keep expanding: from the hundreds of billions scale into the trillions scale.
    • Activated parameters stay converged: the parameters that actually participate in a single forward pass remain stable at tens of billions.
    • Context windows expand: from 128K tokens to the 1M token range, while the KV Cache is repeatedly compressed instead.
    • Expert granularity grows finer: the number of experts rises from the 256 level to nearly a thousand, with increasingly fine routing granularity.

    These four lines may look independent, but they are all pulled by the same set of physical constraints. Understanding how they couple is more valuable than memorizing the literal parameter count of any one model—the latter expires quickly with each version iteration, while the former is the basis for judging the direction of next-generation architectures and for reserving headroom when planning accelerators and clusters.

    The article is organized around twelve model families across twenty-five sections. Each section follows the same order: first the scale and layer configuration, then attention, mixture-of-experts, and numerical format in turn, and finally the hardware constraints. Operator-level decomposition and size accounting methods are provided at the end.

    2. Scale and Layer Configuration: Start With Three Numbers

    When analyzing any model, it helps to fix three basic quantities first: total parameters, activated parameters, and layer count (including the ratio of attention layers to feed-forward layers). Once these three numbers are set, the model’s lower bound on memory footprint, lower bound on compute per token, and pipeline partitioning approach are largely determined.

    A convenient approximation for self-checking:

    1. Weight size (Bytes) ≈ total parameters × bytes per parameter
    2. Compute per token (FLOPs) ≈ 2 × activated parameters
    3. KV Cache size ≈ 2 × layers × KV heads × head_dim × sequence length × batch × bytes per element

    The first formula shows that switching between FP8/INT8 and BF16 can roughly halve weight size, which is the most direct way to fit trillion-parameter models into limited memory today. The second shows that activated parameters are the real source of inference cost; total parameters only determine whether the model fits at all. The third shows that the cost of long context lies not in the weights but in the cache, and it grows linearly with sequence length.

    3. Attention: From “Computing Everything” to “Fetching Less”

    The evolution of attention can be summarized as three approaches, often used in combination.

    The first is low-rank key-value projection. Key-value pairs are compressed into a low-dimensional latent space, and only this compressed representation is cached during inference, pushing cache size down by an order of magnitude. The cost is that the projection matrices introduce extra parameters and one additional matrix multiplication—a typical case of trading compute for memory bandwidth.

    The second is sparsity and sliding windows. Most tokens interact only with a local window or a small number of global tokens, reducing complexity from quadratic to near-linear. The cost is that long-range dependencies must be covered by a few global tokens or by cross-layer information reuse.

    The third is linear attention and state compression. A fixed-size state replaces the cache that grows with length, decoupling memory usage from sequence length. The cost is weaker exact retrieval than standard attention, so it is typically used in only some layers.

    A common engineering combination is “compressed standard attention in most layers, full attention retained in a few layers,” balancing retrieval accuracy against cache size.

    4. Mixture-of-Experts: The Key to Decoupling Total and Activated Parameters

    MoE (Mixture-of-Experts) is the mechanism that pushes total parameters into the trillions while holding activated parameters down. Its structure can be abstracted as:

    1. # Illustration: fine-grained expert routing (not a specific product implementation)
    2. logits = router(hidden) # [tokens, num_experts]
    3. weights, idx = topk(softmax(logits), k) # each token selects k experts
    4. y = sum(weights[i] * expert[idx[i]](hidden) for i in range(k))

    Making things finer-grained means each expert becomes narrower, the number of experts grows, the number of experts activated per token increases, but the total activated width stays unchanged. Under the same activated compute, parameter capacity rises substantially, the number of expert combinations grows combinatorially, and the model’s division of labor over heterogeneous knowledge becomes finer.

    The hard constraint it introduces is communication: when experts are spread across different devices, every layer requires two global dispatches and aggregations, and communication volume grows with the number of activated experts and the sequence length. As a result, routing design, capacity factor, and how experts are packed within a device often affect actual throughput more than the number of experts itself.

    5. Numerical Formats: A General Lever for Memory and Bandwidth

    Low precision is not a single switch but a layered strategy: weights and activations are stored and computed in low precision, accumulation and normalization keep higher precision, and routing and scoring logic, being more precision-sensitive, generally retain a higher bit width. A common practice is to let low precision carry the feed-forward and projection paths while attention scoring and normalization run at higher precision. Three points matter when choosing: whether there is numerical stability risk, whether it is friendly to mainstream accelerator hardware, and whether switching requires retraining or only post-training quantization.

    6. Converging Conclusions on Hardware Constraints

    Putting the four lines together yields three stable judgments:

    1. Memory capacity is determined by total parameters, while memory bandwidth and compute are determined by activated parameters; the two must be planned separately.
    2. The bottleneck of long context is the cache, not the weights, so cache compression and sparsification are mandatory.
    3. The bottleneck of fine-grained experts is the interconnect, and the payoff from cluster networking and expert placement strategies may exceed gains from raising single-card peak performance.

    For implementation, a container platform can handle inference replica orchestration and elastic scaling, object storage can hold model weights and datasets, and logging and monitoring with alerting can track time-to-first-token, throughput, and cache hit rate—so observability is designed in at the architecture selection stage rather than patched on afterward.