China’s Domestic AI Compute: From Model Compatibility to System Efficiency
Adapting large language models to China’s domestic computing platforms requires more than getting a model to run. This article examines operator compatibility, dynamic shapes, numerical precision, memory management, cluster scaling, and reproducible evaluation. It also outlines a staged migration process for turning hardware capacity into reliable, cost-effective production services while meeting quality, latency, and stability requirements.
1. From Market Interest to Engineering Requirements
Growing market interest in computing infrastructure, AI hardware, and semiconductors does not, by itself, demonstrate technical maturity. Trading activity and sector performance cannot be treated as direct evidence of industrial demand. Without complete reporting dates, data sources, and consistent measurement methods, market figures are not a reliable basis for assessing demand growth.
From an engineering perspective, the development of China’s domestic computing platforms must address three questions:
- Can models be adapted to the platform?
- Can the platform support production workloads?
- Can the system be continuously optimized?
These questions need to become testable, reproducible engineering objectives before an adaptation effort can be judged valuable.
Getting a model to start is only the first step. Production deployment also requires acceptable output quality, stable response times, controlled resource consumption, and reliable recovery from failures. Successful validation on a single machine does not establish multi-node scalability. Likewise, high offline throughput does not guarantee acceptable waiting times for online users.
The most useful indicators are therefore the scale of application deployments, the breadth of software compatibility, and the system’s useful output—not short-term market enthusiasm.
2. Three Drivers: Demand Growth, Domestic Substitution, and System Efficiency
2.1 Demand Growth: From Model Experiments to Business Workloads
Enterprise large language model applications are moving beyond demonstration chatbots into knowledge retrieval, document processing, content generation, and business assistance. These workloads have different computing requirements.
Short-text interactions typically prioritize time to first output. Long-document processing places greater demands on context length and cache capacity. Batch generation may prioritize throughput and cost per request.
Using a benchmark from one workload to evaluate every application can lead to systems that appear adequately provisioned but deliver a poor user experience.
Growing demand also does not necessarily require a proportional increase in hardware purchases. Cache reuse, request scheduling, model compression, and batch processing during idle periods can reduce additional resource requirements. Capacity planning should begin with request volume, input-length distributions, and service objectives, then derive the required computing capacity.
2.2 Domestic Substitution: Migrating the Entire Capability Stack
Replacing hardware is not simply a matter of swapping computing devices. It involves migrating the computing architecture, drivers, compilers, runtimes, operator implementations, and operational workflows.
Existing deployment pipelines may depend on particular numerical formats, device-memory management behavior, or communication mechanisms. After migration, execution efficiency and numerical error can change even when the model architecture remains unchanged.
A reliable replacement therefore requires compatibility validation, performance tuning, and production stability testing.
The engineering value of domestic alternatives also includes supply continuity, maintainability, and failure-handling capability. A platform with a lower purchase price may not offer better overall economics if adaptation takes too long.
2.3 System Efficiency: From Peak Performance to Useful Output
Theoretical device performance does not directly translate into business throughput. Data loading, inter-device communication, memory allocation, and request queues can all leave computing units waiting.
If the bottleneck lies in data preparation or communication, adding devices may deliver little benefit. Improving data paths, eliminating repeated computation, or refining scheduling can instead increase workload capacity without additional hardware.
Efficiency should therefore be measured as useful output that meets quality and service objectives, rather than as an isolated peak-performance figure.
3. Technical Layers of Large Language Model Adaptation
3.1 Operator Compatibility: More Than Matching Names
Large language models combine matrix operations, normalization, attention, activation functions, and data rearrangement. Compatibility checks must verify not only whether an operator exists, but also its supported data types, tensor shapes, broadcasting rules, and behavior at boundary conditions.
Operators with the same name can behave differently across execution environments. An operation may run successfully while taking an inefficient execution path that introduces extra data transfers or repeated memory allocation.
Engineering teams should build an operator inventory that distinguishes frequently used operations, performance hotspots, and unusual tensor shapes. Establish computational correctness first, then optimize hotspots through operator fusion or implementation improvements. Local speedups must not change the model’s intended semantics.
3.2 Compilation and Runtime: Managing Dynamic Shapes
Online inference requests vary in input length, while batch sizes change with load. These dynamic shapes affect compilation caches, execution plans, and memory reuse.
If every input shape triggers compilation, services may experience substantial cold-start latency. Padding all inputs to a large fixed length can improve execution-plan reuse, but wastes computation.
A common approach is to group requests into length ranges so that similar shapes share execution paths. Too many groups increase management overhead; too few increase unnecessary padding. The boundaries should be determined from actual request distributions rather than fixed rules of thumb.
3.3 Numerical Precision: Validate Error and Task Quality Together
Lower precision can reduce memory use and improve throughput, but not every operation should use the same precision. Some normalization, reduction, and accumulation operations are more sensitive to numerical error and may need higher precision.
Validation should go beyond comparing average errors in intermediate tensors. It must also assess final task quality.
For question answering, this can include factual accuracy and answer completeness. For structured outputs, evaluation should cover field accuracy, format compliance, and handling of abnormal inputs.
When quantization is introduced, the coverage of calibration data must be documented. Tests should include boundary cases such as long inputs, infrequent words, and complex instructions. Quantization gains and quality losses should be reported together, rather than presenting throughput improvements alone.
3.4 Device Memory and Caches: Static Footprint Versus Dynamic Growth
Inference memory is used for model parameters, intermediate activations, temporary workspaces, and the attention mechanism’s key-value cache.
Parameter memory is relatively stable. Cache usage, however, typically grows with context length, generated output length, and the number of concurrent requests.
A model that fits in memory is not necessarily able to support a production workload. Multiple long requests arriving together can still cause out-of-memory failures or sharply increased queueing times.
Capacity planning should use request-length distributions rather than averages alone. Validation needs to cover high-percentile input lengths, maximum generation limits, cache reclamation, and resource release after request cancellation.
4. From a Single Machine to a Cluster: Why Scaling Efficiency Declines
4.1 Match Parallelism to the Model and Workload
Model parallelism distributes computation or parameters across multiple devices, but introduces communication overhead.
Tensor parallelism requires frequent exchanges of computation results. Pipeline parallelism requires coordination between stages and management of idle time between them. Other forms of parallelism also have workload-specific trade-offs.
More parallelism does not always mean better performance. When communication overhead approaches or exceeds the computational benefit, scaling gains shrink.
Choosing a parallelism strategy requires considering model size, device memory, network conditions, batch size, and response-time objectives together.
4.2 Networks and Topology Are Part of System Capability
Distributed inference and training depend on both computing devices and efficient data exchange. Network bandwidth, latency, congestion, and topology all affect task completion time.
Cluster testing should cover single-node, multi-node, and mixed-workload scenarios, while recording the share of execution time spent on communication.
If throughput improves only slightly after expansion, teams should determine whether the cause is communication overhead, load imbalance, or insufficient data preparation. Limited scaling should not automatically be attributed to device performance.
4.3 Balance Throughput Against User Waiting Time
Larger batches often improve device utilization, but they can also make requests wait longer. For interactive services, maximum throughput is not necessarily the best operating objective.
The input-processing stage and the step-by-step generation stage have different computational characteristics. Organizing resources around these stages may improve efficiency, but it also adds state-transfer and scheduling complexity. Adoption should depend on measured benefits.
Scheduling must also account for mixed short and long requests, business priorities, and overload handling. Where necessary, resource isolation and admission limits should prevent lower-priority batch workloads from consuming capacity needed by real-time services.
5. Build a Reproducible Evaluation Framework
5.1 Fix and Document Test Conditions
Each evaluation should record:
- Model version and parameter count
- Precision strategy
- Input and output lengths
- Concurrency
- Batching strategy
- Software and hardware environment
Alternative implementations must be compared under similar quality requirements and service constraints. Short-input results should not be mixed with long-input results, and offline benchmarks that exclude queueing time should not be presented as online service capacity.
Warm-up, compilation, and formal measurement phases should be documented separately. Cold-start costs matter for production services, but they should not be conflated with steady-state performance.
5.2 Measure Quality, Speed, Resource Use, and Stability
Core metrics fall into four groups:
- Quality: Task accuracy, structured-output compliance, human-review pass rates, and quality changes relative to the baseline.
- User experience: Time to first output token, intervals between subsequent tokens, end-to-end request latency, and high-percentile latency.
- Resources: Device-memory use, compute utilization, communication time, energy consumption, and effective throughput.
- Stability: Request failure rates, timeout rates, performance variation during prolonged operation, and recovery time after failures.
Throughput should be tied to service objectives. Only requests completed within the required quality and response-time limits should count toward effective throughput. This prevents excessive queueing from producing misleadingly high processing figures.
5.3 Account for the Full Lifecycle Cost
Cost per business request includes more than hardware investment. It also includes adaptation development, testing and validation, operations, labor, electricity, and losses caused by failures.
A useful general calculation is:
Cost per effective request = Total relevant costs during the measurement period ÷ Successful requests meeting quality and service objectives
This approach helps compare practical returns across platforms, but the cost boundaries, measurement period, and resource-allocation method must be stated.
Counting only device costs while omitting ongoing adaptation and maintenance can distort the result.
6. A Staged Enterprise Migration Process
Stage 1: Establish a Comparable Business Baseline
Identify representative tasks, request volumes, input-length distributions, minimum quality requirements, and response-time objectives.
Preserve a representative test dataset and establish performance and cost baselines for the existing system.
Test data should be appropriately anonymized and access-controlled. Covering real business scenarios must not expose sensitive information.
Stage 2: Validate a Minimal End-to-End Workflow
Select one representative model and a limited business workflow. Validate parameter loading, key operators, output quality, and handling of abnormal inputs.
The objective is to identify unsupported operations, numerical deviations, and execution-path problems—not to maximize throughput immediately.
Temporary compatibility workarounds should be documented, including their maintenance costs and potential performance risks.
Stage 3: Optimize According to Measured Bottlenecks
Use monitoring and profiling to determine whether the main costs come from computation, communication, data movement, or scheduling.
Where possible, change only one major category of variables at a time and retain before-and-after results.
The bottleneck should determine the optimization order:
- If communication consumes too much time, evaluate parallelism and deployment topology first.
- If memory is constrained, examine cache management, batching, and precision choices.
- If queueing is excessive, revisit admission control and resource allocation.
Stage 4: Introduce Production Traffic Gradually and Test Failures
Route a small share of real requests to the new environment and continuously monitor quality, latency, failure rates, and cost.
Define rollback conditions in advance and verify that model versions, configurations, and request routing can be reliably restored.
Test device failures, node departures, network disruptions, and sudden load increases. Production readiness depends on recovery under failure, not only on performance under normal conditions.
Stage 5: Scale Operations and Run Continuous Regression Tests
After expanding deployment, continue tracking changes in request patterns. Longer user inputs, new applications, and model updates can all shift the original bottlenecks.
Correctness, performance, and stability tests should become part of continuous validation. A software upgrade that fixes one problem should not silently introduce quality degradation or resource waste elsewhere.
7. How to Recognize Real Industrial Progress
Progress in China’s domestic AI computing ecosystem cannot be judged solely by hardware supply or announcements of model compatibility. It also depends on software-stack maturity, application migration efficiency, and the ability to operate at scale.
Operator implementations, compiler optimization, cluster networking, device-memory management, scheduling, and operational tools all influence the final outcome.
Value may come from faster hardware, but it may also come from software that eliminates unnecessary computation, systems that reduce failure-related losses, or application designs that use resources more effectively.
For developers, the key capability is translating business needs into measurable requirements and completing the loop from compatibility testing to production operation.
For enterprises, a sound approach is to establish baselines using real workloads, validate at a small scale, and expand gradually—rather than making procurement decisions primarily on market sentiment.
The purpose of adaptation is not merely to prove that a model can run on a particular device. It is to turn computing resources into business capability reliably, continuously, and economically. Technical progress becomes sustainable industrial value only when quality, performance, stability, and cost meet their targets together.
