Native Multimodal Models and Chinese LLMs: A Developer’s Guide to Model Selection

    Learn how to compare adapter-based and native multimodal architectures, choose the right model size, and evaluate models from Chinese providers. This guide also covers data preparation, multimodal input preprocessing, and practical measures for stable inference deployment.

    Start by Distinguishing Two Multimodal Architectures

    Large models expanded beyond text to process images, audio, and video, with this shift becoming prominent around 2023. For developers, the key question is how a model handles different modalities internally. That architecture affects cost, latency, and the tasks it can perform.

    This article focuses on verifiable technical information and practical engineering guidance.

    Adapter-Based vs. Native Multimodal Models

    A common early approach was an adapter-based architecture: attach a vision encoder to an already-trained language model, then use a linear projection layer to map image features into the language model’s token embedding space.

    This approach is relatively inexpensive and offers a quick route to image-and-text question answering. However, the modalities interact at a relatively shallow level, which can limit performance on tasks such as understanding temporal relationships in video or aligning audio with video.

    Native multimodal models, also described as jointly trained models, learn from text, images, audio, video, and other modalities together during pretraining. When Google introduced the Gemini family in December 2023, its official blog described the models as trained for multimodality from the outset. That is the vendor’s public description; developers still need to validate performance against their own test sets.

    Dimension Adapter-Based Architecture Native Multimodal Architecture
    Training approach Attach a vision module after language model pretraining Learn from multimodal data together during pretraining
    Training cost Lower; can reuse an existing language model Higher; requires large-scale multimodal data and compute
    Cross-modal reasoning Suitable for common image-and-text questions; limited on complex temporal tasks Better suited to joint reasoning over video or audio and video
    Integration requirements Typically requires an image input channel Requires checking supported API modalities and input formats
    Typical risks Loss of visual detail and increased hallucinations High cost and strong dependence on data quality

    “Native multimodal” does not yet have a standardized industry definition, and vendors use the term differently. Base model selection on the input types actually listed in the model documentation.

    Choosing a Model Tier: Large, Medium, or On-Device

    Vendors commonly divide models into tiers based on parameter count and inference cost, although tier names vary. Compare three factors: parameter count, GPU memory usage per request and time to first token, and API pricing per million tokens.

    • Large models: Suitable for complex reasoning, long-document analysis, and multistep planning. Latency and API costs are generally higher.
    • Medium models: Balance capability and latency, making them suitable for many enterprise applications using cloud APIs.
    • Small or on-device models: Use quantization, such as INT8 or INT4, and distillation to reduce memory requirements. They can run on phones or edge devices, allowing data to remain on the device. Their capability ceiling is substantially lower than that of large cloud models, so evaluate them with real business samples.

    How Has China’s LLM Landscape Changed?

    Baidu launched ERNIE Bot on March 16, 2023. According to public reporting, multiple Chinese cloud providers and AI companies subsequently released their own large models. This period became known in China as the “battle of a hundred models,” reflecting a wave of competing model launches.

    Model counts vary considerably between research organizations. Any quoted count should identify the organization responsible and the reporting cutoff date.

    For developers, the direct consequence is a broader range of options. Rather than relying on a single provider, teams can compare multiple APIs for the same task based on output quality, pricing, and data-handling terms.

    Why Training and Data Engineering Remain Barriers

    Training a model with roughly 100 billion parameters requires large GPU clusters, a stable distributed training framework, and fault-tolerance mechanisms. Most application developers do not need to take on that infrastructure themselves, but they still need to oversee data engineering.

    A typical data-processing workflow includes:

    1. Collection: Identify data sources and confirm the scope of permitted use.
    2. Deduplication: Remove duplicate samples using exact hashes or approximate deduplication methods such as MinHash.
    3. Sensitive information filtering: Detect and de-identify information such as phone numbers, government-issued identification numbers, and face images.
    4. Quality filtering: Remove corrupted text, excessively short or long content, and material with low information density.
    5. Instruction dataset construction: Organize samples into instruction–response pairs and manually review a sample of the resulting dataset.

    Preprocessing Multimodal Inputs

    Preprocessing ensures that inputs meet the provider’s format requirements while controlling request size and token usage. The following table lists common practices; exact settings must follow the relevant API documentation.

    Modality Common Processing Reference Settings Key Considerations
    Images Decode, convert to RGB, resize, and compress Resize the longest side to the API limit; JPEG quality around 85 Compress large images to avoid exceeding request-size limits
    Audio Resample, convert to mono, and segment 16 kHz mono WAV or PCM is common Split long recordings into segments and verify supported formats
    Video Sample frames, select keyframes, and separate the audio track Sampling 1–2 frames per second is common The sampling rate directly affects token usage and cost

    The following code demonstrates image preprocessing and request packaging only.

    1. # Requirements: Python 3.9+, Pillow >= 10.0
    2. # Install: pip install "Pillow>=10.0"
    3. from __future__ import annotations
    4. import base64
    5. from io import BytesIO
    6. from pathlib import Path
    7. from typing import Optional
    8. from PIL import Image
    9. MAX_IMAGE_SIDE = 1024 # Example value; check the target API documentation
    10. MAX_FILE_BYTES = 10 * 1024 * 1024 # Example limit: 10 MB
    11. def encode_image(path: str) -> str:
    12. p = Path(path)
    13. if not p.is_file():
    14. raise FileNotFoundError(f"Image not found: {path}")
    15. if p.stat().st_size > MAX_FILE_BYTES:
    16. raise ValueError("Image exceeds the example size limit; compress it first")
    17. with Image.open(p) as img:
    18. img = img.convert("RGB")
    19. img.thumbnail((MAX_IMAGE_SIDE, MAX_IMAGE_SIDE)) # Preserve aspect ratio
    20. buf = BytesIO()
    21. img.save(buf, format="JPEG", quality=85)
    22. return base64.b64encode(buf.getvalue()).decode("ascii")
    23. def build_request(text: str, image_path: Optional[str] = None) -> dict:
    24. if not text.strip():
    25. raise ValueError("The text prompt must not be empty")
    26. payload = {"text": text.strip()}
    27. if image_path:
    28. payload["image_base64"] = encode_image(image_path) # Example field name
    29. return payload
    30. if __name__ == "__main__":
    31. req = build_request("Describe what is happening in this image.", "test.jpg")
    32. print(f"Encoded character count: {len(req['image_base64'])}")

    This code does not call a model. image_base64 is an example field name; the actual field names, encoding requirements, and authentication method must follow the provider’s documentation.

    The same distinction applies to audio. Base64 encoding is a transport mechanism, not a way to produce audio features a model can use. Audio input requires either feature extraction or a specified audio format, depending on the provider’s requirements.

    Deploying Stable Multimodal Inference Services

    Multimodal inference generally places greater demands on concurrency handling and GPU memory than text-only inference. Common operational practices include:

    • Autoscale with a container platform: Scale services based on queue length or GPU utilization.
    • Queue asynchronous tasks: Use a message queue to absorb peak demand and reduce sudden load spikes.
    • Manage GPU memory: Use model parallelism to distribute memory requirements, or KV cache quantization to reduce memory usage. Quantization may affect response quality with long contexts, so compare results on a test set before deployment.
    • Monitor operational metrics: Track time to first token, output tokens per second, GPU memory usage, error rate, and queue wait time.
    • Maintain a rollback path: Keep the previous model image and configuration. Start a new version with a 5% traffic canary rollout, and switch back if problems occur.