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

    This article explains how a domestic chip stack was used to train a state-of-the-art multimodal generation model, with a focus on accurate visual text rendering. It covers the core challenges of generating readable text, the engineering work required for stable large-scale training (operator coverage, mixed precision, parallelism, and fault recovery), data pipeline design, quantitative evaluation, and low-cost inference serving. Readers will get a reusable checklist for taking multimodal generation from training to production.

    1. Why Text Rendering Is the Bottleneck for Multimodal Generation

    Over the past two years, visual generation models have improved rapidly in composition, lighting, and material realism. However, rendering text correctly inside an image has remained a persistent weakness. For posters, covers, infographics, and hand-written-style layouts, the core value lies in the text: titles must stand out, body copy must be readable, and glyphs must be accurate. Once the output contains missing strokes, invented glyph shapes, or misaligned mixed Chinese-English text, the image quickly becomes unusable and cannot be adopted in commercial scenarios.

    The problem can be broken down into three layers:

    1. Symbol modeling is hard. Text is not a natural texture but a discrete symbol system with stroke structure, glyph constraints, semantics, and layout rules. The model must learn both what to write and where to place it.
    2. Long text and multi-line layouts are harder. As the character count grows, line spacing, alignment, line breaks, and font hierarchy introduce cumulative errors, and rendering stability drops significantly.
    3. Chinese imposes stronger constraints. Chinese characters have dense strokes and complex spatial distribution, demanding higher detail fidelity than Latin alphabets.

    Therefore, evaluating whether a multimodal generation model is truly usable requires more than image quality alone. It must also be judged on complex visual text generation and long-text rendering. The industry typically quantifies “did it write correctly” with metrics such as text accuracy and normalized edit distance, and quantifies “did it stay stable” with separate leaderboard results for Chinese and English.

    2. Compute Foundation: Key Engineering Points for Closing the Training Loop on Domestic Chips

    Training a state-of-the-art multimodal model on domestic chips is not just about “can it run,” but “can it run the entire training cycle stably, efficiently, and reproducibly.” Several classes of problems typically need to be addressed.

    2.1 Operator Coverage and Graph Compilation Adaptation

    The computation graph of a multimodal model includes convolutions, attention, and a large number of normalization, interpolation, and variable-length sequence operators. A common first set of issues on domestic accelerators is missing operators or inconsistent numerical behavior. The practical path is usually: build an operator coverage checklist, handle missing operators in tiers (“compose from existing operators — custom operator — equivalent network structure replacement”), and then use graph compilation and fusion optimizations to bring throughput back to a usable range.

    2.2 Mixed Precision and Numerical Stability

    Visual generation training is sensitive to numerical range, and low precision can easily cause loss spikes or gradient overflow. A workable approach is mixed-precision training while keeping higher precision at key locations such as normalization layers and loss computation. Combined with gradient clipping, loss scaling, and automatic rollback on anomalous steps, this keeps long training runs from being interrupted.

    2.3 Parallelism Strategy and Communication Optimization

    Large-model training usually combines data parallelism, tensor parallelism, pipeline parallelism, and sequence parallelism. In a domestic cluster environment, the key is to verify how well the collective communication library matches the interconnect topology, and to reduce the communication share through operator-communication overlap, gradient bucketing, and recomputation, avoiding a bottleneck where compute sits idle waiting on communication.

    Illustrative training launch configuration (expressing only the parallelism and precision approach):

    1. train_config = {
    2. "parallel": {"dp": 8, "tp": 2, "pp": 1},
    3. "precision": "bf16_with_fp32_master",
    4. "gradient_checkpointing": True,
    5. "grad_clip": 1.0,
    6. "micro_batch_size": 4,
    7. "global_batch_size": 512,
    8. }

    2.4 Fault Self-Healing and Training Observability

    At the thousand-card scale, hardware and communication jitter is the norm. It is necessary to build metrics collection, log aggregation, and monitoring/alerting systems, bringing loss curves, throughput, memory usage, and inter-card communication bandwidth into a unified dashboard. Combined with sharded checkpoint saving and automatic resume, this keeps the cost of a single failure within an acceptable range. These capabilities typically rely on general cloud infrastructure such as container platforms, object storage, log services, and monitoring/alerting.

    3. Data Engineering: Data Sets the Ceiling for Text Rendering

    Accurate text ultimately comes from data. A training set with strong rendering ability usually contains four types of samples:

    • Image-text aligned samples: real posters, covers, slides, receipts, signage, and more, with layout and text annotations;
    • Synthetic rendering samples: given a layout template and text content, programmatically rendered samples with perfect glyphs and precise coordinates, used to reinforce the lower bound of “writing correctly”;
    • Hard negative samples: small font sizes, long text, multilingual mixing, artistic fonts, and text that is occluded or perspective-distorted;
    • Aesthetic preference samples: used to align subjective quality dimensions such as color scheme, hierarchy, and whitespace.

    The key data-side actions are cleaning and mixing ratios. Synthetic samples have perfect glyphs but limited style variety, while real samples have rich styles but noisy annotations. A curriculum-learning approach is needed to gradually increase the proportion of real and hard samples, along with unified normalization of text annotations (full-width/half-width, punctuation, simplified/traditional, letter case).

    4. Capability Evaluation: Replacing Subjective Feelings with Quantifiable Metrics

    Evaluation should cover at least four dimensions:

    1. Text correctness: text accuracy and normalized edit distance, reported separately for Chinese and English;
    2. Long-text stability: the accuracy decay curve as character count grows;
    3. Layout quality: whether alignment, overlap, out-of-bounds, and font hierarchy are reasonable;
    4. Image quality: structural consistency and aesthetic preference scores.

    The engineering recommendation is to establish a fixed evaluation set and an automated pipeline that produces a report on every model iteration, avoiding conclusions drawn from “just looking at a few sample images.” Evaluation results should also flow back into data mixing ratios and training strategy, forming a closed loop.

    5. Inference Serving: Turning Capability into a Low-Cost, Usable Service

    Model capability must ultimately land as a cost-controlled service. A typical pipeline is: the access layer handles authentication and rate limiting, a task queue smooths out peaks and fills valleys, the inference layer schedules by resolution and text-length tiers, results are written to object storage and returned only after content moderation, and monitoring/alerting tracks latency, failure rate, and per-image cost.

    Common cost-optimization techniques include: dynamic batching to improve throughput, resolution-tiered routing, caching results for high-frequency templates, and segmenting and re-compositing very long text. Natively supporting aspect ratios from square to ultra-high-definition output covers most scenarios such as social covers, e-commerce main images, and offline materials, reducing the composition loss caused by secondary cropping.

    6. A Reusable Practice Checklist

    • Validate operators and precision at small scale first, then scale up to long thousand-card training runs;
    • Use synthetic data as the base, real data to add style, and hard samples for stress testing;
    • Automate evaluation, with metrics split by Chinese/English and long/short text;
    • Control per-image cost on the serving side with tiered scheduling and caching;
    • Wire monitoring, alerting, and log services into the entire workflow to ensure operability and reproducibility.

    Closing the loop from training to serving with domestic compute and domestic models delivers value beyond a single leaderboard result. It establishes a sustainable engineering path: compute adaptation, data construction, training tuning, quantitative evaluation, and low-cost serving mesh together, so multimodal generation can truly enter everyday production workflows.