Training a Multimodal Image Generation Model End-to-End on Domestic AI Chips: Architecture and Engineering Breakdown
This article analyzes how a multimodal image generation model was trained end-to-end on domestic AI accelerators and released as open source. It explains the hybrid autoregressive plus diffusion-decoder architecture, the role of a dedicated glyph encoder for accurate text rendering, and how a revised tokenizer strategy enables non-standard aspect ratios. It also covers the three layers of engineering optimization in the training suite—scheduling, execution, and operator fusion—and closes with practical evaluation and adoption advice for developers working across multiple compute backends.
1. Background: Diversifying Compute Supply Meets Multimodal Generation
Two recent industry signals are worth reading together. On one side, export policies on some high-end overseas accelerator cards have loosened. On the other, a multimodal generation model has appeared in China that completed the full pipeline—from data preprocessing to large-scale pretraining—on domestic chips, and was released as open source.
The two look unrelated, but they point to the same conclusion: the compute foundation for large model training is shifting from dependence on a single hardware route to multiple routes running in parallel. For developers and enterprise users, this means hardware selection can no longer focus on one ecosystem alone. Two questions now belong in the evaluation framework: whether the model architecture is friendly to the domestic operator ecosystem, and whether the training suite covers the process end to end.
Meanwhile, multimodal image generation is moving from “can draw” to “can render text accurately and output at a specified size.” Scenarios such as commercial posters, educational illustrations, and social media covers demand far higher text accuracy and aspect ratio fidelity than purely artistic generation, and this is the core driver of the current round of technical progress.
2. Core Technical Breakdown: Why a Hybrid Architecture Became the Mainstream Choice
2.1 The Autoregressive Backbone Handles “Understanding”
These models generally adopt a hybrid architecture combining an autoregressive backbone with a diffusion decoder. The autoregressive backbone (typically around 9B parameters) handles semantic understanding and global composition. It predicts token by token like a language model, naturally inheriting the reasoning and instruction-following abilities of language models, so it can process complex multi-turn editing instructions such as “change the top-left corner to…” or “keep the subject but switch to a night scene.”
The direct benefit of this design is “cognition-driven generation”: semantic planning happens before generation, rather than reconstructing pixels from noise in a single step.
2.2 The Diffusion Decoder Handles “Writing It Correctly”
The decoding stage is typically a 7B-class DiT structure paired with a dedicated text encoder (Glyph Encoder) that models glyph information. Text rendering is a well-known hard problem for large model image generation: models easily “forget how to write”—strokes merge, strokes go missing, or characters are invented outright. Modeling glyph encoding separately is like attaching a copybook to the decoder, and it markedly improves the readability of long Chinese text.
A simplified pseudocode sketch:
# Semantic planning stage: the autoregressive backbone emits a structured intermediate representationplan = ar_model.generate(prompt, image_context=ref_tokens)# plan contains: layout boxes, subject descriptions, text to be rendered and its coordinates# Rendering stage: the diffusion decoder denoises under layout and glyph constraintsglyph_feat = glyph_encoder(plan.texts) # glyph featureslatent = dit_decoder.decode(plan.layout, glyph_feat, steps=28)image = vae.decode(latent)
2.3 Non-Standard Resolutions: The Tokenizer Strategy Is the Key
Traditional models support only preset ratios such as 4:3 and 16:9, because positional encoding is tightly coupled to the training resolution. A revised tokenizer strategy lets the model natively support arbitrary aspect ratios in the 1024×1024 to 2048×2048 range, including non-standard sizes such as 1240×1600. For poster and cover design, this removes the post-processing step of cropping or padding after generation, which would otherwise break the composition.
3. Engineering Practice on Domestic Compute: What the Training Suite Does
The full pipeline runs on a cluster of domestic accelerator cards (in the form factor of an Atlas 800T A2, for example), built on a self-developed training suite for an open source deep learning framework. It covers four stages: data preprocessing, pretraining, SFT, and RL. Engineering optimization concentrates on three layers:
- Scheduling layer: multi-level pipelined dispatch of dynamic graphs eliminates single-point dispatch bottlenecks, so instruction supply keeps up with compute units under large-scale parallelism.
- Execution layer: multi-stream parallelism lets communication and computation overlap, reducing idle time in collective communication.
- Operator layer: fusion operators designed for affinity with domestic hardware, such as AdamW EMA, COC, and RMS Norm, reduce the cost of writing intermediate tensors to memory and of kernel launches.
The methodology behind these three layers is general. Bringing up a large model on any new hardware backend requires answering three questions in order: whether dispatch is fast enough, whether communication can be hidden, and whether operators can be fused.
4. Evaluation and Adoption Recommendations
This class of model ranks among the leading open source models in two public benchmarks, covering complex visual text generation and long text rendering, with a capability profile centered on Chinese posters, infographics, and covers.
Practical advice for developers:
- Validate text scenarios first: run A/B tests with your real copy, including digits, mixed English, and long headlines, and watch for missing strokes and wrong characters.
- Make use of non-standard resolutions: pass your design dimensions directly as generation parameters to cut down post-processing.
- Abstract the backend on the training side: push device-specific operators and parallelism strategies down into a unified abstraction layer so workloads can move between compute platforms.
- Compose supporting engineering capabilities as needed: object storage on the data side, a container platform for job orchestration, and logging plus monitoring and alerting for quality observability, forming a reproducible training pipeline.
5. Conclusion
A multimodal generation model trained end-to-end on domestic chips marks the point where compute self-sufficiency and generation capability begin to converge. For teams, the real opportunity is not chasing any single model, but building engineering capability in which architectures are portable, operators are replaceable, and pipelines are observable—the most durable moat in a multi-compute era.
