LLM Inference Architecture Evolution: A Guide to Asymmetric Activation
This article breaks down how modern LLM inference architectures evolve beyond benchmark chasing, focusing on the computational asymmetry between prefill and decode. It explains how cross-layer KV cache sharing and asymmetric activation in causal encoder-decoder designs reduce compute, memory access, and VRAM usage, and offers a practical checklist for evaluating whether an architectural refactor genuinely lowers cost.
1. Two Paths of Model Iteration: A “Refactor-Style” Upgrade
Large model version evolution generally falls into two categories. The first is “score-chasing iteration”: keeping the existing network structure unchanged and improving evaluation scores by expanding data, tuning the training recipe, or increasing training steps. This path is low-risk and predictable, but its returns diminish as scale grows. The second is “refactor-style iteration”: changing how information is passed between layers, how parameters and activations are organized, or even the computation graph of the input and output paths. This path may not be optimal for short-term business metrics, because it requires retraining, retuning, and rebuilding the inference stack. However, it changes the slope of the cost curve, not just a single point on it.
The most reliable way to judge whether a refactor has real technical substance is not to look at leaderboards, but to see whether it reallocates three resources: parameter count, activation volume, and cache footprint. Using computational asymmetry during inference as the entry point, this article presents a reusable analysis framework.
2. Prefill and Decode Are Two Different Workloads
Autoregressive LLMs have two fundamentally different phases during inference:
- Prefill: Reads in the entire prompt at once, generates the key-value cache for every layer, and produces the first output token.
- Decode: Generates tokens autoregressively, one at a time, where each step processes only one new token but must read the entire historical cache.
The bottlenecks differ. Prefill is compute-intensive with high arithmetic intensity, so hardware utilization is easy to saturate. Decode is memory-access-intensive: every generated token requires re-reading the weights and cache, with extremely low arithmetic intensity. Therefore, “fast input” and “fast output” are two independent engineering goals. Optimizing both with the same set of parameters inevitably sacrifices one.
3. An Overlooked Fact: The Traditional Structure Is Already Asymmetric
A commonly misunderstood point is that asymmetry is not an invention of new architectures. The standard decoder structure already has inherent optimization room in the Prefill phase, because Prefill actually has only two goals:
- Compute and write the key-value cache for each layer.
- Predict the first token of the answer.
The feed-forward network and the output vocabulary projection have nothing to do with the cache. Except for the last position, no other position needs to pass through the final feed-forward network and output projection. The masking logic can be expressed schematically:
# Pseudocode: skipping tail computation during Prefillhidden = embed(input_ids) # [S, d]for layer in layers[:-1]:hidden = layer(hidden) # layer-by-layer forward pass, writing KV Cachecache.append(layer.kv)# Only the last position needs to produce logitslast = hidden[-1:] # [1, d]logits = lm_head(mlp(last)) # cost of only 1 tokenfirst_token = argmax(logits)
This means Prefill already saves the tail feed-forward and vocabulary projection compared to “computing everything.” In conventional structures, this saving is a tiny fraction and hardly worth optimizing on its own in engineering terms. But when the way the cache is organized changes, this saving is significantly amplified.
4. How Cache Sharing Amplifies the Benefit
If we introduce cross-layer cache sharing—where multiple layers reuse the same key-value representation—then the main Prefill computation only needs to advance to “the position of the last layer’s cache.” The subsequent layers no longer reconstruct the cache repeatedly and only take on lightweight transformation duties. At this point, the skipped tail computation is no longer a negligible fraction, but a considerable part of the structure. The benefits come from three sources:
- Saving compute: The skipped part includes the feed-forward network and output projection, which are parameter-intensive.
- Saving memory access: Fewer cache copies means the cache volume read at each Decode step drops accordingly, directly improving the memory-access bottleneck.
- Saving VRAM: With a lower total cache volume, the same VRAM can hold a longer context or a larger concurrent batch.
This explains a seemingly contradictory phenomenon: total parameter count rises, yet speed is faster. Because the key quantity determining Decode speed is not total parameters, but the amount that must be activated and read at each step.
5. Asymmetric Activation and Causal Encoder-Decoder Structures
Asymmetric activation means the input path and output path can have different activated parameter scales. Traditional mixture-of-experts structures usually take symmetric paths for input and output, with the same activation volume. Asymmetric design allows the input side to activate a larger set of parameters to fully understand the context, while the output side activates only a smaller scale of parameters to control per-step generation cost. The two organization approaches are compared abstractly below:
| Dimension | Symmetric Activation (Traditional MoE) | Asymmetric Activation (Encoder-Decoder Style) |
|---|---|---|
| Input activation scale | Same as output | Usually larger than output |
| Output activation scale | Same as input | Usually significantly smaller than input |
| Cache organization | Independent per layer | Can be shared across layers |
| Optimization focus | Training and inference consistent | Inference cost prioritized |
The core of the causal encoder-decoder structure is to decouple “understanding” from “generation”: the understanding phase can be heavy, while the generation phase must be light. Since the generation phase is executed repeatedly at every step, any activation reduction on the output side is amplified by the sequence length into a considerable total saving.
It should be emphasized that such structures place higher demands on training and implementation: cache sharing requires semantically compatible representations across layers, asymmetric paths require redesigning routing and parallel partitioning strategies, and length extrapolation and numerical stability both need additional validation.
6. How to Evaluate the Real Value of a Refactor
Here is an actionable evaluation checklist to avoid being misled by parameter scale and a single score:
- Look at per-token cost: Measure the per-million-token cost on the input side and output side separately, rather than only looking at a single average price.
- Look at first-token latency and per-step generation latency: These two metrics must be reported separately to reflect the real experience.
- Look at the cache growth curve under long context: Check whether the cache grows linearly with length and whether the slope decreases.
- Look at the throughput inflection point under concurrency stress testing: Lower activation volume should show up as more stable latency under higher concurrency.
- Look at whether the structural change is reversible: A refactor should keep the old structure as a baseline for comparison, making attribution easier.
When building a self-hosted inference service, the above metrics can be implemented using general cloud capabilities: use a container platform to host inference instances and elastic scaling, use object storage to save model and cache snapshots, use a message queue to smooth out request peaks, and use logging services and monitoring/alerting systems to collect latency percentiles and VRAM usage. The capabilities Baidu AI Cloud offers in these general categories can serve as a reference for setting up evaluation and stress-testing environments.
7. A Rational View on Pricing and Version Numbers
The legitimate goal of peak/off-peak pricing is load balancing and resource utilization, not competing with users for compute during peak hours. If prices instead rise during peak hours, users will naturally shift their budgets to off-peak periods, harming platform utilization over the long run. Version number jumps should not be decided by marketing alone either: changing low-level structures like cache organization and activation paths is indeed closer to the definition of a “major version” than simply piling on more data.
8. Conclusion
When evaluating a model upgrade, it is advisable to shift attention from “how many parameters, what leaderboard score” to three structural questions: Is the cache more economical? Is the output-side activation lighter? Are input and output reasonably decoupled? When all three hold simultaneously, rising parameter count and faster speed can coexist, and the engineering side can turn the benefits into measurable cost reductions through general cloud infrastructure. For developers, mastering this judgment method has more long-term value than memorizing the specifications of any single version.
