Modern LLM Architectures and Parameter Scales: A Practical Guide to Model Selection

    This article explains the key architectural concepts behind modern large language models to help you make informed model selection decisions. It covers the Transformer foundation and its core components, the differences between dense and Mixture-of-Experts (MoE) models, typical configurations across parameter tiers with VRAM estimates, the relationship between parameter scale and capability, and major directions of architectural evolution including long context, inference optimization, multimodality, and post-training.

    1. The Transformer Remains the Foundational Architecture

    Nearly all modern large language models are built on the Transformer architecture. Introduced in 2017, the Transformer replaced word-by-word recurrent processing with a self-attention mechanism. It processes all positions in a sequence in parallel and directly establishes connections between tokens through attention weights, enabling it to capture long-range dependencies.

    A typical large language model consists of the following components.

    Embedding layer: Maps discrete tokens to high-dimensional vectors. The embedding matrix has a parameter count equal to vocabulary size V multiplied by hidden dimension d, i.e., V×d. With a vocabulary of roughly 150,000 and a hidden dimension of 8,192, a single embedding matrix contains about 1.2 billion parameters. If the input embedding and output layer share the same matrix, these parameters are counted only once; otherwise, the output layer adds a comparable number of parameters. Modern models typically have hidden dimensions between 2,048 and 8,192.

    Multi-head self-attention and Grouped Query Attention (GQA): Multi-head attention maintains an independent key-value cache (KV cache) for each head. GQA lets multiple query heads share the same set of key-value heads, reducing KV cache footprint. In long-sequence and high-concurrency scenarios, this design lowers memory pressure and helps improve throughput and latency. The exact magnitude of improvement depends on model architecture, sequence length, batch size, and hardware—there is no universal multiplier that applies across the board.

    Feed-forward network (FFN): After each attention layer comes a feed-forward network, typically following an “expand, activate, contract” structure. Activation functions have evolved from ReLU to gated linear units such as GeGLU and SwiGLU. Gated structures generally deliver better training stability and final performance, which is why they are widely adopted.

    Normalization and residual connections: Mainstream models mostly use Pre-Norm, where normalization is applied before the sub-layer computation. This makes gradients in deep networks more stable. Improvements like DeepNorm further enhance training reliability for extremely deep models.

    Rotary Position Embedding (RoPE): Transformers are inherently unaware of token order, so position encoding supplies this information. RoPE encodes positional information as rotations applied to query and key vectors, allowing attention scores to reflect relative positions between tokens. This provides a foundation for length extrapolation, but performance typically degrades when inference length far exceeds training length. Reliably handling longer text generally requires additional techniques such as position interpolation or scaling, continued training, or sparse attention.

    2. Dense Models vs. Mixture-of-Experts Models

    When understanding model scale, distinguish between two numbers: total parameter count and the number of parameters actually activated per token. They determine memory requirements and compute cost respectively.

    Dense models: Every forward pass uses all parameters. These models are architecturally simple, with mature training and inference implementations. Their bottleneck is that compute grows in lockstep with parameter count. A 70B-parameter dense model must compute through all its parameters for every token generated, demanding significant GPU memory and compute power.

    Mixture-of-Experts (MoE) models: MoE splits the feed-forward network into multiple expert sub-networks, using a gating router to select a small number of experts for each token. Only a fraction of parameters is activated per token, so compute cost is far lower than a dense model with the same total parameter count. DeepSeek-V3, for example, has about 671B total parameters but activates only around 37B per token. This means its compute cost approaches that of a tens-of-billions dense model, yet deployment still requires holding all expert weights in memory, so VRAM requirements remain substantial.

    The key to MoE lies in the routing strategy. Early models relied on auxiliary loss functions to balance expert load, but auxiliary losses interfere with the main training objective. DeepSeek-V3 adopts an auxiliary-loss-free load balancing strategy that maintains balance by dynamically adjusting routing biases. Additionally, fine-grained expert segmentation lets each expert handle more specialized content, while shared experts handle the general capabilities all tokens need. These designs jointly affect expert utilization and final performance.

    Which architecture to choose depends on your goals. If you prioritize simple deployment and stable behavior, a dense model is the better fit. If you want greater total knowledge capacity under constrained inference compute, MoE is more attractive—but you must accept more complex distributed deployment.

    3. Typical Configurations Across Scale Tiers

    By parameter scale, LLMs can be roughly grouped into the following tiers. The parameter ranges between tiers do not overlap, making comparison easier.

    Ultra-large MoE models (300B+ total parameters): These usually represent each team’s flagship capability, with total parameters ranging from 300B to 1T and roughly 20B to 50B activated per token. They excel at complex reasoning, code generation, and long-text processing, but deployment requires multi-GPU or even multi-node distributed inference.

    Cost-effective MoE models (100B–300B total parameters): This tier strikes a good balance between performance and deployment cost, and is a common choice for API services. For self-hosting, VRAM and communication overhead remain the main constraints.

    Dense flagship models (30B–70B parameters): Some teams focus on dense architectures. These models have mature architectures and ecosystems with more stable behavior patterns, suiting enterprises with strict data privacy and deployment control requirements. Deployment typically requires multiple high-VRAM GPUs.

    Small-to-medium dense models (1B–30B parameters): This range contains many open-source, commercially usable models; 7B, 14B, and 32B are common choices. They can run inference and fine-tuning on consumer GPUs or a single professional GPU, serving common needs like code completion, customer service chatbots, knowledge Q&A, and text processing.

    Below is a rough VRAM estimate for dense models. Weight memory approximately equals parameter count times bytes per parameter: 2 bytes for FP16, 1 byte for INT8, and about 0.5 bytes for INT4. This estimate covers weights only—you also need to reserve space for the KV cache and runtime overhead. With long contexts and high concurrency, the KV cache can occupy tens of GB.

    • 7B model: FP16 weights ~14 GB; a single 24 GB GPU can run inference. QLoRA fine-tuning is usually feasible on a single 24 GB GPU.
    • 14B model: FP16 weights ~28 GB; won’t fit on a single 24 GB GPU, so INT4 quantization is typically needed.
    • 32B model: FP16 weights ~64 GB; ~18–20 GB after INT4. A single 24 GB GPU barely fits, but context length and concurrency will be limited; real deployments commonly use 48 GB or dual-GPU setups.
    • 70B model: FP16 weights ~140 GB; ~35–40 GB after INT4. Typically requires two 80 GB+ GPUs, with more resources needed for concurrency and long contexts.
    • Dense models above 300B: Weights alone exceed single-machine capacity; multi-node deployment is usually required.

    For MoE models, memory estimates must be based on total parameters. Taking DeepSeek-V3 as an example, at FP8 storage the weights alone require roughly 671 GB, needing at least multiple 8-GPU servers working together. Its compute, meanwhile, is estimated based on the ~37B parameters activated per token. These two figures mean different things and should not be conflated.

    The numbers above are typical orders of magnitude; actual requirements depend on the inference framework, quantization method, context length, and concurrency. Before making a selection, refer to the model publisher’s documentation and your own benchmark results.

    4. The Relationship Between Parameter Scale and Capability

    The larger the parameter scale, the more knowledge a model can typically compress and store. The feed-forward network can be viewed as a key-value memory structure, where different neurons or experts tend to respond to different patterns.

    As scale grows, data quality matters just as much. Training data needs cleaning, deduplication, and difficulty-based filtering. Many teams have found that high-quality data is often more effective than simply increasing data volume.

    Some research and practice have observed that certain complex tasks—such as multi-step reasoning, mathematical problem solving, and in-context learning—show sudden improvements once model scale reaches a certain magnitude, a phenomenon often called “emergent capabilities.” However, the academic community still disagrees on whether this phenomenon is real or merely an artifact of evaluation metrics. Therefore, caution is warranted when treating parameter scale as a reliable predictor of capability.

    Training efficiency also constrains the size of models that can be trained. Once parameters reach the hundreds of billions, a single GPU can no longer hold all optimizer states and gradients. Modern LLM pretraining commonly employs BF16 mixed precision, ZeRO memory optimization, gradient checkpointing, and asynchronous distributed communication to bring memory usage and communication overhead down to acceptable levels.

    5. Major Directions of Architectural Evolution

    Continuously expanding long-context capability: Many mainstream models have extended their context windows from the early 4K and 8K to 128K or even longer. Approaches include position encoding scaling, sliding window attention, and sparse attention. Gradually increasing sequence length during training also helps models remain stable on long text.

    Deepening inference optimization: KV cache quantization reduces memory usage. Prefix caching reuses computation results for identical prefixes. Speculative sampling uses a small draft model to generate multiple candidate tokens, which the target model then verifies in parallel. The speedup depends on acceptance rate, which in turn depends on task type and draft model quality, so acceleration ratios vary widely across scenarios.

    Multimodality becoming standard: Many new models have evolved from pure text models into multimodal ones, typically combining a vision encoder with a language model backbone. The way the two are connected varies greatly—simple projection-layer alignment versus deep cross-modal attention fusion directly affects the model’s capability ceiling and inference cost.

    Post-training determines usability: After pretraining, steps such as supervised fine-tuning, reinforcement learning from human feedback, and direct preference optimization determine the model’s instruction-following ability, response style, and overall practical usability.