Open-Source Multimodal LLMs: Document Understanding and All-in-One MoE Architectures

    This article examines two open-source multimodal LLM routes: specialized document understanding built on a visual causal flow architecture, and an all-in-one trillion-parameter MoE model that integrates vision, code generation, and agent capabilities. It covers the architectural innovations, performance and efficiency considerations, model selection guidance, integration workflow, and deployment caveats for developers.

    1. Two Technical Routes: Specialized Depth and General Integration

    The two models in this open-source wave represent two typical directions for multimodal LLM evolution:

    Route 1: Specialized depth in document understanding. One type of model focuses on the specific task of “letting AI read documents like a human.” By reconstructing how visual information is processed, it pursues extreme accuracy and efficiency in OCR, layout analysis, reading-order restoration, and related tasks. These models have a controllable parameter scale and are suitable for high-throughput document digitization scenarios.

    Route 2: General capability integration. Another type of model follows an “all in one” approach, unifying visual understanding, code generation, Agent capabilities, and other functions into a trillion-parameter-scale MoE architecture. The goal is to cover as many task types as possible with a single model and reduce system complexity.

    These two routes are not opposites. They correspond to different business scenarios: the former is suitable for pipeline-style batch processing, while the latter is suitable for complex interactive scenarios that require multiple capabilities to work together.

    2. Core Innovation in Document Understanding: Visual Causal Flow

    2.1 Bottlenecks of Traditional Approaches

    Most traditional document understanding approaches follow the classic architecture of a “CLIP-style ViT encoder + language model.” In essence, this architecture is “looking at an image and describing it”: the visual encoder splits a page into image patches and extracts features, and the language model then generates text based on those features. Its problems include:

    • Lack of a reading strategy: The model treats the entire page uniformly and cannot first scan the title and then read the body in semantic order as humans do.
    • Disordered reading order: When facing complex layouts such as newspapers, two-column papers, and nested tables, the output text order is often incorrect.
    • Difficulty balancing global and local information: Pure bidirectional attention is good at global perception, but it provides insufficient support for causal reasoning about “what to read first and what to read next.”

    2.2 Key Architecture Changes

    The bold move of the new generation of document understanding models is to replace the traditional ViT visual encoder with a small causal language model at around the 0.5B parameter scale. This is not a simple parameter substitution but a reconstruction of processing logic—equivalent to replacing a “machine that only takes photos” with “an expert that understands reading comprehension.” The specific process has three steps:

    1. Global perception: Use bidirectional attention to scan the entire page and identify the spatial positions of titles, paragraphs, tables, illustrations, and other elements.
    2. Path planning: Generate “causal flow tokens” to plan a reading order that follows semantic logic, for example, reading the main title first, then the body by column, and finally handling footnotes.
    3. Structured output: Extract information along the planned path. Even for complex newspaper layouts, the model can restore content according to human reading habits.

    2.3 Performance and Efficiency

    On public document parsing benchmarks, the overall accuracy of this type of model can exceed 91%, and the edit distance for reading order drops significantly, indicating more precise understanding of document logical structure. In terms of engineering efficiency, a single high-end GPU can process about 200,000 document pages per day, and token generation speed reaches thousands of tokens per second. This benefits from the lower inference overhead brought by the small-parameter visual encoder.

    For developers, the value of this type of model is that it enables large-scale document digitization pipelines at lower cost. Typical scenarios include financial report parsing, contract structuring, digitization of ancient books, and data extraction ahead of RPA.

    3. All-in-One MoE Model: Integrating Vision and Code

    3.1 Trillion-Parameter MoE Architecture

    Another type of model chooses a completely different route: based on a trillion-parameter-scale MoE (Mixture of Experts) architecture, it integrates visual understanding, text dialogue, code generation, Agent scheduling, and other capabilities into a single model. The advantage of MoE is “large total parameters, sparse activation”—each inference activates only part of the expert networks, maintaining large knowledge capacity while controlling inference cost.

    3.2 Image-to-Code: A Test of Multimodal Capability

    The most representative capability of the all-in-one model is “generating code directly from a design draft.” Users only need to provide a UI design image or floor plan, and the model can:

    1. Understand the spatial layout, color scheme, and component hierarchy in the image.
    2. Map visual information to front-end component structures.
    3. Generate complete code with professional aesthetics, which can even be extended into 3D scenes or deployable web applications.

    Testers provided a floor plan of an apartment from a classic American TV series, and the model was able to generate complete 3D model code and deploy it as an accessible web application. This requires deep coordination among visual understanding, spatial reasoning, and code generation, making it a typical task for testing the quality of a unified multimodal architecture.

    3.3 Cost Advantages

    It is worth noting that this type of open-source model can already match top closed-source models in multiple evaluations, while inference cost is only a fraction of theirs. For budget-sensitive teams, open-source solutions combined with self-built inference clusters or elastic cloud compute can achieve a better balance between performance and cost.

    4. Developer Perspective: Selection and Deployment

    4.1 Selection Recommendations

    • Document-intensive business (receipt recognition, report parsing, knowledge base construction): Prioritize specialized document understanding models, whose advantages in accuracy and throughput are clear.
    • Multi-capability collaboration scenarios (intelligent assistants, design-to-code, complex Agent workflows): All-in-one MoE models are more suitable, avoiding the engineering complexity of stitching multiple models together.
    • Resource-constrained environments: Pay attention to quantization support and deployment barriers. Small-parameter models can achieve usable performance on a single GPU.

    4.2 Typical Integration Workflow

    Taking a document parsing service as an example, a reference engineering pipeline is as follows:

    1. # Illustrative pseudocode: document parsing pipeline
    2. from doc_pipeline import Loader, OCRTask, PostProcessor
    3. pipeline = Loader().use_gpu(device="cuda:0") \
    4. .add_task(OCRTask(model="doc-vlm", batch_size=8)) \
    5. .add_task(PostProcessor(keep_reading_order=True))
    6. for doc in pipeline.stream("oss://my-bucket/reports/"):
    7. result = doc.extract() # Output structured Markdown/JSON with reading order
    8. save_to_knowledge_base(result)

    Together with common cloud components such as object storage, message queues, container platforms, and monitoring and alerting, this can build an elastically scalable batch parsing service.

    4.3 Deployment Considerations

    1. Evaluate first: Build an evaluation set with your own business data, focusing on metrics such as reading order and table restoration rate rather than only general leaderboards.
    2. Plan compute: For high-throughput document scenarios, estimate the number of GPUs as “daily pages processed ÷ per-GPU daily throughput,” and reserve headroom for peak load.
    3. Security and compliance: When processing documents containing sensitive information, consider private deployment or choose cloud service regions that meet compliance requirements.

    5. Conclusion

    This open-source wave marks a shift for Chinese open-source multimodal models from catching up to running in parallel and, in some areas, leading: specialized models have achieved dual improvements in accuracy and efficiency in document understanding through architectural innovation, while general MoE models connect vision, code, and Agent capabilities through a unified architecture. For developers, open source means the freedom to evaluate, private deployment, and deep customization. It is recommended to test both types of models against actual business scenarios and find the optimal balance among performance, cost, and engineering complexity.