LLM Inference Acceleration: From PD Asymmetry to Asymmetric Activation Architectures

    This article explores how Prefill-Decode (PD) asymmetry, an inherent characteristic of autoregressive models, is leveraged to accelerate large language model inference. It breaks down the fundamental differences between the Prefill and Decode phases, explains how cache-sharing asymmetric activation architectures (like CED) transform minor natural asymmetries into significant performance gains, and provides engineering evaluation criteria and practical takeaways for developers deploying these new architectures.

    LLM Inference Acceleration: From PD Asymmetry to Asymmetric Activation Architectures

    Introduction

    In recent years, the inference efficiency of Large Language Models (LLMs) has become a focal point in the industry. Whenever a new architecture is released, the concept of “Prefill and Decode Asymmetry” (PD Asymmetry) is frequently discussed. However, a commonly overlooked fact is that PD asymmetry is not a proprietary invention; it is rooted in the computational essence of autoregressive generative models. This article explores the fundamental principles behind PD asymmetry, explains how asymmetric activation architectures centered on cache sharing amplify this natural characteristic into significant inference acceleration, and discusses evaluation methods in engineering practice.

    1. How Prefill and Decode Differ

    LLM inference is generally divided into two phases:

    • Prefill Phase: Processes all input tokens in parallel, computes and caches the Key-Value (KV) Cache required for attention at each layer, and predicts the first output token.
    • Decode Phase: Generates tokens autoregressively, step-by-step. Each step processes a single new token and relies on the previously accumulated KV Cache.

    While both phases run the same model, their computational characteristics differ significantly. Prefill is compute-bound and can fully utilize parallel computing power, whereas Decode is memory-bound, with the bottleneck lying in the read bandwidth for weights and caches.

    2. The Overlooked Fact: Conventional Architectures Are Naturally PD Asymmetric

    Many readers do not realize that even in conventional symmetric architectures, the activated parameters during Prefill and Decode are naturally unequal. This is because Prefill has two goals:

    1. Compute the KV Cache for each layer of the input sequence.
    2. Predict the first answer token.

    Crucially, only the last position needs to produce the prediction for the next token. The MLP (feedforward network) in the last Transformer block and the output projection layer (LM Head) have nothing to do with the KV Cache computation—the KV Cache is determined once the attention sublayer computation is complete. Therefore, for all input positions except the last one, the computation of the final layer’s MLP and LM Head can be skipped.

    This means that in traditional architectures, the actual number of activated parameters per token during Prefill is inherently slightly less than during Decode. However, because this difference is negligible in models with billions of parameters, it has long been overlooked as a primary optimization direction.

    3. Cache Sharing: Amplifying Asymmetry into Architectural Gains

    Since calculations unrelated to the Cache can be skipped during Prefill, a natural design question follows: Can more layers be decoupled from Cache computation? This is the starting point for new architectures represented by cache-sharing concepts (such as YOCO).

    The core idea is that the KV Cache is no longer maintained by every layer individually. Instead, it is generated by a few key layers and shared by the remaining layers. Consequently, the primary computation during Prefill only needs to proceed to the position of the “last cache-producing layer.” The weights of all subsequent layers can remain completely inactive during Prefill; their computational burden is shifted entirely to the Decode phase.

    This structure is often referred to as a Causal Encoder-Decoder (CED) style asymmetric activation:

    • Input activated parameters are significantly fewer than output activated parameters. For example, some public reports show designs with around 8B activated parameters on the input side and 16B on the output side, whereas traditional symmetric Mixture-of-Experts (MoE) architectures have identical activation for both (e.g., 13B).
    • This is often accompanied by a redesign of the expert routing mechanism, allowing the model to reduce per-step Prefill computation while increasing total parameter count.

    The benefits are direct: Prefill latency (Time To First Token, TTFT) decreases, and throughput in long-context scenarios improves. Although the Decode phase sees an increase in activated parameters, its bottleneck is memory bandwidth rather than compute. The added computational overhead has a limited impact on overall latency. Essentially, this architecture precisely shifts compute overhead to where latency is least sensitive.

    4. Engineering Evaluation and Trade-offs

    When evaluating such architectures, consider the following dimensions:

    1. Combined TTFT and TPOT Performance: First token latency (TTFT) and Time Per Output Token (TPOT) must be measured separately; relying solely on end-to-end throughput is insufficient.
    2. Long-Context Scalability: The impact of cache-sharing designs on KV Cache memory footprint directly determines concurrency capacity and long-sequence costs.
    3. Accuracy Regression Testing: Architectural changes (especially cache sharing and routing mechanism modifications) may cause subtle shifts in model behavior. These should be validated on custom evaluation sets.
    4. Deployment Adaptation Cost: Asymmetric activation requires adapting the inference framework’s scheduling, tensor splitting, and cache management logic. Assess the modification costs for your existing inference stack.

    From an engineering perspective, these architectures yield the most significant benefits in online service scenarios with long inputs and high concurrency (e.g., document Q&A, code analysis). In scenarios with short inputs and long outputs (e.g., creative writing), the increased activated parameters on the Decode side may offset some gains, requiring empirical validation.

    5. Takeaways for Developers

    • Understanding the Essence Over Trends: PD asymmetry is an inherent property of autoregressive models. New architectures simply elevate this property from a marginal optimization to an architectural design principle. Understanding the underlying motivation helps determine the sustainability of a technical approach.
    • Focus on Activated Parameters, Not Total Parameters: Inference costs are driven by activated parameters and memory access. When evaluating models, separately examine the activation scale on the input and output sides.
    • Architecture Evolution Propagates to Inference Infrastructure: Trends like cache sharing and asymmetric activation require inference engines to have more flexible layer-level scheduling capabilities. Investing early in a pluggable inference stack is a prudent choice.

    Conclusion

    From “Prefill naturally requires slightly less computation” to “ensuring Prefill only computes Cache-related parts,” asymmetric activation architectures represent a leap from detail observation to systematic design. For developers, grasping the main thread of PD asymmetry enables quick identification of true technological increments amid a flood of new architecture releases, leading to more rational selection and deployment decisions.