A Deep Dive into LLM Architecture and Parameter Scale: What Model Design Solves for Hardware
This article examines mainstream large language model architectures through an engineering lens, focusing on what structural choices actually solve for hardware. It uses three constraints—compute, memory bandwidth, and communication—as a measuring stick to explain seemingly contradictory trends: growing total parameters with restrained active parameters, longer contexts with smaller KV caches, and more experts with finer routing. It then walks through a five-step framework for reading any model report, surveys four architectural routes (high-sparsity MoE, dense plus lightweight sparse, long-context and linear attention, and closed-source flagship versus open-weight), and explains the engineering meaning of attention, mixture-of-experts, and numerical formats. It closes with actionable capacity-planning guidance based on active parameters, total parameters, context and cache strategy, and parallelism.
1. Why Architecture Deserves Its Own Discussion
Ten years have passed since the Transformer appeared, and there is already a large body of survey material on how its architecture has evolved. This article does not repeat that history. Instead, it narrows the focus to a more engineering-oriented question: what hardware problem do the network architectures of today’s mainstream large language models actually solve?
The changes made by different model families look scattered on the surface—some modify attention, some modify the feed-forward layer, some modify numerical formats—but when mapped onto hardware, they point to the same set of constraints:
- Compute: the throughput of matrix multiplication sets the ceiling for both training and inference;
- Memory access: bandwidth determines actual decoding speed, especially reads and writes of the KV Cache;
- Communication: tensor parallelism and expert parallelism across multiple GPUs and nodes introduce synchronization overhead.
Using these three constraints as a measuring stick makes several seemingly contradictory phenomena clear:
| Phenomenon | Concrete manifestation | Underlying constraint |
|---|---|---|
| Total parameters balloon, active parameters stay restrained | Total parameters grow from hundreds of B to several T, while active parameters stay around tens of B | Keep per-token compute bounded so decoding cost stays controllable |
| Contexts get longer, caches get smaller | Context expands from 128K to 1M, while the KV Cache is repeatedly compressed | Memory bandwidth is the main bottleneck for long context |
| Experts multiply, routing gets finer | Expert count rises from 256 to hundreds or nearly a thousand, with increasingly fine granularity | Trade a sparser combination for capacity, at the cost of communication |
Understanding the coupling among these three trade-offs is more valuable than memorizing the layer count of a particular model: it determines where the next generation of models will go, and it determines which bottleneck accelerator designers should leave headroom for.
2. In What Order Should You Read a Model
The analysis of each model family in this article follows the same main thread, and readers can use this thread to read any model technical report:
- Scale and layer configuration: total parameters, active parameters, layer count, hidden dimension, vocabulary size;
- Attention design: whether it is multiplicative attention, how positional encoding extrapolation is handled, how the KV Cache is compressed;
- Feed-forward and mixture-of-experts: dense or sparse, expert count and routing granularity, whether shared experts exist;
- Numerical format: what precision is used for training and for inference respectively, and how stability is maintained at low precision;
- Hardware constraints: whether the choices above ultimately put pressure on compute, memory access, or communication.
The following sections expand along this main thread, family by family.
3. Structural Characteristics of Each Technical Route
3.1 The High-Sparsity Mixture-of-Experts Route
The shared characteristic of this family is “very large total parameters, very small active parameters.” The typical approach keeps a standard multi-head structure in the attention part, but compresses the number of KV heads and replaces positional encoding with an extrapolatable form; the feed-forward layers are entirely replaced with fine-grained experts, and a small number of shared experts are introduced to carry general capabilities.
The point of fine-grained routing is that once a single expert’s capacity becomes smaller, the number of combinations rises sharply, so the model can express stronger capability with a similar active budget. The cost is a higher frequency of all-to-all communication. Under expert parallelism, load balancing is mandatory; otherwise a long tail appears where “hot experts slow down the whole batch.”
3.2 The Dense and Lightweight-Sparse Hybrid Route
Not every family goes to the extreme of sparsity. Some models keep dense feed-forward layers in the small and medium scale tiers and enable the sparse structure only in the flagship tier; there is also a class of models positioned as “Flash” that deliberately suppress active parameters and layer count, trading a more aggressive cache compression for stable decoding under long context.
The engineering implication of this design is direct: dense structures are friendly to communication, sparse structures are friendly to capacity, and the choice depends on whether your bottleneck is inside a machine or between machines.
3.3 The Long-Context and Linear-Attention Exploration Route
Another route subtracts from attention: gated or linear forms of attention replace some multiplicative attention layers, reducing complexity from quadratic in sequence length to linear; at the same time, a small number of full-attention layers are kept to preserve exact retrieval capability. Combined with techniques such as cross-layer sharing and windowed caches, the KV Cache under million-level context can be compressed into an acceptable range.
3.4 The Closed-Source Flagship and Open-Weight Route
From an engineering perspective, the difference between closed-source flagships and open-weight models shows up mainly in “observability”: for the former, the architecture can only be inferred from public reports, while for the latter you can read the configuration directly and do operator-level verification. For teams doing inference optimization, open weights are more suitable for architecture-level experiments.
4. The Engineering Meaning of Three Core Components
4.1 Attention: The Bottleneck Is Memory Access, Not Compute
During decoding, every token generated requires reading the entire historical KV, which is a typical memory-access-bound scenario. Common optimizations fall into three categories:
1) Reduce the number of heads: multi-query / grouped-query attention, where multiple query heads share one group of KV;2) Reduce precision: store the KV Cache at low precision and convert during computation;3) Reduce length: window attention, cross-layer sharing, sparse selection.
The three can be stacked, but all of them affect accuracy, so they need to be validated on evaluation sets rather than judged only by theoretical compression ratio.
4.2 Mixture-of-Experts: Trading Capacity for Communication
The essence of sparsification is splitting a dense matrix multiplication into many small matrix multiplications and letting routing decide which ones to run. Three things matter in engineering: whether routing is balanced, whether the expert-parallel partitioning matches the topology, and whether the active parameters actually land in the expected range. If routing is severely skewed, actual throughput will be far below the theoretical value.
4.3 Numerical Format: Low-Precision Stability Comes from Details
The current mainstream practice is higher precision for training and lower precision for inference, combined with per-channel scaling, stochastic rounding, block quantization, and similar means to control error accumulation. It is worth emphasizing that low precision is not a switch but a complete numerical-stability scheme; missing any one of these parts, both long-context and large-scale expert scenarios are prone to quality regression.
5. Actionable Advice for Capacity Planning
- Estimate compute from active parameters, estimate memory from total parameters: the former determines per-token cost, the latter determines weight-residency requirements;
- Estimate bandwidth from context and cache strategy: first calculate the byte size of the KV Cache, then judge whether it is sufficient;
- Estimate communication from the parallelism strategy: the higher the expert-parallel ratio, the more high-bandwidth interconnect is needed;
- Handle peripheral stages with general-purpose cloud capabilities: container platforms for elastic scaling, object storage for weights and data, logging services and monitoring alerts for observability. The model service itself stays decoupled from these capabilities, which makes migration easier.
6. Conclusion
Put architecture back inside hardware constraints, and the progress of so-called “next-generation models” is mostly a reallocation of budget among compute, memory access, and communication: trade sparsity for capacity, trade compression for context, trade low precision for throughput. Mastering this analytical framework helps you leave the right headroom in selection, deployment, and capacity planning more than chasing specific model names does.
