Understanding Modern Large Language Model Architectures and Parameter Scales

    This guide explains the core architecture of modern large language models, including decoder-only Transformers, attention variants, dense and Mixture-of-Experts feed-forward networks, parameter-size tiers, memory requirements, and deployment trade-offs. It also outlines industry trends and practical criteria for selecting and deploying models.

    Understanding Modern Large Language Model Architectures and Parameter Scales

    Introduction

    Large language models (LLMs) have evolved rapidly in recent years. Research teams have released increasingly diverse model families, often offering multiple versions that range from base and enhanced editions to flagship and lightweight, high-speed variants labeled Flash, Pro, or Max.

    For developers, model names are less important than the underlying technology. What architecture does a model use? How many parameters does it contain? What do those differences mean for inference cost, context length, and deployment? This article provides a structured framework for answering these questions.

    1. Mainstream Architectures: Transformers and Key Variants

    1.1 Decoder-Only Transformers Are the Industry Standard

    Most leading LLMs use a decoder-only Transformer architecture and generate text autoregressively, one token at a time. Compared with the encoder-decoder architectures used by many earlier systems, decoder-only models are simpler to scale during large-scale pretraining and are naturally aligned with the next-token prediction objective.

    A typical decoder layer contains:

    • A Multi-Head Attention (MHA) sublayer
    • A Feed-Forward Network (FFN) sublayer
    • Residual connections and normalization around each sublayer

    1.2 The Evolution of Attention Mechanisms

    Attention is one of the areas where modern models differ most. Common approaches include:

    • MHA (Multi-Head Attention): The classic design, in which the number of Key/Value heads matches the number of Query heads. It generally requires a large KV cache during inference.
    • GQA (Grouped-Query Attention): Multiple Query heads share a group of Key/Value heads, significantly reducing KV-cache memory usage. It is now common in both mid-range and flagship models.
    • MLA (Multi-Head Latent Attention): Key and Value information is compressed into lower-dimensional latent vectors before being cached. This further reduces cache size and is well suited to long-context inference. It has been adopted by some recent long-context models.
    • Sliding-window and sparse attention: These methods limit the attention range to reduce the computational cost of long sequences. They are often combined with global-attention layers to preserve long-document capabilities while controlling inference overhead.

    1.3 Feed-Forward Networks: From Dense MLPs to Mixture of Experts

    The FFN is one of the main sources of model parameters. Two major designs are currently used.

    Dense FFN: All parameters participate in computation for every token. This design is relatively simple and stable to train, making it suitable for small and medium-sized models.

    Mixture of Experts (MoE): The FFN is divided into many expert sub-networks. A routing network activates only a small number of experts for each token, commonly using Top-2 or Top-8 routing.

    The main benefits of MoE include:

    • The total parameter count can reach hundreds of billions or even more than one trillion, while only about 5% to 15% of the parameters are activated for an individual inference step.
    • At a similar inference-compute budget, MoE models can provide greater knowledge capacity and stronger task performance than dense models.
    • The trade-offs include the need to store all parameters in memory, as well as additional training complexity related to routing balance and expert utilization.

    A clear trend in recent flagship models is the use of fine-grained MoE with shared experts. Experts are divided into smaller and more numerous units, while several shared experts are activated for every token. This design aims to combine general-purpose knowledge with specialized capabilities.

    1.4 Other Common Components

    • Normalization: RMSNorm is widely used, often with a Pre-Norm design to improve training stability in deep networks.
    • Activation functions: SwiGLU has become a common choice, replacing the GELU functions used in many earlier models.
    • Positional encoding: RoPE (Rotary Position Embedding) and its extensions are mainstream approaches and support extrapolation to longer contexts.
    • Depth and width: Many flagship models have more than 60 to 100 layers, with hidden dimensions typically ranging from 5,120 to 16,384.

    2. Parameter-Scale Distribution

    2.1 Common Parameter Tiers

    Leaving specific products aside, models can generally be grouped into the following parameter tiers:

    Tier Approximate Parameter Scale Typical Uses
    Lightweight 1B–7B On-device applications, edge inference, and embedded systems
    Small to mid-sized 7B–14B Private deployment and fine-tuning for specialized domains
    Mid to large-sized 30B–70B Enterprise applications and stronger reasoning capabilities
    Dense flagship 100B and above Complex reasoning, code generation, and multimodal foundation models
    MoE flagship Several hundred billion to more than one trillion total parameters, with 20B–60B activated High-end general capabilities and long-context workloads

    Two principles are especially important:

    1. Total parameters and active parameters must be distinguished in MoE models. An MoE model with more than one trillion total parameters may require roughly the same per-token computation as a dense model with tens of billions of parameters. Its inference cost may therefore be lower than the total parameter count suggests. However, memory capacity must still accommodate the full parameter set.
    2. Parameter count does not equal model capability. Data quality, training compute, and post-training investments such as alignment and reinforcement learning can influence final performance as much as, or more than, parameter count alone.

    2.2 Estimating Memory Requirements

    A practical estimate for the memory required to store model weights during inference is:

    Weight memory ≈ number of parameters × bytes per parameter

    1. FP16/BF16: 2 bytes per parameter
    2. INT8: 1 byte per parameter
    3. INT4: 0.5 bytes per parameter

    For example, a 70B-parameter model requires approximately 140 GB of memory for its weights in BF16. With INT4 quantization, the weight memory falls to approximately 35 GB, allowing the model to run on a small number of high-end inference GPUs.

    By contrast, a 1T-parameter MoE model requires approximately 2 TB of memory for its BF16 weights, even if only several tens of billions of parameters are activated for each token. Such a model generally requires distributed inference across multiple machines and GPUs, which is one reason flagship MoE models are commonly offered through cloud APIs.

    Examining model releases across different versions reveals several recurring patterns. These patterns also provide a useful way to interpret any new model family:

    1. Parallel flagship and lightweight product lines: A model family often maintains both a large flagship model and a faster, lower-cost version that sacrifices some capability for lower latency and operating cost. The two target different priorities: maximum quality and cost efficiency.
    2. Incremental architectural improvements rather than complete redesigns: Version upgrades typically focus on the number and granularity of experts, attention variants, context-window size, and training-data scale, while the underlying decoder architecture remains largely stable.
    3. Long context as a standard feature: Through positional-encoding extrapolation and attention optimizations, mainstream models have expanded from context windows of several thousand tokens to hundreds of thousands or even millions of tokens.
    4. Multimodal integration: More models are extending text foundations with visual and audio understanding. The text architecture generally remains the core backbone.
    5. Inference-efficiency optimization: Techniques such as speculative decoding, KV-cache compression, and quantization-aware training are increasingly co-designed with model architecture and have become important areas of competition between model versions.

    4. Model Selection and Deployment Guidance

    Once the architecture and parameter scale are understood, developers can use the following principles to make deployment decisions:

    • Start with business constraints: Latency requirements, concurrency, context length, and data-compliance requirements should be considered before benchmark scores.
    • Match the parameter scale to the task: For simple question answering, classification, and summarization, a 7B–14B model with domain-specific fine-tuning is often sufficient. More complex reasoning, code generation, and long-document analysis may justify a larger model.
    • Prefer cloud services for flagship MoE models: Building an in-house inference cluster for a flagship MoE model can be extremely expensive. Calling managed LLM inference services through cloud platforms such as Baidu AI Cloud may be more economical. Smaller open-source models can instead be privately deployed using general cloud services such as object storage, container platforms, monitoring, and alerting.
    • Evaluate active parameters and quantization: When estimating inference cost, focus on the number of active parameters and the target quantization precision rather than total parameter count alone.

    Conclusion

    Modern LLMs have converged on a relatively stable design pattern: a decoder-only Transformer combined with GQA or MLA attention, a dense or MoE feed-forward network, and RoPE positional encoding. Current competition is increasingly focused on parameter efficiency, long-context processing, training data, and inference optimization.

    With a solid understanding of these architectural principles, developers can quickly evaluate the technical positioning, resource requirements, and suitable use cases of newly released model families, enabling more rational model-selection and deployment decisions.