How to Benchmark LLM Inference Performance Across AI Chip Platforms
A practical guide to evaluating real inference gains across compute platforms. It explains why a single "X times faster" claim means little without context, defines key metrics such as TTFT, TPOT, throughput, and goodput, outlines six elements of a reproducible benchmark, and maps out a validation workflow you can apply to your own traffic to build capacity and cost models.
1. Put the Conclusion Back in Context: What a Multiplier Does and Doesn’t Tell You
In discussions about large model technology, the claims that attract the most attention are usually comparative: a certain domestic accelerator is said to be several times faster than a mainstream international accelerator card on a specific inference task. This kind of information spreads extremely efficiently. But as engineers, our first step should not be to repost it—it should be to break it down into verifiable propositions.
A “multiplier” implies at least five unstated premises: model architecture, precision mode, input and output length distribution, concurrency and batching strategy, and software stack version. Without these constraints, the multiplier is just a relative value that cannot be transferred to your own workload. A more rigorous statement would be: under a given model, a given precision, a given sequence-length range, and a given concurrency level, the ratio of requests completed per unit time (throughput) or the end-to-end latency per request (latency).
So this article does not review or recommend any specific product. Instead, it abstracts the topic into a general technical question: how to scientifically evaluate the real gains of different compute platforms on large model inference, and turn the conclusions into capacity planning and cost models.
2. Metric Definitions: Latency, Throughput, and the Boundary of “Good Service”
Inference performance cannot be captured by a single number. You need at least three groups of metrics.
- Time to first token (TTFT): strongly correlated with the compute of the prefill stage; it determines how quickly interactive applications “start speaking.”
- Time per output token (TPOT): strongly correlated with memory bandwidth in the decode stage; it determines the smoothness of streaming output.
- Throughput (tokens/s or requests/s): determines how many users a unit of compute can serve, and is the core variable in cost.
In engineering, the “goodput” ratio is often used as a constraint: a request counts toward effective throughput only when both TTFT and TPOT are below the business thresholds. This constraint avoids the false boom of “piling up throughput with very long batches while the user experience collapses.”
Illustrative pseudocode:
def goodput(metrics, ttft_slo_ms=800, tpot_slo_ms=50):ok = (metrics.ttft_ms <= ttft_slo_ms) & (metrics.tpot_ms <= tpot_slo_ms)return metrics.completed_tokens[ok].sum() / metrics.window_seconds
3. Benchmark Design: Six Elements That Make Comparisons Reproducible
- Model and weight precision: only the same architecture, the same parameter count, and the same quantization scheme (such as weight quantization and KV cache quantization) are comparable.
- Sequence length distribution: real workloads are usually a mix of long and short inputs, so the request set should be constructed according to online percentiles rather than testing a single length.
- Concurrency and batch strategy: continuous batching, maximum batch size, and preemption and fallback policies can all significantly change the results.
- Software stack version: the impact of operator libraries, graph compilers, and communication library versions on performance often exceeds hardware generational differences.
- Warm-up and steady state: the cold-start window must be discarded, and steady-state percentiles (P50/P95/P99) should be taken.
- Resource isolation: confirm there is no interference from other workloads, fix frequency and topology, and record temperature and throttling.
4. Why Multiplicative Differences Appear: Four Real Sources
- Depth of operator and graph optimization: if hot operators such as attention, normalization, and quantization/dequantization are efficiently fused, the gain can reach several times.
- Memory hierarchy utilization: the decode stage is constrained by memory access, and the KV cache layout and paging management directly determine effective bandwidth utilization.
- Parallel partitioning and communication efficiency: if collective communication under tensor parallelism overlaps well with computation, scaling efficiency can be significantly raised.
- Precision and numerical schemes: lower precision combined with an appropriate scaling strategy can trade for throughput within an acceptable accuracy range.
It should be emphasized that these are engineering rules that generally hold across the industry; the specific magnitude varies by implementation, and there is no fixed multiplier that can be universally extrapolated.
5. Migrating to Your Own Workload: A Validation Process You Can Actually Run
- Build a replay set from real online request logs, preserving the length distribution and arrival timing.
- Fix the SLO thresholds, first measure the single-card inflection point, then measure the multi-card scaling curve.
- Record the “throughput-latency” Pareto frontier, not a single data point.
- Run accuracy regression: use business-side metrics (such as task accuracy and manual sampling pass rate) as the criterion, rather than looking only at perplexity.
- Output a capacity model: effective throughput per card → peak number of users → redundancy factor → resource budget.
On Baidu AI Cloud, this process can be implemented with general-purpose capabilities: use a container platform to host inference services and elastic scaling, use object storage to store evaluation datasets and artifacts, use a message queue for request peak shaving and replay scheduling, and use a logging service and monitoring and alerting system to solidify the metrics dashboard, forming a performance baseline that can be continuously regressed.
6. Conclusion
A “multiplier” is suitable as a signal of technical progress, but it cannot serve as a basis for decisions. What is truly valuable is establishing your own evaluation standard: define SLOs, construct real traffic, cover steady-state percentiles, run accuracy regression, and consolidate the results into capacity and cost models. Once this methodology is in place, whenever new hardware or a new software stack comes into view, you can give a credible answer within days, instead of being led by a single data point.
