Why Running Flagship LLMs on Domestic AI Chips Is Hard: A Migration Checklist
This article explains why launching a flagship large model on domestic compute is often delayed by software stack migration rather than model training capability. It breaks down the required engineering work across four layers—operators, collective communication, precision and memory, and inference—and shows how to turn release readiness into measurable acceptance criteria such as efficiency baselines, layered validation, convergence alignment, and canary rollback.
1. The Symptom: Release Windows Keep Slipping, and Training Is Not the Bottleneck
A new version of a major model was predicted by several outlets early in the year to appear “more than two months ago.” Since then, the pre-Spring Festival window, the post-holiday window, late February, and early March have all passed without a launch. The longer timeline makes the pattern clearer: the gap between the previous generation and this one was about seven months, while this generation is now more than a year past its predecessor. An organization with a repeatedly validated technical approach, ample funding, and a stable team rarely gets stuck for this long on whether a model can be trained at all.
A more plausible explanation is that the engineering goal changed. Reports indicate that the new version gave early access to some domestic compute vendors first, which means the training and inference pipeline is deliberately moving away from a mature accelerated-computing ecosystem. As a result, the release date is no longer a function of model capability. It is a function of completing an equivalent migration of the entire software stack onto new hardware.
2. Why Switching Hardware Means Rewriting Half the Infrastructure
The mainstream accelerated-computing ecosystem is hard to replace not because of any single chip, but because it carries more than a decade of accumulated software assets: low-level operator libraries, multi-GPU communication libraries, mixed-precision support, graph compilers and inference engines, and performance analysis toolchains. Every line of framework code you write lands on top of it three or four layers down.
The essence of migration is reimplementing these “taken-for-granted” capabilities on a new architecture while meeting numerical behavior, performance characteristics, and stability at the same time. If any layer falls short, end-to-end throughput can drop by an order of magnitude—and the narrative of “building a stronger model with less compute” depends precisely on efficiency not slipping.
3. Four-Layer改造 Checklist: Where the Work Actually Goes
3.1 Operator Layer: From “Computes Correctly” to “Computes Fast”
Core operators such as attention, normalization, positional encoding, and token embedding must be rewritten and tuned on the new architecture. The difficulty is not writing a correct implementation. It lies in overlapping memory access with computation, reusing on-chip cache, operator fusion (merging normalization with the following linear layer), and keeping the performance curve smooth across different sequence lengths.
Illustrative self-check code (pseudocode, expressing validation intent only):
# 1. Numerical consistency: compare bit-for-bit against the reference implementationfor dtype in ["bf16", "fp16"]:out_new = custom_attention(x, w, dtype=dtype)out_ref = reference_attention(x.float(), w.float()).to(dtype)assert rel_err(out_new, out_ref) < 1e-2# 2. Performance baseline: fix a shape set, record throughput and memory access efficiencyfor seq in [1024, 4096, 16384]:report(latency_ms(custom_attention, seq), achieved_tflops(seq))
The acceptance criterion should be a “relative error threshold plus a throughput floor for each shape,” not a single passing run.
3.2 Communication Layer: Collective Communication Must Follow the Topology
Training at ten-thousand-GPU scale relies on all-reduce, ring and tree communication, and point-to-point send/receive. The interconnect topology, link bandwidth, and intra-node versus inter-node differences on new hardware are all different, so copying the existing communication library directly is not viable. Communication order must be designed around the topology, computation and communication must be overlapped, and slow nodes and fault tolerance must be handled. The practical approach is to first measure the bandwidth ceiling under each topology with small-scale benchmarks, then split the parallelism strategy accordingly (the ratio of data parallelism, tensor parallelism, and pipeline parallelism). Otherwise, choosing the wrong parallelism degree makes communication the main bottleneck.
3.3 Precision and Memory: Redesign Rather Than Copy Parameters
Low-precision mixed training, optimizer state offloading, recomputation, and memory sharding all depend heavily on the hardware’s compute-to-bandwidth ratio and its level of low-precision support. The same configuration may neither save memory nor run faster on a new architecture. The right path is to build a two-dimensional “memory–throughput” tuning matrix: keep the global batch size and learning-rate semantics unchanged, adjust only sharding granularity, offloading ratio, and recomputation scope, and observe whether actual throughput and convergence curves match at each setting.
3.4 Inference Layer: Serving in Production Is Another Hard Fight
On the inference side, the key is managing the cache in memory, continuous batching, speculative decoding, quantization, and graph optimization. These optimizations are extremely sensitive to hardware characteristics: cache block size, batch scheduling strategy, and parallel sampling schemes all need recalibration. Long-duration stability testing and tail-latency evaluation are mandatory before launch, because the production experience is determined by P99, not average throughput.
4. Turning “Can We Ship” into Measurable Acceptance
- Efficiency baseline: Treat the best pre-migration configuration as 100%, set a minimum percentage threshold for each layer, and do not advance to the next stage until it is met.
- Layered acceptance: Set thresholds layer by layer—operator → single-GPU module → single node → cluster—so problems do not surface only at ten-thousand-GPU scale.
- Convergence alignment: Under the same data and hyperparameters, the loss curve should follow the same trend and stay in the same magnitude as the reference implementation.
- Canary and rollback: Run old and new pipelines in parallel with shadow traffic, switch back automatically on anomalies, and keep the release controllable.
For cloud deployment, a container platform can host heterogeneous resource pools, object storage can hold datasets and checkpoints, logging and monitoring/alerting services can track throughput, memory, and tail latency, and a message queue can smooth out peaks and valleys—turning “migration” into an observable, rollback-capable engineering pipeline. Baidu AI Cloud has general-purpose capabilities in heterogeneous compute scheduling and observability systems that can serve as an architectural reference.
5. Conclusion
A delayed release is often not a capability problem but a compatibility cost problem. The takeaway for developers is direct: when evaluating domestic compute, do not look only at peak compute; look at operator coverage, communication efficiency, precision support, and inference stack maturity. For migration, follow three steps: baseline-driven, layered acceptance, and canary rollback. Once the software stack achieves equivalence—or better—on new hardware, release is only a matter of time.
