Understanding Modern LLM Architecture: Structural Evolution and Parameter Scaling

    This article examines how mainstream large language models have evolved at the network architecture level and why those changes converge on the same hardware constraints: compute, memory bandwidth, and inter-device communication. It clarifies three distinct parameter metrics—total parameters, activated parameters, and KV Cache—then walks through four structural trends: layer arrangement, attention sparsification, mixture-of-experts routing, and residual mixing with numerical formats. The article closes with a hardware constraint checklist and a five-step evaluation method for capacity planning and model selection.

    1. Why Architecture Deserves Its Own Discussion

    Ten years have passed since the Transformer architecture was introduced, and the structural changes built around it have already been covered extensively in surveys. This article does not revisit that history. Instead, it narrows the focus to a single question: what changes have mainstream large language models (LLMs) actually made at the network architecture level, and what shared hardware constraints do those changes point to?

    Isolating architecture for discussion is worthwhile because adjustments from different model families look scattered on the surface but converge on the same set of bottlenecks when mapped to hardware: compute, memory bandwidth, and inter-device communication. Three long-term trends are observable:

    • Total parameter count has grown from the hundreds of billions to the trillions, while the parameters activated in a single forward pass have stayed in the tens of billions.
    • Context windows have expanded from 128K tokens to the 1M token level, yet the KV Cache has been compressed repeatedly.
    • Expert counts have climbed from 256 to 896 and beyond, while routing granularity has become progressively finer.

    These three trends constrain one another. Untangling the tradeoffs between them helps anticipate the structural direction of the next generation of models and leaves headroom for accelerator selection, cluster networking, and capacity planning. This article takes a general technical perspective and does not target any specific vendor model; where product capabilities are involved, only industry-standard category descriptions are used.

    2. Three Parameter Metrics: Total, Activated, and Cache

    The most common mistake when discussing “how large the parameter count is” is conflating three different metrics.

    1. Total Parameters: determine the resident footprint of weights in VRAM or memory, directly affecting whether the model fits on a single machine and how much parallelism is needed to shard it.
    2. Activated Parameters: determine the actual multiply-accumulate work in a single forward pass, and are the primary source of compute demand and latency.
    3. KV Cache size: strongly correlated with layer count, attention head count, head dimension, sequence length, and concurrency, and often the real VRAM killer during long-context inference.

    A typical sparsified model may present a shape of “trillions of total parameters, tens of billions activated.” This means the memory budget for training and deployment is determined by total parameters, while throughput and latency are determined jointly by activated parameters and cache. Ignoring this distinction produces order-of-magnitude errors in capacity planning.

    A rough estimate can follow the illustrative logic below (values only demonstrate dimensional relationships):

    1. Weight size ≈ total parameters × bytes per parameter
    2. FP16/BF16: 2 byte/param
    3. FP8: 1 byte/param
    4. 4-bit quantization: 0.5 byte/param
    5. KV Cache ≈ 2 × layers × KV heads × head dimension × sequence length × concurrency × bytes
    6. Attention compute ∝ sequence length² (without sparsification)
    7. Feed-forward compute ∝ activated parameters × token count

    3. Four Structural Threads

    Differences between models concentrate in four areas.

    3.1 Layer Arrangement

    The traditional approach stacks attention and feed-forward blocks alternately. Two adjustments have emerged in recent years: replacing standard attention with linear attention or gated linear units in some layers to form a hybrid layer sequence; and changing normalization placement (pre-norm/post-norm) and residual connection patterns to improve training stability in deep networks. Layer arrangement changes look local but alter the operator dependency graph, which in turn affects how pipeline parallelism is partitioned and the resulting bubble ratio.

    3.2 Attention Sparsification

    As context expands from 128K to 1M, keeping attention dense makes both compute and cache grow quadratically. Mainstream countermeasures include:

    • Grouped-query attention (GQA) / multi-query attention (MQA) to compress the number of KV heads;
    • A hybrid layout of sliding windows plus global layers, so most tokens attend only locally;
    • Sparse routed attention that selects a small number of key blocks per query;
    • Cache compression and quantization, reducing KV from high precision to low-bit storage.

    The engineering caveat: sparsification reduces memory access and cache pressure but introduces irregular block access, placing higher demands on memory locality and operator fusion.

    3.3 Mixture-of-Experts Routing

    Sparse mixture-of-experts (MoE) is the core mechanism for pushing total parameters up while holding activated parameters down. The evolution direction is “finer granularity, more experts, sparser activation”: expert counts have grown from hundreds to nearly a thousand, while the number of experts activated per token stays in single digits. Fine-grained routing improves parameter utilization efficiency, but the cost is higher all-to-all communication volume, and uneven routing load creates hotspots on individual devices. Common mitigations include capacity factor limits, load-balancing auxiliary losses, and dynamic reordering under expert parallelism.

    3.4 Residual Mixing and Numerical Formats

    Mixing coefficients on the residual path, gating schemes, and the numerical formats used in training and inference (BF16, FP8, low-bit quantization) jointly determine numerical stability and throughput. Lower precision can significantly increase compute output per unit, but requires finer-grained scaling strategies and outlier handling; otherwise precision collapse can occur in long-context scenarios.

    4. What These Structures Mean for Hardware

    Mapping the structures above to hardware yields a relatively clear constraint checklist:

    • Compute: determined by activated parameters and sequence length; long-context scenarios require careful evaluation of the actual utilization of attention operators.
    • Memory access: resident weight size sets the minimum VRAM threshold, while KV Cache determines the concurrency ceiling for long contexts.
    • Communication: expert parallelism introduces high-frequency all-to-all traffic, tensor/pipeline parallelism introduces intra-layer and inter-layer synchronization, and network topology and bandwidth directly determine scaling efficiency.
    • Storage and operations: training logs, checkpoints, and inference metrics are best routed to general-purpose capabilities such as log services, object storage, and monitoring/alerting to form an observability loop.

    5. A Practical Evaluation Method

    To assess whether a model architecture fits your scenario, follow a fixed order to avoid being misled by a single metric:

    1. Define the metrics: record total parameters, activated parameters, and estimated cache separately, rather than writing a single “parameter count.”
    2. Estimate layer by layer: list the operators, formulas, and tensor dimensions along both the attention and feed-forward paths per layer, estimating cache, compute, and weight size segment by segment.
    3. Stress-test the scenario: validate with the longest context and target concurrency from real workloads, and observe whether cache becomes the bottleneck.
    4. Regression-test precision: after enabling low precision or sparsification, confirm no noticeable quality regression using a business evaluation set.
    5. Leave capacity headroom: reserve margin for expert routing hotspots and long-context peaks, avoiding plans that run right at the line.

    6. Conclusion

    The structural differences among current mainstream LLMs are essentially different solutions to the same set of hardware constraints: sparsification decouples total parameters from activated parameters, attention compression buys ultra-long context, fine-grained routing improves parameter efficiency, and low precision buys throughput. Understanding the relationship between these four structural threads and the three parameter metrics leads to more robust decisions in selection, deployment, and capacity planning, and to reasonable expectations about the structural direction of the next generation of models.