Asymmetric Activation for Long-Context Agent Inference
Agent workloads are highly asymmetric: a single task may read tens to hundreds of thousands of tokens of context but generate only hundreds to thousands of output tokens. This input/output imbalance exposes the different bottlenecks of prefill and decode, making symmetric activation inefficient. This article explains how an asymmetric activation architecture splits the network into a causal encoder and a decoder: the encoder uses a smaller activated parameter set to compress long text and visual inputs, while the decoder uses a larger activated set to preserve generation quality. It also examines native multimodal visual understanding, evaluation beyond tokens per second, co-design with agent runtimes, and deployment risks such as memory footprint, operator maturity, and quality regression.
1. Background: The Read/Write Asymmetry of Agent Workloads
In traditional dialogue scenarios, input and output token counts are roughly of the same order. Model designs therefore often assume a symmetric computation path in which the same network is traversed for every token. Agent workloads break this assumption. A task often begins by reading system prompts, tool descriptions, historical traces, retrieved passages, and even screenshots. The input can easily reach tens of thousands to hundreds of thousands of tokens, while the actual generated output may be only a few hundred to a few thousand tokens. This “read a lot, write less” pattern makes a symmetric activation strategy uneconomical.
The bottlenecks of prefill and decode are fundamentally different:
- Prefill processes all input tokens at once. The matrices are large and parallelism is high, so this phase is primarily compute-bound.
- Decode generates tokens autoregressively, one token at a time, and processes only one position per step. It is primarily memory-bound by memory bandwidth and KV cache access.
If both phases are forced to activate parameters at the same scale, the system may end up applying decode-phase cost to prefill work, or vice versa. This is the problem that asymmetric activation aims to address.
2. Limits of Symmetric Activation
Consider a conventional mixture-of-experts (MoE) architecture. Its activation is typically symmetric: whether a token belongs to the input or the output, it passes through the same number and structure of expert subsets. The following table is an illustrative comparison. The figures are intended only to show architectural differences and do not represent any specific product.
| Architecture form | Total parameters | Activation mechanism | Input activation | Output activation |
|---|---|---|---|---|
| Conventional symmetric MoE | Approx. 284B | Symmetric | Approx. 13B | Approx. 13B |
| Causal encoder–decoder split | Approx. 552B | Asymmetric | Approx. 8B | Approx. 16B |
Symmetric designs are simple to implement and offer high operator reuse. Their drawback is that they cannot make stage-specific trade-offs. When input length grows beyond 100,000 tokens, prefill compute accumulates and can become a major contributor to end-to-end latency.
3. Asymmetric Activation: Splitting the Network into a Causal Encoder and a Decoder
The core idea of asymmetric activation is to split the network structurally into two parts: a causal encoder and a decoder. The encoder compresses long input into a compact context representation; during prefill, it activates a smaller parameter set (illustrative value: 8B). The decoder generates output token by token and activates a larger parameter set (illustrative value: 16B).
The call path can be expressed in pseudocode as follows:
# Phase 1: prefill, activate only encoder parametersctx = causal_encoder(input_tokens) # produce a compact context representationkv = ctx.kv_cache# Phase 2: decode, activate decoder parametersfor step in range(max_new_tokens):logits = decoder(kv, last_token) # activate a larger parameter subset at each steplast_token = sample(logits)kv = append(kv, last_token)
The rationale is straightforward. The encoder handles highly redundant long text, so a smaller activation scale can be traded for throughput. The decoder handles short outputs that require precise generation, so a larger activation scale can be traded for quality. Once the two are decoupled, capacity can scale independently. Total parameter count may rise, while per-token cost can decline.
4. Synergy with Native Multimodal Visual Understanding
Native multimodal models build visual understanding into the backbone rather than attaching a separate external vision tower. This approach fits naturally with asymmetric activation. Images, screenshots, and screen recordings are encoded into large numbers of visual tokens, further increasing input length. If visual encoding and text encoding share the same causal encoder:
- Visual tokens and text tokens are aligned in the same representation space, reducing losses from cross-modal projection.
- The prefill cost of long screenshots and multi-turn interface traces is shifted onto the low-activation path.
- In an agent loop that “views the screen, calls a tool, and observes again,” repeated interface regions can be reused through prefix caching.
5. Evaluation: Do Not Look Only at tok/s
Generation speed alone can be misleading. At minimum, collect four categories of metrics:
- End-to-end total time: including queueing, prefill, decode, and tool-call waiting.
- Token usage structure: input, output, and cache-hit volumes measured separately.
- Prefix cache hit rate: in multi-turn agent loops, this value can often exceed 99%.
- Cost per task: measured per completed task rather than per million tokens.
The following comparison is illustrative and is intended only to show the evaluation dimensions.
| Metric | Symmetric architecture | Asymmetric architecture |
|---|---|---|
| Total time | 30m 11s | 18m 49s |
| Total tokens used | 20.31M | 11.59M |
| Output tokens | 154K | 126K |
| Generation speed | 120 tok/s | 361 tok/s |
| Cache hit rate | 99.7% | 99.5% |
The benefit of the asymmetric architecture comes mainly from lower prefill cost and reduced total input volume, not from a higher cache hit rate. The two cache hit rates are close, suggesting that the caching strategy itself is already near its limit.
6. Co-design with the Agent Runtime
Model-side asymmetric activation only delivers value when the agent runtime cooperates. Engineering work should focus on the following areas:
- Stable context assembly order: place system prompts, tool definitions, and fixed knowledge blocks first, and variable content later to maximize prefix reuse.
- KV cache lifecycle management: long-trace tasks need an explicit eviction policy so that GPU memory is not exhausted by historical turns.
- Batched tool calls: combine multiple read operations to reduce repeated prefill work.
- Observability: use logging and monitoring/alerting to collect per-phase latency, cache hit rate, and retry failure rate.
On cloud platforms, these capabilities are typically delivered by general-purpose services such as container platforms, object storage, message queues, logging, and monitoring/alerting. This separation makes it easier to decouple model inference from agent orchestration, deploy them independently, and scale each service on demand.
7. Selection and Risk Considerations
- Do not blindly pursue total parameter count: asymmetric architectures can have a large gap between total and activated parameters. GPU memory usage and bandwidth requirements must be evaluated separately.
- Limited benefit for short-output tasks: if a task already has short input and short output, the advantage of asymmetric activation may not be significant.
- Operator and framework maturity: new architectures place higher demands on inference engine operator support, quantization schemes, and cache implementations. Compatibility validation should be completed before launch.
- Quality regression testing is essential: after an architecture change, run A/B evaluations on real business workloads. Do not rely only on performance metrics.
8. Conclusion
The essence of asymmetric activation is to align model structure with the read/write asymmetry of real workloads: the encoder uses low activation to handle long inputs and visual tokens, while the decoder uses high activation to protect generation quality. For developers, the real benefit does not come from a single speed number. It comes from coordinated optimization across model structure, runtime framework, and observability.
