Understanding Modern LLM Architectures and Parameter Scale
This article breaks down the two core dimensions used to evaluate large language models: architecture and parameter count. It explains the trade-offs between dense and sparse Mixture-of-Experts designs, reviews efficiency improvements to attention, position encoding, normalization, and multimodal fusion, and shows how parameter scale maps to memory and serving cost. The goal is to help readers make practical model selection and deployment decisions.
1. Why Architecture and Parameter Scale Are the Two Core Dimensions
When evaluating a large language model in engineering practice, the two most common questions are “what architecture does it use” and “how many parameters does it have.” These dimensions are not isolated metrics. Together they determine the model’s capability ceiling, memory footprint, throughput and latency, and training cost. Architecture governs how information flows and is compressed inside the network, while parameter scale governs how much knowledge the model can hold and how well it can fit a task. The two constrain each other: under the same parameter budget, changing the attention computation or the sparsity of the feed-forward layers can produce several-fold differences in measured throughput.
It is worth stressing that total parameter count is not the same as the number of parameters activated during inference. In a dense model, every token passes through all weights. In a sparse Mixture-of-Experts (MoE) model, each token is routed to only a few experts, so “total parameters” and “activated parameters” must be discussed separately. This is the prevailing consensus in the industry and the basis for the analysis below.
2. Breaking Down the Main Architectural Paradigms
2.1 Dense Feed-Forward vs. Sparse Mixture-of-Experts
Dense architectures are simple to implement and stable to train, which makes them suitable for small and mid-sized models and on-device deployment. Sparse Mixture-of-Experts uses a gating network (the router) to dispatch tokens to a set of expert subnetworks. A common configuration has many experts in total while activating only one or two per token, expanding parameter capacity substantially while keeping inference compute roughly unchanged. The cost is high memory usage and difficult load balancing, so engineering practice usually relies on an auxiliary load balancing loss and a capacity factor to control expert skew.
Illustrative configuration (pseudocode, for concept explanation only):
# Conceptual illustration: the trade-off behind sparse routingnum_experts = 64 # total experts, determines parameter capacitytop_k = 2 # experts activated per token, determines inference computecapacity_factor = 1.25 # buffer limit, suppresses load skew
2.2 Efficiency Improvements to Attention
Memory and compute for standard multi-head attention (MHA) grow quadratically with sequence length. Common improvements in the industry include grouped-query attention (GQA) and multi-query attention (MQA), which reduce the KV cache by sharing key and value heads; multi-value or latent-compression attention, which compresses keys and values into a low-dimensional latent space and reconstructs them, significantly reducing cache usage during long-context decoding; and various sparse or sliding-window attention schemes that confine global interaction to a local window plus a small number of global tokens.
2.3 Position Encoding and Long-Context Extrapolation
Rotary position embedding (RoPE) has become the de facto standard choice. Long-context capability is mainly obtained by extending after training: adjusting the rotary base frequency, assigning different scaling coefficients per dimension, or aligning on short sequences first and then gradually lengthening them. In practice, the nominal context window length often differs from the effective length, so validation should combine needle-in-a-haystack retrieval evaluations with multi-hop reasoning evaluations.
2.4 Normalization, Activation, and Residual Details
Pre-Norm combined with RMSNorm has become mainstream. Paired with gated activations such as SwiGLU and residual scaling, it improves training stability in deep networks. These details may look minor, but they directly affect whether a large model can converge stably at thousand-GPU scale.
2.5 Multimodal Fusion Paths
Vision and speech are typically chunked by an encoder first, then mapped into the language model’s latent space by a projection layer and used as a “soft prompt” in autoregressive generation. Another route is early fusion, which tokenizes different modalities into a unified vocabulary. The former is cheaper to implement and has a mature ecosystem; the latter has more potential for fine-grained alignment.
3. Common Parameter Scale Ranges and Cost Conversion
The industry usually groups models into several tiers. Billion-scale models suit on-device use and high-frequency simple tasks. Ten-billion to hundreds-of-billions scale is the main range for general conversation and code assistance. Sparse architectures with hundreds of billions of total parameters and a few billion activated parameters are used for complex reasoning and long-document processing. Larger scales appear mostly in research-oriented pretraining.
A practical way to estimate memory is that inference memory is roughly “weight bytes + KV cache + activations and framework overhead.” Weight bytes are about twice the parameter count under FP16, about one times under INT8, and about one half under INT4. The KV cache is proportional to the number of layers, the number of key-value heads, the head dimension, the sequence length, and the batch size, which is the root cause of the high cost of long-context serving.
weights ≈ P × bytes_per_paramKV ≈ 2 × layers × kv_heads × head_dim × seq_len × batch × bytes
4. Selection Advice for Real Deployments
First, define the task before the scale, and avoid using an oversized sparse model for high-frequency requests that a small model can handle. Second, base compute budgeting on activated parameters rather than total parameters. Third, for long-context needs, evaluate KV cache optimization capability first instead of looking only at the window number. Fourth, for on-premises deployment, container platforms can host inference services, object storage can hold models and data, and logging services plus monitoring and alerting can track throughput, time to first token, and error rate. Fifth, model architectures evolve quickly, so it is worth fixing evaluation sets and load-test scripts in place to form a repeatable regression process, keeping selection conclusions calibrated as versions update.
