LLM Inference Optimization: Measure Your Own Workload First

LLM inference optimisation starts with profiling the serving path and a workload-representative benchmark, not a new model or bigger GPU.

LLM Inference Optimization: Measure Your Own Workload First
Written by TechnoLynx Published on 24 Apr 2026

LLM inference optimisation rarely needs a new model. It needs the deployed serving path profiled and optimised. The dominant levers for latency and cost (batching, caching, routing, quantisation and serving configuration) sit below the model and can each be tuned on their own. Which of them helps depends on your workload, model, hardware and target concurrency. The only thing that settles that is a benchmark built from your own traffic, run with the same disclosed configuration on every candidate. Models co-designed for one platform might not fully use another one.

The stakes are operational, not academic. Training is an upfront capital cost, while serving is a recurring operating cost: higher sustained throughput per chip means fewer servers for the same load. If you want the wider framing first, see our production cost primer on what inference is.

Prefill Is Compute-Bound, Decode Is Memory-Bound, and That Decides the Lever

An LLM request runs in two phases with different resource requirements. Prefill processes the prompt and produces the first token, and it is compute-bound. Decode generates the remaining tokens one at a time, and it is memory-bound. Running both phases on the same GPU wastes resources, especially with long inputs.

Existing literature explains the batching plateau as decode shifting into the compute-bound regime. The plateau itself is real: throughput gains flatten beyond a certain batch size. A 2025 GPU-level study of large-batch inference found the plateau has a different cause: decode stays memory-bound, DRAM bandwidth saturates, and over half of the attention kernel cycles stall waiting for data. Batching raises the arithmetic intensity of the matrix multiplications, but the arithmetic intensity of attention stays almost flat, so the extra batch buys little.

Roofline-based performance modelling points the same way. For Llama2-13B on H100, every GEMM in both phases is DRAM-bound, so as compute scales, memory technology sets inference speed. Databricks’ inference team puts it plainly: achieved memory bandwidth predicts token-generation speed better than peak compute. Adding GPUs also brings diminishing returns for inference latency. Databricks measured that moving Llama2-70B from four to eight GPUs only brought latency down to about 0.7 times at small batch sizes.

The practical consequence: when decode is memory-bound, more compute alone does not speed it up. Levers that move fewer bytes, or keep more useful work on the GPU, do. Best-practice rules only make sense in context, and that context comes from profiling, not from a checklist. Our piece on profiling a GPU workload to find the bottleneck goes into method. Why latency budgets across AI pipelines have no generic answer covers how to split the end-to-end figure. Where decode turns out to be launch-bound, CUDA Graphs and KV-cache choices for decode latency is the next level down.

LLM Inference Optimisation Techniques and When Each One Pays

The table below matches each serving-path lever to the constraint it relieves.

Lever Constraint it targets Where it tends to pay Where to measure before trusting it Measured result or mechanism (source’s own stack)
Continuous (iteration-level) batching Finished requests waiting on the rest of a batch; new requests queuing Shared services with varied output lengths Gains depend on the request stream Orca (OSDI 2022): 36.9x throughput at equal latency versus FasterTransformer on GPT-3 175B
Chunked prefill Decodes stalling when a long prompt joins the batch Long or variable prompts with tight inter-token latency Chunk size is a tuning knob Sarathi-Serve (OSDI 2024): 2.6x serving capacity for Mistral-7B on one A100, up to 3.7x for Yi-34B on two A100s, versus vLLM
Prefill/decode disaggregation Interference between phases; one parallelism plan forced on both High request rates, long contexts, long prefills blocking decodes Mixed traffic with a fixed prefill:decode ratio DistServe (2024): 7.4x more requests or 12.6x tighter SLO; Splitwise (Microsoft, 2023): 1.4x throughput at 20% lower cost
KV-cache reuse and cache-aware routing Recomputing shared prefixes System prompts, multi-turn chat, agentic workflows Cache hit rate and load balance NVIDIA Dynamo routes by cache overlap and offloads cold KV blocks to cheaper tiers
Weight and activation quantisation (FP8, INT8 W8A8) Memory bandwidth and compute density Batch sizes of 16 and up; weight-only methods suit batch sizes of 4 and below Accuracy loss varies by architecture TensorRT-LLM: FP8 at batch 16 gave 2.3x over FP16 for LLaMA-v2-7B on H100 under a 500 ms first-token limit
FP8 KV cache KV-cache capacity and preemptions Memory-pressured, high-concurrency serving Low concurrency with spare cache imec: 31% lower throughput at low concurrency; under memory pressure, 87% fewer preemptions and 60% higher throughput
Serving configuration Batch limits, scheduler, memory utilisation, prefix caching Worth sweeping on every deployment Combinations interact imec: nearly 4x token throughput from the same model, GPUs and workload
Speculative decoding Sequential decode steps Latency-sensitive decode Depends on draft acceptance Draft tokens are verified in one forward pass, so verification adds little latency

Disaggregation shows why measurement has to come first. A study found the gain grows with request rate and context length. NVIDIA’s Dynamo decides this per request at runtime. A request goes to a remote prefill engine when its uncached prefill exceeds a threshold and the prefill queue is short. Otherwise it is prefilled locally on the decode engine.

Quantisation needs the same care. Saving memory does not automatically reduce latency, because bandwidth limits, hardware support and dequantisation overhead get in the way. In imec’s measurements, FP8 weights saved memory and also sped up compute, and imec concluded that KV-cache quantisation is a capacity optimisation first and a compute optimisation second. For speculative decoding, see our explainer on whether speculative decoding reduces accuracy and when it backfires. Library choice matters too. What Hugging Face Accelerate does for GPU inference, and when to use it is a separate question from which serving engine to run.

The figures in that table come from each source’s own experiments. Which of them carries over to yours is a benchmarking question, and the rest of this article covers how to answer it honestly.

Why a Vendor Datasheet Is Not the Performance You Will Get

Vendor marketing claims cite peak theoretical performance, and efficient models are often co-designed for one platform. A model built for NVIDIA Hopper may not fully use AMD GPUs or even NVIDIA Blackwell without software changes. TechnoLynx then runs a disclosed, reproducible benchmark of your model at your precision, batch and load settings on each candidate, including stress and sustained-throughput runs, and writes up the method so a third party could audit it.

LynxBenchAI publishes results showing how each device runs the public PyTorch stack, an independent reference to set against a vendor’s chart; the first step is to look up each shortlisted device in those published results before booking your own benchmark.

Two servers with the same nominal GPUs can also diverge. Databricks reports a 2x latency difference between 8xA100 servers from two cloud providers. Some of those servers connect every GPU at high bandwidth, while others pair GPUs over slower links. Hoefler (IEEE Computer, 2022) warns against chasing one metric such as peak flop/s instead of sustained performance.

Latency at light load does not show latency at peak load. In a 2026 reproducibility study on one A100 running vLLM 0.9.1, median time to first token rose from 91 ms at 200 concurrent users to 12,068 ms at 500. Field conditions add further variables. Edge and embedded hardware needs sustained thermal and power profiling under real load, not a short burst. Second-hand cards have no standard reliability benchmark at all. Physical inspection and testing under your workload are the evidence to rely on. Classical machine learning on GPUs, such as GPU-powered machine learning with NVIDIA cuML, needs its own measurement too.

Because results hold only for the tested stack, validation is not a one-off at migration. It is worth re-running whenever the stack changes. If you want help reading a vendor’s chart, see our guide on how to read AI GPU benchmarks.

Can I Trust MLPerf or Other Published GPU Results for My Setup?

Published results are useful as a sanity check and a shortlist, not as the number you size a deployment against. LynxBenchAI’s published results show how each device runs the public PyTorch stack your own models are built on, so they are broadly indicative for custom PyTorch models, though they do not run your workload. TechnoLynx then turns that shortlist into a measured throughput or latency figure per candidate against your target, with cost per unit of throughput alongside, so the decision is the cheapest hardware that meets the requirement.

LynxBenchAI publishes results showing how each device runs the public PyTorch stack, which gives an independent shortlist to check published scores against; the first step is to look up each candidate device in those results.

MLPerf Inference defines detailed rules to make results comparable. Its closed division requires every submitter to use the same models, datasets and quality targets. Its rules fix when timing starts and what preprocessing is allowed. Some of those rules depart from production conditions. Submitters choose their best batch size per scenario. Caching is prohibited even though production systems cache. And the reference models may not match your sequence lengths or traffic shape.

The 2026 reproducibility study frames its controlled measurements as reference values for relative comparison on the tested stack. They do not predict absolute behaviour under uncontrolled production traffic, and representative traces still have to be tested separately before drawing operational conclusions. Even the model ranking changes with context length. In the same 2026 study, Llama-3.1-8B had the lowest P99 latency at 8k tokens and Mistral-7B at 16k. A single published score would have hidden all of that.

Published results may be enough when your workload is generic and closely matches a published category. Otherwise you need your own numbers. Memory-limited models need extra care: the cost of techniques such as checkpointing or tiling that make a model fit has to be measured, not assumed. For desktop systems, see what DGX Spark benchmark numbers mean for inference cost and how to read DGX Spark performance tests for AI workloads, and for fit rather than speed, where a desktop AI supercomputer actually earns its place. Hardware category matters as well. Inference accelerators versus GPUs and what RISC-V means for inference infrastructure cost cover options beyond the usual data-centre GPU.

How Do I Build a Benchmark That Reproduces My Production Traffic?

A representative benchmark replays your own request mix: the real distribution of prompt and output lengths, a sweep of concurrency levels, a warm-up excluded from measurement, and repeated runs with variance reported. TechnoLynx starts by defining the representative workload and target metrics with you. The harness then runs on each candidate, scaled down where full hardware access is not available, with LynxBenchAI’s published results as the check on whether each device’s numbers are sane.

LynxBenchAI publishes device results on the public PyTorch stack that act as the sanity check for each candidate’s benchmark numbers; the first step is to look up your shortlisted devices in those results before the harness runs.

Sequence lengths drive the two latency metrics separately. According to NVIDIA, longer inputs raise prefill memory needs and time to first token, while longer outputs raise decode memory needs and inter-token latency, so the input and output distribution of the real deployment is the starting point. NVIDIA recommends driving load by concurrency rather than request rate. The sweep should run from 1 to not far above the engine’s maximum batch size, because throughput saturates around that batch size while latency keeps climbing. Batching gains depend heavily on the request stream. Databricks suggests static batching with uniform requests as an upper bound, not a forecast.

Repeatability needs explicit controls. A benchmark without such controls can report a difference between two GPUs that is really run-to-run noise. Our methodology for latency testing beyond best-case numbers covers the harness in more detail.

Can We Rent or Borrow Candidate GPUs Before Committing Budget?

Renting or borrowing a candidate GPU has two limits. A trial window may be too short to show sustained thermal or driver degradation. And a rented node may not match the box you plan to buy, because interconnect layouts differ between cloud servers with the same GPUs. Recording the interconnect, driver and framework versions of the rented system makes it possible to judge how far its results carry over. For a single workstation, our practical protocol for benchmarking a PC for AI applies the same discipline at desk scale.

How Do I Know Each Candidate Ran at Realistic Utilisation?

A throughput number counts only once the run behind it is shown to use the hardware properly: not under-batched, not held back by data loading or networking, and pushed to the same latency limit as every other candidate. The harness records utilisation, autoscaling and cold-start behaviour, flags any run held back by misconfiguration and reruns it, with LynxBenchAI’s published device results as the reference for what that hardware normally delivers.

LynxBenchAI publishes results showing how each device runs the public PyTorch stack, which sets the reference for what each candidate normally delivers; the first step is to look up each shortlisted device in those results before judging a run.

For decode, Databricks’ Model Bandwidth Utilisation measures how well the hardware is used. It divides achieved memory bandwidth by peak. A 7B model at 16-bit precision with 14 ms per output token moves about 1 TB/s, which is 50% of a 2 TB/s device. Google Cloud’s guide adds a cross-check: if model benchmark results fall short of what microbenchmarks and roofline analysis predict, that indicates extra software work, such as different sharding or custom kernels, is required.

A fair comparison records each candidate’s throughput at its own limit under a common latency target. Google’s method raises concurrency until the P99 latency target breaks, then records throughput per chip at that point. Maximum batch is not automatically right either. In the 2025 large-batch study, under a strict SLO, a batch of 96 for OPT-1.3B reached 83.13% of the maximum-batch throughput using 16.32% of the KV cache, and cut inter-token latency by 18.67%.

The whole pipeline belongs in the measurement, storage and data loading included. Hoefler notes that in transformer networks, 0.2% of floating-point operations are data-movement bound yet take 39% of the time. Autoscaling deserves its own measurement too. NVIDIA’s RAG example scales the LLM service from one to six replicas when P90 time to first token exceeds 2 seconds, and the time a new replica takes to become ready depends on model size and image caching. Blending that into steady-state throughput hides the behaviour users actually see during a spike. Communication also costs: for Llama2-13B on eight GPUs, communication time is about 1.6 times memory time. Once a configuration is in production, see ML model monitoring tools for GPU inference.

Should We Pilot Both Candidates Before Signing the Capital Commitment?

When vendor numbers are the only evidence and the commitment is large, a small pilot of your own workload on each candidate is the evidence to decide on. Skip it only when the workload is generic and existing independent results already cover it. It turns your training or inference workload and SLAs into a pilot definition, ports and tunes the workload for each platform, and reports a side-by-side comparison whose method a third party could rerun, with LynxBenchAI as the hardware-level reference.

LynxBenchAI publishes results showing how each device runs the public PyTorch stack, an independent hardware-level reference for the pilot; the first step is to look up both candidates in those results before defining the pilot.

Piloting Two Pod or Rack Designs

A rack-level pilot has to count everything outside the load generator as part of the system under test. MLPerf’s rules provide a usable template: components such as switches and load balancers count as part of the system under test, and submissions must include network characteristics and a system diagram detailed enough for reproduction. A small pilot will still miss some full-scale effects in networking, cooling and power distribution, so the report should state that limit openly. For the node itself, see our notes on when GPU servers for AI justify the investment and what Lambda Hyperplane offers for inference.

Benchmarking Two Accelerators Before the Contract

Both platforms run the same model, data, batch size and precision under one written method. Cost has to be part of the result. Google Cloud’s example: if chip A is 20% faster but 50% more expensive than chip B, chip B wins on performance per dollar. When runway pressure forces a decision before a full pilot finishes, the report should say which conclusions are provisional.

What Configuration Must Be Held Constant and Disclosed Across Candidates?

Precision and quantisation scheme, batch and concurrency limits, input and output lengths, sampling and end-of-sequence handling, parallelism, and every software version all have to be pinned and published, so the comparison holds up if a losing vendor challenges it. Pass/fail criteria are agreed first, the shortlisted hardware runs under identical disclosed conditions, and the documentation is built for sign-off, with LynxBenchAI’s published results as an independent reference point.

LynxBenchAI publishes results showing how each device runs the public PyTorch stack, an independent reference point for the disclosed comparison; the first step is to look up each shortlisted device in those results before agreeing pass/fail criteria.

Controls and a Fixed Workload Definition

The disclosure checklist below is what makes a scorecard reproducible:

  • Quantisation method, described publicly in enough detail to reproduce and calibrated only on the provided calibration data, as MLPerf’s rules require.
  • Prompt set and output length, with end-of-sequence tokens ignored so every run reaches the intended output length.
  • Sampling parameters, kept identical within the benchmark, since methods such as greedy decoding change generation speed.
  • Maximum batch size and concurrency levels, because concurrency above the batch limit adds queueing to time to first token.
  • Software stack and flags, at the level of the 2026 reproducibility study: vLLM 0.9.1, CUDA 12.4, PyTorch 2.4.0, plus GPU memory utilisation, maximum model length and dtype settings.
  • Network characteristics and a system diagram covering everything between load generator and model.

Locking every candidate to one configuration can hold back a platform that needs configuration changes to reach its peak. Disclosing that as a method choice, and reporting each platform’s best-precision point alongside it, is fairer than hiding it. Pinned versions date the result, so the scorecard carries a date and is re-validated when the stack changes.

Which Metrics Should a GPU Comparison Report?

Google Cloud’s guide explicitly calls for measuring the compute-bound prefill phase and the bandwidth-bound decode phase apart. Blended metrics hide real problems. Time to first token mixes scheduling delay with prompt processing. Time per output token averages over the whole response, so a 10-second stall barely shows. The Etalon authors (2024) found one provider’s 600 tokens/s figure, based on time per output token, fell to a quarter of that when tail inter-token latency was used.

Throughput belongs only to the stable operating range. The 2026 study excluded saturated loads because inter-token latency there measures queueing, not generation. For cost, NVIDIA’s method plots latency against throughput, rules out every point beyond the latency limit and picks the highest-throughput point left. Server cost then becomes cost per million tokens. Google divides the amortised capital and energy cost of a chip by its sustained throughput, which brings in energy efficiency for machine learning GPUs as part of cost. For management sign-off, the full latency-throughput curve per candidate is more defensible than a single headline number.

Where no published benchmark covers the shortlisted parts, the only defensible numbers come from running the team’s own kernels on dev-kit hardware for each shortlisted part before the vendor is locked.

The same rule covers GPUs already in service. Whether deployed cards sustain the claimed detection throughput at full production load is answered by running the actual model at production image sizes and batch rates, not by reading the datasheet peak. A kernel A/B test needs fixed hardware, a fixed input suite and per-input variance rather than one average speedup. TechnoLynx’s GPU Performance Engineering work includes this measurement.

Who Can Benchmark Our Inference Stack and Tune It Before We Buy More GPUs?

TechnoLynx profiles your deployed serving path, finds the latency and cost improvements available before any model replacement or hardware purchase, and builds the workload-representative benchmark that decides between candidate GPUs. The catalogue offer is GPU Performance Engineering, covering profiling, kernels, memory and parallelism on the target hardware. On building in-house versus bringing in a specialist: the benchmark and the tuning are one piece of work, because a benchmark that has not tuned each candidate’s batching, cache and quantisation settings is comparing configurations, not hardware. On choosing a partner, check whether the method is disclosed and reproducible enough for a losing vendor to rerun. For the hardware shortlist, LynxBenchAI’s published results are the reference, and they do not stand in for running your own workload. See also our page for AI infrastructure and production SaaS teams.

The engagement suits teams with a real model, real traffic and a decision pending. It is the wrong fit when the workload closely matches a published benchmark category and the published results already answer the question. Teams with strong in-house performance engineers can run controlled comparisons themselves with open tooling such as NVIDIA’s GenAI-Perf, which measures time to first token, inter-token latency and throughput across concurrency levels. Cloud providers’ own benchmarking guides, such as Google Cloud’s vendor-neutral method, are another sound starting point.

The Benchmark Becomes Your Regression Test

The harness built for a purchase decision stays useful after the purchase. The same controlled run catches regressions after a driver update, a serving-engine upgrade or a scheduler change, and the 2026 reproducibility work frames its protocol as a regression-testing tool for exactly that reason. One uncertainty remains. The 2026 study’s authors warn that their comparisons are specific to their benchmark and that different hardware, serving frameworks and workloads may change the ordering. The open question for your deployment is which constraint binds first under your own traffic, and our guidance on deciding AI inference infrastructure from your own workload picks up from there.