Local LLM Deployment Evaluation Guide: Two-Dimensional Testing of Inference Performance and Task Capability
This guide explains how to evaluate a locally deployed large language model along two dimensions: inference performance on the target hardware and task capability on real workloads. It covers five core performance metrics, bottleneck attribution, a reproducible SQL-generation evaluation design, strict versus lenient scoring, failure categorization, token and step costs, and targeted optimization suggestions. The goal is to help teams build an evidence chain that is attributable, reproducible, and comparable before moving to production.
Local LLM Deployment Evaluation Guide: Two-Dimensional Testing of Inference Performance and Task Capability
1. Why Two-Dimensional Evaluation Is Needed
In private deployments, teams often make one of two mistakes: they run a single general benchmark and then go to production, or they stress-test performance while ignoring the model’s actual task quality. The first approach misses the problem of inference speed collapsing under high concurrency. The second misses hidden defects on specific business tasks.
A credible evaluation should answer two questions at the same time:
- Performance dimension: On the target hardware, how much traffic can this deployment handle? What is the latency behavior? Where is the bottleneck?
- Capability dimension: On real task forms, such as structured query generation and multi-step tool calling, what are the model’s accuracy, stability, and token cost?
The following uses a typical local deployment test as an example to break down the evaluation methods and conclusion derivation for both dimensions.
2. Performance Dimension: Five Core Metrics and How to Measure Them
1. Prefill Throughput
The prefill stage processes the input prompt, and its throughput (tokens/s) determines the “speed before generation starts” in long-context scenarios. Testing should cover different input lengths (such as 2k, 4k, 8k, 16k, and 32k) and different concurrency levels (1, 2, 4, and 6), and observe two things:
- Whether the single-concurrency peak and the range with “no obvious length degradation” hold;
- The degradation curve of throughput as concurrency increases. If throughput drops by 30%–45% at concurrency 2 and by more than 60% at concurrency 6, scheduling or memory bandwidth is already under pressure.
2. Decode Speed
Decode determines the generation experience. At single concurrency, focus on speed stability (for example, staying in the 20–30 tok/s range). At multiple concurrency, focus on the low points. A typical phenomenon is that Decode falls to single-digit tok/s with long prompts and high concurrency, but extremely long inputs (such as 32k) may rebound because of batching effects. Such data points should be marked as noise to avoid misinterpretation.
3. TTFT (Time to First Token)
TTFT should rise approximately linearly with input length. If TTFT deteriorates several times as concurrency increases (for example, jumping from the 50-second range to the 180-second range), the problem is usually not the model itself but request queuing: earlier long prefills block the scheduling of subsequent requests.
4. Bottleneck Attribution Method
Performance problems should not be recorded only as symptoms; they must be traced to the configuration layer. Common troubleshooting paths include:
- Check the inference serving framework’s maximum concurrent sequences parameter. If it is set to 2, all requests with concurrency above 2 will queue, and both TTFT and prefill throughput will be averaged down.
- Check the maximum tokens per batch parameter to confirm whether long sequences can be effectively batched.
- Check memory usage. If memory utilization has reached 0.9 or above and the KV Cache is close to its limit, blindly increasing concurrency parameters will only trigger swapping or overflow. Adjust only after weighing the memory headroom.
# Bottleneck troubleshooting sketch (pseudocode)while TTFT is abnormal:if active_requests > max_concurrent_seqs:conclusion = queuing blockageelif kv_cache_usage > 0.9 * total:conclusion = memory constrained; reduce concurrency or upgrade memoryelse:conclusion = compute-bandwidth constrained
5. Improvement Directions
- Increasing
max concurrent sequencesandmax tokens per batchcan significantly improve high-concurrency throughput; - The tradeoff is higher KV Cache memory usage, so decisions should be made together with memory utilization levels (such as 0.9+);
- For long-prompt scenarios, consider prefix caching-style optimizations to reduce repeated prefill overhead.
3. Capability Dimension: A Reproducible Task Evaluation Design
1. Task Selection
The other half of the truth beyond performance comes from task capability. SQL generation is an excellent evaluation vehicle because it tests semantic understanding, multi-table reasoning, window functions, and other hard capabilities at the same time, and judgment is fully objective—running it once shows whether it is correct.
The evaluation process is typically built as an autonomous tool-calling loop:
Model reads the task → generates SQL → executes on an embedded analytics engine→ validates the result → ends if passed, retries with the error if failed
2. Judging Criteria: The Gap Between Strict and Lenient
The judging standard directly determines the pass rate. One common strict criterion is: a task passes only when the row count, column count, column names, and first-row content all match. Under this criterion, a typical result might be 9 of 25 tasks passed (36%).
Further attribution, however, reveals many cases where “the logic is right but the format is off by one detail”: the task explicitly requires keeping two decimal places (such as ROUND(..., 2)), but the model omits this step, causing strict string matching to fail. If numeric precision is relaxed to 1e-6, the pass rate may jump to around 88%.
This gap shows that a pass-rate number must be presented together with its judging criteria; otherwise it is meaningless.
3. Categorizing Real Failure Causes
Failed cases should be attributed task by task rather than broadly labeled as “the model is not good enough”:
- Format-related failures: The logic is correct, but precision or formatting required by the task is not applied. These often account for the largest share.
- Structural failures: With complex nested CTEs or multiple stacked window functions, column names do not match or zero rows are returned. These represent real capability boundaries.
- Interpretation-related failures: Misunderstanding of channel definitions or statistical dimensions in the task leads to choosing the wrong data source.
4. Token Cost and Steps
Capability evaluation should also record cost-side data:
- Simple tasks can typically be completed in about 2 steps and just over 2k tokens;
- Difficult tasks average more than 6 steps, and some individual tasks may reach 15–17 steps and consume around 55k tokens.
This means that even when a difficult task is ultimately answered correctly, its cost may be more than 20 times that of a simple task. In production, step and token limits must be set for the tool-calling loop to prevent runaway retries.
5. Targeted Optimization Suggestions
- Explicitly reinforce in the system prompt that “the precision and format constraints required by the task must be strictly followed.” This can recover format-related failures at low cost.
- For error-prone patterns such as window functions, provide one or two example SQL statements in the prompt as few-shot examples.
- For structural failures, consider adding a self-validation step: after execution, first assert column names and row counts, then proceed to result comparison, allowing the model to correct itself within the loop.
4. Conclusion
The value of local deployment evaluation is not to assign a single score to the model, but to build an evidence chain that is attributable, reproducible, and comparable: on the performance side, identify specific configuration parameters; on the capability side, distinguish format failures from capability boundaries; on the cost side, quantify step and token consumption. With this system, teams can make data-driven rather than intuition-driven decisions when adjusting deployment parameters, optimizing prompts, or evaluating whether to switch deployment approaches. For enterprises building LLM applications in the cloud, it is also advisable to complete these two types of evaluation in a controlled environment before entering production canary release, minimizing launch risk.
