The Evolution of Native Multimodal LLM Architectures and Cost Reduction Practices
This article examines why multimodal capabilities and long context windows jointly drive up inference costs, and how recent architecture designs address the bottleneck. It covers hybrid linear and sparse attention, index vector pooling, manifold-constrained hyper-connections for shallower models, and the practical changes brought by native multimodal sequence spaces. It also provides guidance on capacity and cost modeling, unified token-based rate limiting, cache and storage tiering, evaluation of long-context and multimodal failure modes, and common selection pitfalls.
1. Background: Why Multimodality and Long Context Push Up Serving Costs Together
Over the past two years, LLM capability expansion has mainly followed two tracks: unifying text, images, video, and documents into a single modeling space, and stretching the context window from a few thousand tokens to the million-token range. Both tracks are highly visible in terms of user experience, but on the engineering side they converge on the same bottleneck: attention.
Self-attention in a standard Transformer grows quadratically with sequence length. When inputs include high-resolution image tiles, long documents, or screen recordings, the token count inflates quickly and the attention matrix becomes the dominant cost. At the same time, autoregressive decoding must cache all historical Key/Value pairs, so memory usage scales linearly with both concurrency and context length. The result is clear tension between a model that “can see more and see longer” and a service that remains affordable to run.
The industry has responded in three broad ways: compress the input (image downsampling, document chunking, retrieval followed by reranking); compress the cache (quantization, eviction policies, paged management); and redesign the architecture to reduce complexity in the attention mechanism itself. The first two are engineering optimizations with a ceiling on their gains; the third is where frontier models over the past year have actually focused. This article focuses on the third approach and explains what matters when deploying it in production.
2. Key Architecture One: Hybrid Sparse and Linear Attention
2.1 Linear Attention Handles Local Dependence
Linear attention accumulates historical information through recurrent state updates, turning “compute against every historical token one by one” into “maintain a fixed-size state and keep updating it.” Its advantage is complexity that is roughly linear in sequence length, with a state size that does not grow with context. The cost is weaker exact global retrieval: precise long-range recall tends to decay.
2.2 Sparse Attention Handles Long-Range Exact Recall
Sparse attention preserves exact access to the global context but computes only a selected subset of Query-Key combinations. A common approach adds a lightweight indexer over the sequence: the indexer first proposes a candidate set, and the main attention then performs exact computation over that set. This avoids full attention without sacrificing reachability of important long-range information.
2.3 Controlling the Cost of the Index Structure Itself
The indexer is lightweight, but at million-token context lengths it still accumulates a meaningful cache and latency footprint. One effective technique is pooled compression of index vectors: the multiple cached vectors the indexer produces for each position are merged into a single vector through weighted pooling, proportionally reducing index-side memory and memory-access overhead while barely affecting recall quality.
2.4 How to Read the Engineering Gains
The benefit of a hybrid architecture is not a single-point speedup but a simultaneous reduction of two cost curves: lower attention computation directly cuts compute consumption, while a smaller KV cache raises the concurrency and context length a single GPU can carry. For inference serving, the latter is often worth more, because it determines how many request streams a unit of GPU memory can serve.
An illustrative complexity comparison (showing order-of-magnitude relationships only, not data from a specific implementation):
Full attention: compute ~ O(L^2) cache ~ O(L)Linear attention: compute ~ O(L) cache ~ O(1) stateSparse attention: compute ~ O(L * k) cache ~ O(L)Hybrid (linear+sparse): compute in between, cache far below full attentionwhere L is sequence length and k is the number of candidates recalled per step
3. Key Architecture Two: Manifold-Constrained Hyper-Connections and Staying Shallow
Multimodal models often tend to stack layers, but more layers bring serial dependency, higher peak memory, and higher time-to-first-token. Manifold-Constrained Hyper-Connections are an improvement to cross-layer connectivity: they constrain how features connect and transform within a manifold space, making inter-layer information transfer more stable, gradient propagation more thorough, and representations reusable by later layers.
The engineering significance is that model capability does not degrade even with a substantial reduction in layer count, and parameter count is converted into effective capacity more efficiently. On the serving side, fewer layers mean a shorter serial chain, a lower peak of activation memory, and better decode throughput; a lower share of activated parameters also reduces memory access per token, which is especially critical for the memory-bound decode stage.
A common spec evolution comparison (illustrating design intent, not particular product metrics):
Dimension Previous generation New generationTotal parameters ~355B ~320BActivated parameters ~32B ~18BLayers 92 45
Two design choices are visible here: total capacity stays roughly flat to preserve knowledge capacity, while activated parameters and layer count drop sharply to cut per-inference cost. This is the typical tradeoff of the “sparse activation plus shallow-and-wide” route.
4. Native Multimodality: What a Unified Sequence Space Actually Changes
The difference between “native multimodal” and a “bolted-on vision encoder” is not just the interface shape but how training and inference are coupled. A native approach maps images, files, video, and text into the same sequence space, and vision encoding output participates in all subsequent computation as ordinary tokens. Visual information can therefore enter reasoning loops such as code generation and structured extraction directly, instead of requiring an extra vision call after text reasoning finishes.
This brings three practical changes:
- Shorter chains: a “look at the image, locate the issue, modify the code, read back the result” loop completes within a single request, reducing the latency and failure surface of multiple round trips.
- Consistent context: vision and text share the same positional and caching mechanisms, so reference relationships between long documents and their figures are not severed.
- Engineering simplification: there is no need to maintain two encoders and two caching strategies, and capacity planning and rate limiting can be done on a unified token basis.
5. Deployment Practice: How to Evaluate and Roll Out These Models
5.1 Model Capacity and Cost First
Do not look at unit price alone; plug in context length, concurrency, and the input/output ratio together. A simple way to estimate memory and throughput:
# Illustrative: estimate per-request cache and concurrency ceilingdef estimate(tok_len, layers, kv_heads, head_dim, bytes_per=2):# KV cache bytes per token per layerper_tok = 2 * kv_heads * head_dim * bytes_per * layerskv_bytes = per_tok * tok_lenreturn kv_bytesdef max_concurrency(gpu_mem, reserve_ratio=0.3, kv_per_req=0):usable = gpu_mem * (1 - reserve_ratio)return int(usable // max(kv_per_req, 1))
The key point: the concurrency gains from a smaller cache usually improve per-request cost more than a lower unit price does.
5.2 Use a Unified Token Basis for Rate Limiting and Quotas
Token conversion rules for multimodal requests must be defined in advance (images converted by tile count and resolution, video by frame rate and duration) and measured consistently at the gateway layer. Otherwise capacity planning becomes distorted, and long-video requests easily consume quota meant for interactive requests. Message queues can be combined with this to make processing asynchronous, separating offline handling of long documents and long video from online interaction.
5.3 Cache and Storage Tiering
Multimodal inputs are large, so keep raw assets in object storage and send only the necessary tiles to the model; apply content-addressed deduplication for repeated assets; and reuse prefix caching for high-frequency prefixes such as system prompts, tool descriptions, and long document templates. This last part yields more under a hybrid attention architecture.
5.4 Evaluation Must Cover Both “Long” and “Multi” Failure Modes
- Long context: needle-in-a-haystack retrieval, cross-section coreference, numeric alignment in long tables.
- Multimodal: OCR on small-font documents, chart reading, UI screenshot localization, temporal event localization in video.
- Stability: output consistency for identical inputs, truncation strategy for over-long inputs, retry and fallback paths on failure.
Make evaluation a regression-capable pipeline, and use logging services plus monitoring and alerting to track time-to-first-token, decode throughput, cache hit rate, and failure rate, forming continuous calibration across both capacity and quality dimensions.
6. Selection Guidance and Common Pitfalls
A “scenario, constraints, validation” three-step approach works well: first determine whether the workload is interactive or offline batch, then fix the hard constraints on context length and concurrency, and finally run a small-scale canary with real business samples. Three pitfalls are common: treating total parameter count as the capability ceiling while ignoring the impact of activated parameters and layer count on actual throughput; compressing inputs without governing the cache, which keeps concurrency low; and treating native multimodality as a simple bolt-on without adjusting metering and rate-limiting rules, leading to resource contention after launch.
On Baidu AI Cloud, such models can be paired with a container platform for elastic scaling, object storage for holding assets, and message queues for asynchronous long-running tasks, while logging services and monitoring/alerting establish closed-loop observation of cost and quality, keeping per-unit serving cost within a predictable range as capabilities improve.
