The Evolution of Native Multimodal LLM Architecture: Cutting Inference Costs

    This article examines how modern LLM architectures are evolving to reduce the cost of long-context and multimodal inference. It breaks down hybrid attention designs that combine linear and sparse attention, manifold-constrained hyper-connections that reduce layer count, and native multimodal modeling in a unified sequence space. It also outlines a practical playbook for turning architectural gains into business savings through baseline measurement, tiered routing, cache and batch governance, and context budgeting, along with evaluation and risk considerations.

    1. Background: Long Context and Multimodality Are Both Driving Up Inference Costs

    Over the past two years, the central challenge in LLM serving has shifted from “can it generate?” to “can it generate reliably at an affordable cost per unit?” Two curves are rising at the same time: context length is expanding from thousands of tokens to the million-token range, and input formats are expanding from plain text to images, files, and video. Together, these changes have fundamentally reshaped the cost structure on the inference side. The bottleneck is no longer just the compute consumed by parameter count, but the quadratic growth of attention computation and the linear expansion of the KV cache.

    In a standard Transformer, the complexity of self-attention grows quadratically with sequence length. This means that when the context doubles, the attention computation roughly quadruples. At the same time, every generated token must keep its key and value vectors in the cache, so memory usage scales with both concurrency and context length. In engineering terms, the number of concurrent sessions a single card can handle drops sharply, first-token latency becomes more volatile in long-document scenarios, and multimodal inputs add extra visual encoding overhead. As a result, architectural innovation in the new generation of models generally points to the same goal: lowering the “cost per token of serving” without sacrificing overall intelligence.

    2. Architecture Deep Dive 1: Hybrid Design of Sparse and Linear Attention

    Hybrid attention is the mainstream approach among current frontier models for controlling long-context costs. Its core idea is to assign different responsibilities to different types of attention.

    • Linear attention handles local dependencies. Through a recurrent state-update mechanism, it compresses historical information into a fixed-size state representation, avoiding full computation over every historical token. The tradeoff is limited long-range exact retrieval, but language modeling needs between adjacent tokens make up the largest share of demand.
    • Sparse attention handles global recall. With a lightweight indexer, the model first scores historical segments and selects only a small number of highly relevant ones to participate in computation, preserving long-range cross-sequence information at a cost far below full attention.
    • Index cache compression is a key engineering detail. The indexer itself must also cache vectors, and at million-token context lengths this overhead is not negligible. Compressing the indexer’s multiple cached vectors into a single vector via weighted pooling can significantly reduce latency and memory usage in the indexing stage.

    Based on publicly available technical material, the gains from this kind of design are quantifiable: compared with the previous generation in the same model family, attention computation is reduced by roughly 3x and KV cache size by roughly 4.4x. For developers, the direct implication is that the same accelerator card can sustain longer contexts and higher concurrency, and the marginal cost of scenarios such as long-document summarization and cross-file code understanding drops noticeably.

    It is worth noting that hybrid attention is not a zero-cost replacement. The state compression in the linear part loses some precise information, and the recall quality of the sparse part depends on how thoroughly the indexer was trained. On the business side, this must be paired with evaluation, especially for “needle-in-a-haystack” retrieval tasks and multi-hop question answering over very long documents.

    3. Architecture Deep Dive 2: Manifold-Constrained Hyper-Connections and Fewer Layers

    The second design worth attention is manifold-constrained hyper-connections. Traditional residual connections treat layers as simple additive paths, and in deep networks this can lead to unstable gradient propagation and insufficient representation reuse. Hyper-connection methods extend the connections into learnable cross-layer pathways, while manifold constraints limit how these connections take values in the feature manifold space, making training more stable and representation reuse more thorough.

    The engineering value shows up as “fewer layers are possible.” As a public spec comparison illustrates, one generation with 355B total parameters, 32B activated parameters, and 92 layers becomes a new generation with 320B total parameters, 18B activated parameters, and 45 layers: total parameters stay roughly flat, activated parameters drop by about 44%, and the layer count is nearly halved. Under a sparse activation architecture, the fewer parameters that actually participate in computation per token, the lower the memory bandwidth and compute overhead; fewer layers further compress the fixed overhead of per-layer scheduling and communication. This “deeper connections, shallower stacking” route is effectively amplifying the returns of scaling rather than simply pruning.

    4. Native Multimodality: Why a Unified Sequence Space Matters

    Native multimodality is fundamentally different from “bolting a visual encoder onto a text model.” The former maps images, files, video, and text into the same sequence space for unified modeling, and the visual encoding results directly participate in the subsequent inference loop. The latter is a pipeline concatenation, where visual information is compressed into static features after encoding and struggles to interact repeatedly with text reasoning.

    The capability difference from a unified sequence space is especially clear in coding and document scenarios: the model can repeatedly call on visual information in a loop of “look at the UI screenshot, locate the control, generate code, and check against the screenshot again,” rather than reading the image once and giving an answer. For engineering implementation, this means input preprocessing, truncation strategies, and cache management must all be redesigned for mixed modalities, and cannot reuse the chunking logic of pure text.

    5. Implementation: Turning Architectural Gains into Business Value

    Architectural cost reduction only holds up when it lands in service governance. The recommended order is as follows.

    1. Measure the baseline first. Fix a business dataset and record first-token latency, cost per thousand tokens, concurrency limits under long context, and failure rate as a comparison baseline for later tuning.
    2. Tiered routing. Send short requests to a small-spec model with low activated parameters, and send long-document and multimodal requests to specs that support hybrid attention, using a unified gateway to split traffic by context length and modality.
    3. Cache and batch governance. Turn system prompts and fixed document prefixes into reusable prefix caches, and pair them with continuous batching to improve throughput; also monitor the cache hit rate, since a rate that is too low indicates unstable prefix design.
    4. Context budgeting. Set input limits and the number of retrieved segments for each task type to avoid the latency tail caused by overly long contexts.

    Illustrative routing and budget-control logic:

    1. def route(request):
    2. tokens = estimate_tokens(request)
    3. has_media = bool(request.images or request.files)
    4. if has_media or tokens > 32_000:
    5. return "long_context_multimodal" # Hybrid attention + native multimodal spec
    6. if tokens > 8_000:
    7. return "long_context_text"
    8. return "small_fast" # Low activated-parameter spec
    9. def build_budget(task):
    10. return {
    11. "max_input_tokens": 200_000 if task.kind == "doc_qa" else 60_000,
    12. "retrieve_top_k": 8,
    13. "prefix_cache": task.stable_prefix, # System prompt and fixed background
    14. }

    On the cloud, model inference services, container platforms, object storage, message queues, logging services, and monitoring and alerting can be combined under general categories: batch corpora go in object storage, asynchronous tasks use message queues to smooth peaks, elastic compute is handled by the container platform, and effect and cost metrics go uniformly into the logging and monitoring system. Baidu AI Cloud typically offers complete general-purpose capabilities on this kind of architecture, from compute scheduling to observability, making it easier for teams to focus on evaluation and business logic itself.

    6. Evaluation and Selection: Don’t Just Look at Leaderboard Scores

    The gains from a hybrid architecture must be validated with business metrics. It is recommended to build a three-tier evaluation set: first, a general-capability set covering reasoning, writing, and code; second, a long-context set including multi-hop question answering, cross-file retrieval, and key-information location; third, a multimodal set including screenshot understanding, scanned-document parsing, and image-text consistency checks. Only by running all three tiers in regression can you judge whether the “cost reduction” comes at the price of capability degradation.

    On the cost side, focus on three variables: activated parameters determine compute per token, the KV cache and index cache determine memory and concurrency, and layer count affects fixed scheduling overhead. When selecting, aligning these three items with the business’s peak concurrency is usually more instructive than simply comparing total parameter count.

    7. Limitations and Risks

    • Sparse recall may miss low-scoring but critical information, so hybrid retrieval and reranking are needed as a fallback.
    • Linear state compression may suffer information decay during very long generation, so long-form writing should be generated in segments with consistency checks.
    • Multimodal inputs cost far more than text, so limits on resolution and frame sampling should be set.
    • An architecture upgrade is not the same as a business upgrade; without baseline data, real gains cannot be judged.

    Overall, the value of the new generation of native multimodal models lies not in any single metric, but in unifying attention, cache, layers, and modality into the same cost model. If developers can build the four engineering capabilities of baseline, routing, caching, and evaluation in parallel, they can turn architectural cost reduction into a real drop in unit cost on the business side.