Training SOTA Multimodal Models on Domestic Chips: A Full-Stack Engineering Breakdown
This article examines how a leading multimodal image generation model was trained end to end on domestic chips, and what that achievement reveals about model-framework-hardware co-optimization. It breaks the task into four capability layers, details the key engineering work around operator coverage, parallelism, mixed precision, and fault tolerance, and outlines a practical evaluation framework for visual text rendering. Developers will find a reusable methodology for bringing up training on non-mainstream compute platforms.
1. Why Full-Stack Training on Domestic Chips Matters
Competition in multimodal image generation has shifted over the past two years. The question is no longer whether a model can produce an image, but whether it can produce an image with correct information and a usable layout. The hardest part is text rendering: Chinese and English characters in the image must have correct strokes, correct semantics, and sensible placement, while staying consistent with the background, perspective, and lighting.
At the same time, diversification of compute supply has become a long-term engineering concern. If a multimodal model can run the entire pipeline on domestic chips, from data preprocessing through training to evaluation, it means a complete set of engineering capabilities has been proven in a closed loop: operator adaptation, communication optimization, mixed-precision strategy, fault tolerance, and scheduling. The value of such a breakthrough lies not in a single metric, but in validating that model-framework-chip co-optimization is feasible.
This article does not focus on any specific vendor’s product. Instead, it abstracts the event into a general technical question: how to train an image generation model that reaches the current state of the art on complex visual text generation tasks using non-mainstream compute platforms.
2. Four Capability Layers of a Multimodal Image Generation Model
The difficulty of these models becomes clearer when broken into four layers:
- Semantic understanding: parsing the subject, count, spatial relationships, and style constraints in a prompt.
- Layout planning: deciding the position, font size, line spacing, and alignment of text blocks so they do not occlude the main subject.
- Glyph generation: producing correct strokes character by character, handling mixed Chinese-English text, punctuation, numbers, and units.
- Consistency: keeping the style of multiple lines of text uniform within one image, and consistent with the image’s perspective and lighting.
Most models perform reasonably well on the first two layers. The real dividing line is the third and fourth. Long text, multiple lines, and small font sizes amplify glyph errors, so evaluation sets typically cover two categories of tasks: complex visual text generation and long-text rendering.
3. Key Engineering Steps for Full-Stack Training on Domestic Chips
3.1 Operator Coverage and Graph Compilation
The most common blocker on the training side is not peak compute but missing operators that trigger frequent fallbacks. In practice, you need an operator coverage list, custom implementations for high-frequency operators, and automatic fallback paths for low-frequency ones. Graph compilation can then fuse multiple small operators to reduce scheduling overhead.
3.2 Parallelism Strategy and Communication Optimization
Multimodal models usually combine a large vision encoder with a large text encoder, so parameter distribution is uneven. A combined strategy works well: tensor parallelism to split single-layer computation, pipeline parallelism to split modules, and data parallelism to scale throughput. Communication primitives and gradient aggregation order should be tuned for the interconnect topology of the domestic chips to reduce synchronization waiting.
3.3 Mixed Precision and Numerical Stability
Mixed precision is key to efficiency, but text generation is more sensitive to numerical error. A layered precision policy is recommended: use low precision for the main convolution and attention computation, keep normalization, softmax, and loss computation at higher precision, and apply dynamic scaling for overflow.
Illustrative configuration (pseudocode, expressing the strategy only, not tied to any specific framework API):
# Layered precision policy illustrationpolicy = {"backbone": "bf16", # main computation"attention": "bf16","norm": "fp32", # numerically sensitive layers"loss": "fp32",}for layer in model.layers:layer.precision = policy.get(layer.name, "bf16")
3.4 Fault Tolerance, Checkpoint Resumption, and the Data Pipeline
Long-running training must assume hardware will fluctuate. Engineering should provide: periodic sharded checkpoints, resumption from any shard, prefetching and local caching in data loading, and decoupling of preprocessing (tokenization, image-text alignment, text region annotation) from training so the data side does not become the bottleneck.
4. Evaluation: How to Tell Whether Text Rendering Is Actually Usable
The two leaderboard dimensions mentioned in the original can be abstracted into a general evaluation framework:
- Word Accuracy: the character-level match ratio between generated and target text, measuring whether the text is written correctly.
- Normalized Edit Distance (NED): measures how far the output is from the target, with values closer to 1 indicating a closer match.
- Long-text and multilingual breakdowns: Chinese, English, and mixed scenarios are scored separately so an average score does not hide weak spots.
A practical evaluation script skeleton:
def evaluate(samples):total_acc, total_ned = 0.0, 0.0for s in samples:total_acc += word_accuracy(s["pred"], s["gt"])total_ned += normalized_edit_distance(s["pred"], s["gt"])n = len(samples)return {"word_accuracy": total_acc / n, "NED": total_ned / n}
Engineering recommendation: the evaluation set should cover difficult samples such as small font sizes, multiple lines, mixed Chinese-English text, stylized text, and perspective backgrounds. Manual spot checks should also be introduced, because metrics cannot reflect layout aesthetics or occlusion problems.
5. A Reusable Practice Path
- Establish a capability baseline first: run a baseline on a unified evaluation set to determine whether the weakness is in glyphs or layout.
- Then adapt to the compute platform: build an operator list and fallback mechanism, and prioritize training stability.
- Strengthen the data side: add high-quality annotations for text regions and mine difficult samples.
- Tune the training side: combine layered precision with a parallelism strategy, supported by checkpoint-based fault tolerance.
- Govern the serving side: inference services can scale elastically on a container platform, with object storage managing models and assets, and log services plus monitoring alerts tracking failure rates and latency.
6. Conclusion
The core lesson from training a leading multimodal image generation model end to end on domestic chips is that compute independence and model capability are not two parallel tracks. They require coordinated progress across five layers: operators, parallelism, precision, data, and evaluation. For developers, the reusable part is this methodology: build evaluation first, then fill operator gaps, then tune strategy, and finally turn technical metrics into stable output that the business can use.
