LLM Architecture Evolution: Sparse Activation and External Knowledge as New Directions

    This article explains key trends in modern large language model architecture, including sparse activation in Mixture-of-Experts models, attention optimizations for long contexts, residual and normalization design, external embedding-based knowledge storage, hybrid optimizer strategies, and multi-token prediction. It also provides practical guidance on evaluating new models and translating performance metrics into deployment costs, helping engineers make informed model selection and infrastructure decisions.

    1. Why Models with Small Activated Parameters Are Gaining Attention

    The size of a large language model is usually described by two numbers: total parameters and activated parameters. Total parameters determine the overall volume of model weights, while activated parameters determine the portion that actually participates in computation during a single forward pass. The gap between them comes from sparse structures. In a Mixture-of-Experts (MoE) architecture, the model contains a large number of expert subnetworks, but each input token is routed to only a few selected experts, so the computation per token is far smaller than the total model size.

    For deployment teams, these two metrics affect resources differently. Activated parameters directly determine the computation per token, which in turn affects latency and compute consumption. Total parameters determine GPU memory footprint, weight loading time, and minimum hardware requirements. A model with very large total parameters but small activated parameters may have low per-step compute pressure, yet still requires enough memory to hold all its weights. When selecting a model, you should budget for both parts separately rather than looking at only one number.

    2. The Attention Layer: Throughput and Memory in Long-Context Scenarios

    Attention is one of the main cost drivers in long-context inference. Standard self-attention scales quadratically with sequence length, and inference also requires storing the key-value cache (KV cache) for every layer. When context lengths reach tens of thousands of tokens or more, cache usage often becomes harder to control than the weights themselves.

    The memory footprint of the KV cache can be estimated with the following formula:

    1. kv_cache_bytes = 2 × num_layers × num_kv_heads × head_dim × seq_length × batch_size × bytes_per_element

    The factor of 2 corresponds to the key and value tensors. For example, with 48 layers, 8 KV heads, a head dimension of 128, a sequence length of 32,768, a batch size of 4, and 2 bytes per element (half precision), the result is roughly 24 GiB. This shows that even if the model weights fit in memory, concurrent long-context requests can still exhaust GPU memory.

    Common attention optimization directions in the industry include:

    • Grouped-Query Attention (GQA): multiple query heads share a smaller number of key-value heads, directly reducing cache size.
    • Sliding-window attention: each position only attends to a fixed nearby range of tokens, reducing computation from quadratic to linear, but requiring extra mechanisms to handle long-distance information.
    • Sparse attention: selects an important subset of positions to participate in computation, balancing accuracy and speed, though implementation is more complex.
    • Linear attention or state-space-style structures: replace the full attention matrix with a recurrent state, which suits extremely long sequences but may underperform standard attention on tasks requiring precise retrieval.

    Which option to choose depends on the target scenario. For Q&A and conversational workloads, GQA combined with quantized caches usually offers the best cost-performance ratio. For documents spanning hundreds of thousands of tokens, you need to repeatedly validate the trade-off between sparsity strategies and recall quality.

    3. Residual Connections and Normalization: Stability in Deep Networks

    As the number of layers grows, numerical stability during training becomes increasingly sensitive. The design of residual connections and normalization placement directly affects gradient propagation and convergence speed. Common approaches include Pre-Norm and Post-Norm structures: the former is generally easier to train in deep networks, while the latter can achieve better final results in some scenarios.

    Recent architectural improvements add scaling factors to residual paths or adjust how normalization layers are combined, keeping the numerical distribution of each layer’s output within a reasonable range. These modifications impose almost no extra inference cost, but they do affect training curves and hyperparameter choices during fine-tuning.

    In practice, if you are training or continually training a model yourself, you should log the mean and variance of each layer’s activations to check for abnormal amplification or decay. When instability occurs, first check the learning rate warmup length and normalization configuration before considering structural changes to the network.

    4. Embeddings and Knowledge Representation: The Compute Cost of External Parameters

    The knowledge representation layer is another direction worth watching. The traditional approach stores all knowledge in the backbone network’s weights, so every inference pass goes through full computation. An alternative is to separate a portion of storage-type parameters and read them via lookup. These parameters do not participate in large matrix multiplications, so their compute cost is very low—but they consume additional storage and memory bandwidth.

    Take N-gram-based external embeddings as an example. The core logic is: hash or index segments composed of several adjacent tokens, retrieve the corresponding vectors from an external table, and fuse them with the backbone representations. The benefit of this structure is that it separates “memorization-type” information from the compute path, reducing the burden on the backbone network.

    It also introduces clear engineering challenges:

    1. Storage and loading: the external table may reach tens of gigabytes, so you must decide whether it lives in GPU memory, host memory, or high-speed storage.
    2. Memory access latency: random reads cause cache misses, so real latency may be higher than theoretical compute estimates suggest.
    3. Quantization compatibility: the external table’s numerical distribution differs from backbone weights, so quantization error must be evaluated separately.
    4. Hash collisions: when the index space is limited, different segments may map to the same slot, degrading knowledge quality.

    To validate such a structure, you can compare three configurations: the full backbone, the backbone without the external table, and versions with the table stored at different precisions. By comparing results on factual Q&A and long-tail knowledge tasks, you can judge how much capability the external component actually contributes.

    5. Training Optimizers: Hybrid Scheduling and Orthogonalized Matrix Updates

    The optimizer determines how parameters update based on gradients. Traditional adaptive optimizers maintain first- and second-order momentum for each parameter, which costs significant memory but converges reliably. A recent class of methods orthogonalizes the update direction for two-dimensional weight matrices, making update magnitudes more balanced across directions and potentially achieving faster convergence under the same compute budget.

    In engineering practice, a hybrid strategy is common: two-dimensional weights use a matrix-style optimizer, while embedding layers, normalization parameters, and bias terms continue using an adaptive optimizer. The learning rate, weight decay, and warmup steps for each group need to be tuned independently.

    Below is a conceptual parameter-grouping example showing how to separate optimizers in a training framework:

    1. for param in model.all_parameters:
    2. if param.ndim == 2 and param not in embedding_layers:
    3. assign to matrix_optimizer(lr=lr_matrix)
    4. else:
    5. assign to adaptive_optimizer(lr=lr_adaptive)

    The grouping rules must match the model architecture. If an embedding layer is mistakenly assigned to the matrix optimizer, training often shows noticeable oscillation in the early stages.

    6. Multi-Token Prediction: Training Aid and Inference Acceleration

    Multi-Token Prediction (MTP) adds auxiliary heads during training that predict several subsequent tokens. This helps the model learn longer-range dependencies while also providing candidate tokens for speculative decoding during inference.

    The basic speculative decoding flow is as follows:

    1. The auxiliary head predicts k candidate tokens in one pass.
    2. The main model verifies these candidates in parallel, accepting the prefix that matches its own predictions.
    3. Resampling starts from the first rejected position, and the next round begins.

    The acceptance rate determines the speedup. If candidate quality is low, the acceptance rate drops and the extra verification compute cancels out the gains. Therefore, when evaluating MTP acceleration, you should measure the acceptance rate on real production traffic rather than relying only on synthetic data.

    7. How to Evaluate a New-Architecture Model

    Public benchmark scores are an important reference, but three points deserve attention when making direct comparisons.

    First, the models being compared should be similar in scale and cost. Activated parameters, total parameters, context length, and inference precision all affect scores.

    Second, benchmark datasets may overlap with training data. For coding and reasoning problems, once questions are made public, they can easily be absorbed into training corpora, inflating scores.

    Third, no single metric represents real-world experience. Performance on code completion, tool calling, long-document Q&A, and multi-turn dialogue can vary widely.

    Teams are advised to build their own evaluation sets covering core business scenarios and to standardize the evaluation process:

    1. def evaluate(model, sample_set):
    2. results = []
    3. for sample in sample_set:
    4. output = model.generate(sample.input, temperature=0, max_length=sample.limit)
    5. score = scoring_fn(output, sample.reference_answer)
    6. results.append({"id": sample.id, "score": score, "latency": output.latency})
    7. return aggregate(results)

    Setting the temperature to 0 reduces randomness and makes cross-version comparison easier. The scoring function should be automated as much as possible, with manual spot checks for open-ended tasks.

    8. From a Deployment Perspective: Converting Performance into Cost

    API unit pricing is only part of the cost. When self-hosting or choosing a cloud inference service, you should factor in hardware, throughput, and cache hit rates together.

    The hardware cost per token can be roughly estimated as:

    1. cost_per_million_tokens = gpu_hourly_price ÷ (avg_throughput (tokens/sec) × 3600 × utilization) × 1,000,000

    For example, assume a GPU costs 10 per hour, average throughput is 2,000 tokens per second, and utilization is 50%. That yields 3,600,000 tokens processed per hour, giving a cost of about 2.78 per million tokens. These figures are only meant to illustrate the calculation method—actual values should be replaced with real benchmark results.

    For workloads with many repeated input prefixes, cache hit rate has a significant impact. The effective input cost can be written as:

    1. effective_input_cost = hit_rate × cached_price + (1 − hit_rate) × regular_input_price

    With a hit rate of 60%, a regular input price of 1.0, and a cached price of 0.1, the effective input cost is 0.46. The higher the hit rate, the more value there is in reusing system prompts and fixed document prefixes.

    9. Key Checklist for Deployment and Quantization

    Before launching a new-architecture model, the following checks are recommended, in order:

    1. Inference framework support: confirm that the target inference engine has implemented the operators required for the new attention structure, external table lookups, and multi-token prediction. Without proper adaptation, neither performance nor correctness can be guaranteed.
    2. Quantization validation: separately test the impact of weight quantization, activation quantization, and cache quantization on accuracy, with particular attention to math reasoning, code generation, and long-context retrieval.
    3. Memory planning: account for weights, external tables, KV cache, and temporary activations together, leaving some headroom.
    4. Throughput benchmarking: test concurrent performance using request-length distributions close to production traffic, recording time-to-first-token and overall throughput.
    5. Regression monitoring: after launch, continuously sample production requests and observe output quality, refusal rate, and timeout ratio.

    These checks apply to any large model; new architectures only expand the scope of validation without changing the fundamental methodology.

    10. Conclusion

    LLM architecture is shifting from simply scaling up toward multiple parallel directions: conditional computation, long-context optimization, and external storage. Sparse activation reduces per-token compute, attention optimizations ease memory pressure in long-text scenarios, external knowledge structures separate memorization-type information from the compute path, and new optimizers attempt to improve the efficiency of large-scale training.

    For developers and enterprise users, the key is not memorizing any particular model’s parameter counts, but building a framework for judgment: understand what problem each improvement solves, what cost it incurs, and validate it with your own evaluation sets and benchmark data. Following the approach outlined in this article, you can turn information about architectural evolution into actionable decisions on model selection, deployment, and cost.