LLM Asymmetric Activation Architecture: How Prefill/Decode Asymmetry and Cross-Layer KV Cache Sharing Reshape Inference Cost

    This article explains why large language model inference is inherently asymmetric between the prefill and decode stages, and how far engineering can amplify that asymmetry. It shows that standard causal decoders already skip the final MLP and LM head for all but the last prefill position, describes how cross-layer cache sharing turns this marginal saving into a primary design lever, and outlines the causal encoder-decoder pattern along with its two hard constraints: causality and cache consistency. The article also breaks inference cost into activated parameters, cache footprint, and batching efficiency, provides a capacity estimation skeleton, and gives a five-step checklist for validating a base model upgrade, plus neutral notes on pricing models and cloud scheduling.

    1. Where It Started: A Version Bump Driven by Refactoring, Not Benchmark Chasing

    Occasionally the industry sees a model release where the version number moves by a single decimal place, yet the base architecture, parameter count, activation mechanism, and multimodal support are all rebuilt. The common community read is that this looks less like score optimization against leaderboards and more like an architecture refactor driven by engineering judgment.

    From an engineering standpoint, the trade-off is clear on both sides. The upside is that the inference cost structure is reshaped, and the unit cost for long-context and high-concurrency workloads may drop substantially. The downside is that an upgrade is no longer as light as swapping weights: the inference framework, cache management, batch scheduling, and even capacity models all have to change with it. Setting aside any specific product, this article focuses on the part with genuinely general value: why LLM inference is inherently Prefill/Decode asymmetric, and how far that asymmetry can be amplified in engineering terms.

    2. The Overlooked Fact: The Standard Decoder Is Already Asymmetric

    Much of the discussion treats “asymmetric activation” as a patent of some new architecture. That is a common misconception. The two stages of a standard causal language model do not have the same objective:

    • The prefill stage has two objectives: compute the key-value cache (KV Cache) for the input sequence, and predict the first output token.
    • The decode stage has only one objective: generate subsequent tokens one by one, based on the existing cache.

    The key point is that the feed-forward network (MLP) and the output vocabulary projection layer (LM Head) are independent of the cache. So apart from the last position, the remaining prefill positions do not need to compute the final layer’s MLP or LM Head at all — their outputs neither enter the cache nor contribute to the final prediction.

    Schematically, the logic looks like this:

    1. # Pseudocode: early truncation in the prefill stage
    2. hidden = embed(input_ids)
    3. for layer in layers[:-1]: # backbone layers must all run; the cache depends on them
    4. hidden = layer(hidden, cache)
    5. cache = hidden # only the cache up to the last layer needs to be kept
    6. last = layers[-1].mlp(hidden[:, -1]) # only the last position needs this
    7. logits = lm_head(last) # only the last position needs the vocabulary projection

    The conclusion: prefill in a conventional architecture already saves some activation and compute relative to decode. But that share is small, and in regular designs the speedup from optimizing it is negligible, which is why it has long been ignored.

    3. Amplifying the Asymmetry: Why Cross-Layer Cache Sharing Is the Key Lever

    The value of this newer class of architectures is not that it “invented asymmetry,” but that it turns asymmetry from a leftover into the main course. When multiple layers or modules share the same cached representation, the backbone computation of prefill can terminate early at the layer where the cache is complete, and the remaining structure can be almost skipped during prefill. A saving that was originally around 1% is amplified into a meaningful proportion.

    This produces three knock-on effects:

    1. Compute reallocation: input-activated and output-activated parameters are decoupled and can be set independently. A common approach is to keep the input side “leaner” and leave more of the capacity budget for the cached representation that has to stay resident long-term.
    2. Amplified long-context gains: prefill cost grows roughly linearly with input length, so cache sharing yields the highest marginal benefit on long inputs.
    3. More scheduling freedom: the two stages now have more divergent resource profiles, which provides a physical basis for disaggregated deployment.

    It is worth stressing that these gains are workload-dependent, not a universal bonus. For short-input, very-long-output traffic, prefill is a tiny share of the total, and the architectural dividend is nearly invisible.

    4. Causal Encoder-Decoder: One Implementation Path for Asymmetric Activation

    Systematizing the idea above yields the causal encoder-decoder family of structures. Its core is not “two models chained together,” but dividing responsibilities under the same causal constraint:

    • The encoder side compresses the input into a reusable representation (the cache), emphasizing compression ratio and information density;
    • The decoder side autoregressively expands over that representation, emphasizing generation quality and throughput.

    Compared with an ordinary symmetric structure, where input and output pass through computation of the same width, this division of labor allows the two sides to use different activation widths, different layer counts, and different attention strategies, while keeping causality intact (no future information leakage).

    Two red lines must be held in engineering:

    • Causality: any cross-position aggregation on the encoder side may only look at left-side context; otherwise training and inference become inconsistent.
    • Cache consistency: the representation reused during incremental decoding must be bit-for-bit equivalent to the one computed during prefill; otherwise quality drifts on long sequences.

    5. Parameter Count Is Not Cost: A Bill That Needs Recomputing

    A comparison table circulating in the community shows roughly this trend: total parameter count goes up, input-activated parameters go down, output-activated parameters are decoupled from the input, and generation speed actually improves. The source of this “bigger yet faster” combination is not mysterious:

    • Total parameter count mainly drives memory footprint and weight loading;
    • Activated parameters determine the multiply-accumulate work per token;
    • Cache size determines the memory and bandwidth pressure of long contexts;
    • Batching efficiency determines the actual unit cost.

    So the right way to evaluate a new base model is to measure these four separately, rather than looking only at parameter count or leaderboard scores. A usable capacity estimation skeleton:

    1. # Illustrates order-of-magnitude relationships only; coefficients must come from measurement
    2. prefill_cost ≈ tokens_in * act_params_in
    3. decode_cost ≈ tokens_out * act_params_out
    4. cache_bytes ≈ layers * kv_heads * head_dim * 2 * dtype_bytes * ctx_len * concurrency
    5. total_cost ≈ w1 * prefill_cost + w2 * decode_cost + w3 * cache_bytes

    Here w1/w2/w3 are determined by the actual workload’s input/output ratio, context length, and concurrency. Only by plugging in the real production distribution can you tell whether an upgrade pays off.

    6. Validation Checklist: How to Verify a Base Model Upgrade

    Recommended order of validation, to avoid being misled by a single metric:

    1. Align the quality baseline: run regression on your own business datasets, focusing on consistency for long inputs and structured output (JSON, code), not just general-purpose leaderboards.
    2. Verify cache equivalence: compare the output of “one-shot prefill” against “chunked incremental prefill”; the difference should be on the order of numerical noise.
    3. Disaggregated load testing: measure prefill throughput and decode throughput separately to get two independent curves, then compose the end-to-end latency distribution (P50/P95/P99).
    4. Cost modeling: substitute the real input/output length distribution into the estimation above, and compare unit token cost and peak memory.
    5. Canary and rollback: a new base model involves framework and cache management changes, so keep the old version path and a fast rollback switch.

    7. Neutral Notes on Pricing and Scheduling

    Peak/off-peak pricing has two rather different motivations in the industry: one is shifting load from peaks to troughs to balance resource utilization; the other is closer to dynamically adjusting by real-time resource tightness. The advice for consumers is the same methodology in either case — make decisions on total cost per unit of effective output, not on unit price — and schedule batch, asynchronous, and offline jobs into trough periods where possible.

    On the cloud, this usually does not require binding to any proprietary component; a complete pipeline can be assembled from generic categories: a container platform hosts the inference service, object storage holds weights and datasets, a message queue smooths and async-ifies requests, and logging plus monitoring and alerting handle latency and failure-rate observability.

    8. Conclusion

    The one conclusion worth remembering from this round of architecture evolution is this: inference cost is not determined by parameter count, but jointly by “activation width × stage share × cache overhead × batching efficiency.” Asymmetric activation and cache sharing are essentially about engineering and amplifying the natural Prefill/Decode difference. For developers, rather than chasing version numbers and scores, the better move is to build your own workload profile and evaluation baseline — that is the only reliable basis for judging whether any base model upgrade is worth it.