Migrating the Foundation Model Training Stack: Risks of Moving from the NVIDIA Ecosystem to Ascend
This article explains why migrating a large model pretraining foundation is a software stack transition rather than a simple hardware swap. It outlines the five layers that must be revalidated, the four migration stages with their acceptance criteria, the infrastructure components that need to be rebuilt, and the key risks of running two stacks in parallel during the transition. It also offers a practical framework for decision-makers to assess migration progress and avoid ecosystem lock-in.
1. The Core Issue: Migration Is a Software Stack Swap, Not a Hardware Swap
Discussions about migrating a large model pretraining foundation are often reduced to “replacing hardware A with hardware B.” In real engineering, hardware is only the bottom layer. A reproducible large-scale pretraining system has at least five layers: compute and interconnect, drivers and runtime, operators and the compilation layer, the parallel training framework, and data and checkpoint management. Changing the foundation means revalidating all five layers.
The key cadence described in the source material is this: a domestic accelerator card first takes on inference workloads, and only the next-generation model is planned to migrate pretraining to it. The team has open-sourced a set of infrastructure components that map one-to-one to the existing ecosystem, covering compilation, operators, communication, and attention and selection modules. At the same time, a new-generation accelerator card is still being tested, with the earliest use for new model pretraining by the end of the year, while larger-scale models continue to be trained on the original ecosystem in the short term. This state of having “one foot in the old ecosystem and one foot on the new platform” is exactly the most fragile phase of a migration.
2. The Four Migration Stages and Their Acceptance Criteria
- Inference first. The goal is to move workloads that do not involve backpropagation, validating runtime stability, memory management, and throughput. Acceptance is measured by per-request latency, sustained stable runtime, and failure recovery time.
- Small-scale pretraining alignment. Run alignment experiments with billion-parameter models and short sequences. The core metric is not speed but whether the loss curve overlaps with the baseline ecosystem.
- Mid-scale parallel validation. Introduce tensor parallelism, pipeline parallelism, and data parallelism, focusing on communication overhead and peak memory usage.
- Full-scale pretraining. Only at this point can the migration be considered complete. Acceptance criteria are uninterrupted training for several weeks, recoverable checkpoints, and throughput that meets the schedule.
3. Four Categories of Infrastructure That Must Be Rebuilt
- Compilation and operator layer: Compiling high-level tensor expressions to the target hardware requires self-developed or adapted compilation dialects and high-performance operator libraries covering hotspots such as matrix multiplication, normalization, and attention.
- Communication layer: Topology awareness, bucket size, and overlap strategies for collective communication directly determine multi-node efficiency.
- Attention and selection modules: In long-sequence training, attention implementations and expert selection logic are the main consumers of memory and bandwidth.
- Training framework adaptation: Parallel strategies, mixed precision, gradient accumulation, and fault tolerance must be aligned with the underlying runtime.
The following is a sample adaptation sanity check:
def sanity_check(model, batch, baseline_loss, tol=1e-3):loss = model.train_step(batch)assert abs(loss - baseline_loss) < tol, "loss diverged"assert model.memory_peak < model.memory_budgetreturn loss
4. The Biggest Risk During Migration: The Most Fragile Phase of Dual-Track Parallelism
Dual-track parallelism means maintaining two software stacks at the same time, which lengthens the problem-localization chain: a precision anomaly could originate from operators, communication, mixed precision, or data ordering. It is advisable to establish three layers of observability: a metrics layer for throughput and memory, a logging layer for operator fallbacks and retries, and a tracing layer for single-step time breakdown. Any anomaly should be traceable through bisection to a specific layer.
5. A Decision Framework for Leaders
Do not make a binary judgment about whether to migrate everything. Instead, measure progress with three questions: Has pretraining completed one end-to-end alignment on the target platform? Can checkpoints be recognized across platforms? Does failure recovery meet the schedule? Until all three are in place, keeping the original ecosystem as the primary training foundation is the rational choice. For cloud users, this means preparing heterogeneous compute pools, unified scheduling, and monitoring and alerting capabilities to avoid being locked into a single ecosystem.
