Production-Grade LLM Inference on Domestic AI Compute: Technical Paths and Engineering Practices
This article examines the path from single-card model execution to production-grade LLM inference on domestic AI compute. It covers the three stages of ecosystem maturity, how to interpret revenue-per-unit-compute metrics, the implications of open-sourcing production inference code, an engineering evaluation checklist, a simplified cost model, and key industry trends for enterprise deployment.
1. From “Getting a Model Running” to “Production-Grade Inference”
Over the past two years, the development of domestic AI compute for large-model inference can be summarized in three stages. This evolution path is highly consistent with the development patterns of mainstream international ecosystems.
Stage 1: Single-card usability. The core goal is to enable mainstream open-source LLMs to complete forward inference on domestic accelerators and to verify operator coverage and numerical precision. The key work in this stage includes operator adaptation, graph compilation, and precision alignment. It is a “from zero to one” phase.
Stage 2: Cluster usability. Single-card inference cannot handle real business traffic. Therefore, this stage needs to address the communication efficiency of tensor parallelism and pipeline parallelism under domestic interconnect topologies, including collective communication optimization, memory-tiered scheduling, and batching strategies. The goal is to reach an operable level of throughput and latency.
Stage 3: Production-grade usability. Production-grade means that the inference service must simultaneously meet several requirements: stability (long-running operation and fault self-healing), observability (full-link monitoring of latency percentiles, throughput, and memory usage), elastic scaling (scale up or down based on load), and controllable cost. Open-sourcing production-grade inference code essentially means opening up this set of engineering capabilities that has been tested by real business workloads, lowering the barrier to adoption across the ecosystem.
2. How to Interpret the “Revenue per Unit Compute” Metric Rationally
When discussing whether domestic compute has reached the “highest standard,” a commonly used dimension is the converted output per card-hour under idle-time pricing. Public data shows that under idle pricing, two chip generations still differ by several times in unit revenue (one at approximately $47.5 per card-hour, the other at approximately $17.6 per card-hour).
However, comparing this number directly can be misleading. It should be understood together with the following factors:
- Pricing and cost structures differ. Converted revenue is affected by market pricing strategies and is not fully equivalent to a hardware capability gap.
- Software stack maturity continuously amplifies hardware efficiency. Optimizations in inference engines—such as operator fusion, KV Cache management, continuous batching, and speculative decoding—can deliver several times higher throughput on the same hardware.
- Ecosystem positions differ. In the earlier period, domestic compute mainly handled workloads that could tolerate a better price-performance tradeoff. As the software stack matures, the unit revenue gap will naturally converge.
Therefore, a more reasonable conclusion is that the gap objectively exists, but domestic compute has already completed the key leap from “usable” to “operable.” Future improvement space lies mainly in software and system layers.
3. What Open-Sourcing Production-Grade Inference Code Means
For developers, the value of open-source production-grade inference code is far greater than “just another repository”:
- Engineering experience becomes explicit. High-quality open-source implementations turn key designs from long-running operation—such as memory pre-allocation, operator fallback strategies, and anomaly detection and recovery flows—into readable code. This is more valuable as a reference than documentation.
- Adaptation costs are reduced. The community can directly build on validated scheduling, parallelism, and communication code instead of starting from scratch and repeating the same mistakes.
- A positive feedback loop is formed. More real workloads entering the ecosystem will drive improvements in operator optimization and performance regression testing.
4. An Engineering Checklist for Evaluating Inference Compute
If you need to build LLM inference services on domestic compute, it is recommended to evaluate systematically along the following dimensions:
1. Model coverage: Are target models usable out of the box? Is the path for fixing operator gaps clear?2. Performance baseline: Under a given input-length/output-length distribution,measure P50/P95/P99 latency, time to first token, and throughput per card-hour.3. Long-running stability: Run a 72-hour stress test and observe memory fragmentation,throughput degradation, and error rate.4. Elasticity: Support automatic scaling based on load and load balancing across multiple instances.5. Observability: Are metrics such as latency, queueing, batch size, and cache hit rate exposed?6. Cost model: Calculate cost per thousand tokens by combining electricity costs,card-hour prices, and measured throughput.
Point 6 is especially important: do not look only at converted revenue per card-hour. Instead, calculate the cost per unit of effective work, such as inference cost per million tokens. There is often a 2–5x engineering overhead gap between nominal hardware performance and actual business throughput. This is exactly the part that production-grade inference code aims to compress.
5. A Simplified Cost Calculation Example
Assume that a certain inference service has a measured throughput of T (token/s) on domestic cards and is deployed on n cards. Then:
def cost_per_million_tokens(hourly_price, n_cards, throughput_per_card):total_tokens_per_hour = throughput_per_card * n_cards * 3600return hourly_price * n_cards / (total_tokens_per_hour / 1e6)# Example: $17.6 per card-hour, 1200 token/s per cardcost = cost_per_million_tokens(17.6, 1, 1200)# ≈ 4.08 (USD per million tokens)
This metric allows fair comparison across different hardware and optimization versions: throughput gains from optimization directly and linearly reduce unit cost. It also explains why open-source production-grade inference code deserves more attention than hardware specifications alone—it is the key variable that turns hardware potential into actual cost-effectiveness.
6. Judgments on Industry Trends
Overall, three judgments can be drawn:
- The gap is converging rather than becoming fixed. Domestic compute is moving from single-card adaptation to cluster-based and production-grade deployment. The iteration speed of the software stack is the core variable determining how fast convergence occurs.
- Inference is the most suitable entry point for domestic compute. Compared with training, inference has higher tolerance for precision errors, more flexible load patterns, and greater cost sensitivity, giving differentiated optimization ample room.
- Open source will accelerate ecosystem maturity. Open-sourcing production-grade code lowers enterprise validation costs and, in turn, attracts more real business workloads, forming a three-way flywheel across software, hardware, and business.
For enterprise users, the rational strategy today is not simply to compare a single hardware parameter or a single revenue number. Instead, they should run a PoC under real business workloads, evaluate with a unified “cost per million tokens + long-stability metrics” framework, include the open-source inference stack in the validation scope, and retain flexibility to integrate with cloud-hosted inference services (such as container platforms, logging, and monitoring systems). This provides an objective assessment of the current level of domestic compute while leaving room for future technical evolution.
