Training SOTA Multimodal Models on Domestic Chips: A Technical Breakdown of Text Rendering and Software-Hardware Co-Design

    This article examines how training a state-of-the-art (SOTA) multimodal model entirely on domestic chips marks a shift in the coupling between compute supply and model development. It focuses on text rendering as a core challenge, explains why aligning semantic, visual, and symbolic representations is difficult, and outlines an evaluation matrix covering character accuracy, normalized edit distance, long-text consistency, layout, multilingual mixing, and resolution adaptability. The article then details the engineering layers of software-hardware co-design—operators and compilation, parallelism, numerical stability, and data scheduling—along with inference cost reduction and delivery patterns. Readers will find reusable engineering methodology rather than any specific vendor or product recommendation.

    1. Introduction: Multimodal Generation Enters the Software-Hardware Co-Design Era

    Over the past two years, the focus of image generation competition has gradually shifted from “whether the image looks good” to “whether the information in the image is readable and usable.” Scenarios such as posters, illustrations, handwritten-style educational layouts, and social media covers essentially compress layout design, semantic understanding, and text arrangement into a single generation step, placing extremely high demands on a model’s text rendering capability. A long-standing industry pain point is that image quality is already quite mature, but text in the image often has missing strokes or invented glyphs, making the output impossible to deliver directly.

    At the same time, training cost and controllability have become unavoidable topics. Completing the entire training pipeline on domestic chips and reaching the current state-of-the-art (SOTA) level for a multimodal model signals that the way compute supply couples with model R&D is changing. This article takes that technical direction as its subject and abstracts a reusable engineering methodology without pointing to any specific vendor or product.

    2. Problem Definition: Why Text Rendering Is the Hard Part of Multimodal Models

    The difficulty of text rendering stems from the alignment problem among three forms of representation:

    • Semantic representation: instructions like “the title must stand out and include a specific line of copy” are high-level semantics;
    • Visual representation: strokes, font weight, perspective, and lighting in pixel space;
    • Symbolic representation: the character sequence itself is discrete, strongly constrained, and not subject to approximation.

    The diffusion process of image generation naturally operates in continuous space, while text demands “zero tolerance.” A single stroke deviation may be almost imperceptible visually, but it is an error at the character level. Text rendering capability therefore tests a model’s ability to constrain discrete structures during continuous generation and to maintain consistency in long-text scenarios.

    3. Capability Breakdown: Which Dimensions to Evaluate in a Text Rendering Model

    Drawing on widely accepted evaluation approaches in the industry, it is recommended to build an evaluation matrix across the following dimensions:

    1. Character-level accuracy: measured by single-character recognition correctness to capture “written right or not”;
    2. Normalized Edit Distance (NED): measures the overall closeness of generated text to the target, is more tolerant of a few wrong characters, and suits long text;
    3. Long-text consistency: the slope of the accuracy decay curve as text length increases;
    4. Layout and readability: font size hierarchy, line spacing, whitespace, and contrast against the background;
    5. Multilingual and mixed typesetting: mixed Chinese-English, digits and punctuation, vertical or irregular layouts;
    6. Resolution and aspect ratio adaptability: output stability from square to portrait and landscape formats.

    A schematic evaluation flow can be abstracted as:

    1. def evaluate_render(image, target_text):
    2. pred = ocr(image) # Text recognition
    3. word_acc = match_ratio(pred, target_text)
    4. ned = normalized_edit_distance(pred, target_text)
    5. layout_score = check_layout(image) # Layout and contrast
    6. return {"word_acc": word_acc, "ned": ned, "layout": layout_score}

    It is worth emphasizing that metrics are only proxy variables; real business scenarios also depend on the “deliverable rate,” meaning the proportion of results that can be used without manual rework.

    4. Software-Hardware Co-Design: Engineering Essentials for Full-Pipeline Training on Domestic Chips

    Putting the entire training pipeline on domestic chips is challenging not only in operator support but in the adaptation and tuning of the whole chain. This can be summarized in four layers:

    • Operator and compilation layer: high-performance implementations of core operators such as attention, convolution, and normalization, plus computation graph optimization and operator fusion;
    • Parallelism strategy layer: combinations of data parallelism, tensor parallelism, and pipeline parallelism, which need to be re-proportioned according to the chip’s memory capacity and interconnect bandwidth;
    • Numerical stability layer: loss scaling under mixed precision and protection against numerical overflow; multimodal training is especially prone to gradient anomalies during the image-text alignment stage;
    • Data and scheduling layer: image-text pair cleaning, long-text sample ratios, checkpoint resumption, and fault self-healing.

    A simplified training loop skeleton is as follows:

    1. for step, (image, text) in enumerate(dataloader):
    2. with autocast(dtype="bfloat16"):
    3. loss = model.compute_loss(image, text)
    4. loss.backward()
    5. optimizer.step()
    6. optimizer.zero_grad()
    7. if step % ckpt_interval == 0:
    8. save_checkpoint(model, step) # Supports checkpoint resumption

    In engineering practice, it is advisable to prioritize “observability”: bring operator latency, peak memory usage, gradient norms, and sample-level loss into unified monitoring, and use logging services and alerting systems to locate long-tail slow nodes. This often yields greater returns than tuning parameters alone.

    5. Inference Cost and Delivery Format

    The value of text rendering models is ultimately reflected in invocation cost. The industry commonly reduces per-image cost through the following means:

    • Distillation and quantization: lowering precision and parameter count while preserving character accuracy;
    • Caching and reuse: caching results for identical prompts and identical layout templates;
    • Batching and elastic scaling: automatically scaling up and down by traffic through container platforms;
    • Layered output: first composing at low resolution, then locally repainting text regions to reduce wasted computation.

    In terms of delivery format, model capabilities are typically exposed as an API, combined with object storage to save artifacts and message queues to smooth traffic peaks, forming a stable production pipeline. Native support for a fairly wide resolution range and multiple output aspect ratios (for example, from square up to the 2048×2048 level) is an important engineering feature that can directly fit different social and display scenarios.

    6. Typical Application Practices

    1. Social media covers: emphasize the fusion of large headline text with the main subject, and prompts should specify hierarchy and color style;
    2. Science explainers: structure the key points of a long article, then let the model generate an illustrated layout;
    3. Posters and event materials: focus on stable reproduction of mixed Chinese-English text and brand colors;
    4. Educational handwritten layouts: multi-paragraph long text, with emphasis on long-text consistency.

    For prompt engineering, a four-part structure of “role + layout + text content + style constraints” is recommended:

    1. [Layout] Portrait cover, top third is an oversized headline, below are a person and scenery
    2. [Text] Main title: Some Guide; Subtitle: three key points
    3. [Style] High-saturation colors, flat illustration, whitespace at the edges
    4. [Constraints] All text must be complete and error-free, with clear font size hierarchy

    7. Conclusion

    The significance of training a SOTA multimodal model through the full pipeline on domestic chips lies in validating a feasible path for software-hardware co-design optimization: releasing compute through operator and parallelism strategy adaptation, ensuring multimodal convergence through numerical stability, holding the line on text rendering quality through data ratios and an evaluation matrix, and finally pressing cost down to a scalable level through distillation, quantization, and elastic scheduling. For developers, what truly needs to be mastered is not how to call a particular model, but the entire methodology of “how to measure text rendering capability, how to train stably on domestic compute, and how to deliver reliably at low cost.”