Native Multimodal Large Models: Technical Architecture and Engineering Practices
This article breaks down the architecture of native multimodal large models and the engineering trade-offs behind them. It explains how unified tokenization, ultra-sparse MoE activation, hybrid attention, and million-token context reshape cost and latency, then covers visual coding loops, deployment sizing, long-context strategies, observability, and evaluation metrics that engineering teams can use to control cost and quality.
1. Introduction: From Stitched Multimodality to Native Multimodality
Across the last two years of model progress, multimodal capability has usually been assembled from a vision encoder, a projection layer, and a language model. The approach is mature from an engineering standpoint, but it carries two structural weaknesses. First, visual information is compressed into a limited number of soft prompts, so fine-grained spatial relationships are easily lost. Second, the training objectives are fragmented: the vision side and the language side optimize separately, which makes cross-modal reasoning chains unstable.
Native multimodal models change that premise. From the first stage of pretraining onward, text, images, video, and documents are handled as a single token sequence under a single attention mechanism. A sparse multimodal model recently released by one model team is a representative sample of this route: roughly 320 billion total parameters with about 18 billion activated per inference pass. It scales total parameters to preserve knowledge capacity, keeps activation low to control per-request cost, and uses hybrid attention to bring the computability of million-scale context back into an engineering-feasible range. Setting aside the specific product, this article abstracts the technical elements and discusses the architectural trade-offs and implementation methods developers actually need to care about.
2. Architecture: Four Design Choices That Shape the Cost Curve
2.1 Ultra-Sparse MoE: Decoupling Capacity from Compute
320B total parameters with 18B activated means an activation ratio of about 5.6%. The engineering implication is that memory footprint is determined by total parameters, while the floating-point work per token is determined by activated parameters. The cost structure is therefore not linear; it is “expensive memory, cheap compute,” and the higher the batch throughput, the more clearly per-token cost drops.
The price is routing sensitivity. When a small number of tokens are assigned to a few experts, uneven expert load shows up directly as tail-latency jitter. Three metrics matter in practice: the Gini coefficient of expert load, the fraction of dropped tokens, and how routing entropy changes across training steps.
2.2 Hybrid Attention: Splitting the Quadratic Term of Long Context
A million-scale context (1,048,576 tokens) built entirely on standard self-attention makes the attention matrix grow quadratically with sequence length, which is unacceptable for both memory and latency. The common industry approach mixes two mechanisms: sparse attention preserves exact interactions between key tokens across the global scope, while linear attention compresses history into a constant-size state. Alternating the two by layer keeps long-range dependencies while pushing complexity close to linear.
One engineering caveat: a hybrid architecture makes the KV cache non-uniform. Linear attention layers maintain a fixed-size recurrent state, while sparse attention layers maintain a retrievable sparse index. An inference framework has to manage both cache types separately, or memory accounting becomes distorted.
2.3 Layer Compression and Information Density
Compressing depth from 92 layers to 45 while increasing per-layer width and expert count is essentially trading “wider and sparser” for “shallower and denser.” The benefit is fewer inter-layer communications and kernel launches at inference time, which yields more stable latency. The risk is that deep feature abstraction has to be compensated by more thorough pretraining data, so data volume and data mixture become the key variables.
2.4 Coupling Native Multimodality with Long Context
About 30T tokens of multimodal pretraining corpus, combined with unified tokenization, let the model hold code, rendered screenshots, design files, and logs in the same context at the same time. This matters far more than “supports image input”: the real gain comes from self-consistent verification across modalities, not from single-turn image description.
3. Visual Coding: Giving the Model a Self-Review Capability
Visual coding means the model inspects its own rendered output after generation and corrects it based on what it sees. The typical loop looks like this:
requirement description -> generate frontend code -> render page screenshot -> visual comparison and defect localization -> targeted patch -> regression verification
In a self-built agent pipeline, this loop abstracts into four stages: generate, observe, judge, revise. Illustrative code:
def visual_coding_loop(task, max_iter=3):artifact = generate(task) # generate code or documentfor i in range(max_iter):shot = render(artifact) # render to an imagereport = model.review(task, shot) # visual judgment: layout, hierarchy, defectsif report.passed:return artifact, reportartifact = patch(artifact, report) # targeted patch based on the judgmentreturn artifact, report
The critical point is that the judgment signal must be structured, such as “element overlap,” “insufficient contrast,” or “3D view clipping.” Otherwise the revision stage has nothing to localize against. Supporting this capability usually requires a data synthesis pipeline that automatically generates triples of code, rendered image, and defect annotation, training the model’s self-visual judgment and test-time improvement ability. For document tasks such as presentations, PDFs, word processing, and spreadsheets, the same mechanism can check pagination overflow, chart occlusion, and layout aesthetics.
4. Engineering Practice: Deployment, Long Context, and Cost Control
- Deployment shape: small activation makes tensor parallelism on a single GPU or a few GPUs possible, but total parameters still demand enough aggregate memory, so size in two steps: memory determines card count, compute determines throughput.
- Long-context strategy: do not fill the window by default. A three-tier context of retrieval first, hierarchical summaries, and verbatim key snippets works better; reserve the million-token window for tasks that genuinely need a global view.
- Caching and batching: prefix caching pays off heavily when an agent repeatedly calls the same system prompt, and continuous batching significantly amortizes the compute cost of a sparse model.
- Observability: monitor time to first token, per-token latency, cache hit rate, expert load skew, and visual judgment pass rate to build a two-way dashboard for cost and quality.
- Compute autonomy: when running this class of model on domestic chips, verify support for sparse operators and linear attention kernels first, then compare accuracy drift under small-traffic canary rollout.
5. Evaluation: Turning an “Intelligence Index” into Measurable Items
A single composite score is convenient for cross-team communication but insufficient to guide selection. Break it into four dimensions: knowledge and reasoning, code and agent task completion rate, multimodal understanding and visual judgment accuracy, and cost per task. The evaluation set should include long-context retrieval, cross-modal consistency, and subjective layout quality, with fixed random seeds and decoding parameters to keep results comparable. A product direction of “frontier intelligence at Flash cost” ultimately has to land on spend per million tokens at equal task completion rate before engineering teams will accept it.
6. Common Pitfalls
- Treating total parameter count as the capability ceiling: a sparse model’s real performance depends more on routing quality and data mixture.
- Treating context length as effective memory: noise dilutes attention, so retrieval and summarization are still required.
- Treating vision as an add-on feature: without structured judgment signals, self-revision only introduces jitter.
- Ignoring tail latency: uneven expert load and long-sequence prefill are the main causes and need dedicated stress testing.
7. Conclusion
Native multimodality, ultra-sparse activation, hybrid attention, and million-token context together form a clear path for reducing cost while improving efficiency in today’s large models. For developers, the real leverage is not the parameter table but whether the generate-observe-judge-revise loop can be engineered, with observable metrics continuously constraining both cost and quality. If an enterprise wants to deploy and tune this class of model on Baidu AI Cloud, it can build a standardized pipeline on general capabilities such as the container platform, object storage, log service, and monitoring and alerting, moving smoothly from canary validation to scaled service.
