Understanding Modern LLM Architecture and Parameter Scale: A Technical Guide
This article breaks down the two dimensions that define large language model capability and deployment cost: architecture paradigms and parameter scale. It explains the four core components of mainstream LLM design—attention mechanisms (MHA, GQA/MQA, and latent compression), dense versus sparse mixture-of-experts feed-forward layers, position encoding for long context, and normalization for training stability. It then maps three parameter tiers to their typical use cases and deployment requirements, emphasizing why activated parameters matter more than total parameters for real inference cost. A practical evaluation checklist and engineering recommendations cover capacity planning, throughput, expert parallelism communication overhead, quantization, observability, tiered model selection, and elastic scaling.
1. Why Architecture and Parameter Scale Are the First-Order Questions
When evaluating any large language model, the real determinants of capability boundaries and deployment cost are not a single headline number, but the combination of two dimensions: the network architecture paradigm and the parameter scale (total and activated). The former governs how information flows within and across layers; the latter governs how model capacity maps to memory, bandwidth, and compute.
The source material lists several model families in a chapter format—spanning dense flagships, sparse experts, and lightweight real-time variants. This reflects an industry reality: model iteration has shifted from simply stacking parameters toward a multi-objective balance of architectural efficiency, sparsification, long context, and inference optimization. The sections below strip away specific product attributes and present a general technical framework.
2. Four Core Components of Mainstream Architecture Paradigms
2.1 Evolution of the Attention Mechanism
- Multi-Head Self-Attention (MHA): The standard form, with strong representational capacity, but the KV cache grows linearly with context length during inference.
- Grouped-Query Attention (GQA) / Multi-Query Attention (MQA): Multiple query heads share a set of key-value heads, significantly reducing KV cache footprint. This is a common trade-off in current mid-to-large-scale models.
- Latent Compression Attention: Compresses keys and values into a low-dimensional latent space before caching, carrying very long context with minimal memory at the cost of extra projection matrices and decoding path complexity.
The engineering implication is straightforward: when context length doubles, models using shared or compressed key-values incur far smaller memory increments than standard multi-head structures.
2.2 Feed-Forward Layers: Dense and Sparse Mixture-of-Experts
A dense FFN typically accounts for over 60% of a layer’s parameters, making it the primary target for sparsification. Mixture-of-Experts (MoE) splits a single layer’s FFN into N experts, with each token routed to only the Top-K experts:
# Illustrative: routing logic of a sparse expert layer (pseudocode)logits = router(hidden_state) # [tokens, num_experts]topk_idx = logits.topk(k=2).indices # each token selects 2 expertsout = sum(expert_i(hidden_state) for i in topk_idx) / k
Three metrics matter here: total parameters (which set the capacity ceiling and memory footprint), activated parameters (which determine per-token compute), and expert parallelism degree (which determines communication overhead in distributed deployment). A common industry practice is to make total parameters several times the activated count, achieving larger model capacity with lower inference compute.
2.3 Position Encoding and Context Extension
Rotary Position Embedding (RoPE) combined with frequency scaling and position interpolation is the mainstream path for extending the training window from a few thousand to hundreds of thousands of tokens. In engineering terms, this must be paired with chunked prefill, KV paging management, and cross-request cache reuse to translate long context into usable throughput.
2.4 Normalization and Residual Stability
Pre-Norm, Root Mean Square Normalization (RMSNorm), and bias-free linear layers collectively serve numerical stability in ultra-large-scale training, reducing loss spikes during large-scale parallel training.
3. Three Parameter Tiers and Selection Logic
| Tier | Typical Form | Use Cases | Deployment Notes |
|---|---|---|---|
| Billion-scale (1B–10B) | Dense | On-device, real-time completion, classification and extraction | Can run on a single GPU or consumer hardware |
| Ten-to-hundred-billion (10B–200B) | Dense or lightweight sparse | General dialogue, code, enterprise knowledge Q&A | Multi-GPU tensor parallelism plus quantization |
| Over 200B | Mostly sparse experts | Complex reasoning, long documents, multi-agent systems | Expert parallelism plus cache reuse plus elastic scaling |
It is worth emphasizing that activated parameters track real inference cost more closely than total parameters. A model with a huge total parameter count but only a small fraction activated per token may outperform a same-generation dense model in single-request latency, yet be more demanding in memory footprint and scaling granularity.
4. From Architecture to Cost: A Practical Evaluation Checklist
- Capacity matching: Memory demand ≈ weights (including quantization factor) + KV cache (growing with concurrency and context) + runtime overhead.
- Throughput over peak: Focus on tokens produced per unit time and time-to-first-token, not isolated compute metrics.
- The communication bill for sparse models: Expert parallelism introduces cross-device all-to-all communication; gains are offset when network bandwidth is insufficient.
- Quantization strategy: Low-bit weight quantization yields clear benefits for dense models; for sparse models, routing sensitivity and expert load balancing must be considered simultaneously.
- Observability: Use general-purpose logging services and monitoring/alerting systems to continuously track cache hit rate, queue time, and batch fill rate.
5. Engineering Practice Recommendations
- Tiered selection: Use lightweight dense models for real-time paths and large-scale sparse models for offline batch processing, forming a two-layer structure of cost and quality.
- Externalize capabilities: Place retrieval, tool invocation, and structured output constraints outside the model, hosted on general cloud components such as object storage, message queues, and container platforms, avoiding the pressure of pushing business logic into parameters.
- Continuous evaluation: Establish a fixed evaluation set and regression baseline; every architectural change requires recalibrating prompts and decoding parameters.
- Elastic scaling: Deploy inference services in concurrency-based shards, paired with auto-scaling and request-priority queues to control tail latency.
6. Conclusion
The evolution of modern LLM architecture follows one main thread: trading smarter connection patterns for lower compute cost at equivalent capacity. The evolution of parameter scale follows another: total counts keep growing while activated counts stay restrained. Understanding these two points builds a stable technical judgment framework beyond the proliferation of model names—look first at architecture and activated parameters, then at context and parallelism strategy, and finally validate real cost with observability data. For out-of-the-box compute, storage, and inference hosting, general product offerings from platforms such as Baidu AI Cloud can be combined as needed, letting teams focus on model selection and business refinement.
