Understanding Modern LLM Architecture: Design Dimensions and Parameter Scaling

    This article breaks down the structural design of modern large language models beyond a simple module checklist, focusing on four dimensions that separate architectures: layer arrangement, attention sparsification, expert routing, and residual mixing with numerical formats. It explains why total parameters are growing into the trillions while activated parameters stay in the tens of billions, why KV Cache is compressed even as context windows expand, and how these trends reflect the same compute, memory, and interconnect constraints. Using twelve anonymized model families as reference points, it provides operator-level decomposition and resource estimation methods for cache size, compute demand, and weight footprint, along with implications for accelerator selection and deployment planning.

    1. Why Architecture Deserves Its Own Discussion

    It has been over a decade since the Transformer was introduced, and surveys of its structural evolution are common. Most of them, however, stop at a module checklist: how attention is modified, how the feed-forward block is replaced, how positional encoding is tuned. What actually determines whether a model runs on a given hardware target is not the module names but how those modules are organized and the resource profile that results from that organization.

    Placing today’s mainstream large language models side by side reveals several seemingly contradictory trends:

    • Total parameters grow from hundreds of billions to trillions, yet the parameters activated in a single forward pass stay in the tens of billions.
    • Context windows expand from 128K to 1M and beyond, yet the KV Cache is repeatedly compressed.
    • The number of experts rises from 256 to nearly a thousand, while routing granularity becomes finer.

    These “reverse movements” are not designers contradicting one another. They are projections of the same set of hardware constraints along different dimensions: compute, memory bandwidth and capacity, and interconnect. This article uses twelve typical model families as a thread (referred to neutrally as Model Series A/B/C, and so on), examining each one’s layer configuration, attention form, mixture-of-experts approach, and numerical format. Each section closes with operator-level decomposition and resource accounting methods.

    In this article, B and T denote billion and trillion parameters respectively. The unit of measurement is uniformly the token, without a plural suffix.

    2. Four Design Dimensions That Truly Create Separation

    The changes made by different vendors may look scattered, but they converge on four areas. Understanding these four threads is more valuable than memorizing a specific model name.

    2.1 Layer Arrangement: The Ratio of Attention to Feed-Forward

    The classic approach alternates “attention + feed-forward” in every layer. Two common adjustments have emerged recently. First, the proportion of feed-forward blocks increases in deeper layers, letting the model place more capacity in knowledge storage rather than token mixing. Second, cross-layer sharing or inter-layer reuse binds the weights of several layers together, reducing weight read operations while keeping total parameters unchanged. Layer arrangement also determines the width of the residual stream, which directly affects activation caching and communication volume.

    2.2 Attention Sparsification: From “Computing Less” to “Reading Less”

    The bottleneck in attention is usually not floating-point operations but the capacity and bandwidth of the KV Cache. Mainstream compression paths include grouped-query attention (reducing the number of KV heads), sliding windows and local attention (limiting the visible range), sparse or learnable routing (computing only selected history blocks), and low-rank or latent vector caching (compressing each token’s cache into a smaller vector). The longer the context, the more nonlinear the gains from compression.

    2.3 Expert Routing: The Trade-Off Between Fine Granularity and Load Balancing

    Splitting the feed-forward layer into a large number of small experts and activating only a few per token is the main source of “large total parameters, small activated parameters.” Finer granularity means smaller per-expert matrices and more favorable weight reads, but routing overhead and the share of expert-parallel communication rise. In engineering, this must be paired with capacity factors, dropping strategies, and load-balancing losses; otherwise, hotspot experts will slow down the entire batch.

    2.4 Residual Mixing and Numerical Formats

    Residual mixing determines how multiple outputs (attention output and several expert outputs) are combined: weighted summation, gating, or segmented concatenation. For numerical formats, weight and activation quantization, KV Cache storage precision, and accumulation precision must be designed separately. A common practice is to store large matrices at low bit-width, keep sensitive layers at higher precision, and accumulate at a wider bit-width.

    3. Structural Commonalities Across Typical Model Families (Neutral Description)

    To avoid pointing to specific vendors, the following describes publicly observable general design paradigms as Series A through Series L, all of which have corresponding practices in publicly available industry technical specifications.

    • Series A (early sparsification representative): fine-grained experts + shared experts + latent vector caching, with a significant gap between total and activated parameters.
    • Series B (dense and sparse in parallel): the same generation offers both dense and sparse versions, with different layer configurations and grouped attention heads.
    • Series C (ultra-long context orientation): a local window overlaid with a few global layers, with a high cache compression ratio.
    • Series D (multimodal fusion): a vision encoder attached alongside the text backbone, with cross-modal alignment layers inserted at shallow depths.
    • Series E (inference-optimization orientation): a small-activation model named as a “fast version,” with fewer layers but no reduction in expert count.
    • Series F through Series L: differentiated trade-offs in inter-layer sharing, routing granularity, quantization format, and positional encoding extrapolation.

    Common conclusion: no vendor maximizes all four dimensions simultaneously. The trade-off point almost always falls between “training throughput” and “inference cost.”

    4. Operator-Level Decomposition and Resource Accounting

    Taking a typical decode path as an example, it can be decomposed along two paths:

    1. # Attention path (single-token decode, batch=B, heads=H, head dim=D, cache length=L)
    2. q = x @ Wq # [B, H*D]
    3. k, v = cache.append(x @ Wk, x @ Wv) # cache grows by 2 * B * H_kv * D * L
    4. o = softmax(q @ k.T / sqrt(D)) @ v # mostly reads cache, low compute share
    5. attn_out = o @ Wo
    6. # Feed-forward path (sparse)
    7. g = router(x) # top-k routing
    8. y = sum(g_i * expert_i(x)) # only k experts activated
    9. out = residual_mix(attn_out, y)

    Accounting for three metrics is enough to judge hardware headroom:

    1. Cache size ≈ number of layers × 2 × cache length × number of KV heads × head dim × bytes per element;
    2. Compute demand ≈ 2 × activated parameters × number of tokens (forward pass);
    3. Weight size ≈ total parameters × bytes per parameter, which sets the lower bound on loading and expert-parallel communication.

    5. Implications for Accelerators and Deployment Planning

    • Memory-first: the decode stage is mostly memory-bound, so cache compression and weight-read bandwidth matter more than peak compute.
    • Reserve for communication: expert parallelism and long-context sharding amplify the share of collective communication, so the interconnect topology needs headroom.
    • Layered quantization: do not treat “quantization” as a single switch; weights, activations, and cache should each be assigned their own tier.
    • Elastic headroom: plan capacity along three separate lines — total parameters set capacity, activated parameters set latency, and cache sets concurrency.

    When running on general-purpose cloud capabilities, you can combine a container platform for elastic scaling, object storage for weights, and logging and monitoring services with alerting to observe latency and throughput in long-context scenarios, completing a reproducible load-testing loop without binding to a specific interface.

    6. Conclusion

    On the surface, architectural evolution looks like module replacement. At its core, it is a continuous rebalancing under the triangular constraints of compute, memory, and communication. Mastering the four main threads — layer arrangement, attention sparsification, expert routing, and residual mixing — together with operator-level accounting methods, enables evidence-based decisions in model selection and hardware planning, rather than chasing a single parameter metric.