The Economics of Domestic AI Compute for LLM Inference
This article examines why the economics of domestic AI accelerators—not just deployment feasibility—determine their viability for large language model inference. Using public benchmark comparisons, it breaks down the gap in revenue per GPU-hour into throughput, latency, and billing efficiency, then outlines a three-stage evolution from proving feasibility to achieving commercial scale. It closes with a practical optimization checklist covering decoding, batching, parallelism, prefix caching, and observability.
1. Why Inference Compute Must Be Measured by Economics
Over the past two years, the debate over whether domestic compute can handle large model inference has shifted from “can it be deployed?” to “does the math work out?” This shift signals a maturing industry focus: inference is not a one-off experiment but a long-running, token-billed, latency-sensitive production service. Any solution that only holds up in lab benchmarks will be tested by three metrics once real traffic arrives—tokens produced per unit time, how long users wait, and how much revenue each GPU-hour can generate.
Public benchmark data offers an analyzable sample. Under similar workload settings (average input length of about 98.44K, cache hit rate of about 97.2%), a domestic accelerator card and a mainstream international platform performed roughly as follows:
- Time to first token (TTFT) P50: 277 ms vs. 205 ms
- TTFT P90: 459 ms vs. 380 ms
- Single-stream output speed: 137.9 t/s vs. 238.9 t/s
- Per-GPU decode throughput: 7,409 t/s vs. 17,840 t/s
- Revenue per GPU-hour: $17.60 vs. $47.50
The revenue gap of about 2.7x aligns in direction with the throughput gap of about 2.4x, showing that revenue is not an independent variable but a result jointly determined by throughput, latency, and concurrency strategy. Understanding this is the prerequisite for all subsequent optimization.
2. Three-Stage Evolution: From Feasibility to a Commercial Loop
The first stage is “getting it to run.” The goal is to connect model weights, operators, and communication primitives on domestic chips while ensuring correct output. The core challenge here is ecosystem adaptation; performance and stability are not primary evaluation criteria.
The second stage is “running at full capacity.” Work shifts down to operator fusion, overlapping communication with computation, memory and cache management, and batching and scheduling strategies, approaching the hardware’s theoretical limits layer by layer. This stage determines the ceiling of per-GPU throughput.
The third stage is “large-scale commercial deployment.” The measure of success changes from benchmark scores to production metrics: can it handle real user traffic, can commercial output be quantified, and can service quality be maintained through failures and fluctuations? Only when revenue is accountable and gross margin is predictable does a solution truly “get a seat at the table,” gaining the ability to self-fund and iterate continuously.
3. Breaking Down the Metrics: Where Does the Revenue Gap Come From?
Decomposing revenue per GPU-hour causally yields a schematic relationship:
Revenue per GPU-hour ≈ per-GPU decode throughput (t/s) × 3600 × effective billing ratio × price per token
The “effective billing ratio” is affected by TTFT and single-stream speed: higher latency and slower token output worsen the perceived user experience, lowering the concurrency and retention that can actually be sold. In the comparison data, single-stream speed of 137.9 vs. 238.9 t/s is the most striking item, directly setting the experience ceiling for interactive scenarios; meanwhile, the per-GPU throughput gap of 7,409 vs. 17,840 t/s determines the gross margin room for B2B batch and offline scenarios.
Notably, both sides share the same input length and cache hit rate, indicating the gap does not come from an unfair workload but from the efficiency of the decoding path itself: attention computation, KV cache reads and writes, intra-batch scheduling, and memory bandwidth utilization.
4. Closing the Last Few Miles: An Actionable Optimization Checklist
- Decoding path optimization: increase operator fusion to reduce intermediate tensor round-trips; optimize KV cache layout and paging for long contexts to improve cache locality.
- Batching and scheduling: apply dynamic batching (continuous batching) under latency SLO constraints, and factor P90 latency into the scheduling objective function rather than optimizing only the mean.
- Communication and parallelism strategy: make cost-model-driven choices between tensor parallelism and pipeline parallelism, ensuring full overlap of communication and computation.
- Cache hit management: turning 97%-level prefix cache hits into billable capacity requires cache lifecycle management and hotspot detection.
- Observability: build a metrics loop with monitoring and alerting, logging services, and distributed tracing, bringing t/s, P50/P90, and error rates into a unified dashboard.
Schematic scheduling pseudocode:
def schedule(requests, slo_p90_ms):batch = []for r in requests:if r.estimated_ttft + queue_delay(batch) <= slo_p90_ms:batch.append(r)else:yield run(batch); batch = [r]if batch: yield run(batch)
5. Ecosystem Perspective: From Usable to Independently Mature
The real endgame is not matching a single-point metric but forming an independent, mature hardware-software co-designed ecosystem: a unified compiler and operator ecosystem, stable drivers and runtimes, and reusable performance-tuning methodologies. Baidu AI Cloud’s practices in general-purpose compute scheduling, container platforms, object storage, and monitoring and alerting show that an engineering loop and observability system are the infrastructure for scaling inference services. For domestic compute, bringing every millisecond of latency and every token of throughput into an accountable framework is the key to moving from “getting it to run” to “making the math work out.”
