Modern LLM Architecture and Parameter Scaling: A Deep Dive into Core Design Choices

    This article provides a technical overview of modern large language model (LLM) architecture and parameter scaling strategies. It explains the fundamental role of the Transformer decoder-only baseline, the widespread adoption of sparse Mixture-of-Experts (MoE) for balancing capacity and compute, attention mechanism variants for long-context support, and the distinction between total parameters and activated parameters. The article also covers multi-stage training pipelines, inference optimization techniques, and practical model selection criteria for developers and enterprises, offering a structured perspective on how model design and parameter organization drive real-world performance.

    1. Technical Evolution: From Baseline Architectures to Scaling Exploration

    Large language models (LLMs) have undergone rapid iteration in recent years. The scaling law, based on the Transformer architecture, has driven parameter counts from hundreds of millions to trillions. In parallel, researchers have explored ways to overcome the computational efficiency bottlenecks of traditional dense architectures. Current mainstream models no longer simply chase “bigger” – instead, they aim for a finer balance between architectural design, data composition, training strategy, and inference optimization.

    To understand the overall landscape of modern LLMs, two core dimensions are essential: the internal structure (how network layers are stacked, how attention is designed, and how feed-forward networks are expanded), and the organization of parameter scale (how total parameters are allocated, the relationship between activated and total parameters, and how sparsity affects actual compute cost).

    2. Mainstream Architecture Paradigms and Core Components

    2.1 Transformer Remains the Foundation

    Whether from open-source communities or industry research labs, most modern LLMs are built on the decoder-only Transformer architecture. Key characteristics include:

    • Autoregressive generation: The model predicts the next token sequentially, using causal attention masks to ensure each position only sees historical information.
    • Multi-head attention: Input is split into multiple subspaces for parallel attention computation, improving the model’s ability to model relationships across positions.
    • Residual connections and layer normalization: These stabilize gradient flow in deep networks; the placement of normalization (Pre-Norm vs. Post-Norm) affects training stability.

    In practice, many models adopt rotary position embeddings (RoPE) or improved attention variants (e.g., grouped query attention, GQA) to address memory pressure and inference speed challenges in long-sequence processing.

    2.2 Widespread Adoption of Sparse Mixture-of-Experts (MoE)

    As parameter counts reach hundreds of billions or even trillions, traditional dense models require activating all parameters in every forward pass, leading to extremely high compute costs. MoE has emerged as a mainstream approach to balance model capacity with computational overhead.

    Core MoE concept: Replace the feed-forward network layer in the Transformer with multiple parallel expert networks, and use a router mechanism to dynamically select a subset of experts for each token. Common practices:

    • Each layer contains several experts (e.g., 8, 16, or 64).
    • Each token activates only Top-1 or Top-2 experts, meaning only a fraction of the total parameters are used per computation.
    • Total parameter count is very large, but activated parameters per inference are significantly smaller.

    The main benefit is that large model capacity can be leveraged during inference while keeping compute cost relatively low. However, engineering challenges such as load balancing, expert-parallel communication overhead, and routing degeneration must be addressed, which leads to differences in implementation across teams.

    2.3 Attention Variants and Long-Context Adaptation

    To support longer context windows (from 4K to 128K or more), modern models incorporate several attention improvements:

    • Grouped query attention (GQA): Reduces the number of key-value heads while preserving expressive power, significantly lowering memory usage for long contexts.
    • Sliding window attention: Gives higher weight to local information, combined with global tokens for sparse attention computation.
    • Linear/approximate attention: Replaces Softmax with kernel functions or low-rank decomposition to reduce quadratic complexity for long sequences.

    These techniques do not replace the Transformer backbone but are modular refinements of the attention component, enabling stable performance in scenarios such as long documents, multi-turn dialogues, and repository-scale code understanding.

    3. Refined Classification and Configuration Logic of Parameter Scale

    3.1 Distinction Between Total Parameters and Activated Parameters

    When discussing parameter scale, two key concepts need clarity:

    • Total parameters: The number of weights stored in the model file, representing model capacity.
    • Activated parameters: The number of parameters actually used in a single forward pass, directly determining per-inference compute cost.

    In dense models, these two are equal. In MoE models, they can differ by an order of magnitude. For example, a trillion-parameter MoE model might activate only tens or hundreds of billions of parameters per token. The essence of this design is to use sparse activation to store more knowledge without proportionally increasing compute.

    3.2 Design Orientation for Different Parameter Tiers

    Current industry model sizes generally fall into several tiers, each with typical use cases:

    Parameter Range Common Architecture Typical Application Scenarios
    1B–10B Dense On-device deployment, low-latency tasks, simple tasks
    10B–50B Dense / light MoE General conversation, medium-complexity agent tasks
    50B–200B MoE (activated parameters ~10B–30B) High-intelligence scenarios, complex reasoning, long context
    200B+ MoE (multiple experts + hierarchical routing) Flagship models with the strongest overall capability

    Notably, when total parameters are similar, MoE models often outperform dense models on many benchmarks, especially knowledge- and reasoning-intensive tasks. However, they impose higher demands on memory bandwidth and parallelization strategies during inference.

    3.3 Example Configuration Analysis of Flagship Models

    Using representative model families (referred to generically to avoid brand specificity):

    • A flagship open-source family: Uses MoE architecture with total parameters in the hundreds of billions, but activated parameters controlled to about one-tenth of the total. These models feature multiple expert groups and dedicated attention-expert parallel strategies in certain layers, supporting context lengths above 128K.
    • A closed-source top-tier family: While not all architecture details are public, inference speed and benchmark performance suggest a multi-level MoE with hybrid attention parallelism. The context window exceeds 200K.
    • A lightweight family: Total parameters under 10B, dense structure, emphasizing low deployment thresholds and high inference speed, suitable for enterprise private deployment and edge inference.

    Performance differences among these models stem not only from parameter count but also from training data diversity, quality corpus ratios, alignment strategies, and multi-stage training (pre-training, long-context continuation, and post-training alignment).

    4. Training Strategies and Post-Training Techniques: Competitiveness Beyond Parameters

    4.1 Multi-Stage Training Pipeline

    Modern LLM training typically involves several stages:

    1. Large-scale pre-training: Self-supervised learning on trillions of tokens of general corpus, establishing the model’s foundational knowledge and language ability.
    2. Long-context continuation: Incremental pre-training with longer sequence data to activate the model’s length extrapolation capability.
    3. Supervised fine-tuning (SFT): Training on human-annotated instruction-response pairs to teach the model to follow instructions and formatting requirements.
    4. Preference alignment: Using RLHF or DPO to align model outputs with human preferences, improving helpfulness and safety.

    4.2 Inference Optimization Techniques

    Beyond the model’s parameter structure, inference-stage optimization is equally important for real-world deployment:

    • Quantization compression: Reducing weights from FP16 to INT8 or INT4 to decrease memory usage, especially effective for dense models.
    • KV cache optimization: Paging or pruning cached tensors in long-context scenarios to reduce peak memory usage.
    • Speculative decoding: Using a small draft model to propose candidate token sequences, while the large model validates them in parallel, accelerating generation.

    5. Practical Dimension for Model Selection

    Developers and enterprises face many model choices. How can they select the most cost-effective solution based on their needs? Consider the following dimensions:

    1. Inference cost and throughput: Activated parameter size directly determines per-token inference cost.
    2. Context length support: Whether it fits target scenarios (e.g., long document parsing, code repository analysis, multimodal document processing).
    3. Customizability and deployment flexibility: Open-source weights vs. proprietary APIs have direct implications for data compliance and private deployment.
    4. Ecosystem and toolchain maturity: Availability of fine-tuning frameworks, quantization tools, and deployment templates.
    5. Vertical capability focus: Some model families are specifically optimized for code generation, mathematical reasoning, or language understanding – targeted benchmarks are necessary.

    6. Summary and Outlook

    The structural design of modern LLMs is shifting from a “single, large, and all-encompassing” approach toward a refined path that combines sparse and dense architectures, separating total parameters from activated parameters. The maturation of MoE makes it possible to store more knowledge under limited compute budgets, while continued attention mechanism improvements pave the way for extremely long contexts.

    Future trends to watch include more efficient sparse routing algorithms, cross-layer parameter sharing, more expressive positional encoding schemes, and inference strategies that leverage test-time compute. For technical decision-makers, understanding the internal architecture and parameter scale logic is far more practical than chasing the raw parameter count—because what truly determines application effectiveness is the alignment between compute budgets, scenario needs, and model characteristics.