Multimodal Agent Architecture Evolution: Native Vision and Parallel Orchestration
This article explains why multimodal systems benefit from native vision-language integration during pretraining, how native-resolution visual encoding can support both images and videos, and how dependency-aware parallel orchestration can reduce agent latency. It also presents practical design considerations, evaluation guidance, and a Python reference implementation for layered task execution.
1. Why Multimodal Model Construction Needs to Evolve
As large language models become more capable, general-purpose agents are increasingly expected to process text, images, and video while calling tools to complete multi-step tasks. Multimodal understanding has therefore become a core capability. The model architecture directly affects whether a system can reliably interpret language and visual information together.
A common approach is to train a text-only model first and then connect it to a pretrained vision encoder. A projection layer maps visual features into the language model’s representation space. This approach is relatively inexpensive, but it can leave vision in a subordinate role. On tasks involving interleaved text and images, long-video understanding, or chart reasoning, the model may demonstrate strong language capabilities but weak visual detail recognition. In other cases, the semantics of the two modalities may conflict.
The way an agent executes tasks can also limit efficiency. If subtasks must be completed one after another, total latency increases as the number of subtasks grows. This article focuses on two questions: when visual capabilities should be introduced, and how multiple subtasks can be executed in parallel.
2. Native Fusion: Bringing Vision and Language Together During Pretraining
2.1 Problems with Late Fusion
Late-fusion architectures have a relatively low training barrier because they reuse an existing language model and vision encoder, requiring only the intermediate projection layer to be trained. However, the language model has not seen visual signals during pretraining. When visual features are added later, it can be difficult for the model to learn fine-grained alignment.
Tasks such as geometric figure analysis and reading complex charts require accurate spatial relationships and numerical details. Models using late fusion are often weaker on these tasks.
2.2 Data Flow and Components in Native Fusion
Native fusion introduces vision and text jointly during pretraining. The overall data flow can be summarized in three steps:
- A native vision encoder processes an image or video and produces visual features in a unified format.
- An MLP projection layer aligns the visual feature dimension with the language model’s embedding space.
- The aligned visual tokens and text tokens are fed together into an MoE language backbone for end-to-end modeling.
Three training decisions require particular attention.
First, the training objective usually includes a language-modeling loss and auxiliary objectives related to image-text alignment. Their weights should be tuned on a validation set.
Second, the proportions of image-text data, video data, and text-only data affect the final results. Small-scale ablation studies aligned with the target tasks are recommended before selecting the final mixture.
Third, the number of visual tokens directly determines computational cost. The system must balance token compression against the preservation of visual detail.
Evaluation should be reported separately by task. Chart understanding, geometric reasoning, multi-image question answering, and video question answering may show different performance trends. Looking only at an aggregate score can conceal important weaknesses.
An MLP projection layer is simple and stable to train, making it suitable when the number of visual tokens is manageable. If GPU memory is limited and the visual token count must be reduced substantially, a resampling module such as Q-Former may be considered. The choice should be based on measurements using the target data and available memory budget rather than on conclusions from other systems.
3. Native-Resolution Vision Encoding: From Patch Packing to Spatiotemporal Modeling
The vision encoder serves as the model’s entry point for perceiving images. Traditional vision models often require inputs with a fixed size, such as 224 × 224 or 336 × 336. Images are therefore commonly cropped or resized to meet that requirement, which can remove small text, table lines, and other fine-grained information. Video tasks also need to handle the temporal dimension, making fixed-size designs more difficult to extend.
3.1 Native-Resolution Support with Patch Packing
Patch Packing is based on ideas used in methods such as NaViT. Instead of resizing every image to a fixed grid, it divides images with arbitrary resolutions and aspect ratios into multiple patches. These patches are then flattened and concatenated into a one-dimensional sequence before being sent to the Transformer attention layers.
Patches from different images can be packed into the same batch. As a result, both training and inference can accept variable-resolution inputs, reducing information loss during preprocessing.
The packing strategy must control the total sequence length. Because attention cost grows approximately with the square of sequence length, each sample should have a maximum token budget. Content beyond that limit can be downsampled proportionally or processed by splitting it into multiple parts.
3.2 Joint Spatiotemporal Modeling for Images and Video
A video can be treated as a sequence of image frames. One approach is to group every four consecutive frames into a spatiotemporal block and jointly pack the 2D patches from those frames. A single weight-shared vision encoder then models attention across both spatial and temporal dimensions. Images and videos can use the same encoder without requiring a separate video branch.
Several implementation details affect the outcome:
- Frame sampling: Frames can be sampled uniformly or selected as keyframes based on scene-change detection. The sampling strategy should match the task. Action-oriented tasks typically require denser temporal sampling.
- Temporal positional encoding: Packed patches must include frame-index information. Otherwise, the model cannot distinguish the order of events.
- Long-video segmentation: Videos longer than the context window must be divided into multiple segments. Keeping some overlapping frames between adjacent segments can reduce the risk of cutting an event across segment boundaries.
- Memory and throughput: As the number of frames increases, sequence length can grow rapidly. Load testing should measure throughput, memory usage, and temporal information retention to determine the frame limit for each task.
Shared weights allow image capabilities to transfer to video tasks, while making training cost and inference latency easier to control. This benefit should still be validated on the target task data.
4. Dynamic Parallel Orchestration: Rewriting Sequential Pipelines as Parallel Compute Graphs
4.1 Sequential Versus Parallel Execution
Traditional agents often execute subtasks sequentially, with each step waiting for the previous step to finish. Dynamic parallel orchestration first analyzes dependencies between tasks and assigns independent subtasks to multiple sub-agents for concurrent execution.
| Dimension | Sequential Execution | Dynamic Parallel Orchestration |
|---|---|---|
| End-to-end latency | Grows approximately linearly with the number of subtasks | Depends on the longest dependency path |
| Failure handling | Often stops immediately after a failure | Must skip downstream tasks according to dependency relationships |
| Scheduling overhead | Lower | Adds dependency analysis, concurrency control, and result aggregation overhead |
| Suitable tasks | Tasks with strong step dependencies and few subtasks | Tasks with many subtasks and sparse dependencies |
Parallel execution does not benefit every workload. When the dependency chain is long or subtasks frequently exchange intermediate results, the gains may be limited and scheduling overhead may become more significant.
4.2 Interpreting Speedup Claims
Some materials report figures such as “several-fold latency reduction.” These numbers usually depend on a specific baseline, concurrency level, and measurement method. Without that context, they have limited reference value.
To estimate the theoretical upper bound, first calculate the critical-path length of the task dependency graph. Then combine it with the available concurrency to estimate the theoretical lower bound. Finally, validate the result under realistic workloads.
Tests should record both P50 and P95 latency. They should also state whether the measurement covers end-to-end execution time or the latency of an individual step.
4.3 Reference Implementation
The following example shows the basic structure of a layered parallel scheduler. It uses only the Python 3.9-or-later standard library. run_sub_agent is a placeholder and should be replaced with the actual model or tool invocation logic.
import asynciofrom dataclasses import dataclass, field@dataclassclass SubTask:task_id: strpayload: dictdeps: list[str] = field(default_factory=list)async def run_sub_agent(task: SubTask) -> dict:# Placeholder implementation: replace with a model or tool callawait asyncio.sleep(0.1)return {"task_id": task.task_id, "status": "ok", "output": f"done:{task.task_id}"}async def dispatch_agent(task: SubTask, timeout: float = 60.0) -> dict:# Return a structured result on timeout or failure# so that one subtask does not bring down the entire workflowtry:return await asyncio.wait_for(run_sub_agent(task), timeout=timeout)except asyncio.TimeoutError:return {"task_id": task.task_id, "status": "timeout", "output": None}except Exception as exc:return {"task_id": task.task_id, "status": "error", "output": None, "reason": str(exc)}def decompose_task(main_task: str) -> list[SubTask]:# Example decomposition: a planning model would typically perform this stepreturn [SubTask("a", {"query": main_task + " subtask A"}),SubTask("b", {"query": main_task + " subtask B"}),SubTask("c", {"query": "aggregate results"}, deps=["a", "b"]),]def build_layers(tasks: list[SubTask]) -> list[list[SubTask]]:# Group tasks by dependency level.# Tasks in the same layer can run in parallel.done: set[str] = set()remaining = {t.task_id: t for t in tasks}layers: list[list[SubTask]] = []while remaining:layer = [t for t in remaining.values()if all(d in done for d in t.deps)]if not layer:raise ValueError("The dependency graph contains a cycle ""or references a missing task")layers.append(layer)for t in layer:done.add(t.task_id)del remaining[t.task_id]return layersasync def execute_swarm_task(main_task: str) -> dict[str, dict]:tasks = decompose_task(main_task)results: dict[str, dict] = {}for layer in build_layers(tasks):runnable = []for task in layer:failed = [dep for dep in task.depsif results.get(dep, {}).get("status") != "ok"]if failed:results[task.task_id] = {"task_id": task.task_id,"status": "skipped","output": None,"reason": f"Upstream task failed: {failed}",}else:runnable.append(task)outputs = await asyncio.gather(*(dispatch_agent(task) for task in runnable))for result in outputs:results[result["task_id"]] = resultreturn resultsif __name__ == "__main__":print(asyncio.run(execute_swarm_task("analyze a chart")))
Several design decisions in this example are important:
- Dependencies must be declared explicitly or derived through static analysis. Incorrect dependency detection can cause a task to read data that is not ready.
build_layersdetects dependency cycles. Failing immediately is easier to troubleshoot than allowing the workflow to hang midway.- When an upstream task fails, downstream tasks are marked as
skippedand the reason is recorded. This keeps the failure scope controlled and makes the result easier to audit. - Every subtask has a timeout. Without a timeout, a suspended subtask can block the entire layer.
- Subtasks should be designed as idempotent operations. When retries are required, non-idempotent side effects can result in duplicate actions.
