Inference Benchmarking Examples

Inference benchmarking that decides a serving config compares cost per request at a fixed latency bound, not peak tokens per second. A worked example.

Inference Benchmarking Examples
Written by TechnoLynx Published on 12 Jun 2026

Inference benchmarking decides a serving choice when it compares configurations on cost per request at the latency your product has to hold, usually a p95 or p99 bound. Ranking them by peak tokens per second does not settle it. A GLM-5 sweep on a fixed two-node H100 cluster compares configurations as inverse throughput rather than at a latency bound: the recommended profile cost 0.896 per request against a 2048/16 baseline, and a profile with a larger prefill chunk cost 1.132. The method is short. Profile your own traffic, fix the latency bound, sweep load, and compare cost at the highest load each configuration sustains inside that bound.

A Worked Cost-per-Request Benchmark: Two Serving Configs on the Same Cluster

One worked example comes from a controlled sweep of GLM-5 FP8 served with SGLang v0.5.9 on two H100 nodes. The platform, model artefact and software stack stayed fixed, and only three knobs changed: chunked-prefill-size, the tensor/pipeline parallelism split, and max-running-requests. The workload used long synthetic inputs of roughly 28,000 to 30,000 tokens and outputs of about 500 tokens. Summarising huge articles in the browser, as in Google Chrome summarizing huge articles with generative AI, produces a similar long-input, short-output shape. That is the shape of agent traffic, which is dominated by system prompts, conversation history and tool output, and it is far from a minimal inference benchmark on short prompts.

Because hardware and model are identical across runs, normalised cost is simply the inverse of achieved throughput: cost per request for configuration i is RPS(baseline) / RPS(i), and cost per token is total tok/s(baseline) / total tok/s(i).

Profile (chunk / tp / pp / max-running) Req/s Total tok/s Cost per request Cost per token Verdict
2048 / 4 / 4 / 16 (baseline) 0.43 9029.64 1.000 1.000 Rollback point
4096 / 4 / 4 / 16 0.38 7885.54 1.132 1.145 Not recommended
3072 / 4 / 4 / 24 0.48 9993.23 0.896 0.904 Default

The arithmetic checks out from the table: 0.43 / 0.48 = 0.896 and 0.43 / 0.38 = 1.132. Against the baseline, the 3072/24 profile is 10.4% cheaper per request and 9.6% cheaper per token. Against the 4096/16 profile the saving is 20.8% per request and 21.1% per token. Against the baseline, latency moved the same way: average time to first token (TTFT) fell from 8.98 to 6.69 seconds and P90 end-to-end latency from 40.23 to 32.64 seconds.

The optimum was not monotonic. Chunk sizes of 4096 and 6144 and deeper queues of 32 and 48 did not improve the workload, so the result was a sweet spot specific to this workload rather than a “bigger is better” rule. The authors also declare the result’s measurement boundaries: the FP8 artefact on that cluster, and they warn against carrying it over to BF16 or INT4 without a fresh measurement.

Why the Throughput-Best Serving Config Still Loses Money per Request

A throughput-optimal configuration (the same caveat applies to RL-tuned serving configs and cost per request) loses money per request because its headline number is measured at saturation, and a service bound by a latency SLA typically cannot reach saturation. A study of 42 vLLM benchmark runs on H100 GPUs (six server configurations, seven arrival rates) found that effective cost per million tokens varied by up to 36.3× on identical hardware as a function of offered request rate. Those authors treat utilisation as a result, not an input: it falls out of arrival rate, model, quantisation and latency SLO, and the SLO caps how high it can go.

Effective cost per million tokens is the GPU price per hour × 10⁶ / (3600 × achieved throughput), whereas the naive estimate divides by maximum throughput, so the naive figure understates cost by exactly 1/U. They describe the SLA as a price: tightening it forces a lower arrival rate and a higher cost per token. A Mixtral-8x7B FP16 deployment on 2×H100 had a best minute-level cost of $8.23 per million tokens under a live 1 to 50 rps workload, roughly 9.5× its saturation floor of $0.87, because the averaging window covered the whole traversal, idle sub-intervals included.

Queueing dynamics make the gap nonlinear. Under the M/M/1 approximation, response time is twice the service time at 50% utilisation and ten times it at 90%. The same analysis gives an example of a system that achieves 10,000 req/s offline but may sustain only 3,000 req/s online under a 50 ms p99 SLA. Offline saturation throughput and online throughput under an SLA are fundamentally different quantities.

Raw throughput and cost efficiency also diverge across GPU counts. In a cost-performance analysis of Llama-3.3-70B on H100s, TP-8 won raw throughput at every batch size, yet per device TP-2 was better up to batch 96 and TP-4 at 128 and 192. At an assumed $5.50 per H100 hour, the authors concluded that two or four cards made economic sense and that eight would be overkill for most of the range unless traffic is heavy and sustained. SemiAnalysis (InferenceMAX) puts the point in one line: TCO per million tokens is the metric customers actually care about, and throughput is only a step towards it.

How Do You Fix p95 Latency so the Serving Config Comparison Is Fair?

Fix the latency bound before you run anything. Then compare every configuration at the highest load it sustains while staying inside that bound, never at its own best-looking operating point. P95 is the threshold below which 95% of requests complete, so the slowest 5% stay visible instead of being averaged away, and it is a widely used SLO threshold because at moderate request rates it gives enough samples to act on. The 42-run vLLM study works through one example SLA this way. For a fixed SLA of TTFT p99 ≤ 300 ms and TPOT p99 ≤ 50 ms, it took the highest arrival rate in each configuration’s sweep that met both bounds and reported cost at that point.

Three details decide whether the fixed bound means anything:

  • Which latency you mean. Kernel time, model latency, request latency and client-observed service latency all go by the name “latency”, and they can differ by an order of magnitude for the same model on the same hardware.
  • Enough samples after warmup. One proposed reporting standard asks for mean, p50, p95 and p99 over at least 1,000 iterations after warmup, and MLPerf Inference requires runs of at least 60 seconds so that power management and DVFS reach equilibrium.
  • Percentiles, not normalised means. Time per output token and normalised latency divide by decode length, which can hide a stall of around 10 seconds inside a numerically small change.

Arranging the configurations themselves so that only one variable changes per comparison is a separate discipline, covered in structuring serving configs so cost-per-request comparisons are fair.

What the Benchmark Has to Record to Produce a Cost Number

A cost-per-request benchmark needs four inputs per configuration: the hourly price of the hardware footprint, throughput achieved at the SLO, the input and output token split of real requests, and the latency percentiles that prove the SLO held. With those, cost per request is the hardware price for a period divided by requests completed in that period at the SLO operating point. Cost per million tokens follows the same way: compute how long one million tokens takes at that throughput, multiply by the hourly price, and multiply by the number of devices needed. NVIDIA’s sizing guidance does the same at fleet level. Yearly server cost divided by the requests one server can serve in a year gives cost per 1,000 prompts, adjusted for actual uptime.

For API-served models the formula changes shape. Per-request cost is input tokens × input price plus output tokens × output price, so latency no longer sets the cost, though it stays a hard constraint that has to be checked separately. The token split moves cost directly. In one text-classification study, few-shot prompting roughly doubled average input tokens on IMDB without materially improving F1, and cost rose with it. If you have not yet settled which metrics belong in the run at all, start with which performance numbers to measure so cost is decided, and with which model metrics actually decide a serving configuration once quality enters the trade.

How Batching and Concurrency Move Cost per Token

Batching lowers cost per token until the GPU saturates, and it raises per-request latency along the way. Larger batches improve card throughput while slowing each sequence. Past saturation, throughput stops rising and latency grows roughly linearly with batch size. NVIDIA’s benchmarking guidance therefore recommends sweeping concurrency from 1 to a little above the engine’s maximum batch size, because beyond that point requests queue, throughput flattens and latency keeps climbing.

The cost curve that results is steep at low load. In the vLLM study, effective cost dropped by roughly 20× over the first 25 rps and then flattened as the engine saturated. In the Llama-3.3-70B analysis, a 50 ms/tok threshold for real-time chat capped a 4×H100 deployment at 192 concurrent users at a 1,024-token context, even though throughput alone would have favoured batches as large as 512. SemiAnalysis frames the same trade as throughput per GPU against interactivity per user: higher interactivity means fewer tokens per paid GPU hour and so a higher cost per million tokens.

Batching is also where configuration choices interact. For adapter serving, choosing a batching strategy for LoRA serving works through the effect on cost per request.

Where MLPerf Inference Stops Short of a Margin Comparison

MLPerf Inference fixes scenarios, latency bounds, percentile rules and minimum run lengths. Its server scenario reports the queries per second achievable while meeting a latency bound. The FMwork authors contrast it as a standard for cross-vendor comparison on fixed workloads, while users benchmarking their own configurations on their own hardware need something else. What MLPerf results do and do not tell you about cost is covered in MLCommons and MLPerf Inference: where standard benchmarks stop short.

Turning a Sweep into a Defensible Config Choice

A config selection holds up when it can be traced from your traffic to your SLO to a cost number, and when it would hold up if someone reran the measurement. This is the order we would run it in:

  1. Profile the real request shape first. That means input and output lengths, arrival pattern and fan-out (when one user action triggers several model calls, measure cost per task in agentic systems). Optimising on raw short-prompt throughput was misleading for the long-context agent workload above, and the GLM-5 sweep found a cheaper configuration while the model artefact stayed fixed.
  2. Write down the SLO as a latency type, a percentile and a bound. NVIDIA’s sizing method names the latency type and its maximum value, then rules out every data point beyond that constraint.
  3. Sweep concurrency and the knobs you are deciding on, holding everything else fixed.
  4. Take the highest-throughput point that meets the SLO for each configuration. NVIDIA’s guidance calls that the most economical option.
  5. Compute cost from goodput at the SLO, not from saturation throughput, and compare that number to any alternative, including API pricing, as the SGLang DeepSeek cost-per-request walkthrough does for self-hosting.
  6. Record the conditions the result depends on. A configuration that was optimal at 50% utilisation may be suboptimal at 80%, and fast-moving inference software makes a benchmark from a fixed date go stale.

Vendor rules of thumb do not replace step 1. Whether a fused kernel, a different parallelism split or a vendor-specific runtime path pays off depends on the workload, and only measuring that workload shows it.

For how the reasoning strategy changes the unit of “request”, see the cost per request of chain-of-thought versus tree-of-thought reasoning. A cheaper configuration also has to hold quality, which is where Arena Hard Auto quality scores alongside cost per request come in. The same lens reaches below the serving engine, to cluster interconnects such as direct-attach copper and to portable GPU inference backends such as OpenCL on Linux.

When the open question is the AI inference infrastructure rather than the serving configuration, published measurement is the better starting point than spec sheets. A device’s number has to come from a real run.

Who Can Run a Cost-per-Request Benchmark on Our Own Serving Path?

TechnoLynx runs this comparison against an AI infrastructure team’s deployed serving path: it profiles real traffic, fixes the SLO, sweeps the candidate configurations, and produces before and after cost-per-request numbers that back the choice of config. The engagement is the Inference Cost-Cut Pack, which starts with an audit before a 4-8 week optimisation sprint.

It is not the right engagement for every team. A team that only needs cross-vendor hardware figures is better served by published benchmark results than by a sprint.

FAQ

What Is p50, p90, p95 and p99 Latency?

They are percentiles of the request latency distribution. p95 is the value below which 95% of requests complete, and p95, p99 and p99.9 together are called tail latency. A rising p95 with a flat p50 usually points to contention affecting a subset of requests, not a uniformly slower system.

Is Inference Profitable?

It depends on whether the price per token sits above the cost to serve, and that cost rises with the interactivity the product needs. High-interactivity products need higher prices per token than high-throughput batch workloads.