LLM Asymmetric Activation Architecture: How Prefill and Decode Asymmetry Became a First-Class Design Concern

    This article examines how phase asymmetry in large language model inference evolved from a low-level implementation detail into a first-class architectural design principle. It explains the fundamental differences between prefill and decode workloads, shows that standard decoder-only structures are already asymmetric, and describes how cross-layer cache sharing and encoder-decoder-style causal structures amplify early termination in prefill. It also covers asymmetric activation as an adjustable design degree of freedom, why total parameter count and inference speed can improve together, a practical evaluation checklist, and the technical meaning of load-based pricing. The intended takeaway is to quantify your own workload first, then make explicit trade-offs among latency, throughput, memory, and cost.

    1. Where It Started: A Minor Version Bump with a Major Change

    A version bump from x.0 to x.1 usually signals bug fixes and experience polish. But when the update touches the underlying network structure, parameter scale, and activation strategy, that small version number actually carries an architecture-level refactor. Such a refactor may not be optimal on short-term business metrics: it does not directly produce a jump in benchmark scores, yet it changes the cost structure of training and inference. For engineering teams, understanding the technical motivation behind this kind of change is more valuable than focusing on the version number itself.

    This article strips away specific product attributes and discusses one general and critical topic: how phase asymmetry in LLM inference evolved from an “implementation detail” into a “first-class citizen” of architectural design.

    2. Prefill and Decode: Two Fundamentally Different Workloads

    Serving an autoregressive LLM is typically divided into two phases:

    • Prefill: processes all input tokens at once. It is compute-intensive, highly parallel, and usually achieves good compute utilization.
    • Decode: generates tokens one by one, processing only one new token per step. It is memory-bandwidth-intensive, with the bottleneck often in the bandwidth for moving weights and cache.

    This creates a long-standing conflict: the two phases have completely different compute requirements, memory requirements, and batching strategies, yet they share the same set of weights and the same cache layout. Common engineering responses include continuous batching, chunked prefill, and phase-disaggregated deployment, but these are all “scheduling-layer” remedies that do not change the model structure itself.

    3. The Overlooked Fact: Conventional Structures Are Already Asymmetric

    A commonly misunderstood point is that phase asymmetry is not an invention of a new architecture; conventional decoder structures are inherently asymmetric. The reason is that prefill actually has two goals:

    1. Compute and write the cache needed for subsequent decoding;
    2. Predict the first token of the answer.

    The feed-forward network and the output projection layer are unrelated to the cache. Except for the last position, the remaining positions do not need to compute the final-layer feed-forward network and the output head. Illustrative pseudocode:

    1. # Naive forward pass of a conventional decoder-only model
    2. for layer in layers[:-1]:
    3. h = layer(h, cache) # computed for all positions; results go into cache
    4. h_last = layers[-1](h, cache) # last layer
    5. logits = lm_head(h_last[:, -1]) # take only the last position
    6. # Optimization: the MLP and lm_head computation for h_last[:, :-1] can be skipped

    In other words, prefill can naturally skip a portion of activated parameters and floating-point operations. It is just that in conventional structures, this saving accounts for a tiny fraction and the speedup is negligible, so it has long been treated as a negligible implementation trick.

    4. Architectural Amplification: How Cache Sharing Turns a Small Win into a Large Gain

    The key change in the new generation of architectures is that the main computation of prefill can terminate early—forward computation can stop once it reaches “the last representation that needs to be written to the cache,” keeping only the minimal path required for decoding. The technical prerequisites usually include two types of design:

    • Cross-layer or cross-segment cache sharing: reduces repeated cache writes and reads, making the cache a reusable intermediate representation rather than an independent product of each layer;
    • Encoder-decoder-style causal structure: splits “building reusable representations” and “per-token generation” into two segments with clear responsibilities; the former can be highly parallel, while the latter maintains low latency.

    Combined, the previously negligible “skip the last layer” is amplified into a considerable compute saving, while also reducing the memory footprint and bandwidth pressure of the cache. This is the engineering meaning of “refactor over chasing benchmark scores”: the gain does not come from leaderboards, but from per-request cost.

    5. Asymmetric Activation: Decoupling the Input Side from the Output Side

    Conventional mixture-of-experts structures typically adopt a symmetric activation budget for input and output, meaning the number of activated parameters on both sides is the same. Asymmetric activation allows the two sides to be configured independently: the input side can activate more parameters to improve representation quality, while the output side keeps a smaller activation to reduce per-step decode cost; the reverse is also possible, depending on business workload characteristics.

    It should be emphasized that asymmetric activation is not a synonym for “more efficient,” but an adjustable design degree of freedom. Its value lies in aligning the architecture with real workloads:

    • Scenarios with long input and short output (document understanding, code base Q&A, retrieval-augmented generation) are suited to strengthening the input side;
    • Scenarios with short input and long output (writing, translation, multi-turn agent generation) should control output-side cost.

    6. Why Parameter Scale and Speed Can Improve Together

    “It has more total parameters, yet inference is faster” is not a contradiction; three metrics need to be distinguished:

    Metric Meaning Impact on experience
    Total parameters Upper bound of weight scale Determines capacity and knowledge carrying
    Activated parameters per token Parameters actually involved in computation Determines compute and latency
    Cache size Context representations that must be stored Determines memory and concurrency limits

    When the activation ratio decreases, the cache is compressed, and prefill computation terminates early, the compute and memory-access cost per request can still decrease even if total parameters grow. Evaluation should insist on “per-request cost and throughput as the standard,” rather than judging strength by parameter scale.

    7. Deployment Evaluation Checklist

    1. Workload profile: measure the distribution of input/output lengths to determine whether the optimization focus is on the input side or the output side.
    2. Metric baseline: separately record time to first token, per-token latency, throughput, and peak memory.
    3. Cache strategy: evaluate the impact of cache sharing and chunked prefill on concurrency.
    4. Elasticity and cost: combine the elastic scaling of container platforms, log services, and monitoring/alerting to build a cost dashboard, and use object storage or message queues to handle asynchronous and batch traffic.
    5. Canary and rollback: roll out the new architecture to a small traffic canary first, keep the old version channel, and decide the rollout pace based on real business metrics rather than leaderboards.

    8. The Technical Meaning of Dynamic Pricing

    Time-based pricing by workload is intended to shave peaks and fill valleys, improving resource utilization. If model efficiency gains lower the unit compute cost, a corresponding price reduction is a natural result; conversely, a surcharge during peak hours is also a routine adjustment under capacity constraints. To judge whether such a strategy is reasonable, look at whether it is consistent with the real resource cost curve, rather than interpreting it emotionally.

    9. Conclusion

    From a “small optimization at the implementation layer” to a “first-class design at the architecture layer,” asymmetric activation and cache sharing mark the maturation of inference optimization thinking: no longer chasing a single-point score, but reconstructing the computation path itself. The practical advice for developers is: first quantify your own workload, then make explicit trade-offs among latency, throughput, memory, and cost. If you run on Baidu AI Cloud, you can use general capabilities such as container platforms, monitoring/alerting, and log services to complete load testing and cost attribution, so that architectural gains truly land on business metrics.