Large Model Architecture Evolution: PD Asymmetry and Asymmetric MoE Explained
This article explains the Prefill and Decode (PD) asymmetry in large language model inference, the asymmetric activation Mixture-of-Experts (MoE) architecture, and practical guidelines for deploying these architectures in the cloud.
As the parameter counts of large language models keep growing, the industry’s standards for measuring technical breakthroughs are changing. Rather than chasing high scores on public leaderboards, more foundational R&D teams are choosing to deeply restructure model architectures. Although this technology-driven restructuring may face uncertainty in commercial deployment in the short term, in the long run it addresses the core of model inference efficiency and computational bottlenecks. This article analyzes the Prefill and Decode asymmetry (PD asymmetry) in large model architectures and the asymmetric activation Mixture-of-Experts architecture. It also discusses practical guidelines for deploying these new architectures in the cloud.
1. The Design Logic Behind Prefill and Decode Asymmetry
When optimizing large model inference, we usually focus on techniques such as KV Cache and operator fusion. We often overlook the asymmetry within the inference process itself. In fact, even in conventional autoregressive large models, the Prefill and Decode stages differ fundamentally in their computational goals.
1. Dual goals and computational redundancy in the Prefill stage
The Prefill stage has two core tasks. First, it computes and caches the KV Cache for the input prompt so that the Decode stage can reuse it. Second, it predicts the first token of the answer based on the input sequence. However, if we break down the computation graph of the Transformer architecture, we find that generating the KV Cache depends only on the Key and Value projection matrices in the attention layers. The MLP and the final language model output head have no role in KV Cache computation.
This means that in the Prefill stage, only the last token of the sequence needs to pass through the full MLP and LM Head to predict the next token. In theory, all preceding tokens do not need to participate in the computation of the last-layer MLP and LM Head. In traditional architectures, the overhead of this redundant computation seems negligible. However, as model size and context length grow, the accumulated waste becomes significant.
2. Acceleration amplified by cross-layer Cache sharing
A new generation of model architectures introduces cross-layer Cache sharing, which further amplifies the benefits of PD asymmetry. In this design, multiple Transformer layers reuse the same set of KV Cache. As a result, the main computation in the Prefill stage can end early, at the generation of the last layer’s cache. This substantially reduces the floating-point operations in the Prefill stage. The design not only lowers first-response latency but also leaves more computing headroom for longer context windows.
2. Breakthroughs in Asymmetric Activation MoE Architecture
Mixture-of-Experts has become the mainstream approach for scaling model parameters. However, traditional MoE models usually use symmetric activation, meaning the number of parameters activated at the input side and the output side is the same. Although this symmetry simplifies engineering, it does not fully exploit the characteristics of different computing stages.
1. Limitations of traditional symmetric MoE
In a traditional symmetric MoE model with 284B total parameters, for example, the activated parameters for both input and output might each be 13B. This design gives context understanding and output generation equal computational weight. In practice, however, processing input context often requires fast feature extraction and pattern matching, while generating output relies more on refined decoding of deep semantic features. A symmetric activation mechanism cannot optimize for this difference, so computing resources are not allocated as efficiently as possible.
2. Causal encoder-decoder and the introduction of asymmetric activation
The new architecture introduces the concept of a causal encoder-decoder, which breaks the traditional symmetric paradigm. Take a new-generation model with 552B total parameters and 196B activated parameters. It uses asymmetric activation: input activated parameters are reduced to 8B, while output activated parameters are increased to 16B.
This asymmetric design offers clear technical advantages:
- Lightweight input processing: With 8B input-activated parameters, the model can process large volumes of context at very low computational cost during the Prefill stage. This significantly eases the compute pressure from long text inputs.
- Heavier output generation: With 16B output-activated parameters, the model has enough parameter capacity during the Decode stage to perform high-quality feature mapping and token generation. This improves generation quality without excessively increasing the latency of each decoding step.
This strategy of separating “reading” from “writing” and configuring resources differently for each is an important sign that large model architectures are maturing.
3. New Challenges for Compute and Scheduling as Architectures Evolve
Major changes to the underlying model architecture pose new challenges for cloud compute scheduling and resource management. Asymmetric activation and PD-separated design fundamentally change the memory footprint and communication patterns of the model.
1. Load balancing and the trade-off with peak-valley pricing
Model inference services typically show clear peak and off-peak demand. Many platforms use peak-valley pricing to balance server load. However, when model capabilities improve sharply, for example when architectural restructuring brings broad performance gains, this often triggers price cuts. Price cuts can further drive a surge in call volume during peak hours. Underlying compute platforms need strong elastic scaling capabilities to handle the sudden traffic caused by these capability upgrades.
2. Cloud-native infrastructure strategies
Deploying complex asymmetric activation MoE architectures requires a strong cloud-native platform. Infrastructure providers such as Baidu AI Cloud can support PD-separated deployment architectures through high-performance heterogeneous compute instances, high-speed, low-latency RDMA networking, and containerized orchestration.
When deploying asymmetric MoE, the distribution strategy for input experts and output experts requires careful design. By using a cloud platform’s container services and object storage, model weights can be sliced and stored according to the activation strategy and loaded on demand. This reduces memory fragmentation. Combined with the platform’s monitoring, alerting, and logging services, development and operations teams can observe GPU utilization and communication overhead in both the Prefill and Decode stages in real time. They can then dynamically adjust batch size and concurrent requests.
4. Best Practices for Deploying Large Models
Given the architectural changes described above, developers building large model applications should adopt more flexible deployment strategies.
1. Physically separated PD deployment
Fully decouple Prefill and Decode and deploy them on different compute nodes. The Prefill cluster focuses on high-throughput context processing. It uses the lightweight 8B-level input activation to build the cache quickly. The Decode cluster focuses on low-latency token generation. It uses the 16B-level output activation to maintain output quality. KV Cache is transferred between the two clusters through a high-speed network and a distributed cache system, such as Redis or an in-memory message queue.
The following is a simplified pseudocode example of a PD-separated inference router:
class PDInferenceRouter:def __init__(self, prefill_cluster, decode_cluster, cache_store):self.prefill_cluster = prefill_clusterself.decode_cluster = decode_clusterself.cache_store = cache_storedef generate(self, prompt, max_tokens):# 1. Prefill stage: use a lightweight input-activation node to compute the KV Cache and the first tokenfirst_token, kv_cache = self.prefill_cluster.process_prompt(prompt)# 2. Store the KV Cache in distributed storage so Decode nodes can reuse itcache_id = self.cache_store.set(kv_cache)# 3. Decode stage: route to a high-activation generation nodegenerated_tokens = self.decode_cluster.generate_tokens(first_token, cache_id, max_tokens - 1)return [first_token] + generated_tokens
2. Compute-aware elastic scheduling
Using the capabilities of a cloud-native platform, scale the service automatically based on QPS and token throughput. During peak business hours, increase the number of Decode compute node replicas to handle generation-intensive requests. During off-peak periods, release resources to reduce operating costs.
Conclusion
The restructuring of large model architectures, from symmetry to asymmetry and from unified computation to PD separation, reflects a deep understanding of the nature of computation. Combining PD asymmetry with asymmetric activation MoE not only breaks the zero-sum trade-off between parameter scale and inference speed. It also provides a more solid engineering foundation for the path toward artificial general intelligence (AGI). For developers and enterprises, understanding the logic behind these architectural changes, and adapting to them with cloud-native infrastructure such as Baidu AI Cloud, will be key to staying competitive in the AI application wave.
