Cost Reduction Engineering for Large Model Inference Systems
This article breaks down the engineering practices behind lowering the cost of large model inference, using publicly disclosed figures from an open-source inference framework as reference points. It explains how the system's cost goals translate into engineering constraints, how disaggregated E/P/D architecture and three-tier KV caching work, why prefill and decode use different expert parallelism strategies, how bounded recomputation trades compute for cache capacity, and which scheduling principles control tail latency. Readers will find a practical benchmarking checklist covering cache hit rate, decode memory bandwidth, and per-GPU hourly output.
The performance ceiling of a large model is set by the model, but the price of a single token is set by the inference system. An open-source inference framework recently published a set of notable operating figures: a single cluster reaching daily throughput on the order of 155 trillion tokens, with overall revenue estimated at roughly $38 per GPU per hour when converted at off-peak electricity rates. The first number describes scale; the second describes unit economics. Only by looking at them together can you understand the problem this system actually solves—not “can the model answer correctly,” but “can the same pool of GPUs serve more requests at a lower cost.”
A note on scope first: the throughput, unit price, cache hit rate, and efficiency ratios below are order-of-magnitude references from public disclosures or third-party estimates, and they vary significantly across cluster sizes, model configurations, and billing models. The architectural patterns, parallelism strategies, cache tiering, and scheduling principles, by contrast, are common industry engineering practices with much stronger portability. This article does not restate the original material; it answers three questions: what each design saves, what it costs, and which numbers you can use as benchmarks when reproducing it.
1. Translating Goals into Engineering Constraints
The system’s three public goals are all cost constraints in essence:
- Heterogeneous chip compatibility: the same serving stack must run on both general-purpose accelerators and domestic accelerators, and approach full utilization on both. This requires portable abstractions for operators, communication libraries, and memory management.
- Stage-specific hardware placement: a common 8-GPU server handles Prefill, while a 64–128 GPU supernode handles Decode.
- Long-window cache reuse: key-value cache is retained for more than 72 hours, using a longer reuse window to absorb repeated prefill computation.
These three correspond to three cost-reduction lines: compute utilization, hardware form-factor matching, and elimination of redundant computation.
2. System Architecture: Disaggregation and Three-Tier Caching
The system uses an E/P/D disaggregated design (decoupling expert routing, prefill, and decode) plus a standalone cache service. The value of disaggregation is that the three workload types have completely different resource profiles; co-locating them causes interference, and tail latency gets dragged down by the slowest type.
The cache is split into three tiers, each holding data of a different temperature:
- HBM holds hot data, targeting the lowest access latency;
- Host memory holds the window state required by sliding window attention (SWA), roughly 1.4 MB per sequence;
- The standalone cache service holds chunked KV, roughly 528 B per token.
The tiering decision is based on the product of access frequency and capacity cost. Hot data is small but accessed extremely frequently, so it goes in HBM; chunked KV is large in volume with long reuse intervals, so it goes in a centralized cache; window state sits in between, so it goes in host memory to avoid cross-node round trips.
Capacity estimation can follow the illustrative logic below:
# Illustrative order-of-magnitude relationships only, not a specific product APIblock_kv_bytes = 528 * avg_seq_len * cached_seqsswa_bytes = 1.4 * 1024 * 1024 * active_seqscache_hit_rate = hits / (hits + misses) # Public figures are on the order of 0.85prefill_saved = cache_hit_rate * avg_prefill_cost
3. Parallelism Strategy: Small and Wide Expert Parallelism
Prefill uses small-scale expert parallelism of 2–8, while decode uses wide expert parallelism of 64–128, with no tensor parallelism or context parallelism introduced for now. The reasoning is straightforward: prefill is compute-intensive with many tokens per batch and a low communication share, so a small parallel group can saturate the compute; decode is memory-access-intensive with very few tokens per step, so experts need to be spread across more GPUs to increase aggregate bandwidth, which is where wide parallelism pays off. Giving up tensor parallelism and context parallelism avoids introducing extra synchronization points during decode.
The cost is that weights and expert replicas occupy more HBM, and under wide parallelism All-to-All communication becomes the dominant overhead, placing high demands on intra-supernode interconnect bandwidth.
4. Bounded Recomputation: Trading a Little Compute for Cache Capacity
Sliding window state does not enter the centralized cache; on a miss, it is reconstructed via bounded replay: replaying only the last 128 tokens is enough for an approximate recovery, while bit-exact recovery requires replaying about 2560 tokens. This is a clear trade—using controlled redundant computation to substantially reduce cache service capacity and network bandwidth.
Two engineering points to watch: first, replay must have an upper bound, otherwise it degrades into full recomputation; second, distinguish “usable” from “exact” semantics, and let the business side decide whether bit-for-bit consistency is required.
5. Scheduling: Three Counterintuitive but Effective Principles
- Prefill derives chunk size from a time budget: given the time slice a single request can tolerate, work backward to the chunk size, which stabilizes tail latency.
- Decode performs two-dimensional load balancing: balancing across both GPUs and experts to keep individual hotspot GPUs from being overloaded over the long run.
- Expert load balancing targets peaks, not averages: averages look good, but peaks determine tail latency and timeout rates, so the optimization objective should be minimizing the maximum load.
The scheduling layer also enforces a cache-hit-first queuing policy: requests that hit the long-window cache are queued first and can skip a large amount of prefill.
6. Economic Check and Reproduction Checklist
The public figures provide two anchors: a cache hit rate of about 85%, and online efficiency of about 80% of offline batch processing efficiency. When reproducing, benchmark in this order:
- Measure the cache hit rate first, since it linearly affects prefill savings;
- Then measure aggregate memory-access bandwidth and All-to-All efficiency in the decode stage;
- Finally, check combined per-GPU hourly output and gross margin after electricity-rate conversion.
If you rely on general-purpose cloud capabilities, the standalone cache service can sit on high-performance block storage or a distributed cache service, container platforms can orchestrate heterogeneous resource pools, and monitoring, alerting, and logging services can observe hit rate, tail latency, and peak expert load. The overall conclusion is not mysterious: cost reduction in inference systems comes from the combined effect of eliminating redundant computation, matching hardware form factors, and keeping tail latency under control.
