Modern LLM Architecture and Parameter Scale: A Technical Breakdown
This article examines the network architecture and parameter scale of current mainstream large language models. It breaks down depth and width configurations, sparse expert routing, attention evolution, numerical precision, and KV Cache compression, then maps each structural choice to its hardware constraints in compute, memory bandwidth, and interconnect. The goal is to help readers plan capacity and select parallelism strategies using reproducible benchmarks.
1. Why Architecture Deserves Its Own Discussion
More than a decade has passed since the Transformer was introduced, and surveys of its structural evolution are far from scarce. Rather than repeating a chronological account, this article focuses on the concrete network configurations of today’s mainstream large language models (LLMs) and dissects them layer by layer.
Architecture is separated from training recipes and data mixtures for one reason: changes that look scattered across different model families all converge on the same set of hardware constraints — compute, memory bandwidth, and interconnect communication.
Three long-standing “scissors gaps” illustrate the problem best:
- Total parameters have climbed from hundreds of B to several T, while activated parameters per token have stayed in the tens of B range.
- Context windows have expanded from 128K to the 1M level, yet the KV Cache is repeatedly compressed.
- Expert counts have grown from 256 to nearly a thousand, while routing granularity keeps getting finer.
Placed on a single chart, these three trade-offs reveal where the next generation of architectures is heading, and how much headroom to reserve for accelerator memory capacity, bandwidth, and interconnect topology. Here B and T denote billion and trillion parameters, and token is used as the unit of measure throughout, without a plural suffix. Each section follows roughly the same order: scale and layer configuration first, then attention, mixture of experts, and numerical format, ending with the concrete hardware constraints each structure imposes.
2. Scale and Layer Configuration: Balancing Depth, Width, and Sparsity
Scale is no longer described by a single “parameter count” but by a triple: total parameters / activated parameters / number of layers. Depth determines the length of the serial inference chain, width (hidden dimension) determines the matrix size and parallelism of a single layer, and sparsity determines the actual number of floating-point operations executed.
A typical sparsified configuration looks like this:
# Illustrates structural relationships only; not the parameters of any specific productconfig = {"num_layers": 60, # depth: affects serial latency"hidden_size": 7168, # width: affects single-layer GEMM size"total_params": "600B", # capacity: determines memory residency requirements"activated_params": "30B", # compute: determines compute requirements"num_experts": 512, # expert pool size"top_k": 8, # experts activated per token}
The engineering implication is direct: size memory for total parameters, size compute for activated parameters. This explains a common puzzle — why inference throughput for a “600B model” can approach that of a “30B dense model” while memory consumption is on an entirely different scale. If capacity planning looks only at activated parameters, deployment will hit OOM; if it looks only at total parameters, compute procurement will be badly overestimated.
3. Attention: From Full to Sparse, Then Toward Linear
Attention is the main source of cost as context grows, with complexity scaling quadratically with sequence length. The mainstream evolution follows four steps:
- Multi-head to grouped-query: compress the number of Key/Value heads to directly shrink KV Cache size.
- Positional encoding extrapolation: extend the effective window through frequency scaling and interpolation in rotary position embeddings.
- Sparse and block attention: replace global attention with a combination of local windows plus a small number of global tokens.
- Linear or state-space hybrids: substitute a fixed-size state for a cache that grows with length.
Step 4 is the direction drawing the most attention right now. Hybrid architectures are typically stacked at a fixed interleaving ratio — for example, inserting a linear/state-space layer every few layers while keeping standard attention in the rest:
Layer pattern: [Attn] [Attn] [Attn] [Linear] [Attn] [Attn] [Attn] [Linear] ...
The payoff is that memory consumption shifts from “growing linearly with length” to “approximately constant.” The cost is that capability on exact-retrieval tasks may degrade, so a certain proportion of full attention layers is usually retained as compensation.
4. Mixture of Experts and Routing Granularity: The Communication Pressure of Fine Granularity
The core of mixture of experts (MoE) is decoupling parameter capacity from compute. What matters is not the total number of experts but routing granularity: splitting each expert into smaller units and activating more of them per token yields a finer combinatorial space at the same activated compute, which generally works better than “a few large experts.”
Fine-grained routing, however, shifts the pressure onto the interconnect. Because different tokens are assigned to different experts, cross-device all-to-all traffic rises with the number of activated experts, and uneven distribution causes load skew. Common mitigations include capacity factor limits, auxiliary load-balancing losses, and restricting routing within a node to shorten the communication radius.
# Illustrative routing logicdef route(token_emb, router_w, top_k=8, capacity=1.25):scores = softmax(token_emb @ router_w) # expert scoresidx = topk(scores, top_k) # fine-grained selectionreturn enforce_capacity(idx, capacity) # capacity constraint to suppress skew
5. Numerical Formats: Low Precision Is a Memory Problem, Not Just a Compute Problem
As parameter counts rise, moving weights often costs more time than the multiply-accumulate itself, so the primary value of numerical formats is reducing the number of bytes moved from memory. The prevailing practice is to store weights at 8 bits or lower and compute activations at 8 bits, while keeping higher precision for a few sensitive tensors such as normalization layers, routing scores, and accumulators.
Three points need engineering attention: first, group quantization, sharing scale factors per channel or per block to control error; second, mixed-precision boundaries, making explicit which operators must fall back to higher precision; third, calibration data distribution, since quantization error is most easily amplified on long-tailed distributions. It is worth stressing that the gains from low precision come mainly from bandwidth and capacity, not from theoretical peak compute.
6. Long Context and KV Cache: Why Repeated Compression Is Inevitable
As context moves from 128K toward 1M, the KV Cache becomes the dominant consumer of memory. Its size is approximately:
KV_bytes ≈ 2 × layers × kv_heads × head_dim × seq_len × batch × bytes_per_elem
So “a larger window but a compressed cache” is not a contradiction but an inevitability: grouped-query attention reduces kv_heads, hybrid architectures reduce the number of attention layers among all layers, and low precision reduces bytes_per_elem. Only the three combined can offset the growth in seq_len. In addition, paged cache management, prefix reuse, and cache eviction are system-level techniques that make long context affordable.
7. Mapping Architectural Choices to Hardware Constraints
Collapsing the previous six sections into one comparison table makes it directly usable for capacity planning:
| Architectural choice | Main benefit | Main cost | Hardware impact |
|---|---|---|---|
| Sparse experts + fine-grained routing | Large capacity, low compute | Load skew | High-bandwidth interconnect, all-to-all |
| Grouped-query attention | Smaller cache | Slightly reduced expressiveness | Lower memory capacity requirement |
| Linear/state-space hybrid | Near-constant cache | Limited retrieval capability | Significantly reduced bandwidth pressure |
| Low-bit numerical formats | Fewer bytes moved | Precision requires calibration | Lower bandwidth and capacity |
| Deeper networks | Better serial inference quality | Higher latency | Single-device compute utilization |
Deploying on the cloud, these constraints typically map to a few general capabilities: a container platform handles elastic scaling and topology-aware scheduling, object storage holds weights and datasets, a message queue decouples the pipeline, and logging plus monitoring and alerting provide observability into throughput, cache hit rate, and communication wait time. For selection, it is advisable to first run a small-scale benchmark to measure three metrics — memory residency, effective compute, and interconnect bandwidth — and then decide the combination of parallelism strategies (tensor parallelism, pipeline parallelism, expert parallelism) accordingly.
8. Conclusion: Leaving Headroom for the Next Generation
Across the structural evolution of current mainstream models, three stable trends stand out: capacity and compute continue to decouple, caches are systematically compressed, and routing granularity keeps getting finer. They point to a shared conclusion — the bottleneck is shifting from compute to memory access and communication. So when planning accelerators and clusters, instead of chasing a single peak metric, it is better to reserve ample headroom for memory capacity, interconnect bandwidth, and load-balancing mechanisms, and to keep calibrating those judgments with reproducible benchmarks.
