Large Language Model Architectures and Parameter Scale Explained
This article breaks down modern large language model design across two core dimensions: architecture and parameter scale. It explains how attention mechanisms, feed-forward layers, positional encoding, and normalization choices shape information flow, and how total parameters differ from activated parameters in sparse models. It also maps the common four-tier model family strategy, summarizes structural patterns shared by mainstream flagship series, and covers practical guidance for memory estimation, KV cache optimization, parallelism for MoE models, and evaluation. Readers will gain a reusable framework for assessing any new model's positioning, cost, and use cases.
1. Introduction: Why Architecture and Parameters Are the Two Coordinates
More than a decade has passed since the Transformer architecture was introduced, and its structural evolution has never stopped. For developers and enterprise technology decision-makers, what matters is not a checklist of specific model names, but two main threads: architectural paradigms (how information flows within and across layers) and parameter scale (how capacity is allocated and how much of it is actually activated). This article takes a neutral perspective and follows the order of architecture, scale, product family tiers, and engineering implementation to help readers build a reusable analytical framework.
One common misconception needs to be clarified upfront: total parameters are not the same as the compute used in a single forward pass. The sparse approach allows “large capacity” and “low inference cost” to hold at the same time, and this has been the most important dividing line in architectural evolution in recent years.
2. The Architecture Dimension: What Modern LLMs Are Made Of
2.1 The Evolution of Attention
- Multi-Head Self-Attention (MHA): The standard baseline, with strong expressive power, but the KV cache grows linearly with context during inference.
- Grouped-Query Attention (GQA) / Multi-Query Attention (MQA): Multiple query heads share a set of key-value heads, significantly reducing cache usage. This is a common trade-off in current mid- to large-scale models.
- Latent compression attention: Compresses keys and values into a low-dimensional latent space, carrying longer contexts with a smaller cache. This is an efficiency-oriented direction that has emerged in recent years.
2.2 The Feed-Forward Layer: Dense vs. Sparse
A dense FFN activates all parameters for every token; Mixture of Experts (MoE) uses a gating network to select a few experts for each token, with a common configuration of “dozens to hundreds of experts, with 1 to 8 activated per token.” The core engineering challenge is load balancing: gating collapse can overload a few experts while leaving the rest idle.
# Illustration: a minimal implementation of token-level Top-K gatingimport torchdef topk_gate(x, router, k=2):logits = router(x) # [tokens, num_experts]topk_val, topk_idx = logits.topk(k, dim=-1)weights = torch.softmax(topk_val, dim=-1)return topk_idx, weights # dispatch to experts by idx
2.3 Positional Encoding and Context Extension
The shift from absolute positional encoding to Rotary Position Embedding (RoPE) has become mainstream. Combined with interpolation, extrapolation, and chunking strategies, it has extended training length from a few thousand to hundreds of thousands or even million-level tokens. The key to long context is not just “fitting it in,” but recall of mid-context information and the linear pressure on memory and bandwidth.
2.4 Normalization, Residuals, and Activation Functions
Pre-Norm ensures stable training in deep networks; RMSNorm is more compute-efficient because it omits mean centering; gated activations such as SwiGLU typically outperform traditional ReLU/GELU at the same parameter count. These seemingly minor choices directly determine whether a large model can converge stably at the hundreds-of-billions parameter scale.
3. The Scale Dimension: Parameters, Activated Parameters, and Family Tiers
The industry commonly adopts a “family” strategy to cover different scenarios, which can be abstracted into four tiers:
| Tier | Typical Total Parameter Range | Activation Characteristics | Use Cases |
|---|---|---|---|
| On-device / lightweight | 0.5B–8B | Dense, fully activated | Local inference, low latency |
| General-purpose mainstream | 10B–70B | Dense or lightly sparse | General business use, fine-tuning friendly |
| Flagship sparse | 100B–1T+ | 10B–40B activated per token | Complex reasoning, long context |
| Multimodal / ultra-long context | Mixed | Text + vision encoder | Image-text understanding, document-level tasks |
The key point is: judge the capacity ceiling by total parameters, and judge inference cost by activated parameters. A sparse model with 600B total parameters and 20B activated can have per-token compute overhead close to a 20B dense model, but memory must hold all expert weights.
4. Structural Commonalities of Mainstream Series (Neutral Summary)
Although flagship series from different vendors vary in naming, their structural choices have converged significantly:
- Sparsification has become standard for flagships: large total parameters plus small activated parameters, balancing quality and throughput.
- Attention is simplified: GQA or latent-space compression to ease the long-context cache bottleneck.
- Training precision and stability are engineered: low-precision training combined with finer-grained quantization and scaling strategies.
- Multimodality is assembled as “encoder + projection layer + backbone”, rather than rewriting the backbone.
- Capability slicing within the same family: flagship, general-purpose, lightweight, and code/reasoning-specialized models coexist, sharing a tokenizer and alignment methodology.
5. Engineering Implementation: How to Choose and Deploy
- Memory estimation: weight memory ≈ parameter count × bytes per parameter (about 2 bytes for FP16, about 1 byte for INT8), plus KV cache and activation overhead.
- KV cache optimization: prioritize architectures with GQA or compressed attention; on the inference side, combine paged caching with continuous batching.
- Parallelism strategy for sparse models: expert parallelism combined with data parallelism fits MoE better, and communication overhead needs focused stress testing.
- Elastic resources: training and inference can each build elastic pipelines on general cloud capabilities such as container platforms, object storage, message queues, logging services, and monitoring and alerting.
- Unified evaluation criteria: only by fixing context length, concurrency, and input distribution can the real throughput of different architectures be compared horizontally.
6. Conclusion
Architecture determines “how information flows,” parameters determine “how large the capacity is,” and activated parameters plus engineering implementation determine “whether you can afford it.” With this three-dimensional perspective, when facing any newly released model series, you can quickly judge its positioning, cost, and applicability without relying on a single benchmark score.
