Accelerating Hardware-Software Co-Design for Domestic LLMs: Operator Adaptation and Evaluation Governance

    This article examines two parallel trends in large model engineering: the shift of domestic accelerators from "able to run" to "running well" in next-generation training, and the rapid rise of vertical security capabilities measured by dedicated benchmarks. It breaks down the real challenges of domestic compute adaptation—operator coverage and fusion, numerical alignment and reproducibility, communication and parallel strategy, and fault tolerance—then proposes a four-phase, roughly twelve-month rollout rhythm based on scaling up in small steps with explicit entry criteria. It also outlines governance practices for evaluating security-oriented capabilities, including tiered access, sandbox isolation, traceability, and bidirectional assessment, and closes with the common cloud capabilities that support both training and evaluation.}

    1. Introduction: Two Parallel Technical Tracks

    Two recent developments are worth attention. First, the localization of training compute is moving from “able to run” to “running well”: next-generation large model training plans are beginning to treat domestic accelerator chips as a core compute source, with a landing timeline of roughly one year. The real hard work is not the moment the hardware arrives, but the long phase of low-level operator adaptation and custom development that comes before it. Second, model capabilities for security research scenarios keep rising: a class of models focused on network security improved its score on vulnerability-exploitation benchmarks from just over 30% to nearly 50%, a relative gain of more than 50%, showing that vertical security capability is becoming an independent track in large model evaluation.

    The two tracks look unrelated, but they share the same engineering foundation: extreme operator-level optimization, stable distributed training, and a reproducible evaluation system. This article takes a neutral view, abstracts both tracks into general technical problems, and offers an actionable methodology.

    2. Where the Real Difficulty of Domestic Compute Adaptation Lies

    Many people understand localization as “swap the chip model and recompile once,” which is the biggest misconception. The real work concentrates in the following layers.

    2.1 Operator Coverage and Operator Fusion

    Mainstream training frameworks ship extensive hand-written optimized operators targeting general-purpose accelerators. Domestic chips differ in instruction sets, memory hierarchy, and matrix unit shapes, so three types of problems appear frequently:

    • Missing operators: operators used by the framework, such as attention, normalization, and loss functions, have no counterpart on the target platform and can only fall back to composite implementations, causing a sharp performance drop;
    • Numerical differences: the same operator accumulates in a different order on different platforms, and floating-point error accumulates along different paths, causing loss curves to diverge;
    • Fusion breakage: fusion strategies originally designed for specific hardware stop working, intermediate tensors repeatedly spill back to device memory, and bandwidth becomes the bottleneck.

    The common engineering practice is to build an operator coverage matrix, decompose the model computation graph to operator granularity, label each item as “natively supported / needs customization / needs fallback,” and then tackle them in order of performance gain.

    A schematic version of the audit logic can be expressed as:

    1. # Pseudocode: operator coverage audit
    2. def audit(graph, platform_ops):
    3. missing, fallback = [], []
    4. for node in graph.nodes:
    5. if node.op not in platform_ops:
    6. missing.append(node.op)
    7. elif platform_ops[node.op].mode == "fallback":
    8. fallback.append(node.op)
    9. return sorted(missing, key=graph.cost, reverse=True), fallback

    2.2 Precision Alignment and Reproducibility

    Large model training is extremely sensitive to numerical stability. Under mixed precision, if a domestic platform implements BF16/FP8 details differently, alignment experiments must be run at small scale first: fix the random seed, fix the data order, fix the parallel partitioning, compare activations and gradient norms layer by layer, and only scale up after deviations are brought into an acceptable range. Skip this step, and a job running on hundreds of cards may suddenly diverge at some thousandth step.

    2.3 Communication and Parallel Strategy

    Domestic clusters differ from general-purpose solutions in interconnect topology and in the maturity of collective communication libraries, so the parallel strategy must stay closer to the hardware: keep tensor parallelism within the node’s high-bandwidth domain, rebalance pipeline parallel splits according to operator timing, and evaluate the communication amplification factor for sequence and context parallelism. In practice, profiling data is used to derive the optimal partitioning rather than copying empirical formulas.

    2.4 Stability and Fault Tolerance

    In jobs beyond a thousand cards, single-point failures are the norm. Three capabilities need to be built: health inspection (screening out slow and faulty cards before a job starts), fast recovery (periodic checkpoints plus elastic rescheduling), and fault attribution (separating hardware errors, communication timeouts, and operator crashes). Without these three layers, the “effective compute utilization” of a domestic platform is repeatedly eaten by restarts.

    Breaking the roughly one-year landing cycle apart, a pragmatic rhythm is:

    1. Months 1–2: computation graph and operator audit, fixing the fallback list and the customization list;
    2. Months 3–5: custom operator development and single-card/single-node precision alignment, establishing a regression baseline;
    3. Months 6–8: parallel strategy tuning at the hundred-card scale, getting checkpoints and elastic recovery working end to end;
    4. Months 9–12: long-running stable training at the thousand-card scale, stress-testing continuous runtime and the throughput decay curve.

    The key principle is “scale up in small steps”: every scale tier must have explicit entry criteria (loss deviation, throughput, stability duration), and scaling does not proceed until the criteria are met.

    4. Evaluation Governance for Vertical Security Capability

    The second track offers a methodological lesson: vertical capability must be measured with vertical benchmarks. Security capability evaluation typically covers tasks such as vulnerability identification, exploitation chain construction, and defensive hardening recommendations. A score rising from around 32% to around 48% means the model’s usability on real attack-and-defense chains has crossed a threshold, but it also brings governance requirements:

    • Tiered authorization: open capabilities in tiers by sensitivity, with audit logs;
    • Sandbox isolation: run evaluations and experiments in isolated environments, with no external leakage of artifacts;
    • Traceability: record evaluation dataset versions, prompt templates, and decoding parameters to keep results reproducible;
    • Bidirectional assessment: test both attack construction capability and defensive repair and false-positive control capability.

    5. Cloud Deployment: Combining Common Capabilities

    Whether for training or evaluation, engineering deployment relies on a set of common cloud capabilities: a container platform to host elastic training clusters and operator compilation environments; object storage for checkpoints and datasets; a message queue to decouple the data preprocessing pipeline; and log services plus monitoring and alerting for visualizing throughput, device memory, and communication timeouts and for threshold-based alerts. The capability forms Baidu AI Cloud provides in these common categories can serve as a reference baseline for architecture selection; refer to the official documentation for specific parameters.

    6. Conclusion

    The essence of domestic compute adaptation is turning “hardware is usable” into “training is trustworthy,” which requires advancing along four lines at once: operators, precision, parallelism, and fault tolerance. The rapid rise of vertical security capability is a reminder that the evaluation system must evolve in step with capability. Only both together mark the maturity of hardware-software co-design.