Training SOTA Multimodal Models on Domestic Chips: Technical Breakthroughs in Text Rendering

    This article examines how a SOTA multimodal model trained end to end on domestic chips achieves reliable text rendering in generated images. It explains why in-image text is difficult, how Word Accuracy and NED are used to evaluate quality, the engineering layers required for full-pipeline training on domestic hardware, and practical ways to reduce inference cost. It also covers common use cases and recommendations for building an evaluation set before model selection.

    1. Introduction: Multimodal Generation Enters the “Readable Text” Stage

    The focus of multimodal image generation has shifted over the past two years from “whether the image looks good” to “whether the text in the image is readable, copyable, and properly laid out.” Early models often produced missing strokes, merged glyphs, or invented symbols when generating posters, illustrations, and infographics, which made the output unusable for production.

    At the same time, a key change is happening on the training side: SOTA multimodal models trained through the full pipeline on domestic chips have started to appear. This means the entire chain—from data preprocessing and operator adaptation to mixed-precision training and inference deployment—can now be closed on an independent computing foundation.

    This article focuses on domestic chips, domestic multimodal models, and text rendering. It abstracts a reusable technical methodology without referencing any specific third-party products, and concentrates on general engineering practice.

    2. Why Text in Images Is Hard

    Text rendering has long been a weak point for three reasons:

    • Semantic and visual mismatch: Text is a discrete symbol sequence, while an image is a continuous pixel distribution. The model must preserve both glyph structure and semantic consistency during generation.
    • Accumulated error in long text: Short words can rely on local texture priors, but long paragraphs suffer from inconsistency, repetition, and missing characters, with error accumulating as the sequence grows.
    • The special nature of Chinese: Chinese characters have dense strokes, symmetric structures, and complex component combinations. The tolerance for error is far smaller than for Latin letters—a single shifted stroke can turn one character into another.

    For this reason, judging whether a model “can write” should not rely on a single sample image. It requires accuracy and edit-distance distributions measured across a batch of samples.

    3. Evaluation Perspective: What the Two Benchmarks Measure

    Two types of metrics are commonly used to measure text rendering quality:

    1. Word Accuracy: The proportion of target words correctly recognized in the generated image, reflecting whether the text was written correctly.
    2. NED (Normalized Edit Distance): The edit distance between the recognized result and the target text, normalized. It reflects how far an error is from the correct answer and is more tolerant of slight deformation.

    Leading results on benchmarks for complex visual text generation and long-text rendering indicate that the model meets the bar on both “short-text precision” and “long-text stability.” For engineering work, it is advisable to build a small regression set covering the following distributions:

    1. Regression set design suggestions (illustrative)
    2. - Language: Chinese / English / mixed Chinese-English
    3. - Length: 1-4 character titles / 10-30 character slogans / paragraphs over 80 characters
    4. - Layout: horizontal / vertical / arc / multi-line centered
    5. - Interference: complex background / low contrast / textured background
    6. - Metrics: Word Accuracy, NED, manual readability score

    4. Engineering Essentials for Full-Pipeline Training on Domestic Chips

    Completing full-pipeline training on domestic hardware typically requires adaptation at four layers:

    • Operator layer: High-frequency operators such as attention, normalization, and convolution need high-performance implementations, and missing operators need a fallback path.
    • Precision layer: Mixed-precision training requires confirmed numerical stability, with higher precision retained for sensitive layers when necessary.
    • Parallelism layer: Combinations of data parallelism, tensor parallelism, and pipeline parallelism must match the chip’s interconnect bandwidth so that communication does not become the bottleneck.
    • Data layer: The quality of image-text pair cleaning, text region annotation, and layout coordinate extraction directly determines the upper limit of text rendering.

    Illustrative training configuration (pseudocode, structure only):

    1. # Illustrates training flow structure only, not a specific API
    2. for batch in dataloader:
    3. image, text, layout = batch # image, target text, layout coordinates
    4. logits = model(image, text, layout)
    5. loss = render_loss(logits, text) + layout_loss(logits, layout)
    6. loss.backward()
    7. optimizer.step()
    8. optimizer.zero_grad()

    5. Inference and Cost: Breaking “a Few Cents per Image” into Optimizable Items

    Generation cost is typically composed of compute usage, batching efficiency, and cache hit rate. To bring the cost per image into the “cents” range, optimization can start from these directions:

    • Batching and dynamic resolution: Group by layout complexity, and route simple images through a low-resolution fast path.
    • Cache reuse: Serve repeated requests that hit the same prompt and layout template from cache to avoid recomputation.
    • Quantization and distillation: Reduce memory and compute overhead within an acceptable accuracy range.
    • Elastic scheduling: Schedule compute resources by peak and off-peak demand, with monitoring and alerts to control unit cost.

    6. Typical Use Cases

    • AI handwritten posters and class bulletin boards: Multi-line titles plus body paragraphs, testing long-text stability.
    • E-commerce posters and promotional materials: Mixed Chinese-English plus price figures, testing symbol and number accuracy.
    • Illustration captions and memes: Short text plus stylized lettering, testing glyph style transfer.
    • Infographic and flowchart labels: Small font sizes and dense placement, testing small-target text reproduction.

    7. Practical Recommendations and Risks

    1. Build the evaluation set before choosing a model: Without a regression set, you cannot tell whether an upgrade actually delivers gains.
    2. Separate “generation” from “layout”: For complex layouts, “generate the base image with the model and place text programmatically” is more stable.
    3. Pay attention to compliance and copyright: Training data and generated content must meet licensing and content safety requirements.
    4. Make cost observable: Include cost per image, failure rate, and retry rate in the monitoring and alerting system.

    8. Conclusion

    A SOTA multimodal model trained through the full pipeline on domestic chips marks the parallel maturation of independent computing power and multimodal generation capability. For developers, the real benefit lies not in a single benchmark lead, but in forming an engineering loop that is “evaluable, reproducible, and cost-controlled”—this is the underlying capability for reliably delivering text rendering to business scenarios.