Training SOTA Multimodal Models on Domestic AI Chips: Engineering Breakthroughs and Text Rendering

    This article examines how training a state-of-the-art multimodal image generation model entirely on domestic AI chips demonstrates that the full software-hardware stack is now engineering-ready. It covers the core training engineering points—operator coverage and graph compilation, mixed precision and numerical stability, parallel strategy and communication optimization, and data pipelines with checkpointing—along with a three-stage approach to text rendering, a practical framework for interpreting public benchmarks, and guidance on turning prompts into deliverable assets through structured templates, channel-aware sizing, and asynchronous serving. Readers will also find notes on observability and quality regression for subjective generation tasks.

    1. Introduction: Why a Fully Domestic Stack Matters for Multimodal Models

    Multimodal image generation models are moving from “producing good-looking images” to “producing usable images.” In scenarios such as enterprise marketing, content production, and online education, the value of an image depends not only on composition and color, but also on whether the text in the image is accurate, whether the layout is controllable, and whether the output dimensions match the target distribution channel. At the same time, the training side places higher demands on the stability of compute supply, interconnect bandwidth, compilation optimization, and operator coverage. Completing the entire training process on domestic chips and reaching the leading level in current public evaluations means the coordinated software-hardware pipeline is now engineering-usable, rather than stuck at the single-point demo stage.

    For developers and enterprise users, the significance of this progress can be summarized in three points. First, diversification of compute supply reduces dependence on a single hardware ecosystem. Second, the cost structure of training and inference becomes more controllable, making it easier to plan elastically around business peaks. Third, improved Chinese text rendering directly boosts the production efficiency of high-frequency assets such as posters, covers, and infographics.

    2. Technical Foundation: Training Engineering on Domestic Chips

    2.1 Operator Coverage and Graph Compilation Optimization

    When training diffusion-style models on domestic accelerator cards, the common bottleneck is not peak compute but insufficient operator coverage, which causes frequent fallbacks and graph splitting. In engineering practice, you typically need to build an operator mapping list, prioritize custom implementations for high-frequency operators in attention, normalization, convolution, and sampling scheduling, and use graph-level compilation to fuse multiple small operators, reducing memory reads and writes as well as launch overhead.

    2.2 Mixed Precision and Numerical Stability

    Training stability depends on careful tuning of the mixed precision strategy. Beyond conventional loss scaling, you also need to pay attention to precision choices for normalization layers and accumulation operations to avoid gradient scale drift during long training runs. In practice, a layered precision strategy works well: keep higher precision for sensitive layers, and use lower precision for throughput-sensitive layers with periodic weight checks.

    2.3 Parallel Strategy and Communication Optimization

    Large model training usually combines data parallelism, tensor parallelism, and pipeline parallelism. On domestic clusters, you need to pay closer attention to collective communication libraries and topology-aware scheduling so that communication and computation overlap fully. A simplified parallel configuration example is shown below:

    1. # Parallel dimensions illustration (not a specific product interface)
    2. parallel:
    3. data: 64 # Data parallel group size
    4. tensor: 8 # Tensor parallelism within a single node
    5. pipeline: 4 # Pipeline parallelism across nodes
    6. precision: bf16 # Main computation precision
    7. overlap: true # Overlap communication with computation

    2.4 Data Pipeline and Checkpointing

    The data side of multimodal training includes image-text pair cleaning, resolution bucketing, and text length stratification. Bucketing significantly reduces padding waste, while stratification ensures long-text samples are adequately sampled during training. For checkpoints, asynchronous writes and sharded saving are recommended to shorten failure recovery time, along with cross-availability-zone backups using object storage.

    3. Core Capability: Text Rendering in Complex Scenarios

    Text rendering is difficult because the model must simultaneously accomplish three things: semantic understanding, glyph generation, and layout constraints. A “three-stage” view helps break it down:

    1. Semantic parsing: extract the title, subtitle, body, and emphasized words from the prompt, and determine the hierarchy;
    2. Layout planning: allocate whitespace, line width, and font size gradients based on the aspect ratio, avoiding conflicts between text and the main subject;
    3. Glyph generation and verification: generate character by character, then run consistency checks and redraw to fix missing strokes or misjudged connected strokes.

    For evaluation, the industry commonly uses text accuracy and normalized edit distance to measure rendering quality: the former reflects the proportion of correct characters, while the latter measures the overall difference between predicted text and target text. Long-text scenarios require additional examination of cross-line consistency and paragraph structure integrity, which is the core difference between the two evaluation categories of complex visual text generation and long-text rendering.

    4. Reading the Benchmarks: Look Beyond the Ranking

    When facing public leaderboards, developers are advised to focus on four dimensions:

    • Evaluation set construction: whether it includes difficult samples such as long Chinese sentences, artistic fonts, and multi-line mixed layouts;
    • Metric definitions: whether character-level metrics and distance-based metrics are reported together, avoiding single-metric bias;
    • Resolution consistency: whether metrics hold at high-resolution output, preventing “tricks from downscaling”;
    • Reproducibility: whether inference configuration, sampling steps, and random seeds are disclosed.

    Using these dimensions as a selection checklist predicts business results better than simply comparing rankings.

    5. Engineering Practice: From Prompt to Deliverable Asset

    5.1 Structured Prompts

    A structured template is recommended to describe requirements, separating style, subject, text content, and layout:

    1. {
    2. "style": "clean science-popularization style",
    3. "subject": "travel guide illustration",
    4. "text": {"title": "packing checklist", "subtitle": "pack in three steps"},
    5. "layout": {"ratio": "3:4", "align": "center"}
    6. }

    5.2 Sizing and Channel Adaptation

    Social media covers, e-commerce main images, and long infographics have different ratio requirements. The generation side should support proportional output within a relatively large canvas range, and produce assets in batches through one generation followed by multi-ratio cropping and secondary layout, reducing repeated inference overhead.

    5.3 Servicing and Cost Control

    In production, it is recommended to package the model as an asynchronous task service: requests enter a message queue, inference instances on a container platform consume them, results are written to object storage, and a callback notification is sent. Combined with monitoring and alerting that sets thresholds for latency, failure rate, and queue backlog, this handles traffic fluctuations while keeping costs under control. An inference service billed per image at a low unit price turns asset production from “project-based outsourcing” into “on-demand self-service,” significantly compressing trial-and-error costs.

    6. Observability and Quality Regression

    Asset generation is a task with strong subjective quality, so automated regression is needed: fix a prompt set and random seeds, run batches regularly, and compare character accuracy with manual spot-check scores; at the same time, record every model or inference configuration change to form a traceable version baseline. When quality regresses, you can quickly locate whether the cause is data, training configuration, or inference parameters.

    7. Outlook

    The value of a fully domestic stack goes beyond being “usable”; it lies in forming a sustainable iteration loop: collaborative optimization of chips and frameworks shortens the training cycle, high-quality Chinese corpora and layout annotations raise the ceiling of rendering, and low-cost inference services expand the application surface and feed data back. For development teams, incorporating evaluation definitions, prompt engineering, and asynchronous servicing into the design early is what preserves efficiency and quality advantages as multimodal asset production enters an industrialized stage.