The Evolution of Native Multimodal LLM Architecture and Cost Optimization Practices

    This article examines how native multimodal large language models are evolving to handle long contexts without runaway inference costs. It breaks down four core architectural strategies—hybrid sparse and linear attention, manifold-constrained hyper-connections, sparse activation, and unified sequence modeling for native multimodality—and explains which cost variable each one targets. Readers will also find practical guidance on establishing a cost baseline, tiered configuration, caching and reuse, capability guardrails, and observability, along with common misconceptions to avoid.

    1. Background: The Dual Cost Pressure of Multimodality and Long Contexts

    The capability boundary of large models keeps expanding, moving from plain text conversation toward native multimodal modeling that unifies images, files, video, and text. At the same time, the business side is raising its demands on context length, and inputs at the million-token scale are gradually moving from demo scenarios into real production. These two trends combine to push up resource overhead on the inference side, making the tension between “capability upgrades” and “service cost” a question engineering teams must address head-on.

    Cost pressure comes from three layers. The first is the quadratic complexity of attention computation: standard self-attention requires every token to interact with all historical tokens, so doubling the sequence length makes the computation roughly four times as large. The second is the GPU memory footprint of the KV cache: the cache grows linearly with sequence length and concurrency, and in long-context scenarios it often becomes a bottleneck before compute does, directly limiting the number of concurrent requests a single card can carry. The third is the extra overhead of multimodal encoding: high-resolution images and long videos are split into large numbers of visual tokens, and if they interact in full with text within the same sequence, the cost is amplified further.

    Given this, the design goals of the new generation of architectures are clear: reduce the computation per token, the memory bandwidth usage, and the cache size at the same time, without sacrificing overall intelligence. The sections below break down the implementation approach from four dimensions: attention mechanisms, connection patterns, sparse activation, and native multimodality.

    2. Key Design One: A Hybrid Architecture of Sparse and Linear Attention

    Hybrid attention is the mainstream direction for cutting long-context costs, and its core idea is to let different types of attention each do what they are best at.

    Linear attention captures local dependencies through recurrent state updates, turning “reviewing all history one by one” into “maintaining a state of fixed size,” which in theory reduces complexity from quadratic to linear. Its weakness is limited long-range exact retrieval. Sparse attention preserves a low-overhead global path: a lightweight indexer first scores historical tokens and recalls a small number of highly relevant segments, then attention is executed only on those segments, preserving cross-sequence long-distance information at a cost far below full attention.

    There is also an easily overlooked engineering optimization: the indexer itself needs caching, and at the million-token context scale this overhead is likewise substantial. A common approach is to apply weighted pooling compression to the indexer’s multiple cache vectors, merging several vectors into one, thereby reducing both latency and memory usage in the indexing stage.

    A schematic structural expression is as follows (it describes only the computation path, not a specific implementation):

    1. # Pseudocode: single-step computation path of hybrid attention
    2. def hybrid_attention_step(x, linear_state, index_cache):
    3. # 1) Linear branch: recursively update state to capture local dependencies
    4. linear_state = update_state(linear_state, x)
    5. out_local = read_state(linear_state, x)
    6. # 2) Index branch: compress the cache first, then recall a few global segments
    7. compact = weighted_pool(index_cache) # multiple vectors -> single vector
    8. topk = indexer_select(compact, x, k=64) # keep only highly relevant tokens
    9. # 3) Sparse branch: run attention only on the recalled set
    10. out_global = sparse_attention(x, topk)
    11. return combine(out_local, out_global), linear_state, update_cache(index_cache, x)

    When evaluating this kind of architecture, it is advisable to look at three metrics rather than latency alone: the reduction factor in attention computation, the reduction factor in KV cache size, and recall accuracy on long-context retrieval tasks. Only when all three hold can you conclude that the cost reduction did not come at the expense of capability degradation.

    3. Key Design Two: Manifold-Constrained Hyper-Connections and Layer Compression

    Another cost-reduction path is compressing network depth. Fewer layers reduce both parameter count and inference overhead, but conventional approaches tend to cause capability degradation. The idea behind Manifold-Constrained Hyper-Connections is to constrain how features connect in manifold space, making cross-layer information reuse and gradient propagation more stable, so that representation quality can be maintained with fewer layers.

    Its engineering implication is worth emphasizing: when the connection pattern improves the efficiency of information flow, scaling gains are further amplified, meaning “fewer layers” no longer equals “less capability.” Looking at the spec comparison, a certain new-generation model has roughly the same total parameter count as the previous generation, but its activated parameter count drops by about 40% and its layer count is nearly halved. This shows that improvements in architectural efficiency can substitute for part of the scale stacking.

    4. Key Design Three: Sparse Activation and the Inference Cost Model

    The separation of total parameters from activated parameters is the core of sparse architectures. Total parameters determine the model’s knowledge capacity, while activated parameters determine the part that actually participates in computation for a single token. Under sparse activation, the memory bandwidth and compute overhead per token are determined mainly by the activated parameters, so compressing the activated parameters to a small magnitude can significantly reduce the unit inference cost.

    A convenient approximate expression for communication:

    1. Single-token inference cost ≈ f(activated parameters, KV cache size, context length, concurrency)
    2. Total long-context cost ≈ single-token cost × input length × output length × request volume

    From this it is clear that hybrid attention lowers the cache and attention terms, while sparse activation lowers the parameter term; the two act on different variables, so their gains can stack. This also explains why “fewer activated parameters + fewer layers” can achieve comprehensive performance on par with or better than the previous generation at lower compute.

    5. Key Design Four: Unified Sequence Modeling for Native Multimodality

    The difference between native multimodality and “bolt-on concatenation” lies in where the modeling happens. The former maps images, files, video, and text into the same sequence space for unified modeling, with visual encoding results participating directly in the subsequent inference loop; the latter usually has a separate module generate descriptions first, then hands them to the text model, and information is lost in the conversion.

    The direct benefit of unified sequence modeling is more coherent cross-modal reasoning, for example letting the model read a UI screenshot directly and generate the corresponding code, locating key frames in a long video and then answering questions, or jointly analyzing a spreadsheet file and accompanying text. What engineering needs to support this includes data construction with a proper modality mix, compression strategies for visual tokens, and cache management tailored to multimodal inputs.

    6. Implementation Advice: How to Reuse These Ideas in Your Own Business

    • Establish a cost baseline first: separately measure the input length distribution, output length distribution, concurrency peaks, and cache hit rate to locate the real cost bottleneck.
    • Tiered selection: route short requests to a low-latency configuration and long-document and multimodal requests to a long-context configuration, avoiding a globally uniform high-end setup.
    • Caching and reuse: reuse prefix caching for system prompts and knowledge segments; use compression strategies to control memory for index-type caches.
    • Capability guardrails: build separate evaluation sets for long-context retrieval and cross-modal understanding, and require any cost-reduction change to pass a capability regression.
    • Observability: make single-token cost, cache size, time to first token, and throughput routine monitoring and alerting metrics, connecting them to logging services and monitoring and alerting systems to form a closed loop.

    7. Common Misconceptions

    The first is mistaking “few activated parameters” for “small knowledge capacity”; in fact total parameters determine capacity, while activated parameters determine the cost of a single pass. The second is focusing only on compute while ignoring memory bandwidth; long-context scenarios often cannot max out concurrency because the cache is the limiting factor. The third is simply equating multimodality with image-text concatenation, overlooking the difference unified sequence modeling makes for cross-modal reasoning. The fourth is skipping capability regression after cost reduction, leading to hidden degradation in long-range retrieval and complex reasoning.

    8. Conclusion

    Native multimodality and long contexts are the direction of capability evolution, and hybrid attention, manifold-constrained connections, sparse activation, and unified sequence modeling are the four pillars that make this direction affordable. For developers, the truly reusable methodology is: first quantify the cost structure, then apply optimization to each variable separately, and finally use capability evaluation to hold the line. With the general-purpose capabilities of cloud platforms such as Baidu AI Cloud (for example container platforms, object storage, logging services, and monitoring and alerting), this methodology can be applied to real business systems relatively smoothly.