Understanding Modern LLM Architectures and Parameter Scale

    This article breaks down the two factors that truly define a large language model's capability ceiling and cost floor: architecture paradigm and parameter scale, including activated parameters. It explains dense versus sparse mixture-of-experts (MoE) designs, attention and positional encoding advances, parameter size tiers, and the memory and compute trade-offs behind them. Developers will gain a practical framework for classifying any model series, estimating its size range, and making deployment choices around long context, KV cache, and inference acceleration.

    1. Why Architecture and Parameter Scale Are the First-Order Questions

    When evaluating any large language model, the real determinants of its capability ceiling and cost floor are not benchmark scores but two things: the network architecture paradigm and the parameter scale (including activated parameters). The former governs how information flows between layers, and how it is compressed and retrieved. The latter determines model capacity, memory footprint, and the compute required for a single forward pass.

    The source material lists model entries by vendor series across different generations. From an engineering perspective, however, it is more useful to abstract these entries into a few clear technical threads: the divide between dense and sparse mixture-of-experts (MoE) designs, modifications to the attention mechanism, positional encoding and long-context handling, and compute optimization during inference.

    Rather than introducing specific models one by one, this article establishes a general coordinate system. It helps developers quickly determine, when facing information like “a certain series, a certain version,” which architecture class a model belongs to, roughly where its parameter scale falls, and where the trade-offs lie.

    2. Mainstream Architecture Paradigms: Dense, Sparse, and Hybrid

    2.1 Dense Transformer

    The most classic and easiest-to-serve form: the feed-forward network in each layer transforms the full hidden dimension, and all parameters are activated in every forward pass. The advantages are engineering simplicity, operator friendliness, and predictable memory and compute. The drawback is that parameter growth is linearly coupled with compute, making scaling expensive. This paradigm is still widely used in small-to-medium models (roughly 1B–14B) and in some edge or on-device models that emphasize low latency.

    2.2 Sparse Mixture of Experts (MoE)

    MoE replaces the feed-forward layer with several “expert” subnetworks. A router or gating network selects the Top-K experts to participate in computation for each token. Three metrics matter most: total parameter count, activated parameter count, and expert granularity and routing strategy. A typical range is tens of billions to hundreds of billions of total parameters, while activated parameters are only 1/4 to 1/10 of the total. This decouples “capacity” from “compute per pass.” The costs are memory footprint counted by total parameters, uneven routing load, and communication overhead in distributed training.

    Illustrative pseudocode:

    1. # Conceptual illustration only, not any specific implementation
    2. logits = router(hidden_states) # [tokens, num_experts]
    3. topk_idx, topk_w = top_k_softmax(logits, k=2)
    4. out = zeros_like(hidden_states)
    5. for e in selected_experts:
    6. mask = (topk_idx == e)
    7. out[mask] += topk_w[mask] * expert_e(hidden_states[mask])

    2.3 A Middle Ground Between Dense and Sparse

    Recent years have seen many “hybrid layer designs”: some layers use dense feed-forward networks while others use MoE; or a combination of shared experts and routed experts to reduce the instability caused by routing jitter. Architecturally, these designs are more sensitive to parallelism strategy and require coordination among expert parallelism (EP), tensor parallelism (TP), and pipeline parallelism (PP).

    3. The Evolution of Attention and Positional Encoding

    • Efficient variants of multi-head attention: Grouped-query attention (GQA) and multi-query attention (MQA) reduce memory bandwidth pressure by compressing the number of K/V heads. They are a standard configuration for long-context inference.
    • Sparse and linear attention: Local windows plus global tokens, or linear-complexity approximations, are used to extend context from tens of thousands to hundreds of thousands of tokens.
    • Positional encoding extrapolation: Rotary position embedding (RoPE) combined with frequency scaling or interpolation is the mainstream approach for cross-length generalization. When training length and inference length differ, dedicated extrapolation evaluation is required.

    4. Parameter Scale Tiers and Cost Intuition

    Tier Typical Total Parameters Activated Parameters Use Cases
    Small 1B–8B Same as total On-device, low latency, vertical-task fine-tuning
    Medium 8B–30B Same as total General dialogue, code assistance, private deployment
    Large dense 30B–100B Same as total High-throughput serving with predictable cost
    Sparse large 100B–hundreds of B 20B–50B Complex reasoning, multi-tool coordination

    A practical rule of thumb: memory ≈ parameter count × bytes per parameter (2 for FP16, 1 for INT8, roughly 0.5 for INT4) + KV cache. The KV cache grows linearly with context length and concurrency, and is often the real bottleneck for long-context serving rather than the weights themselves.

    5. Long Context, Inference Acceleration, and Deployment Essentials

    1. KV cache optimization: paged management, quantized compression, and prefix reuse (sharing cached results for identical system prompts).
    2. Speculative decoding and batching: a small model drafts and a large model verifies, combined with continuous batching to improve throughput.
    3. Combining parallelism strategies: TP reduces per-layer latency, PP improves throughput, EP carries sparse experts, and data parallelism scales replicas.
    4. Observability: when deploying on a container platform, it is advisable to integrate a general logging service and monitoring alerts, and to establish baselines for time to first token, time per token, and cache hit rate.

    6. Selection Recommendations

    • If you prioritize predictable cost and controllable private deployment, prefer small-to-medium dense models.
    • If you pursue the highest capability ceiling and can bear the memory cost, choose a sparse architecture, focusing on activated parameters and routing stability.
    • If long context is the primary use case, focus on attention variants and KV cache solutions rather than simply stacking parameters.
    • If you rely on general cloud capabilities (object storage, message queues, container platforms, logging, and monitoring), factor elastic scaling and caching strategy into capacity planning.

    In summary, understanding modern large language models is not about memorizing the numbers of a specific model. It is about mastering the analysis chain of “architecture paradigm → parameter scale → activation ratio → context and cache cost.”