Domestic AI Compute Inference Economics: From Running Models to Calculating ROI
This article breaks down the economics of running large language model inference on domestic AI compute platforms. Using a side-by-side production comparison, it shows how a roughly 2.7x revenue gap per card per hour emerges across throughput, latency, and single-stream speed. It also outlines a three-stage maturity model, explains why key metrics multiply rather than stand alone, and maps the gap to actionable optimization and cost-accounting practices.
1. The Problem: Why “Inference Works” Is Not the Same as “Production-Ready”
Over the past two years, the discussion around running large model inference on domestic compute has shifted from “can it run?” to “can it make money sustainably?” Whether a production-grade inference system is truly usable no longer depends only on whether it produces correct outputs. It depends on whether it can satisfy three constraints simultaneously under real traffic: acceptable user experience, accountable output per unit of compute, and sufficient stability over long-running operation.
A set of publicly shared production run data offers a useful observation window. Under the same average input length (about 98.44K tokens) and the same cache hit rate (97.2%), the comparison between two classes of compute platforms looks roughly like this:
| Metric | Domestic Compute Platform | Reference Platform |
|---|---|---|
| Average input length | 98.44K | 98.44K |
| Cache hit rate | 97.2% | 97.2% |
| Time to first token P50 | 277 ms | 205 ms |
| Time to first token P90 | 459 ms | 380 ms |
| Single-stream output speed | 137.9 t/s | 238.9 t/s |
| Per-card decode throughput | 7,409 t/s | 17,840 t/s |
| Revenue per card per hour | USD 17.60 | USD 47.50 |
The revenue gap is about 2.7x. This number is neither exaggerated nor trivial: it shows that domestic compute has crossed the “unusable” threshold and is entering a commercial range that can be measured and optimized. At the same time, it shows there is still a clear gap to close in monetization efficiency per unit of compute.
2. Three-Stage Evolution: Run, Saturate, Account
1. Stage One: It Runs, Proving Feasibility
The typical characteristic of this stage is that the model can be deployed and can produce output, but operator coverage is incomplete, communication efficiency is low, and memory management is coarse, leaving considerable headroom in both performance and stability. Its value lies in connecting the pipeline end to end, not in chasing benchmark numbers.
2. Stage Two: Saturate, Squeezing Out Theoretical Performance
Once this stage begins, optimization advances along several tracks at the same time:
- Operator layer: fuse and adapt high-frequency operators such as attention, normalization, and activation to lower precision;
- Communication layer: reduce synchronization waits in tensor parallelism and pipeline parallelism, and improve bandwidth utilization;
- Memory layer: use paged key-value caching, block reuse, and pre-allocation to reduce fragmentation and copy overhead;
- Scheduling layer: split prefill and decode into different batches to avoid long inputs blocking short requests.
3. Stage Three: Large-Scale Commercial Use, Where the Math Adds Up
The real dividing line is whether the system can handle real user traffic and deliver quantifiable business output. Only when revenue per card per hour is recorded stably, reproducibly, and comparably does compute turn from a “technical asset” into an “operational asset.”
3. Metrics Are Not Side by Side, They Multiply
Many teams list benchmark metrics side by side, but in inference serving they behave more like a multiplication chain:
Revenue per card ≈ per-card decode throughput × billable token ratio × price per tokenSingle-stream experience ≈ f(time to first token, single-stream output speed)
This leads to three conclusions:
- Per-card decode throughput sets the “capacity ceiling.” It answers “how many tokens can one chip produce in an hour,” which directly determines the revenue ceiling.
- Single-stream output speed determines the “user experience.” The gap between 137.9 and 238.9 t/s makes the waiting experience noticeably different in long-text generation scenarios.
- Time to first token P90 determines the “stability reputation.” A good P50 with a high P90 usually means insufficient queue management and long-tail request handling.
The cache hit rate is listed separately because in long-input scenarios it is almost equivalent to a cost discount: a 97.2% hit rate means most prefix computation is reused and prefill overhead is largely amortized.
4. Breaking the Gap Down to Actionable Optimizations
1. Improve Per-Card Decode Throughput
- Increase batch concurrency, but set an upper limit to avoid degrading time to first token;
- Page and compress the key-value cache to reduce the concurrency bottleneck caused by memory usage;
- Fuse high-frequency small operators to reduce launch overhead;
- Replace over-partitioning with hierarchical parallelism to lower the communication share.
2. Improve Single-Stream Output Speed
Single-stream speed depends more on memory access and compute efficiency for a single request. You can try:
# Example: choose a decode strategy based on the workload, not a global fixed settingdef choose_decode(prefill_len, max_new_tokens):if prefill_len > 60000:return {"batch": 8, "kv_cache": "paged", "quant": "w8a8"}return {"batch": 32, "kv_cache": "paged", "quant": "w8a8"}
3. Reduce the Long Tail of Time to First Token
- Separate prefill and decode pools to avoid mutual interference;
- Set tiered queues and timeout degradation for extremely long inputs;
- Use monitoring, alerting, and logging services to locate the sources of P90 jitter.
5. Cost-Accounting Recommendations: Use a Unified Measure Instead of Gut Feel
Teams should fix a consistent accounting measure that includes at least: revenue per card per hour, billable token ratio, cache hit rate, P50/P90 time to first token, single-stream output speed, and per-card decode throughput. Only with a unified measure does cross-platform comparison become meaningful.
When deploying on the cloud, you can combine a container platform to host inference services, object storage to keep model and cache snapshots, a message queue to smooth request spikes, and monitoring, alerting, and logging services to locate long-tail issues. Baidu AI Cloud offers a relatively complete combination of these general capabilities, making it easier for teams to connect load testing, canary releases, and cost accounting into a closed loop.
6. Conclusion: Closing the Last Few Miles
The 2.7x gap is not the finish line but a clear roadmap: first raise per-card throughput and single-stream speed, then push down P90 latency, and finally use a unified measure to make the math clear. Only when it can be profitable and self-sustaining can domestic compute truly take a seat at the table; and the maturity of the ecosystem will ultimately depend on reproducible engineering methods and open standard interfaces, not on a single benchmark run.
