Modern Large Language Model Architectures and Parameter Scaling Explained

    This article explains the architecture of modern large language models, from the continued dominance of Transformer-based designs to the rise of Mixture-of-Experts models. It clarifies the differences between total and active parameters, examines attention and inference optimizations, and provides a practical framework for evaluating model size, deployment requirements, cost, and real-world capabilities.

    1. Introduction: From “More Parameters” to “Better Architecture”

    Over the past several years, the focus of large language model development has shifted significantly. In the early stages, parameter count was widely viewed as the primary driver of model capability, and “bigger is better” became a common assumption. However, as training costs, inference latency, and deployment requirements have become more important constraints, increasingly refined architectural design has begun to replace simple parameter scaling as a major direction of progress.

    Understanding model architecture and parameter scale helps developers assess capability boundaries and make better decisions about private deployment, inference optimization, and cost control. This article starts with the fundamental architecture of modern LLMs, then examines mainstream structural designs, parameter trade-offs, and practical model selection considerations.

    2. The Foundation: Transformer Remains the Dominant Architecture

    Although many new architectures continue to emerge, the Transformer remains the foundation of most large language models. A typical modern decoder-only model consists of the following core components:

    1. Token embedding layer: Maps tokens to high-dimensional vectors. Some models tie the input embedding matrix to the output projection matrix to reduce the total parameter count.
    2. Stacked Transformer blocks: Each layer contains a multi-head self-attention module and a feed-forward network. The number of layers can range from several dozen to more than one hundred.
    3. Normalization layers: Modern models commonly use RMSNorm instead of traditional LayerNorm. They also typically adopt a Pre-Norm design, placing normalization before each submodule to improve training stability in deep networks.
    4. Output layer: Projects hidden states back into the vocabulary space, often using techniques such as logit soft-capping to control the output distribution.

    Standard multi-head attention has also been enhanced or replaced by several variants. Grouped-query attention (GQA) allows multiple query heads to share a smaller number of key-value heads, significantly reducing KV-cache memory usage during inference. Multi-head latent attention (MLA) goes further by compressing key-value representations into a lower-dimensional latent space, offering particular benefits for long-context workloads. These changes generally have limited impact on model capability while potentially reducing inference memory requirements by an order of magnitude.

    For positional encoding, rotary positional embeddings (RoPE) have become a de facto standard. Various extrapolation and interpolation techniques have been developed on top of RoPE, allowing models to process context windows considerably longer than their original training length.

    3. Mixture-of-Experts: Separating Parameter Scale from Compute Cost

    One of the most significant architectural trends in leading models is the widespread adoption of Mixture-of-Experts (MoE) architectures. The core idea is to replace the conventional feed-forward network with multiple “expert” sub-networks. A router dynamically selects a small number of experts for each token.

    This design creates an important separation between total parameter count and per-token computation. A model with hundreds of billions or even trillions of total parameters may activate only a fraction of them—sometimes roughly one-tenth—for each token. A simplified routing process can be represented as follows:

    1. # Simplified MoE feed-forward layer
    2. def moe_forward(x, experts, router, top_k=2):
    3. scores = router(x) # [batch, seq, num_experts]
    4. topk_idx = scores.topk(top_k).indices
    5. out = 0
    6. for i in topk_idx:
    7. out += experts[i](x) # Activate only the selected experts
    8. return out / top_k

    MoE is not a free optimization, however. It introduces additional challenges such as load balancing, expert collapse, and training instability. In practice, implementations often use auxiliary losses, shared experts, and fine-grained expert partitioning to address these issues.

    Although MoE can reduce computation, all expert parameters still need to be stored in memory. This creates higher requirements for deployment hardware, especially when the model is hosted on local infrastructure.

    4. Parameter Scale: How to Read a Model Specification

    When comparing parameter counts, several concepts must be clearly distinguished:

    • Total parameters: The number of all parameters in the model. This reflects the model’s potential knowledge capacity and contributes to its overall memory requirements.
    • Active parameters: The number of parameters involved in the forward pass for each token. This more directly affects inference compute and generation speed.
    • Context length: The maximum number of tokens the model can process in a single request. This affects its suitability for long documents, code repositories, and other long-context workloads.

    Based on commonly seen model sizes, the current landscape can be broadly divided into three tiers:

    • Lightweight models: Models with several billion to more than ten billion parameters, generally intended for on-device use and low-cost inference.
    • Mainstream models: MoE models with hundreds of billions of total parameters and tens of billions of active parameters, offering a balance between capability and cost.
    • Flagship models: Models with trillion-scale total parameter counts, designed to push the upper limits of capability.

    Parameter precision also has a direct effect on deployment requirements. With FP16 or BF16 storage, a 7B model requires approximately 14 GB of memory. With 4-bit quantization, it can be reduced to around 4 GB. This reduction is one of the key reasons local and edge deployment can be practical.

    5. Architecture-Level Optimizations for Inference Efficiency

    In addition to the model architecture itself, modern LLM inference systems use several supporting techniques:

    1. KV-cache compression: Shared or latent key-value representations reduce peak memory usage during long-sequence generation.
    2. Speculative decoding: A smaller model drafts candidate tokens while a larger model verifies them, improving throughput while preserving the larger model’s output behavior.
    3. Sparse activation combined with quantization: The sparsity of MoE models can be combined with low-bit quantization to further reduce the cost of processing each token.
    4. Multi-token prediction: During training, the model predicts multiple future tokens at once. Some implementations can use this capability to accelerate inference.

    Together, these techniques support a broader trend: model parameter counts continue to grow, while the inference cost per unit of capability continues to decline.

    6. Model Selection from a Practical Perspective

    When evaluating models with different architectures, developers can use the following framework:

    • Workload fit: Conversational applications often prioritize time to first token. Batch processing emphasizes throughput, while agent workloads place greater importance on long-context stability and reliable tool use.
    • Deployment constraints: Determine available memory and the number of accelerators first, then work backward to identify feasible parameter scales and quantization levels.
    • Cost structure: MoE models may offer lower API costs than dense models with comparable capabilities. For private deployment, however, the full set of expert parameters still needs to remain resident in memory.
    • Capability validation: Do not rely solely on public benchmarks. Build evaluation sets from real business data to test instruction following, code generation, long-context understanding, and other capabilities that matter to the target application.

    In practice, a useful strategy is to validate quickly with a small model and use a larger model to establish the upper capability limit. Start with a lightweight model to build and test the application workflow, then move to a larger model when necessary. Prompt engineering and retrieval-augmented generation can also help extract more value from smaller models, reducing the risk of paying for unnecessary parameter scale too early.

    7. Conclusion

    The evolution of modern LLM architectures is fundamentally an effort to find a better balance among capability, cost, and latency. Dense architectures are gradually giving way to Mixture-of-Experts designs, while attention mechanisms continue to evolve for long-context processing. Parameter scale is no longer represented by a single number; it is better understood through a combination of total parameters, active parameters, and context length.

    For developers, understanding these architectural details is essential for making rational technology choices. As sparsity, quantization, and inference scheduling continue to mature, more models are likely to deliver stronger capabilities at lower cost.