Next-Generation Asymmetric Activation LLM Architecture: CED, Shared KV, and Lookup-Based Memory

    This article breaks down how next-generation asymmetric activation LLM architectures restructure the computation graph to cut long-context inference costs. It explains causal encoder-decoder (CED) layer splitting, shared cross-layer KV with two-level sparse indexing, and sparse lookup-table memory, then covers evaluation metrics, agent framework coordination, and practical adoption advice. Readers will learn why prefill and decode can activate different parameter subsets, what accuracy tradeoffs context compression introduces, and which metrics make benchmark results reproducible.

    1. The Starting Point: An Imbalanced Cost Structure for Long-Context Inference

    In agent-style applications, the workload is clearly “read-heavy, write-light”: hundreds of thousands of tokens are injected at once from retrieval results, code repositories, and historical traces, while the actual generated output is often only a few thousand tokens. Traditional dense models and sparse expert models with symmetric activation run the same parameter path through both prefill and decode. As a result, the most expensive stage and the cheapest stage cost roughly the same per unit, and resource utilization is structurally wasted.

    The answer from the new generation of Flash-class models is to split the computation graph vertically, so the two stages activate different parameter subsets. All discussion below is based on the general mechanisms described in public technical reports and does not refer to any specific vendor model.

    2. Core Mechanism One: Causal Encoder-Decoder (CED) and Asymmetric Activation

    CED divides the network along the layer dimension into a lower half and an upper half. The lower layers act as an encoder that runs only during prefill, compressing long context into a compact set of representations. The upper layers act as a decoder that runs during token-by-token generation. Its global KV is no longer built layer by layer from the hidden states of its own layers; instead, it is projected directly from the encoder’s final hidden state.

    Illustration (pseudocode, expressing data flow only, not any real interface):

    1. # prefill: run the full stack, fewer activated parameters
    2. enc_hidden = encoder_layers(ctx_embeds) # ~8B scale activation
    3. kv_global = project(enc_hidden[-1]) # global KV projected from the last layer
    4. cache.append(kv_global)
    5. # decode: run only the upper stack, double the activated parameters
    6. for _ in range(new_tokens):
    7. h = decoder_layers(last_hidden, kv_global) # ~16B scale activation
    8. last_hidden, logits = h, head(h)

    This design brings three benefits. First, the context is compressed, so the memory and bandwidth pressure of long sequences drops from “multi-layer KV that grows linearly with length” to “one shared KV.” Second, prefill becomes cheap: reading long documents costs significantly less than before. Third, although decode activates more parameters per token, the smaller KV and more concentrated memory access actually improve throughput.

    One boundary worth stating objectively: context compression is lossy and may reduce accuracy on tasks that require verbatim backtracking, such as string location in very long logs. Shared KV also makes the model more sensitive to encoder capacity. In engineering practice, treat the “compression ratio” as an adjustable knob and use an evaluation set to determine a working point the business can accept.

    3. Core Mechanism Two: Sparse Lookup-Table Memory (Engram-Style Approach)

    The second change separates “memory” from the parameters. Inference-heavy work is handled by the attention backbone, while content that is low in compute value but high in memory volume — local patterns, entity names, fixed collocations, high-frequency phrases — is retrieved directly as embedding vectors via n-gram hash lookup and fused with the backbone representation.

    1. idx = hash_ngram(token_window, n=3) % table_size
    2. mem = embed_table[idx] # lookup, almost zero compute
    3. h = fuse(h, mem) # fuse with the backbone hidden state

    This belongs to the same technical lineage as the “lookup-based memory expansion” that has gained traction in the industry over the past year: trading memory for compute and decoupling parameter capacity from computation. The costs are noise from hash collisions and the memory footprint of the table, so collision rate and hit rate need to be monitored.

    4. Restructuring Attention: Shared KV and Two-Level Sparse Indexing

    Conventionally, each layer maintains its own global KV. The new generation of designs reorganizes this into cross-layer shared KV and adds two-level sparse indexing: a coarse-grained pass first selects candidate blocks, then fine-grained token selection happens within those blocks. Complexity drops from a full O(n) scan to roughly O(√n) or O(k·log n), which accounts for the other half of the throughput gain under long context.

    5. Performance Evaluation: Why Cache Hit Rate Determines Perceived Speed

    Public community reproduction data shows that the gap between the old and new approaches on the same long-document task appears mainly in the generation stage: total time drops from about 30 minutes to about 19 minutes, generation speed rises from about 120 token/s to around 360 token/s, the output contains fewer tokens, and the cache hit rate stays above 99.5%.

    Evaluation must record four metrics at the same time; otherwise the conclusions are not reproducible:

    Metric Meaning Common Mistake
    Generation speed Output tokens/s Looking only at first-token latency
    Cache hit rate Prefix reuse ratio Ignoring differences across multi-turn sessions
    Total token usage Input + output Not distinguishing billing conventions
    Pure LLM inference time Excluding tool waiting Counting IO as model performance

    6. Deep Coordination with Agent Frameworks

    Structural changes on the model side require cooperation from the framework side: stable prefixes, a fixed tool-call protocol, and a consistent context concatenation order are what keep caches and sparse indexes hitting. General-purpose capabilities on Baidu AI Cloud, such as the container platform, object storage, log service, and monitoring and alerting, can host the inference service, store session prefixes, and build load-testing dashboards, turning the metrics above into a sustainable engineering feedback loop.

    7. Adoption Recommendations

    1. Run A/B tests on real business corpora first, focusing on accuracy loss caused by compression.
    2. Fix the system prompt and retrieval prefix to maximize cache reuse.
    3. Split routing by “read long, write short”: send long-context requests to asymmetric activation models and short tasks to small models.
    4. Set alerts on three metrics — collision rate, hit rate, and tail latency — so long-tail jitter is not hidden by averages.

    Overall, stacking asymmetric activation, shared KV, and lookup-based memory marks a shift in inference optimization from “quantization and distillation” toward “architecture-level rearrangement.” Its engineering value can only be settled after validation on your own evaluation set.