Modern LLM Architecture Evolution and Parameter Scale: A Technical Analysis
This article traces how large language model architectures have changed since the 2017 Transformer, and why. It covers the trade-offs among compute, memory access, and communication that shape dense and mixture-of-experts designs, attention and KV Cache compression, expert routing, training objectives, inference optimization, and multimodal extension.
1. Overview: A Decade of Structural Change and Design Constraints
Large language model architectures have evolved for nearly a decade since the Transformer was introduced in 2017. The designs look varied, but most changes respond to the same three hardware constraints: compute, memory access, and communication. Understanding how these three pull against each other is the key to understanding most model architecture decisions.
From a hardware perspective, LLM development has followed three main trends. Total parameters have grown from tens of billions to trillions, while active parameters have remained at the tens-of-billions level. Context windows have expanded from 128K to 1M tokens or more, yet KV Cache has been repeatedly compressed and optimized. The number of experts has grown from 256 to nearly 1,000, while routing granularity has become finer. These seemingly conflicting choices reflect designers balancing the limits of compute, memory bandwidth, and communication overhead.
2. Architecture Types and Parameter Scale Overview
2.1 Dense Transformers and Mixture-of-Experts
Today’s leading LLMs fall into two architectural families: dense Transformers and mixture-of-experts (MoE) models. A dense model activates all of its parameters for every token. Its computation path is simple, but parameter growth is limited by compute cost. An MoE model uses a gating router to activate only some expert networks for each token. It can hold more parameters while using less compute per token.
In terms of parameter scale, the dense versions of frontier models typically range from 70B to 400B parameters. MoE models usually have total parameters from several hundred billion to several trillion. MoE models often activate only 5% to 15% of their total parameters. This is the main reason they can hold very large parameter counts under limited compute.
2.2 The Relationship Among Total Parameters, Active Parameters, and KV Cache
Model designers face a central trade-off among three factors. Total parameters determine the model’s knowledge capacity and expressive ceiling. Active parameters determine the compute required for each forward pass. KV Cache determines the memory needed when processing long sequences. Together, these factors constrain offline training cost, online inference latency, and long-context capability.
The dominant strategy is to make total parameters large and active parameters small. MoE architectures push total parameters into the trillion range, while active parameters stay at a few tens of billions, which keeps inference compute manageable. At the same time, KV Cache compression techniques, such as grouped-query attention, multi-query attention, and sliding window attention, continue to improve. They support longer context windows without sacrificing too much memory efficiency.
3. Evolution of Attention Mechanisms and KV Cache Optimization
3.1 From Multi-Head Attention to Grouped-Query Attention
In standard multi-head attention (MHA), each attention head has its own Key and Value weight matrices. KV Cache therefore grows linearly with the number of heads, making it the main memory bottleneck for long-context inference. Multi-query attention (MQA) followed. It lets all heads share a single set of Key and Value projections, which reduces KV Cache to 1/(number of heads) of its original size. Grouped-query attention (GQA) is a middle option. It divides query heads into groups that share KV heads, balancing quality and efficiency.
Frontier models commonly use GQA. Typical configurations include 8 query heads sharing 2 KV groups, or 32 query heads sharing 8 KV groups. In long-context settings, this design can reduce memory use by more than 4x while keeping quality close to MHA.
3.2 Co-evolution of Context Extension and KV Cache Compression
Long-context capability is a key competitive factor for models. Context lengths have moved from 4K and 8K to 128K, 256K, and even 1M tokens, and this growth has outpaced compute growth. However, KV Cache memory grows linearly with sequence length, so supporting long contexts requires aggressive cache compression.
The industry combines several techniques. GQA reduces the number of KV heads. Sliding window attention limits how far each token can attend. Sparse attention skips less important token pairs. Linear attention replaces softmax attention to keep cache size constant. Some leading models also quantize KV Cache to 4-bit or 8-bit precision, which further halves memory use. Together, these techniques make 1M-token contexts feasible in practice. Quality loss still has to be offset through careful design during training.
4. Mixture-of-Experts Design and Routing Mechanisms
4.1 Expanding Expert Counts and Refining Routing Granularity
MoE architectures have developed along two parallel paths. The total number of experts keeps growing, from 8 or 32 in early designs to hundreds, and sometimes close to 1,000. Routing has also moved from layer-level selection to finer granularity, including per-token and per-sequence-block routing. Finer routing allocates experts more precisely, but it adds communication overhead and routing compute.
Current frontier configurations often combine fine-grained experts with shared experts. Shared experts handle general knowledge, while fine-grained experts focus on domain-specific knowledge. This design preserves model capacity and reduces routing conflicts and uneven expert load.
4.2 Load Balancing and Communication Optimization in Practice
The main challenge for MoE models in distributed training and inference is communication. Each token’s representation must be sent to the device that hosts its selected experts, processed there, and then gathered back. With hundreds or nearly a thousand experts, cross-device communication can account for more than 50% of overall latency.
Common optimizations include expert parallelism, which places different experts on different devices. They also include local-first routing, which prefers experts on the same device. Hierarchical routing first selects a group of devices coarsely, then selects specific experts. Asynchronous communication that overlaps with computation is another option. The shared goal is to maximize overlap between computation and communication and reduce routing wait time.
5. Evolution of Training Objectives and Architectural Adaptation
5.1 From Pure Autoregressive Training to Multi-Task Joint Training
Modern LLM training has expanded from a single autoregressive language modeling objective to joint optimization across multiple tasks. General capability training, such as text generation, code synthesis, and mathematical reasoning, runs alongside targeted enhancements, such as instruction following, tool use, and multimodal understanding. These tasks share one backbone network, but they differ in output heads and training strategies.
This trend shapes architecture in two ways. The backbone needs stronger task generality. Task-specific abilities are added through lightweight adaptation modules, such as LoRA and adapters, rather than through large structural changes. This “general backbone plus lightweight adaptation” pattern has become the mainstream approach.
5.2 Deep Coupling Between Long Context and Architecture Design
Long-context support is not only a question for the attention mechanism. It requires coordinated engineering across data, architecture, and training. Training data must include enough long documents. The architecture must support position encoding extrapolation, such as frequency adjustments in RoPE. Training must extend context progressively, starting short and moving to longer lengths step by step.
Frontier models commonly pretrain with 8K to 32K contexts. They then extend to 128K or more through several stages of long-context continued pretraining. Each stage requires adjusting position encoding, switching KV Cache compression strategies, and rescheduling the learning rate. For this reason, the architecture should leave enough headroom for long context from the start.
6. How Inference Optimization and Deployment Constraints Shape Architecture
6.1 Architectural Differences Between Prefill and Decode Stages
Generative inference has two stages. Prefill processes all input tokens in parallel and is compute-bound. Decode generates one token at a time and is memory-access-bound. These differences create very different architectural requirements and are a major driver of model design.
Prefill benefits from larger matrix multiplication batches, so it can use high-compute, low-latency configurations. The main bottleneck in decode is KV Cache memory bandwidth. Architectures therefore try to shrink KV Cache as much as possible, through GQA and KV quantization, and to improve memory efficiency, through techniques such as contiguous layouts and memory pool management.
6.2 Architectural Requirements of Speculative Decoding and Early Exit
To reduce decoding latency, the industry widely uses speculative decoding. A small model first drafts several candidate tokens, and a large model verifies them in parallel. This requires the large model’s intermediate representations to align with those of the small model. Architecture design must therefore account for consistency across layer representations and make them easy to inspect.
Early exit is another approach. It places classification heads in shallow layers so that simple tokens can be output early, without running through all layers. This requires training deeper classification heads with inter-layer consistency losses, which adds its own architectural requirements.
7. Future Trends in Architecture Design and Hardware Co-design
7.1 Extending Architectures from Single Modality to Multimodal
Multimodal LLMs are becoming a clear direction. Joint modeling of text, images, audio, and video requires architectural changes. Current and future research focuses on how to fuse vision encoders with the text backbone, design cross-modal attention, and handle modality-specific position encoding.
The common pattern is to keep the text backbone stable and achieve modality alignment through peripheral adaptation modules, such as projection layers, Q-Formers, and cross-modal attention. This moves architectural complexity from the backbone to the periphery and lowers the marginal cost of adding modalities.
7.2 Pre-adapting Architectures for Next-Generation Hardware
Model architecture design is shifting from “define the structure first, then optimize for hardware” to co-design of hardware and architecture. Trends such as sparse activation, low-precision compute, heterogeneous memory, and optical interconnects are shaping model structure in return. For example, finer-grained expert routing responds to the high-parallel communication capabilities of newer accelerators. Low-bit KV Cache requires quantization-aware training from the start, rather than simple post-processing at inference time.
For infrastructure planners, the practical value of understanding these trends is clear. They should reserve compute and storage headroom, choose scalable distributed architectures, and design hardware that supports sparse computation and low-precision arithmetic. Real gains will come only when architecture, systems, and hardware are designed together.
Summary
Modern LLM architecture design is a systems engineering problem. The goal is to find the best solution under three constraints: compute, memory access, and communication. Choices between dense and MoE architectures, compression of attention mechanisms, and trade-offs in expert routing granularity all connect with multimodal support, long context, and inference optimization to form the current design landscape. Understanding the underlying logic of these changes is more useful over time than memorizing the parameter settings of any specific model. It gives readers a framework for evaluating new developments and a basis for model selection and infrastructure planning that carries across generations of models.
