Sparse MoE with Asymmetric Activation: A Practical Guide to Lower-Cost LLM Serving

    This article examines a sparse Mixture-of-Experts (MoE) architecture that uses asymmetric activation between the input and output sides, with a total parameter count around 552B, roughly 8B activated on the input side and 16B on the output side, built on a Causal-Encoder-Decoder structure. It explains why separating model capacity from per-forward compute matters for read-heavy, write-light workloads, why the encoder-decoder design is gaining renewed attention, and where the cost advantages come from. It also covers engineering essentials such as memory and capacity planning, expert routing and scheduling, serving configuration by scenario, and evaluation practices that separate capacity metrics from service metrics, along with common testing mistakes to avoid.

    1. Background: Why Large Parameter Counts and High Cost Must Be Decoupled

    Over the past two years, demand for large models has shifted from “does it work” to “is the cost per unit of intelligence acceptable.” In scenarios such as AI coding assistants, long-document review, multi-turn customer support, and knowledge base Q&A, the input side often carries thousands or even tens of thousands of characters of context, while the output side is frequently only a few hundred characters of structured results. This “read a lot, write a little” load profile is a clear resource mismatch for traditional dense models, where every input token activates all parameters.

    Sparsification (Mixture-of-Experts, commonly referred to as MoE) addresses exactly this: it separates model capacity from the compute required for a single forward pass. Total parameter count determines how much knowledge the model can “remember” and “express,” while activated parameter count determines the compute cost actually paid per token. This article discusses a frontier sparse architecture with roughly 550 billion total parameters (552B class) built on a Causal-Encoder-Decoder structure, with asymmetric activation on the input and output sides: about 8 billion activated on the input side and about 16 billion on the output side, delivering better cost performance at comparable scale. The discussion covers four layers: structure, mechanism, engineering, and evaluation.

    2. Structure: Why the Encoder-Decoder Design Is Back in Favor

    2.1 Separation of Responsibilities Between the Two Sides

    The causal encoder handles “reading”: it performs representation extraction over the input context with restricted bidirectional visibility, focusing on long-range dependency modeling and retrieval-style alignment. The decoder handles “writing”: it generates results autoregressively, focusing on instruction following and format stability. The two sides do not share all weights, so the number of experts and routing granularity can be designed independently for each workload.

    A schematic structural description (pseudocode that expresses only the data flow and does not represent any specific API):

    1. # Input side: long-context representation extraction, smaller activation footprint
    2. ctx = causal_encoder(input_tokens) # shape: [B, L_in, D]
    3. pooled = ctx.mean(dim=1) # sentence/segment-level summary
    4. # Output side: autoregressive generation, larger activation footprint
    5. state = decoder.init_from(pooled)
    6. for step in range(max_new_tokens):
    7. logits = decoder.step(state) # only some experts are activated per step
    8. token = sample(logits)
    9. state = state.append(token)

    2.2 What Asymmetric Activation Means for Engineering

    Activating 8B on the input side and 16B on the output side means the “reading” phase is cheaper in compute while the “writing” phase is heavier. This matches real business distributions closely: the prefill phase processes long sequences that can be parallelized, with high compute density but a per-token cost that can be amortized; the decode phase runs token by token in sequence, where memory access and scheduling overhead take a larger share and stronger expressive capacity is needed to preserve generation quality. Tilting the activation budget toward the output side trades for generation quality without raising overall cost.

    3. Why the Cost Is Lower: Four Verifiable Sources

    1. Compute savings from sparse routing: a single token activates only a tiny fraction of total parameters, so training and inference FLOPs grow with activated volume rather than total volume.
    2. Load profile match: with long inputs and short outputs, low input-side activation directly reduces prefill cost, and prefill typically dominates the latency of online requests.
    3. Structural reuse: the encoder side builds a representation of the long context once, and the decoder side reuses it many times, reducing repeated computation.
    4. Parallelism-friendly partitioning: the expert dimension can naturally be split across multiple devices; combined with tensor parallelism and pipeline parallelism, this improves cluster utilization and indirectly lowers unit cost.

    Note that these are general mechanisms. Actual numbers depend on implementation quality, batching strategy, and hardware conditions, and any “lower cost” conclusion should be validated on your own workloads.

    4. Engineering Implementation

    4.1 Memory and Capacity Planning

    A 552B total parameter count means the weights alone cannot fit in a single machine’s memory and must be sharded across devices. In practice, plan around three elements: weight sharding, expert parallelism, and activation recomputation.

    • Weights: split along both the layer and expert dimensions to avoid a single device hosting too many experts and becoming a hotspot.
    • KV cache: the main memory consumer under long contexts; estimate it as 2 × num_layers × num_heads × head_dim × sequence_length × batch_size and leave headroom.
    • Activation recomputation: enable recomputation for deep encoder layers, trading compute for memory.
    1. Memory budget ≈ weight shards + KV cache + peak activations + communication buffers
    2. Recommended headroom: 15%~25% to absorb bursty long requests and fragmentation

    4.2 Routing and Scheduling

    Expert routing carries a risk of load imbalance. Common practice is to add an auxiliary load-balancing loss, set expert capacity limits with overflow buffers, and enable expert affinity scheduling on the inference side so that requests in the same batch tend to hit the same devices, reducing cross-machine communication.

    4.3 Serving Configuration Reference

    Scenario Input/output profile Recommended strategy
    Long-document summarization Very long input, short output Increase prefill parallelism, enable chunked encoding
    Structured extraction Medium input, stable output Fix the decoding template, constrain generation length
    Multi-turn dialogue Balanced on both sides Reuse prefix cache, control the context window

    5. Evaluation Methods and Common Pitfalls

    Evaluation must separate capacity metrics from service metrics. The former covers perplexity and downstream task accuracy; the latter covers time to first token, cost per thousand tokens, throughput, and availability. There are three common mistakes: reporting only total parameters without activation volume, which distorts cost expectations; stress-testing with short inputs and extrapolating to long-context conclusions; and overlooking the decode bottleneck caused by higher output-side activation, leading to wrong capacity planning.

    A recommended benchmarking approach: fix input length in tiers (for example 2K/8K/32K), fix output length, record P50/P95 latency and unit cost, and instrument the prefill and decode phases separately. Only then can you locate the real bottleneck.

    6. Conclusion

    A sparse architecture with asymmetric activation is essentially about turning “knowledge capacity” and “online compute” into two adjustable knobs. For developers, the key to implementation is not chasing parameter scale but accurately characterizing your own input-to-output ratio, choosing an activation budget accordingly, and then using sharding, caching, and scheduling to convert the theoretical cost advantage into real savings on the bill. To validate this on Baidu AI Cloud, you can build a reproducible benchmarking loop using general capabilities such as the container platform, object storage, log service, and monitoring and alerting, and make decisions with data rather than a parameter table.