Evaluating Throughput, Latency, and Quality in Local LLM Services

    A reliable evaluation of a locally hosted large language model must measure more than whether a single conversation feels fast or produces a broadly correct answer. This guide explains how to assess prefill and decoding performance, queueing under concurrency, batch and memory trade-offs, tool-based task accuracy, token consumption, and the difference between strict and tolerance-based scoring. It also provides a practical checklist for repeatable optimization and re-testing.

    Evaluating a local large language model service requires more than checking whether a single conversation feels fast or generally correct. In the inference pipeline, prefill processes the prompt, while decoding generates the response one token at a time. Task quality also depends on whether tool calls form a complete loop and whether the final result satisfies the scoring rules.

    A meaningful evaluation should cover both throughput and latency and answer quality. Otherwise, testing at low concurrency can produce overly optimistic results, while the service later loses points in production because of queueing, GPU memory pressure, or strict output-format requirements.

    Break Performance Into Observable Metrics

    Prefill throughput describes how quickly the model consumes the input context, typically measured in tokens per second. As the context grows from a short prompt to tens of thousands of tokens, single-request prefill throughput does not always collapse linearly. The computation graph and batching strategy can distribute long sequences across a similar amount of available compute.

    Concurrency is often more sensitive. When two requests enter the system at the same time, throughput may fall by 30% to nearly half. At four to six concurrent requests, the decline can exceed 50% and may approach two-thirds. This suggests that the bottleneck is often not the ability to process one sequence, but how the scheduler allocates limited batch slots among multiple long-prefill requests.

    Decoding is usually much slower than prefill. With a single concurrent request, a rate in the low twenties of tokens per second is not unusual on consumer hardware or a single-GPU deployment, and the result is often relatively stable. Once concurrency increases—particularly when prompts range from 16,000 to 30,000 tokens and four to six requests run simultaneously—decoding may drop to single-digit speeds or just above ten tokens per second. An isolated increase at one context length is more likely to reflect sampling noise or scheduling jitter than a sudden improvement in model performance.

    Time to first token (TTFT) is expected to increase with prompt length. However, under concurrency, much of the degradation often comes from queueing rather than computation alone. For example, a 30,000-token prompt may wait for tens of seconds with one concurrent request but several minutes with six. The difference is largely caused by long-prefill requests occupying execution slots.

    If the service limits the number of simultaneously processed sequences—for example, to roughly two—requests beyond that threshold must wait. Long prefill operations can also block one another, causing both TTFT and prefill throughput to deteriorate.

    Balancing Concurrency, Batch Size, and GPU Memory

    A typical optimization direction is to increase the allowed number of concurrent sequences and the maximum number of tokens that can be combined in a batch. This can prevent short requests from waiting indefinitely behind a long prefill operation.

    However, this is not free. KV cache usage grows approximately linearly with context length and concurrency. When GPU memory utilization is already high and the cache is close to capacity, increasing concurrency blindly can trigger offloading, recomputation, or outright request rejection.

    A practical procedure is to:

    1. Fix several prompt-length tiers, such as 2K, 4K, 16K, and 32K tokens.
    2. Test concurrency levels of 1, 2, 4, 6, and 8.
    3. Record prefill throughput, decoding throughput, TTFT, and queue wait time.
    4. Monitor the GPU memory usage curve at the same time.

    Increasing the batch limit is worthwhile only when the KV cache still has sufficient headroom. Otherwise, prioritize shortening the system prompt, trimming conversation history, or moving very long requests to a separate instance.

    Local load testing should also avoid attributing tool startup overhead to model performance. Warm up the service by completing at least one full prefill-and-decode cycle. Collect formal samples during a stable interval, and clearly state whether queueing time is included. When only a small number of data points is available, avoid overinterpreting isolated rebounds at long context lengths.

    Quality Evaluation: Logical Correctness Is Not the Same as Passing

    Consider a data-analysis task in which the model must independently complete the following loop:

    1. Generate a query.
    2. Execute it against a local analytics database.
    3. Compare the returned result with the task requirements.
    4. Revise the query when necessary.

    This type of evaluation measures planning and tool use rather than answer memorization.

    Difficulty should be stratified. Very simple tasks can test output formatting and single-table filtering. Medium-level tasks can cover joins and aggregations. Difficult tasks can include multiple tables, discount calculations, shared business-definition CTEs, and window operations such as lag, row numbering, and cumulative ratios.

    Strict scoring may require the row count, column count, column names, and the exact string value in the first row to match. Under these rules, the overall score may be only around one-third: simple tasks pass almost consistently, while medium- and high-difficulty tasks fail frequently.

    A closer analysis may show that the model did not actually fail to write the query. Many queries are logically correct but omit the decimal rounding required by the prompt. If the official scorer compares the first-row string exactly, a numerically equivalent result can still fail by a small amount.

    If a very small numerical tolerance is allowed, the pass rate may rise to nearly 90%. Reports should therefore include both the strict pass rate and the tolerance-based pass rate. Otherwise, formatting issues may be mistaken for a collapse in reasoning ability.

    Structural failures should be categorized separately. Examples include:

    • Final column names that do not match the prompt
    • Incorrect window conditions that produce zero rows
    • A reversed interpretation of the business definition, such as calculating distributor-channel share instead of online-channel share

    Numerical tolerance cannot fix these errors. They should be treated as priorities for prompt engineering and evaluation-set revision rather than combined with rounding errors in a single chart.

    Token Consumption and Task Difficulty

    Simple tasks often finish in roughly two steps and consume a few thousand tokens. Difficult tasks generally require more steps; individual cases may take more than ten steps and tens of thousands of tokens.

    Token growth usually comes from repeated execution, reading error messages, and revising queries. Evaluation should record the number of steps as well as input and output tokens, rather than tracking only the final pass or fail result.

    If even simple tasks consume an unusually large number of tokens, the likely causes include an oversized system prompt or tool results that are not truncated.

    Practical Optimization and Re-Testing Checklist

    The system prompt should explicitly state that:

    • Numeric fields must be rounded to the precision specified by the task.
    • Column names, sorting, and returned rows must not be added, removed, or changed without instruction.

    For error-prone window calculations, such as period-over-period comparisons and cumulative shares, the prompt may include minimal examples. These examples must not reveal the answers in the test set.

    On the service side, analyze prefill and decoding separately. Determine whether queueing is the primary driver of TTFT before deciding whether to increase concurrency slots or control context length.

    Change only one variable in each experiment, such as the scoring rule, prompt constraints, or concurrency limit. Re-run the same prompt-length tiers and task set, then compare:

    • Strict pass rate
    • Tolerance-based pass rate
    • Step count
    • Latency distributions

    This approach produces results that can guide capacity planning, rather than subjective conclusions that one model configuration merely “feels slower” or “performs worse” than another.