AI Infra Interviews logo
Open-Weights Models & Serving Engines / 10
mediumNewTogether AIFireworks AIBaseten

Design the benchmark you would run before putting a new open-weights model into production.

A single throughput number describes a configuration nobody runs. The four variables that have to be fixed, the curve that is the actual deliverable, and the bandwidth bound that turns the result from a description into a diagnosis.

Updated Sep 2026 · Grounded in real AI infrastructure interview loops and written to a senior-engineer editorial bar, with every number worked and every diagram hand-built.

TL;DR: Fix four variables and report a curve. The input distribution comes from production logs, meaning prompt and output lengths sampled from real traffic with the real prefix-sharing rate, because a fixed prompt pair measures something no user will experience. The concurrency is a sweep rather than a point, since tokens per second at batch one and at batch 128 are different measurements and both are legitimate. The cache state is stated explicitly, cold or warmed to a realistic hit rate, because replaying one prompt with prefix caching enabled measures the cache. And the metric is named precisely: per-user output rate, aggregate throughput, time to first token at a percentile, or goodput counted only from requests that met their target. The deliverable is aggregate throughput plotted against p99 latency, with the operating point marked where it crosses the service level objective. Add the computed bandwidth bound and the achieved fraction, which turns a number into a diagnosis of where the remaining headroom is.

How to approach it

Start from the decision the benchmark has to support, because that determines which metric is primary. Then fix the four variables and say how. Then the sweep and the curve. Then the bound. Close with everything the report has to carry so a reader six months later can tell whether it still applies.

A strong answer

A typical situation: a team reports that a new model achieves 8,400 tokens per second and recommends it. The number was measured with one repeated prompt, prefix caching on, at whatever concurrency the load generator defaulted to, and it does not predict anything about production.

The four variables:

VariableThe loose versionThe version that supports a decision
Input distributionOne prompt and output lengthLengths sampled from production logs, with percentiles reported
ConcurrencyOne valueA sweep of at least eight levels through and past the intended operating point
Cache stateWhatever happenedStated: cold, or warmed to the production prefix-sharing rate
Metric"Tokens per second"Named: per-user output rate, aggregate throughput, p99 TTFT, or goodput
sampling the input distribution
  take a window of production requests: prompt token counts and completion token counts
  report p50, p90, p99 for both
  replay with those distributions rather than their means, because the tail is what sets p99
    latency and a mean-only replay never produces one

why the mean is not enough
  a workload with p50 800 and p99 12,000 prompt tokens behaves nothing like one with every
    prompt at 1,400, even if the means match
  the long prompts occupy prefill capacity and delay decode for everyone sharing the step
sanity: replaying the distribution rather than the mean is the difference between a benchmark
        that predicts p99 and one that predicts only p50

The sweep and the curve:

per concurrency level, record
  time to first token, p50 and p99
  per-user output tokens per second
  aggregate output tokens per second
  goodput: aggregate throughput counted only from requests meeting the SLO

what the curve looks like
  aggregate throughput rises with concurrency, then flattens
  p99 latency rises, slowly then sharply
  the operating point is where p99 crosses the SLO, and capacity is the request rate there

worked, illustrative
  concurrency  8: aggregate 1,900 tok/s, p99 TTFT 340 ms, per-user 238 tok/s
  concurrency 32: aggregate 5,600 tok/s, p99 TTFT 720 ms, per-user 175 tok/s
  concurrency 64: aggregate 7,800 tok/s, p99 TTFT 1,450 ms, per-user 122 tok/s
  concurrency 96: aggregate 8,400 tok/s, p99 TTFT 3,100 ms, per-user 88 tok/s
  SLO: p99 TTFT under 1,000 ms
  operating point: concurrency 32 to 48, so capacity is about 5,600 to 6,500 tok/s
sanity: the headline 8,400 figure is at a concurrency whose p99 is three times the SLO, so
        quoting it describes a configuration that would never be run

Serving Benchmarks That Do Not Lie covers the methodology. Latency Metrics: TTFT, TPOT and Goodput covers the metric definitions.

The bound, which makes the result diagnostic:

compute it alongside
  bound = aggregate memory bandwidth / active weight bytes per token
  achieved fraction = measured aggregate tokens/s at the operating point / bound

why it belongs in the report
  a result at 15 percent of the bound says there is a large amount of headroom and points at
    launch gaps, collectives or scattered reads
  a result at 65 percent says the deployment is close to physical limits and further tuning
    will return little
  without it, no reader can tell those two apart
sanity: the bound costs two numbers from the model card and the hardware specification, and
        it changes the report from "here is a number" to "here is where the remaining
        headroom is"

The report's contents, which is what makes it reusable:

  • Engine and version, model and revision, quantization format. All three change the result and all three move.
  • Hardware, GPU count and parallel degrees, plus every flag that differs from the default.
  • The input distribution with its percentiles, and the prefix-sharing rate.
  • The full curve, not only the operating point, so a different SLO can be answered from the same data.
  • The bound and the achieved fraction.
  • The warmup discarded and the run length, so the percentiles are trustworthy.
TWO WORKLOADS WITH THE SAME MEAN p0 p50 p90 p99 800 1,400 12,000 percentile of prompt tokens real distribution mean-only replay Both have a mean near 1,400 tokens. Only one of them ever produces a slow request. Fix input length, output length, concurrency and engine version, then publish the curve.

The reversal condition: if the decision is between two engines or two configurations rather than about absolute capacity, the absolute numbers matter far less than holding everything else identical. There the discipline is a controlled comparison: same model revision, same quantization, same hardware, same input distribution, same concurrency levels, and the only difference is the thing under test. A comparison that changes two variables answers nothing, and it is the most common way an engine benchmark ends up misleading, because quantization differences in particular are easy to introduce without noticing.

What interviewers probe next

  • "How long do you run each level?" Long enough for p99 to stabilize, after discarding a warmup window. Report both durations.
  • "What if you cannot get production traffic?" Approximate the distribution from whatever logs exist and say the assumption explicitly, because the alternative is a fixed prompt that measures nothing.
  • "Why goodput?" It collapses the curve to one honest number by counting only throughput that met the target, which is what capacity planning needs.
  • "What invalidates a comparison?" Any variable changing alongside the one under test, and quantization is the one that slips in most often.

Common mistakes

  • Reporting peak aggregate throughput, which occurs at a concurrency whose latency nobody would accept.
  • Replaying one prompt with prefix caching on, which measures the cache.
  • Using mean prompt lengths rather than the distribution, so p99 is never exercised.
  • Omitting the bound, so a reader cannot tell a tuning problem from a physical limit.
  • Comparing two engines with different quantization, which measures the format rather than the engine.

Key takeaways

  • Fix four variables: input distribution from logs, a concurrency sweep, a stated cache state, and a named metric.
  • The deliverable is aggregate throughput against p99 latency with the SLO crossing marked, not a peak.
  • In the worked example the 8,400 tokens per second headline sits at a p99 three times the SLO, and real capacity is about 5,600 to 6,500.
  • Report the bandwidth bound and the achieved fraction, which distinguishes remaining headroom from a physical limit.
  • For a comparison, hold everything identical except the variable under test, and watch for quantization slipping in.
That one was free — and so are 10 answers per topic without an account. Signing in doubles that to 20, opens the Plus lessons in the courses, and remembers which topics you keep getting wrong.no card · Google sign-in · nothing to cancel
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 10 to 20 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free

The concepts behind this question

Ranked by how closely each one overlaps this question's topic, so the first card is the thing to read if the answer above moved too fast.

Foundational
🧮 Open Weights & Serving Engines
Serving Benchmarks That Do Not LieMost published serving numbers are not comparable to each other and not predictive of production, because they differ in the input distribution, the concurrency, whether the cache was warm, and which of several very different metrics is being reported. A benchmark that supports a decision has to fix all four, report a distribution rather than a mean, and be run against the traffic shape you actually serve. The single most useful discipline is to compute the bandwidth bound first, so you know what fraction of the possible you achieved.
Core
🩺 Fleet Reliability & ObservabilitySign in
SLOs for AI SystemsA service level objective is a promise with a number attached, and AI systems need their own because the classic ones do not fit: a training run has no requests, only progress, so its objective is goodput; an LLM endpoint streams, so its latency is two numbers (time to first token and time per token) rather than one; and both spend a budget that is set by hardware failure rates rather than by software bugs. This page defines the objectives that fleet and serving teams actually use, derives the thresholds from user needs and from the hardware, and works the error-budget arithmetic that decides when to stop shipping and start fixing.
Foundational
🚀 Inference & Serving
Latency Metrics: TTFT, TPOT and GoodputAn LLM request has two latencies, not one: time to first token, set by queueing and prefill, and time per output token, set by the decode loop. Reporting them as percentiles, and reporting goodput (requests that met both SLOs per second) rather than raw throughput, is what separates a serving engineer from a benchmark reader. The numbers a loop expects: about 24 tokens per second single-stream for a 70B model on one H100, TTFT floors in the hundreds of milliseconds for long prompts, and p99s that come from queueing, not from the GPU.
Foundational
🧮 Napkin Math & Capacity
KV Cache SizingThe KV cache is the memory that decides how many users a serving replica can hold and how long their context can be. Its size per token comes from four numbers in the model's config file (layers, KV heads, head dimension, bytes per element) and one formula; multiplied by context and concurrency it is the number every capacity plan is built on. This page derives it, works it for four models including an MLA one, and shows the two places candidates get it wrong by a factor of eight.
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Scored on fixing input distribution, concurrency, cache state and metric, on reporting a curve rather than a peak, and on including the achieved fraction of the bound.

DISCUSSION · 0

No comments yet — be the first to share your approach.