Large Language Model Architectures and Parameter Sizes: From Dense Transformers to MoE

    Explore how dense Transformers and mixture-of-experts architectures shape modern large language models. This guide explains total versus active parameters, model size tiers, core architectural components, training and alignment, and long-context capabilities, with a practical framework for balancing model quality, inference cost, and deployment requirements.

    1. From Transformers to Mixture of Experts: Two Paths of Architectural Evolution

    Large language model development has followed two closely related paths: continued optimization of the Transformer architecture and the adoption of sparse architectures, particularly mixture of experts (MoE).

    As dense Transformers scale to hundreds of billions of parameters, training and inference become increasingly expensive. Each input token passes through essentially the same model parameters, so the computational cost of the main model layers grows with parameter count. These constraints have renewed interest in MoE, an approach demonstrated as early as 2017 and subsequently developed for large-scale language modeling.

    The central idea behind MoE is specialization. Rather than using a single feed-forward network at each relevant layer, the model contains multiple expert networks. A gating or routing mechanism selects a small subset of experts for each token. Experts can learn to handle different input patterns, although their roles are not necessarily predefined or easily interpreted.

    This allows total parameter count to increase substantially without a proportional increase in per-token computation. A model can therefore have a large parameter capacity while activating only part of it for each token.

    A common Transformer-based MoE design combines shared attention components with multiple feed-forward experts. Depending on the architecture, total parameters may exceed active parameters by several times or more than an order of magnitude.

    For example, a model with 600 billion total parameters might activate approximately 40 billion parameters per token. This distinction is essential when comparing models:

    • Total parameters describe the model’s overall parameter capacity.
    • Active parameters describe the portion used to process a particular token.
    • Activation fraction is the active parameter count divided by the total parameter count. The inverse expresses the total-to-active parameter ratio.

    These measures should not be treated as interchangeable. Sparse activation reduces computation, but total model size still matters for deployment.

    2. Understanding Model Size Tiers

    Parameter count alone is not enough to evaluate an LLM. Total parameters, active parameters, training data volume, and context window length all contribute to its capabilities and operating requirements.

    The following tiers provide a useful selection framework rather than a strict classification of every model. Here, B means billion parameters, and T means trillion.

    Lightweight and Efficient: 10B–30B Total Parameters

    Models in this range are often considered for resource-constrained deployments, real-time interaction, and cost-sensitive applications. They may use dense architectures or MoE designs with a relatively high activation fraction.

    Despite their smaller size, improvements in data quality and training methods have made these models capable options for tasks such as:

    • Code generation
    • Text classification
    • Information extraction

    Their main attraction is simpler deployment. Depending on precision, context length, and workload, inference may fit on a single A100- or H800-class GPU. Low-latency operation is possible, but a sub-100-millisecond target depends heavily on what is being measured, as well as output length, batching, and hardware.

    For high-concurrency production services, models in this range can be a cost-effective choice when their task performance is sufficient.

    Balanced Workhorses: 100B–300B Total Parameters, Around 30B–50B Active

    MoE models in this broad range aim to combine substantial parameter capacity with manageable per-token computation.

    The design trade-off is straightforward: more total parameters provide additional representational capacity, while a smaller active subset limits computational requirements. Some sparse designs use total-to-active parameter ratios of roughly 8:1 to 12:1, although these ratios do not apply uniformly across the entire size range.

    Models in this category can offer strong performance in mathematical and logical reasoning, long-document understanding, and consistency across multi-turn conversations.

    For enterprise applications, they can provide a useful balance between capability and cost. Whether they are the best choice depends on workload-specific evaluation rather than size alone.

    Very Large Models: More Than 500B Total Parameters

    Models with hundreds of billions to trillions of parameters are used to explore capability limits and build broadly capable foundations.

    Training at this scale can require thousands of accelerators operating for months, with compute costs reaching tens of millions of dollars. Access is often provided through APIs rather than end-user-managed deployments, although availability varies by model.

    MoE also changes what “very large” means operationally. A trillion-parameter model does not necessarily require computation proportional to a trillion dense parameters for every token. With sufficiently sparse activation, its active computation can approach that of a much smaller dense model.

    However, similar active parameter counts do not guarantee similar end-to-end inference costs. The full model must still be accommodated by the deployment infrastructure, and expert routing adds its own overhead.

    3. Shared Architectural Patterns and Important Differences

    Although implementations vary, many modern LLMs follow a common structural pattern.

    Tokenization and Embeddings

    A tokenizer converts input text into tokens, often using subword units. The model then maps these tokens to high-dimensional embedding vectors.

    Vocabulary sizes of roughly 100,000–200,000 tokens are used in many contemporary models, balancing encoding efficiency against vocabulary size. This is a common design range, not a universal requirement.

    Stacked Transformer Layers

    The model’s main computation takes place across dozens of Transformer layers. Each layer typically contains two core components:

    • Self-attention, which models relationships between tokens.
    • A feed-forward network, which applies nonlinear transformations independently at each token position.

    In MoE variants, selected feed-forward layers are replaced with sets of expert networks. A router dynamically determines which experts process each token.

    Normalization and Residual Connections

    Modern models commonly use pre-normalization: normalization is applied before a sublayer, while residual connections help stabilize training in deep networks.

    RMSNorm is a common alternative to LayerNorm. It normalizes using the root mean square without subtracting the mean, simplifying the normalization operation. Its practical behavior and training stability still depend on the broader architecture and training setup.

    Output Head and Decoding

    An output projection maps the final hidden states to vocabulary logits, which can be converted into probabilities using softmax.

    During inference, an autoregressive model generates text one token at a time. Decoding methods such as temperature sampling and top-p sampling control the diversity of the generated output.

    Where Architectures Differ

    Several design choices distinguish otherwise similar models:

    • Attention variants: Grouped-query attention reduces key-value, or KV, cache requirements. Sliding-window attention limits attention to selected portions of the sequence, trading off local processing and access to broader context.
    • Positional encoding: Rotary position embeddings, or RoPE, are widely used in modern LLMs. RoPE-based methods support context extension, but reliable extrapolation depends on the specific method and training.
    • Expert granularity: Some MoE models use many smaller experts, while others use fewer, larger experts. These choices affect routing flexibility and computational efficiency.

    4. Training and Alignment: What Parameter Counts Leave Out

    Architecture shapes a model’s capabilities, but training and post-training strongly influence the experience users actually receive.

    A useful way to think about model quality is as the combined result of three factors:

    Architecture + pretraining data + post-training alignment

    A strong design cannot compensate indefinitely for weak data, and a large pretrained model does not automatically become a reliable assistant.

    Pretraining: Building Foundational Capabilities

    Pretraining develops a model’s language skills and broad knowledge. Large contemporary training runs can use datasets on the order of 10–20 trillion tokens, although data volumes differ across models.

    Preparing those datasets involves cleaning, deduplication, quality filtering, and adjustments to the training mixture.

    The balance among code, mathematics, reference material, dialogue, and multilingual text affects a model’s strengths and behavior. Data composition is therefore a major technical decision, not simply a matter of collecting more tokens.

    Post-Training: Following Instructions and Improving Reliability

    Post-training helps models follow human instructions and produce more useful, accurate, and safer responses.

    Common methods include:

    • Supervised fine-tuning
    • Reinforcement learning from human feedback
    • Reinforcement learning with verifiable rewards

    Verifiable rewards are particularly useful when outputs can be checked automatically, as in certain mathematics and coding tasks.

    For developers, the practical implication is that two models with similar architectures and parameter counts can behave very differently. Selection should be based on evaluations that reflect the intended application, not parameter count alone.

    5. Context Windows: The Technology Behind Long-Document Processing

    Context windows have expanded from early limits of 2K or 4K tokens to 128K tokens and, in some models, around one million tokens.

    Two areas of progress have been especially important.

    Better Positional Encoding and Long-Sequence Training

    RoPE and its variants can support longer contexts, but extending beyond the training window is not automatically reliable.

    Positional extrapolation has limits. Continued pretraining on long sequences is generally a more dependable way to strengthen long-context performance than relying on extrapolation alone.

    More Efficient Attention

    Standard full self-attention has quadratic computational complexity with respect to sequence length. At very long sequence lengths, a straightforward implementation becomes prohibitively expensive.

    Sparse, block-based, and linear attention approaches can reduce the cost of long-sequence processing. These methods involve different trade-offs and are not interchangeable, nor are they used by every long-context model.

    Long-context capability also means more than accepting a large input. A useful model must retrieve information from the middle of a document and preserve relationships across distant passages.

    Training therefore needs to balance short-context performance with targeted long-context improvement. The objective is not merely a larger advertised window, but reliable use of the information inside it.

    6. A Practical Framework for Model Selection

    Developers and technical decision-makers can evaluate candidate models across four dimensions.

    1. Task Complexity and Domain Fit

    For standard question answering, summarization, and classification, a lightweight or balanced model may be sufficient.

    Complex code reasoning, multi-step mathematical problems, and extended tool-use workflows may require stronger reasoning capabilities, more effective post-training, or greater model capacity.

    The deciding factor should be performance on representative tasks rather than an assumption that larger is always better.

    2. Throughput and Inference Budget

    Estimate the expected number of queries per second and the average input and output token counts per request. Use those estimates to assess the required infrastructure and serving cost.

    MoE reduces active computation relative to a similarly sized dense model and can offer throughput advantages in suitable batched workloads. Actual performance, however, depends on routing overhead, hardware utilization, and the serving implementation.

    Compare measured latency and throughput under realistic conditions rather than inferring them from active parameter counts alone.

    3. Data Security and Deployment Constraints

    Determine whether data can leave the organization, whether private deployment is required, and which hardware is available.

    GPU-based deployments and specialized inference accelerators can impose different compatibility and capacity constraints. These requirements may narrow the candidate list before model quality is considered.

    4. Ecosystem Compatibility

    Check whether the model is supported by the intended inference framework, whether suitable quantization options exist, and whether the surrounding tooling is mature.

    These factors can significantly affect deployment effort and long-term maintenance costs.

    7. Three Directions in LLM Architecture

    Three developments are particularly relevant to the future of model architecture and parameter design.

    Inference-Time Scaling

    Traditional scaling discussions focus on model parameters and training data. Inference-time scaling adds another dimension: how much computation a model uses when solving a particular problem.

    Allocating more computation to intermediate reasoning or self-correction can help smaller models achieve results comparable to larger models on some complex tasks.

    This does not eliminate the importance of model size. It changes how capability can be balanced against runtime cost and latency.

    Deeper Multimodal Integration

    Joint modeling of text, images, audio, and video is moving beyond loosely attached modality-specific components toward more integrated designs.

    Some models bring text and visual processing together during pretraining, with greater integration or parameter sharing across modalities. The extent of that integration varies by architecture.

    Architecture Search and Automated Design

    Researchers are using neural architecture search and automated design methods to explore alternatives to conventional Transformers.

    These efforts remain exploratory. Meaningful advances could reshape how future language models allocate parameters and computation, but their eventual impact is not yet settled.

    Conclusion

    LLM architecture and parameter scale are evolving together. Dense and sparse computation, multimodal integration, and dynamic allocation of inference-time compute all offer different ways to extend model capabilities.

    For developers, the objective is not to select the model with the largest parameter count. It is to match model behavior to the task while balancing quality, cost, latency, and deployment constraints.

    Understanding the distinction between total and active parameters—and how architecture, training, and context handling interact—provides a stronger basis for that decision than any single headline number.