The Evolution of Native Multimodal LLM Architectures and Cost Optimization Practices

    This article examines how modern LLM architectures are reshaping the cost curve of long-context and multimodal inference. It covers sparse activation (MoE-style designs) that decouples total from active parameters, hybrid attention that combines linear and sparse branches with indexer pooling, manifold-constrained hyper-connections that preserve capability with fewer layers, and native multimodal modeling in a unified sequence space. It closes with practical guidance on cost breakdown, load testing, multimodal preprocessing, and capability regression testing.

    1. Why Multimodal and Long Context Are Expensive

    Over the past two years, LLM capability growth has followed two main tracks. One is context length, which has expanded from a few thousand tokens to the million-token range. The other is modality coverage, which has grown from plain text to images, documents, and video. On the inference side, however, the cost curve for both tracks is unfavorable.

    Self-attention in a traditional Transformer scales quadratically with sequence length. Doubling the context can therefore make the attention computation roughly four times as large. At the same time, the KV cache grows linearly with length and consumes memory bandwidth directly. Visual input compounds the problem: a single image is often encoded into hundreds or even thousands of visual tokens, and a short video can easily occupy tens of thousands of tokens. When long context and multimodality are combined, the cost of a single request can spiral quickly.

    As a result, recent architectural work is no longer focused only on making models larger. It has shifted toward three directions: activating only a small fraction of parameters per token, avoiding full computation over the entire history during attention, and modeling different modalities in a unified sequence space. Each is examined below.

    2. Sparse Activation: Decoupling Total and Active Parameters

    The core idea of sparse activation (MoE-style) architectures is to decouple parameter capacity from per-token computation. Total parameter count determines the model’s knowledge ceiling, while active parameter count determines the actual cost of a single forward pass.

    Take a recent model generation as an example. It has roughly 320 billion total parameters but only about 18 billion active parameters. Compared with the previous generation, which had about 355 billion total parameters, 32 billion active parameters, and 90 layers, the new architecture keeps the total parameter count roughly flat while compressing active parameters by about 40% and nearly halving the layer count.

    One point that is easy to overlook is that reducing layers often benefits memory bandwidth more directly than reducing parameters. Every layer removed means one less read and write of activations and the KV cache. During autoregressive decoding, the bottleneck is usually bandwidth rather than compute, so the gains from fewer layers are amplified.

    The engineering trade-off is that fewer active parameters reduce the representational capacity of each token. This must be compensated for with stronger connectivity mechanisms and training strategies; otherwise, capability degrades. That leads to the second key design.

    3. Hybrid Attention: Dividing Work Between Sparse and Linear

    Linear attention captures local dependencies through recurrent state updates and avoids computing over every historical token, giving roughly linear complexity with respect to length. However, it is weaker at precise long-distance recall. Sparse attention uses a lightweight indexer to select a small number of key positions from the global candidate set for computation, preserving long-range information across the sequence at a cost far below full attention.

    The rationale for combining them is separation of responsibility: the linear branch handles dense, smooth local modeling, while the sparse branch handles on-demand global retrieval. Publicly available figures suggest that, compared with the previous generation, attention computation drops by about 3x and KV cache size drops by about 4.4x.

    Further optimization targets the indexer itself. If each position keeps 4 index cache vectors, that overhead is also significant at million-token context lengths. The approach is to compress the 4 vectors into 1 through weighted pooling, which can be understood as a lightweight IndexPool mechanism, substantially reducing latency and memory usage in the indexing stage.

    Schematically, the computation path of hybrid attention can be abstracted as:

    1. # Pseudocode: illustrates data flow only, not a real API
    2. def hybrid_attention(x, linear_state, indexer, kv_cache):
    3. local = linear_attn_step(x, linear_state) # recurrent update, O(n)
    4. idx = indexer.topk(x, k=64) # lightweight index recall
    5. global_part = sparse_attn(x, kv_cache, idx) # compute over k positions only
    6. pooled = weighted_pool(indexer.cache, groups=4) # 4 vectors -> 1 vector
    7. return fuse(local, global_part, pooled)

    4. Manifold-Constrained Hyper-Connections: Trading Connectivity for Depth

    Hyper-connection methods introduce richer cross-layer connections between layers to ease gradient propagation and representation reuse in deep networks. Manifold constraints further limit the value space of these connections, making training more stable. The engineering value is that, even with a sharply reduced layer count, the model shows no clear capability degradation and instead releases the scaling benefits of the parameter budget more fully.

    This explains why “halving the layers” and “no capability loss” can hold at the same time: the benefits of depth are partly replaced by connection topology.

    5. Native Multimodality: The Value of a Unified Sequence Space

    The difference between native multimodality and a bolt-on visual encoder is that images, files, video, and text are mapped into the same sequence space and modeled together. The visual encoding results participate directly in the backbone’s inference loop, rather than being paraphrased into text first and then handed to the language model. A direct benefit is that visual information can be referenced repeatedly throughout the reasoning chain, which is friendlier to tasks such as chart understanding, UI screenshot localization, and document layout reasoning.

    6. Implementation Guidance and Cost Assessment

    1. Break down the cost structure first: split per-request cost into prefill (strongly related to input length and number of modalities) and decode (strongly related to output length, layer count, and bandwidth), and evaluate them separately.
    2. Load-test long context with real workloads: focus on KV cache usage and time to first token, not just peak throughput.
    3. Preprocess multimodal input: compress resolution, crop irrelevant frames, and control the visual token budget per request.
    4. Support with general-purpose capabilities on the serving side: use container platforms for elastic scaling, object storage for large files, and logging and monitoring with alerting for long-tail latency attribution.
    5. Build a capability regression set: after an architecture upgrade, validate quality with a fixed evaluation set rather than looking at cost metrics alone.

    7. Conclusion

    The value of a new-generation multimodal model lies not in any single parameter figure but in the combination of sparse activation, hybrid attention, strong connection topology, and native multimodality: flattening the cost curve of long context and multimodality while maintaining capability. For developers, the real gains come from redesigning context budgets and request orchestration accordingly. Baidu AI Cloud continues to follow these architectural trends across model serving and supporting cloud products, which can offer enterprises a smoother path to adoption.