Modern LLM Architectures Explained: Transformer Structure and Parameter Scale
A practical guide to the shared architecture of modern large language models. Learn why Decoder-only Transformers dominate, how RMSNorm, SwiGLU, RoPE, and GQA became de facto standards, and how parameter counts range from lightweight dense models to trillion-parameter Mixture-of-Experts systems.
Understanding Modern LLM Architectures and Parameter Scale
Why Model Structure Matters
Large language models have been iterating at a rapid pace in recent years, with new models and version numbers appearing constantly. For developers and technical decision-makers, cutting through the naming noise comes down to two fundamental questions: What do these models share in terms of architecture? And what parameter scale do they typically operate at? Answering these two questions builds a unified mental framework for evaluating any new release.
It’s worth noting that today’s mainstream commercial and open-source LLMs—despite coming from different teams and targeting different use cases—have converged to a remarkable degree at the architectural level. Rather than cataloging specific models, this article takes a general technical perspective and summarizes the structural paradigms and parameter-scale patterns shared by modern LLMs.
The Structural Foundation: Decoder-Only Transformers
From the Original Transformer to Decoder-Only
Modern LLMs are almost entirely built on the Transformer architecture. The original Transformer used an encoder-decoder design for sequence-to-sequence tasks like machine translation. Today’s mainstream generative models, however, almost universally adopt the Decoder-only architecture combined with causal attention for autoregressive generation: the model predicts the next token one at a time, and each position can only attend to content that precedes it.
Why this choice? The Decoder-only setup offers a unified training objective (next-token prediction), scales well, is simple to implement, and—with instruction fine-tuning at sufficient scale—can handle understanding tasks without a separate encoder.
How Key Components Have Evolved
While the skeleton is consistent, the industry has converged on a set of de facto standards for individual components:
- Normalization: RMSNorm has largely replaced the original LayerNorm, and its position has moved from post-layer (Post-Norm) to pre-layer (Pre-Norm), enabling more stable training of deep networks.
- Activation functions: Gated linear unit variants such as SwiGLU are now widespread, offering better expressiveness than traditional ReLU/GELU at the same parameter count.
- Positional encoding: Rotary Position Embedding (RoPE) is the mainstream approach. It injects relative position information into attention computation as rotations and naturally supports length extrapolation. Combined with techniques like position interpolation and NTK scaling, context windows can be extended from a few thousand tokens to hundreds of thousands or even millions.
- Attention optimization: To reduce key-value cache overhead in long-context scenarios, Grouped-Query Attention (GQA) and Multi-Query Attention (MQA) are widely adopted, letting multiple query heads share key/value heads to significantly cut inference memory usage. Some teams are also exploring approaches like Multi-head Latent Attention to compress the cache further.
A typical single layer of a modern LLM looks like this:
class DecoderLayer(nn.Module):def forward(self, x, kv_cache=None):# Pre-normalization + grouped-query attention (with RoPE)x = x + self.attention(self.rms_norm(x), kv_cache)# Pre-normalization + SwiGLU feed-forward network (or MoE)x = x + self.mlp(self.rms_norm(x))return x
Two Approaches to Parameter Organization: Dense vs. Mixture-of-Experts
To understand parameter scale, you first need to distinguish between two architectural routes.
Dense Models
In a dense model, every forward pass activates all parameters. A 7B dense model, for example, runs every token through all 7 billion parameters. The advantages are predictable behavior and mature training and deployment pipelines; the drawback is that compute cost grows linearly with parameter count.
Mixture-of-Experts (MoE)
The Mixture-of-Experts architecture replaces the feed-forward network with multiple “expert” sub-networks and adds a routing mechanism so each token activates only a small subset of experts. This introduces two distinct concepts:
- Total parameters: all parameters the model contains—potentially hundreds of billions or even trillions.
- Active parameters: the parameters actually involved in computation per forward pass, typically only 5%–15% of the total.
The core value of MoE is achieving large model capacity at relatively low inference cost. Among today’s leading models, MoE has become the dominant approach to scaling, with typical configurations ranging from dozens to hundreds of experts and several to a dozen or so activated per token. The trade-offs are increased training complexity (load balancing, routing stability) and the need for memory to hold all parameters.
Typical Parameter Scale Tiers
Based on publicly available information, current LLM parameter scales fall roughly into several tiers:
- Lightweight (1B–10B): Mostly dense architectures, suited to on-device deployment, edge inference, or as base models for domain-specific fine-tuning. Low cost and low latency are the main advantages.
- Mid-range (10B–100B): A mix of dense and MoE, this is the workhorse range for many enterprise private deployments, balancing capability against cost.
- Flagship (100B–1T+ total parameters): Predominantly MoE, with active parameters usually in the tens of billions. These models define the ceiling of general capability and are typically used for complex reasoning, agent orchestration, and other demanding tasks.
- Efficient variants: Most teams also ship streamlined versions optimized for high throughput and low latency, using distillation, pruning, or more aggressive expert sparsity to sharply reduce inference cost while preserving core capabilities.
One important caveat: parameter count does not equal capability. Training data quality and volume, training methods (such as reinforcement learning post-training), context length, and multimodal abilities all significantly affect real-world performance. At equal parameter counts, models with better data recipes often perform better.
Practical Guidance for Model Selection and Evaluation
Based on this architectural understanding, here is a general evaluation framework:
- Check the architecture type: Dense or MoE? Focus on active parameters rather than total parameters—it’s a closer proxy for real inference cost.
- Check context capability: The positional encoding scheme and attention optimizations determine both the cost and the upper limit of long-text handling.
- Check deployment constraints: Memory capacity determines whether local deployment is feasible. MoE models must hold all parameters in memory but compute faster; for dense models, memory and compute grow together.
- Check ecosystem and tooling: Inference framework support, quantization options (e.g., INT8/INT4), and the maturity of fine-tuning tools often matter more for time-to-production than raw parameter counts.
- Validate with your own benchmarks: Build evaluation sets on your own business data rather than relying solely on public leaderboards.
For teams that want to build AI applications quickly without managing their own infrastructure, cloud-based model serving and fine-tuning services are also an option. Major cloud platforms offer managed LLM services covering model invocation, fine-tuning, evaluation, and deployment, helping teams go from selection to production with a lower barrier to entry.
Conclusion
Despite the flood of names and rapid release cycles, modern LLMs have converged on a highly consistent structure: a Decoder-only Transformer skeleton with RMSNorm, SwiGLU, RoPE, and GQA as de facto standard components, and two routes for parameter organization—dense and Mixture-of-Experts. Parameter scales now range from billion-parameter lightweight models to flagship MoE systems with trillions of total parameters. With this framework in hand, developers can quickly position any newly released model on the technical landscape and make informed selection and architecture decisions.
