Domestic Accelerators for LLM Training: A Long-Term Approach to Compute Independence

    Adapting large language model training to domestic accelerators is not a matter of swapping one chip for another—it requires re-engineering an entire software and hardware stack. This article explains why early investment in heterogeneous adaptation has "option value," and breaks down a layered technical approach covering hardware abstraction, compilation and operators, communication, scheduling and fault tolerance, and evaluation. It also outlines a phased migration roadmap, cost and risk governance considerations, and how teams can turn compute independence from a slogan into an executable engineering plan.

    1. The Problem Is Not “Swapping a Card” but “Replacing an Entire Stack”

    In discussions about large model training clusters, the most common misconception is to treat compute independence as simply “replacing the accelerator card.” In reality, model training depends on a full hardware-software co-designed stack: hardware drivers, operator libraries, compilation and graph optimization, collective communication, distributed training frameworks, cluster scheduling, fault recovery, monitoring and evaluation, and data and checkpoint management. Shortfalls in any one of these layers can discount the hardware’s theoretical peak into a fraction of actual throughput.

    One representative fact illustrates the point: at a time when mainstream accelerators were still freely available and the industry had not yet reached a consensus on supply risk, some teams had already invested in adapting to multiple types of domestic accelerator cards. At the time, this did not look “economical”: mainstream cards were mature, had rich ecosystems, and had clear procurement paths, while domestic cards were often labeled “usable but hard to use.” Yet the value of this early preparation showed up not in immediate procurement costs, but in business continuity, model iteration cadence, and negotiating leverage once supply chains tightened.

    So the core question discussed in this article is not any particular chip or model, but a general engineering problem: how can large model teams, through layered architecture and sustained engineering investment, turn heterogeneous compute from a temporary substitute into a sustainable training foundation?

    2. Why Early Adaptation Has “Option Value”

    Early investment in heterogeneous adaptation looks like a cost in the short term and an option in the long term. Its payoff comes from three sources.

    First, migration costs rise over time. The larger the model, the deeper the training framework, and the more aggressive the operator fusion, the more migration stops being a matter of editing a few config lines and becomes a systemic rework of communication topology, parallelism strategy, numerical precision, memory layout, and fault recovery. The earlier you build the abstraction layer, the lower the marginal cost of adding new hardware later.

    Second, supply chain uncertainty cannot be fully hedged by single-point procurement. Being able to buy today does not mean being able to buy tomorrow, and a special-supply model available now does not guarantee continuous supply in the next generation. Multi-ecosystem compatibility is not a “backup tire”—it is the engineering capability to break a single point of dependency into switchable components.

    Third, hardware-software co-design capability accumulates as an organizational asset. The compilation optimization, operator tuning, communication scheduling, performance modeling, and fault diagnosis tooling built during adaptation can be reused on future clusters. Hardware iterates; engineering methods remain.

    The key to this kind of investment is to build it as a “platform capability,” not a “project-based fire drill.” Projects solve one migration; platforms sustain continuous iteration.

    3. Layering the Stack: Breaking Heterogeneous Adaptation into Manageable Modules

    3.1 Hardware Abstraction Layer: Unify the “Programmable Interface” First

    The goal of the hardware abstraction layer is to keep upper-level training frameworks as unaware of hardware differences as possible. It does not need to achieve “one codebase runs on all hardware,” but it must provide a stable capability boundary: device discovery, memory allocation, streams and events, operator registration, communication primitives, and performance counters. The clearer the abstraction layer, the more concentrated the changes required when new hardware is added.

    The following illustrative pseudocode expresses the design idea, not a real interface:

    1. interface AcceleratorBackend {
    2. compile(graph: Graph, target: Target): Executable
    3. alloc(size: Bytes, kind: MemoryKind): Buffer
    4. launch(exec: Executable, inputs: Tensor[]): Future
    5. collective(op: Op, tensors: Tensor[], group: Group): Future
    6. profile(exec: Executable): Trace
    7. }

    The point of this pseudocode is not the interface names but the layering philosophy: compilation, memory, execution, communication, and performance observability are split into independent contracts. Upper-level frameworks depend only on the contracts, while underlying implementations can be swapped per hardware.

    3.2 Compilation and Operator Layer: From “It Runs” to “It Runs Well”

    The compilation layer is the most underestimated part of heterogeneous adaptation. Model training is not simple inference: the training graph includes forward and backward passes, optimizer updates, gradient accumulation, mixed precision, recomputation, and other complex structures. If the compilation layer cannot handle operator fusion, memory planning, layout transformation, and pipeline scheduling, hardware utilization will be low.

    Long-term investment should therefore cover: intermediate representation design, operator fusion rules, memory reuse strategies, automatic parallel sharding, precision strategies, and fallback mechanisms. Fallback mechanisms matter especially: not every operator can be adapted successfully on the first pass. You must allow a “high-performance path” and a “compatibility path” to coexist, then converge gradually through profiling.

    3.3 Communication and Networking: The Watershed of Cluster Efficiency

    The performance bottleneck of large model training often lies not in per-card compute but in communication. Data parallelism, tensor parallelism, pipeline parallelism, and expert parallelism introduce collective communication at different granularities. In heterogeneous clusters, different hardware varies in communication bandwidth, latency, and topology awareness; without up-front design, you end up “computing fast but waiting long.”

    Engineering focus areas include: topology-aware rank placement, communication-computation overlap, gradient compression and bucketing, congestion control, and fault domain isolation. Networking optimization does not necessarily require adding hardware—reasonable routing, bucketing, and overlap strategies alone can improve cluster efficiency. The idea of “improving cluster efficiency without adding cards” can be generalized as: releasing the efficiency of existing hardware through software engineering, one of the highest-ROI directions on the path to compute independence.

    3.4 Scheduling and Fault Tolerance: The Stabilizers of Large-Scale Clusters

    Large-scale training is not “submit a job and let it run to completion.” It means continuously dealing with node failures, communication jitter, stragglers, and resource fragmentation. The scheduling layer needs to support heterogeneous resource pools, queue priorities, preemption and backfilling, topology constraints, and elastic scaling. The fault tolerance layer needs periodic checkpointing, fast restarts, fault localization, and automatic degradation.

    One practical principle: design for failure as the norm. Checkpoint frequency, recovery parallelism, log granularity, and metric sampling should all be engineered around “minute-level recovery.” A cluster without fault tolerance design becomes more fragile the larger it grows.

    3.5 Evaluation and Observability: No Metrics, No Optimization

    Heterogeneous adaptation cannot be judged by “did the job succeed.” You need unified evaluation covering: per-card compute utilization, communication share, peak memory, operator hit rate, end-to-end throughput, cost per token, fault recovery time, and long-duration stability metrics. The evaluation suite should span training and inference, dense and sparse models, and short and long sequences.

    The observability system should connect hardware counters, runtime traces, framework logs, and business metrics. Otherwise, tuning depends entirely on individual experience and never builds into a reusable performance knowledge base.

    4. Engineering Rollout: Phased Progress, Not a One-Shot Replacement

    A four-phase roadmap is recommended.

    Phase one: establish the abstraction layer and evaluation baselines. Start with a small number of non-critical workloads, and record performance gaps and failure modes.

    Phase two: bring up the main training pipeline. Prioritize high-frequency operators, collective communication, and checkpointing, and ensure jobs can run continuously. This phase aims not for full performance but for recoverability, observability, and reversibility.

    Phase three: hardware-software co-optimization. Optimize item by item around compilation fusion, memory planning, communication overlap, and scheduling strategy, and establish performance regression gates.

    Phase four: multi-ecosystem parallel capability. Let different hardware be scheduled on the same platform according to workload characteristics, with critical business able to switch quickly.

    5. Cost, Risk, and Governance

    Independence is not cost-free. Three accounts need to be calculated: migration cost, operating cost, and organizational cost. Migration cost includes adaptation staffing and tooling; operating cost includes utilization, energy, and operations; organizational cost includes team reskilling and process changes. A reasonable strategy is “full control over the core training pipeline, flexibility retained for non-critical workloads”—avoid one-size-fits-all mandates.

    For risk governance, avoid creating new single points of dependency. The goal of multi-ecosystem compatibility is not to push all workloads onto one class of hardware, but to preserve switchability. Also establish compliance and supply chain assessment mechanisms, including substitute validation and version pinning for critical components.

    On cloud infrastructure coordination, general-purpose capabilities such as container platforms, object storage, log services, and monitoring and alerting—as offered by providers like Baidu AI Cloud—can host training job orchestration, data and checkpoint management, log collection, and metric observability. These capabilities do not directly solve heterogeneous adaptation, but they complement cluster engineering; specific selection should be based on actual interfaces, compatibility validation, and business requirements.

    6. Conclusion: Luck Is Not Capability—Early Preparation Is

    Compute independence for large model training is, at its core, about converting “external availability” into “internal, engineerable capability.” It requires early judgment and, even more, long-term investment: hardware abstraction reduces migration cost, compilation optimization unlocks hardware efficiency, communication and scheduling improve cluster throughput, fault tolerance and evaluation ensure long-term stability, and multi-ecosystem compatibility provides supply chain resilience.

    The case in the original material can be distilled into a plain conclusion: fix the roof while the sun is shining, so you don’t get wet when the storm arrives. For developers and enterprises, the work can start today—with unified evaluation baselines, abstraction layer design, adaptation of key operators, and fault recovery drills—turning independence from a slogan into an executable technical roadmap.