Native Multimodal Architecture and Sparse Activation: A Deep Dive
This article breaks down how a new generation of small, natively multimodal models uses asymmetric activation, a causal encoder-decoder structure, and externalized memory to reduce serving cost. It explains the design rationale behind each architectural choice and offers a reusable framework for evaluation, deployment, and tuning, with a focus on long-input, short-output AI agent workloads.
Native Multimodal and Sparse Activation Architecture: A Deep Dive
1. Why Small Models Have Become the Engineering Battleground
Over the past two years, improvements in large model capability have mainly come from scaling up parameter counts. In real production environments, however, deployment cost is not determined by how “smart” a model is alone. It is shaped by the compute cost per request, time to first token, generation throughput, and context length taken together.
As a result, a clear trend has emerged: vendors no longer release only their largest and most powerful flagship models. They also ship smaller, low-activation, natively multimodal general-purpose versions designed to handle the bulk of online traffic.
The value of small models can be broken down into three layers:
- Cost layer: Fewer activated parameters mean smaller matrix multiplications per forward pass and lower cost per token.
- Experience layer: Generation throughput directly determines how smooth streaming output feels. Long-form text and code generation are especially sensitive to speed.
- Workload layer: AI agent applications typically “read a lot and write a little,” meaning very long input contexts and relatively limited output. This requires an architecture that is cheap enough during the prefill stage.
This article uses a “new-generation small native multimodal model” as the subject of discussion, abstracts its architectural characteristics, and presents a reusable methodology for evaluation and deployment.
2. Architecture Breakdown One: The Motivation Behind Asymmetric Activation
Traditional mixture-of-experts (MoE) models typically use symmetric activation: the input and output stages run the same set of experts with the same number of activated parameters. The new-generation approach introduces asymmetric activation, where the number of activated parameters differs between the prefill and decode stages. A typical configuration activates about 8B parameters during prefill and about 16B during decode.
This is not about “adding more parameters.” It is about redistributing compute along the time axis:
- The prefill stage processes thousands of tokens at once. It is compute-intensive and highly parallel, so fewer activated parameters can significantly reduce total latency.
- The decode stage processes one token per step. It is constrained by memory access and scheduling, so activating more parameters buys stronger context modeling capability, which has a more direct impact on final quality.
The following pseudocode illustrates this scheduling difference:
# Inference path for asymmetric activationif stage == "prefill":model.set_active_experts(budget="low") # Long-sequence parallelism, minimize total computehidden = model.encode(prompt_tokens) # Compress context into a compact representationelse:model.set_active_experts(budget="high") # Single-token generation, prioritize qualitytoken = model.decode_step(hidden)
The engineering implication is clear: if your workload has long inputs and short outputs, asymmetric activation is almost purpose-built for it.
3. Architecture Breakdown Two: The Causal Encoder-Decoder (CED) Structure
Asymmetric activation only works because the network is reorganized into a Causal Encoder-Decoder (CED) form. To make this easier to understand, here is a “not fully rigorous but intuitive enough” analogy:
- The lower layers act as the encoder: They run only during prefill, compressing long context into a compact representation.
- The upper layers act as the decoder: They do most of the work during decoding.
- The source of the global key-value cache changes: The decoding layers no longer build a global KV set from their own hidden states. Instead, they project it directly from the last-layer hidden states of the encoder.
This is the key to making context “more compact.” In a traditional structure, every layer must maintain and read its own global KV, so memory usage grows linearly with both the number of layers and the sequence length. Projection-based sharing means there is only one source of global information, reducing memory and bandwidth pressure. The benefits are amplified under long contexts.
At the same time, the attention mechanism is reorganized into shared KV plus two-level sparse indexing: first, coarse-grained localization of relevant segments; then, fine-grained retrieval within those segments. This aligns with common sparse attention approaches in the industry, but the emphasis is on making the index structure itself hardware-friendly to execute.
4. Architecture Breakdown Three: Memory Enhancement Moves into the Main Model
Another important change is partially separating “memory” from the parameters. The core assumption is that model capability can be split into two parts:
- The part that requires reasoning: Handled by Transformer layers for composition, generalization, and multi-step inference.
- The part with low compute value but high storage demand: Local patterns, entity names, fixed collocations, and high-frequency fragments, whose representations are retrieved via N-gram hash lookups.
Similar practices already exist in the industry (for example, some models incorporate N-gram embedding tables with billions of entries). The benefits and costs are both clear:
- Benefit: Inject massive factual memory at very low cost, avoiding wasting parameters on low-frequency combinations.
- Cost: Requires additional lookup memory access and engineering pipelines, placing higher demands on storage and caching strategies.
5. Performance Evaluation: Don’t Look Only at “Total Parameters”
When evaluating this class of models, it is recommended to fix four dimensions to form a comparable baseline:
| Evaluation Dimension | Metrics to Observe | Notes |
|---|---|---|
| Speed | Generated tokens/s, time to first token | Core to the streaming experience |
| Consumption | Total input/output tokens, total elapsed time | Strongly tied to billing |
| Cache | Cache hit rate | Huge gains for repeated long-context prefixes |
| Quality | Long-text comprehension, multimodal QA accuracy | Avoids the trap of looking at speed alone |
A typical long-context AI agent stress test looks like this: input on the order of tens of millions of tokens, output on the order of hundreds of thousands of tokens, cache hit rate sustained above 99%, generation speed increasing from the hundreds to over three hundred tokens/s, and total elapsed time compressed to about 60% of the original. This kind of data shows that when the cache hit rate is high, the benefits of asymmetric activation and shared KV stack together.
6. Deployment and Tuning: Turning Architectural Advantages into Engineering
- Prefix stability: Place system prompts, tool definitions, and knowledge snippets in fixed positions to maximize cache hits.
- Context layering: Route static background through the cache and put dynamic retrieval results at the tail, avoiding prefix pollution.
- Batching strategy: Schedule prefill and decode separately, setting concurrency and memory quotas for each.
- Multimodal input preprocessing: Keep image downsampling and chunking strategies fixed; otherwise, the prefix hash is invalidated.
- Observability: Build a metrics dashboard on top of general capabilities such as the container platform, log service, and monitoring and alerting offered by Baidu AI Cloud, tracking throughput, hit rate, and error rate.
Example configuration:
serving:prefill:max_batch_tokens: 32768cache: enableddecode:max_batch_size: 64kv_source: encoder_last_hiddenobservability:metrics: [throughput, ttft, cache_hit, error_rate]
7. Conclusion
The core competitiveness of new-generation small native multimodal models lies not in the numbers on a parameter sheet, but in redistributing compute along the time axis: cheaper prefill, stronger decode, compact context, and externalized memory. For developers, the real implementation focus is to restructure the call pipeline around the “long input, short output” workload pattern, use caching and prefix design to fully capture the architectural benefits, and continuously validate results with a complete observability system.
