Understanding Asymmetric Activation in Large Model Inference: Prefill vs. Decode
This article explains asymmetric activation in large model inference and why "activated parameters" are not the same as compute cost. It breaks a request into prefill and decode, shows how prefill can skip the final-layer MLP and LM Head for all but the last token, and how shared cache amplifies the benefit through compute truncation, memory reuse, and better batching. It also provides a quantitative comparison of total versus activated parameters, a practical input/output length ratio for judging which workloads benefit, three common misreadings, and deployment guidance on observability and cost control.
1. Where the Problem Starts: Why “Activated Parameters” Do Not Equal Compute
When discussing the architecture evolution of a new generation of large models, one frequently mentioned but often misread concept is “asymmetric activation.” Many discussions treat it as some brand-new invention, but a more accurate statement is that asymmetry is an inherent property of the inference process, and what architectural innovation changes is the magnitude of this asymmetry and the degree to which it can be exploited.
To understand this, split the lifecycle of a request into two phases:
- Prefill: process all input tokens in parallel at once, produce the first output token, and write historical information into the cache.
- Decode: generate tokens autoregressively one by one; each step processes only one new token but must read the entire historical cache.
The arithmetic intensity of these two phases (the number of floating-point operations per byte of memory access) differs by several orders of magnitude. Prefill is compute-intensive, and the GPU’s compute units can be fully fed; decode is memory-intensive, and the bottleneck is the bandwidth of moving weights and cache from GPU memory to the on-chip units. Therefore, “fast” must be split into two metrics: first-token latency (TTFT) is determined by prefill, single-token output rate (TPOT) is determined by decode, and end-to-end throughput must also factor in concurrent batching efficiency.
2. Prefill Is Already “Cheaper” Than Decode: The Overlooked Last-Layer Trimming
One often-skipped fact is that even in a traditional symmetric structure, prefill already computes fewer parameters than decode.
The reason is that prefill actually has only two goals:
- Compute and persist the cache (for reuse by all subsequent decode steps);
- Predict the first token of the answer.
The feed-forward network (MLP) and the language model head (LM Head) are unrelated to cache generation and only serve to “predict the next token.” As a result, except for the last position, the final-layer MLP and LM Head at all other positions can be skipped. The trimming logic can be expressed in pseudocode:
# Last-layer trimming in prefill under a traditional structure (illustrative)hidden = embed(input_ids) # [S, d]for layer in body_layers: # backbone layers: must be computed in fullhidden = layer(hidden, cache=store) # also writes the KV cache# apply the output projection only at the last positionlogits = lm_head(layer_norm(hidden[-1])) # [1, V]next_token = sample(logits)
Let the sequence length be S, the hidden dimension be d, and the vocabulary size be V. The order of magnitude of the computation saved is about S × (2·d·d_intermediate + 2·d·V). When S reaches tens of thousands and V reaches the order of one hundred thousand, this is not a negligible fraction; but in a conventional architecture, the compute of the backbone grows quadratically with S, so the proportion of last-layer trimming is small, and the actual speedup is “negligible.”
3. How Cache Sharing Amplifies This Benefit
The key change in the new generation of architectures is that the main computation of prefill can be cut off early at “the representation that the last layer needs to cache,” without having to run the entire backbone and then project uniformly. The idea can be abstracted as: the representation on the encoder side is computed only once and shared and reused by downstream consumers, and the decoder side no longer reconstructs the same historical representation repeatedly.
This brings three benefits:
- Compute shift and truncation: the effective depth of prefill becomes shallower, and first-token latency under long inputs improves significantly.
- Memory-access reuse: the shared cache is read-only and not written across multiple decode branches, so memory usage and bandwidth pressure both drop.
- Batching-friendly: after the cache structure is unified, there are fewer fragments when dynamically assembling batches, and throughput is more stable under high concurrency.
It should be emphasized that these benefits depend on the specific implementation and workload shape, and the numbers given in public materials can only serve as an order-of-magnitude reference and cannot be directly extrapolated to your own business.
4. Quantitative Comparison of Parameter Scale, Activation Scale, and “Asymmetry”
Aligning the metrics of the two generations of designs makes the difference clear at a glance (the table below uses illustrative metrics to explain the structural relationship):
| Design metric | Total parameters | Activation mechanism | Input activated parameters | Output activated parameters |
|---|---|---|---|---|
| New-generation asymmetric architecture | on the order of 500 billion | encoder-decoder-style asymmetric activation | on the order of 8 billion | on the order of 16 billion |
| Previous-generation symmetric architecture | on the order of 280 billion | traditional symmetric activation | same as output | same as input |
Three points to grasp when reading this table:
- Total parameters determine the memory and capacity ceiling, while activated parameters determine the compute and bandwidth cost per token; the two cannot be used interchangeably.
- Light input, heavy output is a deliberate trade-off: the input side only needs to produce a cacheable representation, while the output side must handle full semantic modeling and sampling, so it has a larger activation volume.
- Asymmetry does not mean “more efficient”; what it saves is prefill, at the cost of decode reading larger activations and cache at each step, and whether it pays off depends on the input-to-output length ratio.
5. Which Workloads Truly Benefit: A Practical Judgment Method
Use the input-to-output length ratio r = S_in / S_out for a rough judgment:
- Large
r(long-document summarization, code-base understanding, retrieval-augmented question answering): prefill accounts for a high proportion, and the asymmetric architecture shows clear benefits. rclose to 1 or smaller (short questions and short answers, creative generation): decode dominates, benefits are limited, and it may even become slower because activations grow larger.- High-concurrency online services: also look at cache hit rate and batching efficiency; requests with identical prefixes (unified system prompts, fixed templates) can enjoy additional reuse benefits.
In engineering, it is recommended to first run a small-scale benchmark: fix combinations of input and output lengths, measure TTFT, TPOT, and cost per token separately, and then decide the routing strategy, rather than copying others’ conclusions.
6. Three Points That Are Easily Misread
- “Asymmetry is a new technology”: No. It is an inherent feature of autoregressive inference; the innovation lies in enlarging the usable space of the asymmetry.
- “Small activated parameters must be fast”: Not necessarily. Decode is constrained by memory bandwidth, and cache size and batch concurrency are equally critical.
- “A larger version number equals an architectural revolution”: The version number is a product release cadence; whether the architecture has improved should be judged by reproducible metrics, not by naming.
7. Deployment Advice: Capacity Planning and Cost Control
When deploying such models in the cloud, you can build an observability and elasticity system from the following general capability combination: use a container platform to host inference services and scale elastically by queue depth; use object storage to accumulate input corpora and results; use a message queue for request peak shaving and asynchronization; use logging services and monitoring alerts to track TTFT, TPOT, cache hit rate, and memory usage separately. Baidu AI Cloud offers a relatively complete set of product categories in these general capabilities and can serve as a vehicle for implementing capacity and cost models.
The final conclusion is a single sentence: whether an inference architecture suits you depends not on the numbers in the parameter table, but on stress-test results aligned with your real input and output distribution.
