Large Language Model Architectures and Parameter Scale Explained

    This article breaks down the two core dimensions for understanding modern large language models: architecture and parameter count. It explains dense versus sparse mixture-of-experts designs, the evolution of attention mechanisms, positional encoding and context extension, and normalization choices. It also maps parameter tiers to deployment needs, covers training precision and inference quantization, and corrects common misconceptions so readers can make better model selection and capacity planning decisions.

    1. Why Architecture and Parameter Scale Are the Two Core Dimensions

    When people discuss modern large language models, two questions come up most often: what network architecture does it use, and how many parameters does it have. These two dimensions matter because together they determine two things: the upper bound of the model’s expressive capability, and the real cost of inference and training. Architecture determines how computation is organized, while parameter scale determines the approximate magnitude of information capacity. Both eventually map to engineering outcomes such as throughput, latency, and unit cost through intermediate variables like activated parameters, attention overhead, and memory bandwidth requirements.

    It is important to note that total parameter count is not the same as the number of parameters that actually participate in computation during each forward pass. Recent mainstream designs commonly adopt sparsification, which creates a clear separation between total parameters and activated parameters. This is why designs with “hundreds of billions of total parameters and tens of billions of activated parameters” appear frequently. Understanding this point is a prerequisite for avoiding selection mistakes.

    2. Breaking Down Mainstream Architectural Paradigms

    2.1 Dense Feed-Forward and Mixture-of-Experts (Sparsification)

    In traditional dense architectures, every token passes through all feed-forward layer parameters, so computation is roughly linearly related to parameter count. Sparse mixture-of-experts architectures replace the feed-forward layer with multiple parallel “expert” subnetworks, and a routing module selects a few experts to participate in computation for each token. The benefit is that total parameter capacity can be expanded significantly while per-token computation remains relatively controlled.

    Three engineering issues deserve attention. First, routing load balance: if the distribution is too concentrated, some experts become overloaded while others sit idle, wasting effective compute. Second, communication overhead: expert parallelism is often split across devices, making all-to-all communication a bottleneck. Third, training stability: routing decisions are discrete, so auxiliary losses or noise strategies are usually needed to smooth them.

    1. # Illustration: core logic of sparse routing (pseudocode)
    2. logits = router(hidden_states) # [tokens, num_experts]
    3. weights, expert_ids = topk(softmax(logits), k=2)
    4. y = zeros_like(hidden_states)
    5. for e in selected_experts:
    6. mask = (expert_ids == e)
    7. y[mask] += weights[mask] * expert_e(e, hidden_states[mask])
    8. y += aux_loss * load_balance_penalty(weights)

    2.2 The Evolution of Attention Mechanisms

    Multi-head attention is the baseline, and further optimization mainly follows three paths. The first is multi-query or grouped-query attention, which lets multiple query heads share a set of key-value heads, directly compressing the key-value cache size during inference. This yields clear benefits for long-context scenarios. The second is low-rank or latent-compressed key-value representations, which carry key-value information with smaller latent vectors, striking a compromise between cache usage and expressiveness. The third is sparse or local attention, which reduces attention complexity from quadratic downward through window limits and block sparsity.

    From an engineering perspective, the value of attention optimization often lies not in the training phase but in the inference phase: the key-value cache is one of the main sources of memory usage. The smaller the cache, the more concurrent requests can be served, and the lower the unit throughput cost.

    2.3 Positional Encoding and Context Extension

    Rotary positional encoding has become the de facto common choice. Its advantage is that it injects information in the form of relative positions, making context extrapolation easier through adjustments in the frequency dimension. Common extension methods include adjusting the rotary base frequency, interpolating high-frequency dimensions, and gradually lengthening sequence length during continued training. To judge whether a model’s “nominal context length” is meaningful, look at two things: whether long-sequence continued training is sufficient, and whether mid-section information utilization in long-document retrieval evaluations remains stable.

    2.4 Normalization, Residuals, and Activation Functions

    Pre-normalization combined with a residual stream is the foundational configuration for stably training deeply stacked networks. Paired with appropriate initialization scale and learning rate warmup, it can significantly reduce the probability of divergence in deep models. On the activation side, gated linear unit variants are mainstream, typically delivering more stable convergence than traditional activations at the same parameter count.

    3. Parameter Scale Tiers and Applicability

    The industry usually divides parameter scale into four rough tiers, each corresponding to a different deployment form:

    • Below the billion-parameter level: suitable for on-device or high-concurrency lightweight scenarios, emphasizing low latency and low resource usage, with capabilities concentrated in relatively deterministic tasks like classification, extraction, and rewriting.
    • Billion to tens-of-billions level: can be hosted on a single card or a single machine with multiple cards. This is the main range for general dialogue and code assistance, with a mature fine-tuning ecosystem.
    • Tens-of-billions to hundreds-of-billions level (dense): requires multiple machines with multiple cards and a combination of tensor and pipeline parallelism. It covers complex reasoning and long-document understanding, but memory and bandwidth pressure are high.
    • Above hundreds of billions (sparse total parameters): large total capacity with controllable activation. The training side needs expert parallelism and efficient communication, while the inference side demands more from scheduling and batching strategies.

    A practical approach is to first look at “activated parameters plus key-value cache size,” then work backward to the required memory and concurrency, rather than fixating only on total parameter count.

    4. Training Precision, Quantization, and Inference Deployment

    On the training side, mixed precision is commonly used: forward and backward passes use lower-precision tensors, while key accumulation and normalization keep higher precision to maintain numerical stability. On the inference side, weight quantization is the main approach. A common practice is to compress weights to lower bits, keep activations at higher precision, and handle outlier channels separately, reducing memory and bandwidth pressure while keeping precision loss controllable.

    For deployment, if a container platform hosts inference services, it is typically paired with auto-scaling, logging services, and monitoring alerts to manage peak traffic. Batch offline tasks are better decoupled through message queues, and tiered hot and cold data can leverage object storage to reduce costs. These are general cloud capability categories, and specific parameters should follow the relevant platform documentation.

    5. Common Misconceptions

    First, treating total parameter count as the sole indicator of capability while ignoring the roles of data quality, training epochs, and post-training alignment. Second, assuming long context equals effective context and overlooking mid-section information decay. Third, equating reduced memory from quantization with linear throughput gains, when actual results are also constrained by operator implementation and batching efficiency. Fourth, ignoring the communication cost of sparse architectures, where measured performance in bandwidth-constrained environments may fall clearly below expectations.

    6. Practical Recommendations

    During selection, build a small-scale evaluation set covering target tasks, long-document scenarios, and boundary conditions, and compare different parameter tiers and architectural approaches under a unified standard. Before launch, run capacity stress tests to establish per-request latency and concurrency limits. During continuous operation, use monitoring alerts to track latency distribution and resource levels, and use logging services to locate anomalous requests. Combining architectural understanding with parameter tiering into a single judgment framework supports long-term technical decisions better than chasing a single number.