Asymmetric Activation and Memory Augmentation: Architecture Boundaries and Deployment Considerations for Large Language Models

    This article covers the Causal Encoder-Decoder (CED) architecture, which uses different activation sizes for prefill and decoding, along with its shared KV projection and two-level sparse indexing. It also describes the Engram approach, which moves memory-style tasks to N-gram hash lookup tables. The article explains which workloads suit each design, where each one can fail, and what teams should check before deploying them.

    Large language models are moving toward native multimodality and AI agents, and long inputs are becoming a more pressing problem. An agent may read many documents in a single task, and it must also keep the history of several rounds of tool calls. All of this content has to be processed during the prefill stage, so most of the cost falls on the input side.

    1. CED Architecture: Separating Encoding from Generation

    A Causal Encoder-Decoder (CED) splits a network into two parts. The lower layers act as an encoder. They process long inputs only during the prefill stage and compress the context into a compact hidden state. The upper layers act as a decoder. They generate output tokens one at a time.

    The main difference from a standard Mixture of Experts (MoE) model lies in the activation strategy. A standard MoE model usually activates the same number of experts in both stages. CED allows each stage to activate a different number of parameters: fewer during prefill and more during decoding. The source material describes one architecture that activates 16B parameters per token during decoding and 8B parameters per token during prefill, where B stands for billion parameters. These figures come from the description of a single model, so they do not apply directly to other models.

    The benefit of asymmetric activation depends on the workload shape. If the input is short and the output is long, prefill accounts for only a small share of the total computation, so the savings are limited. If the input is long and the output is short, such as long-document question answering or batch log analysis, prefill makes up a large share of the total computation, and the benefit is clearer.

    The approach has three boundaries. First, the input length in the business workload must be much longer than the output length. Second, the model must learn the division of work between the two stages during training. Existing dense models or ordinary MoE models cannot simply be converted to get the same effect. Third, if the encoder compresses too aggressively, fine-grained details are lost. This shows up as lower accuracy on questions about the middle sections of long documents. Teams can catch this failure with regression tests on their own target business data.

    2. Shared KV Projection and Two-Level Sparse Indexing

    In a standard Transformer, each layer builds its own global key-value (KV) pairs from its hidden state and caches them. The longer the context, the larger the cache. Memory use grows linearly with context length, and the computation for dense attention grows quadratically.

    CED lets all decoder layers share one set of global KV pairs. These KV pairs are projected directly from the hidden state of the encoder’s last layer, so the decoder layers no longer store a separate history of KV pairs. The cache holds only one copy, which reduces memory pressure.

    Two-level sparse indexing reduces how much content the decoder must examine at each decoding step. The first level roughly filters the memory blocks that may be relevant. The second level runs fine-grained attention only within the candidate blocks. As a result, decoding does not need dense computation over the entire context.

    The table below compares the two approaches on key dimensions. The conclusions are based on mechanistic reasoning. Specific numbers depend on model size and hardware.

    Dimension Standard Transformer CED Shared KV Approach
    Number of historical KV copies One per layer One shared copy for the whole model
    Memory growth with length Grows with both layer count and length Mainly grows with length, with a smaller effect from layer count
    Retrieval method Usually dense attention Two-level sparse indexing
    Prerequisites None The structure must be adopted during training
    Main risk High cost for long contexts Sparse filtering may miss relevant segments

    The failure case for sparse indexing needs attention. When the answer to a question is spread across several passages, and those passages have low semantic similarity to one another, the first-level filter may miss one of them. The answer is then incomplete. Possible mitigations include increasing the number of candidate blocks or setting fixed retention rules for key passages. Both options raise the amount of computation.

    3. Engram and N-gram Hash Lookup

    Large models handle two kinds of work at once: reasoning and memory. Reasoning includes mathematical calculation, logical planning, and code generation, and these tasks require multiple layers of computation. Memory covers fixed collocations, entity names, and common phrases, which are mainly lookup problems. If all of this work is handled by Transformer parameters, the model grows larger and computational efficiency drops.

    Engram separates the two kinds of work. The Transformer backbone focuses on reasoning, and an N-gram hash lookup module handles local patterns. The module uses a hash function to map N consecutive tokens to a position in a table, then retrieves the vector stored at that position.

    Hash lookup has a collision problem. Different N-grams can map to the same position. There are three common ways to handle this. The first is to use multiple independent hash functions. The same N-gram then retrieves vectors from several positions, which are combined through weighting or concatenation, so that a single collision has less effect. The second is to add a gate in the fusion stage, so the backbone decides from context whether to trust the lookup result. The third is to expand the table’s capacity, which lowers the collision probability but increases storage use. Which method to use depends on the technical report for the specific model. Teams should not assume an approach based on experience alone.

    The update mechanism also needs to be clear. Lookup vectors are usually learned during training and are read-only at inference time. If a business introduces many new entities, such as new product or people names, those entries are not in the table, so the module cannot help with them, and the backbone must handle them alone. Incremental updates need a separate training process. They cannot be written into the table online.

    The hit rate has clear limits. Frequent fixed collocations have high hit rates, while rare entities and new words have low ones. When estimating the benefit, teams should measure the hit rate on their own business corpus instead of relying on averages from general corpora.

    4. How to Read Performance Data

    The source material cites several performance figures, including latency reduction, faster generation speed, and cache hit rate. These figures come from a public benchmark. However, the material does not give the benchmark name, report number, model version, hardware model, input and output lengths, or measurement method. Without this information, the numbers cannot be reproduced or compared with other approaches. For that reason, this article does not cite the specific values.

    When evaluating performance data, readers can check the following items:

    1. The benchmark name and source, such as a paper ID or a link to the technical report.
    2. The model scale and version, including total parameters and active parameters per token.
    3. The hardware setup, including GPU model, GPU count, and interconnect.
    4. The distribution of input and output lengths, and the batch size.
    5. The metric definitions, such as time to first token, time per output token, and throughput.
    6. The scope of the cache hit rate calculation, whether it counts per request or per token.

    Cost estimates can use a simple formula. The cost per token equals the hourly GPU cost divided by the number of effective output tokens per hour. Effective output tokens exclude requests lost to queuing, failed retries, and timeouts. To compare two architectures, both should use the same input and output lengths and the same hardware conditions.

    5. Pre-Deployment Checklist

    Before adopting this kind of architecture, teams can work through the following steps:

    1. Measure the input and output lengths of business requests, and confirm that inputs are much longer than outputs.
    2. Run long-document question answering and multi-round tool-calling tests on target data, and record changes in accuracy.
    3. Measure time to first token and generation speed, and compare them with the current solution.
    4. Measure the N-gram lookup hit rate, and confirm how well the business corpus covers high-frequency patterns.
    5. Prepare a fallback plan so that requests can switch back to the original model if quality drops for a given request type.
    6. Confirm that the model is compatible with the parallelism strategy of the inference framework in use, including how expert parallelism, data parallelism, and pipeline parallelism split the workload.

    6. Suitable and Unsuitable Scenarios

    Suitable scenarios include long-document question answering and contract review, where inputs are long and outputs are short. They also include agents that repeatedly read tool results across multi-round tasks, and batch log analysis or report summarization.

    Unsuitable scenarios include creative tasks with short inputs and long outputs, because prefill accounts for only a small share of the computation in these tasks. They also include legal or medical retrieval that demands very high detail, because encoder compression and sparse filtering may miss critical information. Businesses that need frequent knowledge updates are a poor fit as well, because the lookup module does not support online writes.

    Summary

    CED separates encoding from decoding and lets the two stages use different activation sizes. Shared KV projection and two-level sparse indexing reduce the cache and retrieval costs of long contexts. Engram hands memory tasks to N-gram hash lookup so that the backbone can focus on reasoning. The benefits of all three depend on the shape of the workload, and each has clear failure conditions. When choosing a design, teams should first measure their own input and output distributions, then verify results on their target data instead of relying on published figures.