Understanding Modern LLM Architectures and Parameter Scale

    This article breaks down the network organization of today's mainstream large language models and explains why their seemingly scattered design changes all point to the same hardware constraints: compute, memory bandwidth, and communication. It clarifies three easily confused scales (total vs. activated parameters, context length vs. cache overhead, expert count vs. routing granularity), covers the four dimensions that actually differentiate models, provides layered formulas for parameter and cache sizing, discusses numerical formats and low-precision trade-offs, and closes with four hardware constraints and actionable capacity-planning advice.

    1. Why Architecture Deserves Its Own Discussion

    Transformer is now ten years old, and plenty of surveys have already covered how the architecture has evolved. This article skips that history and narrows the focus to today’s mainstream large language models, taking apart their network organization one by one and explaining why changes that look scattered all point to the same set of hardware constraints: compute, memory bandwidth, and communication.

    First, three sets of quantities that are easy to confuse. The first is total parameters versus activated parameters: the former has grown from hundreds of B to several T, while the latter has stayed in the tens of B range. The second is context length versus cache overhead: the window has expanded from 128K to 1M, yet the KV Cache has been repeatedly compressed. The third is expert count versus routing granularity: the number of experts has risen from 256 to nearly a thousand, while the share of experts hit per forward pass keeps shrinking. Only by looking at these three trade-offs together can you judge where the next generation of models is heading and leave enough headroom for accelerator capacity planning.

    Throughout this article, B and T denote billion and trillion parameters, measured uniformly in tokens. Each section follows roughly the same order: first the scale and layer configuration, then attention, mixture of experts, and numerical format, and finally the model’s concrete hardware constraints. Where a model has published its original architecture diagram, it is interpreted from that diagram; where it has not, a schematic is drawn from its technical specifications and marked as illustrative. Each section ends with an operator-level breakdown that lists operators, formulas, and tensor dimensions along the attention and feed-forward paths, and calculates cache, compute, and weight size in the figure caption.

    2. Four Dimensions That Actually Make a Difference

    Differences across vendors look all over the place, but they boil down to four areas.

    Layer arrangement. Not all layers are homogeneous. A common approach keeps the first several layers as dense feed-forward, stacks sparse expert layers in the middle, and returns to dense or shared experts at the end; some models also insert global attention every few layers to gain long-range dependency modeling. Layer arrangement determines how weights are distributed in memory and whether pipeline-parallel splits are uniform.

    Attention sparsification. There are roughly three directions: compression, which pools or low-rank projects historical keys and values; sparsity, which computes only over a local window plus a few global tokens; and linearization, which replaces the explicit cache with state updates. All three aim to turn the cache from “growing linearly with length” into “roughly constant or sublinear.”

    Expert routing. Routing is moving from token-level to finer-grained group routing, with shared experts carrying general capability and routed experts carrying domain capability. Load-balancing loss, capacity factor, and drop policy directly determine the actual activated parameters and effective throughput.

    Residual mixing. The scaling of residual connections, the position of normalization (pre or post), and whether a learnable mixing coefficient is used affect training stability in deep networks and whether some branches can be folded away at inference time.

    3. Layered Accounting of Parameter and Activation Scale

    With total parameters N, layers L, hidden dimension d, expert count E, and experts hit per token k, you can write a handy estimation relationship:

    1. Activated parameters ≈ L * (attention parameters + (k/E) * expert parameters) + dense layer parameters
    2. Weight size ≈ N * bytes per parameter
    3. Cache size ≈ 2 * L * layers * d_kv * sequence length * batch size * bytes per element

    The key takeaway: total parameters set the floor for memory and bandwidth, activated parameters determine compute demand, and the cache determines the usable batch size under long context. The three cannot substitute for each other and must be accounted for separately. In practice, engineers first use weight size to confirm the model fits, then use activated parameters to estimate FLOPs per token, and finally use the cache to work out how large a batch and how long a window fit in the given memory.

    4. Numerical Formats and Low-Precision Training Trade-offs

    The mainstream approach stores weights and optimizer states at different precisions: forward and backward passes use lower bit widths, while master weights and first- and second-order moments keep higher bit widths; numerically sensitive parts (normalization, accumulation, routing scores) maintain high-precision accumulation. The finer the granularity of scaling factors (per tensor, per channel, per block), the smaller the precision loss, but the higher the metadata overhead. It is worth stressing that the gains from low precision show up mainly in memory access and bandwidth, not peak compute, so the benefit is more pronounced in the bandwidth-bound decoding stage.

    5. Four Classes of Hardware Constraints

    The first is the compute constraint, determined jointly by activated parameters and sequence length; the prefill stage saturates the matrix-multiply units. The second is the memory-access constraint: decoding reads all the weights for every generated token, so bandwidth often becomes the bottleneck before compute does. The third is the communication constraint: expert parallelism brings two collective communications, tensor parallelism brings intra-layer synchronization, and pipeline parallelism brings bubbles; the optimal mix shifts with cluster topology. The fourth is the cache constraint: under long context the cache can exceed the weights themselves, requiring compression, quantization, or offload strategies.

    6. Actionable Advice for Capacity Planning

    First, work backward from the target throughput to the required bandwidth, then check whether compute is overprovisioned; align expert parallelism with the topology to avoid high-frequency small messages across nodes; reserve at least half the weight size as headroom for the cache; and factor the non-uniformity of layer arrangement into pipeline splits to reduce bubbles. If you rely on general-purpose cloud capabilities, you can put weights in object storage, hand request distribution to a container platform, and wire runtime metrics into logging and monitoring with alerts, achieving elastic scaling and problem localization without binding to a specific implementation.

    Every architectural change is essentially a reallocation of budget among compute, memory access, and communication. Understanding this allocation logic is more valuable in the long run than memorizing a model’s layer count or expert count.