Performance Diagnostics and Capability Evaluation for Locally Deployed Large Language Models
A local deployment that can load model weights and generate text is only the starting point of evaluation. This article presents a practical framework for assessing runtime feasibility, service usability, and end-to-end task delivery. It explains how to interpret prefill, decoding, concurrency, and time-to-first-token metrics; how to tune concurrency under KV-cache constraints; and how to evaluate structured query tasks with separate semantic, numerical, and format checks. It also outlines a reproducible testing process for turning a model that “runs” into a system that is stable and usable in production.
1. Start by Separating Three Different Evaluation Questions
For large language models, successful local deployment is only an engineering milestone. If a model can load its weights, accept requests, and generate text, the basic execution path is working. That does not prove that the system is suitable for interactive applications, nor does it prove that the model can reliably complete complex business tasks.
A complete evaluation framework should distinguish among three levels:
- Runtime feasibility: Can the model load reliably without out-of-memory errors, process exits, or failed requests during inference?
- Service usability: Under the target input length and concurrency, how long must users wait for the first output, and is the sustained generation speed sufficient for the application?
- Task delivery capability: Can the model understand the request and produce a final result that conforms to business semantics, data definitions, and interface contracts?
These levels cannot replace one another. A high single-request generation speed does not guarantee a good experience under concurrency. A query that executes successfully does not necessarily answer the intended question. Logic that is nearly correct does not make column names, precision, or field ordering optional.
The focus of local deployment evaluation should therefore move beyond “can it run?” to a more practical question:
Under what conditions, at what cost, and with what level of stability can the system complete which tasks?
2. How to Interpret the Speed Data from the Original Test
The original material provides a set of observations from a local test, but it does not fully disclose the hardware configuration, weight precision, input and output samples, or statistical methodology. The figures below should therefore be used to analyze the behavior observed in this test, not as performance expectations for other deployment environments.
2.1 Input Processing and Continuous Generation Are Different Workloads
Large language model inference can generally be divided into two stages:
- Input processing: The system reads the prompt and builds the intermediate state required for subsequent generation. This is commonly called prefill.
- Output generation: The system uses the existing context to generate new tokens step by step. This is commonly called decoding.
In the original test, single-concurrency prefill performance was approximately 629–758 tokens per second. As the input length increased from roughly 2,000 to 32,000 tokens, there was no obvious sustained decline. Single-concurrency decoding performance was approximately 23.8–28.7 tokens per second.
This shows why input processing speed and output generation speed should not be combined into a single metric. Prefill primarily affects the waiting time before generation begins, while decoding primarily affects the reading pace after output starts.
For retrieval-augmented question answering, time to first token may matter more than final generation speed. For long-form report generation, total completion time and the effective output length may be more important.
2.2 Higher Concurrency Does Not Necessarily Increase Effective Throughput
The test showed that as concurrency increased, the observed prefill speed for each request declined significantly. With two concurrent requests, it fell by approximately 30%–45%; with four, by about 50%; and with six, by approximately 63% in some samples.
The throughput metric must be defined clearly:
- Processing speed for an individual request;
- Aggregate system throughput across all requests;
- Average completion rate over the entire test window.
These metrics can show different trends. For example, per-request speed may decline while total system throughput increases. Alternatively, queueing and resource contention may cause total throughput to remain nearly unchanged while user waiting time rises sharply.
Therefore, it is not enough to conclude that overall system performance has degraded simply because each request becomes slower under concurrency. Conversely, an increase in aggregate throughput does not necessarily mean that the user experience has improved.
2.3 Break Down Time to First Token Instead of Looking Only at the Total
In the original material, a roughly 32,000-token input had a time to first token of 51.5 seconds at single concurrency. At six-way concurrency, this increased to 186.4 seconds. This is a clear service-usability signal: long inputs combined with concurrency can create a substantial interactive delay.
Time to first token can be conceptually divided into:
Time waiting after the request enters the system + input processing time + time to generate the first token + transmission overhead.
The material also states that the inference service was configured to process two sequences simultaneously, while the test concurrency exceeded that limit. Some requests therefore had to wait for execution resources, and queueing was likely an important contributor to the latency increase.
However, the claim that queueing was the primary cause should be verified through timestamps. At minimum, record the following four points:
- Request arrival;
- Execution start;
- First-token generation;
- Request completion.
These timestamps help distinguish the contributions of queueing, computation, and transmission.
3. Concurrency Tuning Is a Resource-Budgeting Problem
3.1 Reserve Memory for the Context Cache, Not Only Model Weights
Accelerator memory is used not only for model weights, but also for the key-value cache, temporary computation space, and runtime overhead.
The key-value cache stores intermediate states used in attention computation. Its usage generally grows with the number of active sequences and the context length. Long inputs, higher concurrency, and long outputs can therefore increase memory demand simultaneously.
The original test reported a memory utilization configuration of approximately 0.91 and considered the cache budget close to its limit. This type of configuration ratio should not be interpreted as real-time memory usage, nor as evidence that concurrency can be increased by the same proportion. The actual available space is also affected by cache management, temporary allocations, and memory fragmentation.
3.2 Increasing the Number of Concurrent Sequences Can Introduce New Problems
Raising the number of sequences processed simultaneously may reduce queueing delays, but it also increases cache pressure and causes more requests to compete for compute resources.
Similarly, increasing the token budget processed in each batch may improve device utilization, but it can also allow long inputs to occupy compute resources for longer periods and interfere with requests that are already generating responses.
A sensible tuning process should use incremental experiments rather than increasing every configuration value at once:
- Fix the input and output lengths, then increase concurrency step by step.
- Change only one category of scheduling configuration at a time.
- Monitor aggregate throughput, time to first token, completion latency, and failure rate together.
- Check for cache exhaustion, request preemption, repeated computation, and other anomalies.
- Identify a stable operating range that meets the business latency target instead of pursuing only the highest peak value.
For workloads that mix long inputs with short interactive requests, consider grouping requests by length or scheduling offline batch processing separately from online interaction. This can reduce interference from long-running tasks.
4. Structured Query Evaluation: What Does a Low Pass Rate Actually Mean?
The original material used strict acceptance criteria for query tasks. The system passed 9 out of 25 tasks, for an overall pass rate of 36%. Simple tasks performed relatively well, while more complex tasks failed strict validation.
This indicates a clear weakness in end-to-end delivery capability. However, it does not prove that every failure was caused by incorrect query logic.
4.1 Completing Tool Calls Does Not Mean Completing the Business Task
The material indicates that every task completed the sequence of generating a query, executing it, and checking the result. This demonstrates that the model can participate in a multi-step tool interaction, but it does not prove that the final answer is correct.
Engineering evaluation should record the following separately:
- Whether the tool-calling workflow completed;
- Whether the query executed successfully;
- Whether the result matched the intended business meaning;
- Whether the output satisfied the interface requirements.
Autonomously executing a query completes only part of the task. True business success requires all of these conditions to hold simultaneously.
4.2 Format Errors and Semantic Errors Must Be Counted Separately
The material suggests that many failures were related to omitted decimal-handling requirements, such as failing to use ROUND(…, 2). Strict validation also checked the number of rows, number of columns, column names, and the first row. As a result, a result that was logically close to correct could still fail.
There are two distinct categories of risk:
Format and contract risks: Incorrect column names, incorrect field order, the wrong number of decimal places, or inconsistent string representations of results.
Business semantic risks: Using the wrong channel, applying incorrect filters, joining the wrong entities, or defining the time window incorrectly.
The first category can be reduced through explicit prompt constraints and deterministic validation. The second requires the model to understand the data structure and business definitions. Treating both categories as the same problem can lead to either overestimating or underestimating model capability.
4.3 A Score Based on Relaxed Precision Rules Cannot Replace the Formal Score
The original material estimated that the pass rate might reach approximately 88% if numerical comparison rules were relaxed. However, it did not provide item-level review records, and some descriptions of the number of failures lacked a clearly defined denominator. This figure should therefore be treated as a diagnostic lead that requires verification, not as a replacement for the formal score.
The following rules must be distinguished:
- Rounding according to the task requirement and retaining two decimal places;
- Allowing floating-point error;
- Requiring a fixed two-decimal display;
- Ignoring differences in string representation.
These are not equivalent. For example, 1.2 and 1.20 are numerically equal but have different strings. An unrounded value of 1.234 is also not equivalent to a two-decimal result of 1.23 merely because a small error threshold is used.
The strict pass rate should remain the formal delivery metric. At the same time, add semantic accuracy and format compliance as separate metrics to identify the appropriate improvement direction.
5. Improve Delivery Quality with Explicit Contracts and Layered Validation
5.1 Convert Ambiguous Requirements into Checkable Conditions
Before executing a query, define the following explicitly:
- Which tables and fields may be used;
- The filters and their business meanings;
- The grouping granularity and join relationships;
- Sorting rules and tie-handling behavior;
- Required output column names, column order, and row count;
- Rounding rules, null handling, and zero-denominator behavior.
The following query is illustrative only. It demonstrates how numerical rounding and column naming can be made explicit:
SELECTchannel,ROUND(100.0 * SUM(amount)/ NULLIF(SUM(SUM(amount)) OVER (), 0),2) AS share_pctFROM salesGROUP BY channelORDER BY share_pct DESC, channel;
The table and field names in this example do not represent a real business schema. In practice, verify the data type of the amount field, the channel scope, refund handling, and the denominator definition. Even when the query rounds to two decimal places, the presentation layer may still need additional handling to display a fixed number of decimal places.
5.2 Divide Validation into Three Layers
Structural validation checks whether the column names, column count, row count, and ordering match the contract.
Numerical validation checks rounding, precision, null values, and whether the calculation range is reasonable.
Semantic validation checks whether the selected channels, time range, relationships, and metric definitions match the task requirements.
This layered approach prevents the model from repeatedly changing correct query logic because of a formatting error. It also prevents a business-definition error from being hidden by a result that appears structurally clean.
5.3 Limit Ineffective Retries and Evaluate Cost Together with Success Rate
The original material shows that complex tasks required more interaction steps on average, with some tasks consuming approximately 55,000 tokens in total. This indicates that the model may have made multiple attempts, but the additional cost did not guarantee final success.
The system should set task-level time budgets, token budgets, and retry limits. It should also record what problem each revision was intended to solve. When the same type of error appears repeatedly, route the task to human review or a controlled template-based workflow instead of allowing an unlimited loop.
The business should also evaluate the average cost per successful task. A low cost per individual attempt does not necessarily mean a low cost for successful delivery.
6. Build a Reproducible and Explainable Evaluation Process
A reliable process should include four steps.
First, record the runtime conditions. Document the hardware resources, weight precision, context limit, cache configuration, scheduling policy, and request-length distribution. Without this information, performance figures are difficult to reproduce.
Second, measure service performance and task quality separately. Keep output length fixed as much as possible during performance tests. For task tests, fix the dataset, acceptance rules, and available information so that the two types of variables do not interfere with each other.
Third, report distributions rather than single values. Repeat each test and report the median, a high percentile, and the failure rate. When an outlier suddenly improves or worsens, first verify the sample count, timing methodology, and actual output length.
Fourth, preserve complete error evidence. Save the task, generated query, execution result, validation failure reason, and retry history. Confirm every optimization through regression testing to ensure that fixing one case does not break others.
7. Conclusion: Production Usability Requires Joint Design of the Model and the System
Local large language model evaluation should not focus only on model size, single-request speed, or a single aggregate score. Long-input time to first token, resource contention under concurrency, formatting failures under strict output contracts, and misunderstandings of business definitions can all become real deployment blockers.
A more reliable path is to establish a reproducible baseline first, then separate queueing bottlenecks from compute bottlenecks. Define task success criteria before testing, distinguish semantic errors from format errors, and finally combine scheduling optimization, deterministic validation, and controlled retries into a reliable business workflow.
The model generates candidate solutions. The serving system manages resources and latency. Validation mechanisms protect the delivery boundary. Only when all three work together can local deployment move from “able to run” to “stable and usable.”
