Modern Large Language Model Architectures and Parameter Scales: A Technical Overview
This article breaks down the architecture and scaling patterns of current large language models across overall size, attention mechanisms, mixture-of-experts design, numerical formats, and hardware constraints. It explains why Decoder-only stacks remain dominant, how techniques such as GQA, MQA, MLA, and long-context extensions reduce KV-cache and attention costs, and how sparse MoE models separate total parameter count from per-token activation. It also reviews precision choices in training and inference and the resulting demands on memory capacity, interconnect bandwidth, compute utilization, and cache hierarchy, giving inference planners a systematic basis for estimating cost and performance.
Since the Transformer was introduced, its basic structure has remained largely unchanged, but engineering changes around attention, sparsity, and numerical precision mean that today’s large language models differ substantially under a similar exterior. This article examines current mainstream models layer by layer—overall scale, attention mechanisms, mixture of experts, numerical formats, and hardware constraints—to build a systematic understanding of the relationship between architecture and compute.
1. Overall Architecture: Decoder-only Remains Dominant
Almost all current autoregressive generative large models use a Decoder-only structure, retaining only causal-masked self-attention stacks. A typical layer configuration is as follows:
- Layers: mid-sized models usually have 30–60 layers, while very large models can reach 60–90;
- Hidden dimension: the common range is 4096–8192, with some very large models extending beyond 10,000;
- Vocabulary size: often between 100k and 250k tokens, with multilingual and code-oriented scenarios tending toward larger vocabularies;
- Context length: early models used 4K–8K, but 128K or longer is now common, and some models use extrapolation techniques to support million-token contexts.
Parameter scale is commonly measured in B (billion) and T (trillion). Three tiers have emerged:
- Lightweight (1B–10B): aimed at edge and low-latency scenarios, with single-card deployment as a goal;
- Mid-range (30B–100B): balances capability and cost and is a major range for enterprise private deployment;
- Heavyweight (hundreds of B to T-scale): mostly sparsely activated mixture-of-experts models, with a large total parameter count but limited per-token activation.
2. Three Evolution Directions in Attention Mechanisms
2.1 KV Cache Compression
Multi-head attention (MHA) incurs a large KV-cache footprint in long-context settings. Mainstream approaches have shifted to grouped-query attention (GQA) or multi-query attention (MQA), in which multiple query heads share a small number of KV heads. This can compress the cache to a fraction of its original size with almost no accuracy loss. Going further, multi-head latent attention (MLA) uses low-rank projection to compress KV into latent vectors, significantly suppressing the growth of cache overhead with model scale.
2.2 Long-Context Extension
To support very long sequences, common methods include rotary position embedding (RoPE) and its extrapolation variants, sparse attention such as hybrid patterns with local windows and global anchors, and linear attention or hybrid state-space layers. Some models use a hybrid stack of “a few full-attention layers plus mostly sliding-window layers,” balancing quality and throughput at 128K-level context.
2.3 Normalization and Residual Design
Pre-Norm has largely replaced Post-Norm, and RMSNorm is used to reduce computational overhead. Some models add an extra normalization layer before the final output to stabilize training. SwiGLU is the standard activation function.
3. Mixture of Experts: From Stacking Parameters to Sparse Activation
MoE (Mixture of Experts) is the standard paradigm for current very large models. Its core idea is to replace the feed-forward layer with multiple expert FFNs and have a router select Top-K experts for each token, usually with K around 8, thereby achieving “large total parameters, small activated parameters.”
Typical configuration characteristics:
- The total number of experts ranges from 64 to 512, and some models distinguish shared experts from routed experts;
- The activation ratio is usually kept at 5%–20% of total parameters;
- When total parameters reach hundreds of B or even T-scale, per-token activation is often only tens of B.
This creates a key engineering tradeoff: memory occupancy is determined by total parameters, while compute is determined by activated parameters. MoE models therefore place much higher demands on memory capacity and expert parallelism (EP) communication bandwidth than dense models with the same activation scale. Training details such as load-balancing loss, expert capacity factor, and routing jitter also directly affect the uniformity of expert utilization.
4. Numerical Formats: Precision Layering for Training and Inference
- Training: mainstream practice uses BF16 mixed precision, together with FP32 master weights and gradient accumulation; some frontier training introduces FP8 forward/backward passes to further reduce memory and bandwidth pressure.
- Inference: weights are often quantized to INT8/INT4 or FP8, while activations retain higher precision as needed; KV-cache quantization is an important means of reducing long-context inference costs.
Precision choice is no longer only a matter of “saving memory.” It is a system-level design issue shaped by router numerical sensitivity and differences in gradient scale among experts.
5. Specific Hardware Constraints
Taken together, these architectural characteristics impose four core requirements on underlying hardware:
- Memory capacity: total parameter count determines weight residency requirements, and T-scale MoE must rely on multi-machine memory pooling;
- Interconnect bandwidth: expert parallelism and tensor parallelism (TP) bring high-frequency all-to-all and all-reduce communication, making interconnect topology an expansion bottleneck;
- Compute utilization: low-precision matrix units and sparse scheduling capability determine the actual throughput of activated parameters;
- Cache hierarchy: KV-cache compression strategies must match memory bandwidth to avoid attention becoming a memory-access bottleneck in long contexts.
6. Trend Summary
A horizontal comparison reveals a clear direction of convergence: sparse parameter scaling, compressed attention, low-precision numerical systems, and hybrid sequence modeling. Competition in the next generation of models will shift from raw parameter scale to “effective intelligence per unit of compute”—that is, how to maximize activation efficiency and context capability under limited memory and interconnect resources. For planners of inference services, understanding these architectural tradeoffs is a prerequisite for accurately estimating cost and performance.
