Local LLM Deployment Evaluation: Speed, Concurrency, and Complex SQL Performance
This article presents a local deployment evaluation of a large language model across single- and multi-request inference speed, long-context time to first token, tool-assisted complex SQL tasks, and token consumption. It reports measured throughput, latency changes under concurrency, strict SQL task pass rates, major formatting and structural failure modes, and practical optimization directions involving scheduling, batching, memory headroom, prompt constraints, and independent result validation. The conclusion is that real-world usability depends on stable service behavior and machine-verifiable output quality, not on a single peak performance number.
After several hours of hands-on local testing, a relatively clear judgment can be made about the practical performance of this class of large language model: it has some capability in basic question answering and routine code generation, but it still has clear weaknesses in high-concurrency inference, long-context processing, and complex data analysis tasks with strict formatting constraints.
Model evaluation should not rely only on whether a single response “looks correct,” nor should it focus only on theoretical parameters from promotional materials. For actual deployment, at least three dimensions should be assessed together:
- Whether the model can produce stable output.
- Whether the service can still provide acceptable response speed under different concurrency levels.
- Whether generated results satisfy precise, machine-verifiable requirements.
1. Test Dimensions and Basic Method
The test had two parts.
The first part was a local inference performance test. It focused on input processing speed, output generation speed, performance changes under concurrent requests, and the impact of long context on time to first token. Test input lengths ranged from approximately 2K to 32K, and both single-concurrency and multi-concurrency scenarios were observed.
The second part involved data analysis tasks with tool calls. The model had to generate SQL from a task, submit it to a local database for execution, and then verify and correct the query based on execution results until the task was complete. The evaluation checked not only whether the query logic was correct, but also whether the returned row count, column count, column names, data types, and first-row content exactly matched the preset result.
This testing approach is closer to real business use. In enterprise environments, model output is often not shown directly to users; it must be further processed by programs. A SQL query may be broadly correct in logic, but if column names or decimal places do not follow the agreed format, the entire workflow can still fail.
2. Local Inference Speed
2.1 Input Processing: High Single-Request Throughput, Noticeable Decline Under Concurrency
With single concurrency, the peak input processing speed was approximately 757.7 tokens/s. Across the 2K to 32K test range, speeds were roughly distributed between 629 and 758 tokens/s, and no very obvious length-related degradation was observed.
This indicates that in a single-request scenario, the hardware and inference framework can make relatively full use of computing resources. Even when input length increases to a larger scale, the amount of input processed per unit of time remains within a relatively stable range.
However, after concurrency was increased, performance dropped noticeably:
- With 2-way concurrency, input processing speed dropped by approximately 30% to 45%.
- With 4-way concurrency, overall performance dropped by approximately 50%.
- With 6-way concurrency, some test points dropped by approximately 63%. For example, in certain short-input scenarios, speed fell from about 688 tokens/s to about 228 tokens/s.
This kind of decline does not necessarily mean that the model’s computational capability is insufficient. It is more likely related to request scheduling and batching configuration. When the service allows only a small number of sequences to be processed simultaneously, requests beyond that limit can only wait, and multiple long-input requests can contend with each other for compute and GPU memory resources.
2.2 Output Generation Speed Remains Relatively Stable
With single concurrency, generation speed was approximately 23.8 to 28.7 tokens/s, with limited overall fluctuation. Compared with the input processing stage, output-stage speed was more stable, indicating that under single-request conditions, the token-by-token generation process did not show severe jitter.
In multi-concurrency scenarios, generation speed was roughly distributed between 8 and 18 tokens/s. When input length reached 16K or 32K and concurrency reached 4 to 6, some test points dropped to 8 to 11 tokens/s. A few 32K test results rebounded to 20 to 28 tokens/s. This rebound was more likely caused by scheduling timing, batch composition, or test noise, and should not simply be viewed as a stable performance improvement.
Therefore, when evaluating generation speed, recording only a peak value is not enough. A more reasonable approach is to report the average, median, P95, and P99 latency together, along with complete data across different input lengths and concurrency levels.
2.3 With Long Context, Time to First Token Is Driven Mainly by Queuing
Time to first token usually consists of two parts: the computation time needed to process the input, and the time a request waits in the scheduling queue.
In the tests, with single concurrency and 32K input, time to first token was approximately 51.5 seconds. When concurrency was increased to 6-way, the latency reached as high as 186.4 seconds. This increase can no longer be explained by input length alone; queuing clearly became the main factor.
If the service configuration allows only a small number of simultaneously running sequences, the first long request may already occupy a large amount of computing resources, and later requests may be unable to enter the computation stage immediately even after they arrive. The result is:
- No output appears for a long time after the request is submitted.
- Time to first token deteriorates quickly as concurrency increases.
- Input processing throughput is shared among multiple requests.
- The response speed perceived by users is far lower than the single-request test result.
This is why “fast under single concurrency” does not mean “good online service performance.” For interactive applications, users care more about how quickly the first valid result appears under realistic concurrency.
3. Performance Bottlenecks and Optimization Directions
Based on the observed test results, the main bottlenecks may be concentrated in three areas.
3.1 The Maximum Number of Parallel Sequences Is Too Low
The maximum number of parallel sequences in the inference service determines how many requests the system can schedule simultaneously. If the value is set too low, multi-concurrent requests will queue. If it is set too high, it may cause insufficient GPU memory, frequent cache eviction, and even service exceptions.
Optimization should not blindly increase parallelism. Instead, the balance point should be found through gradual stress testing. It is advisable to test different concurrency levels such as 2, 4, and 8, and record throughput, time to first token, complete response time, and GPU memory usage.
3.2 The Batch Token Limit Needs Reasonable Configuration
The batch token limit affects how much input can be processed in a single scheduling round. Raising the limit generally helps improve throughput in long-input scenarios, but it also increases GPU memory pressure. In particular, when multiple requests carry long contexts at the same time, cache space may quickly approach its limit.
Therefore, tuning should use a gradual approach:
- First fix concurrency and gradually increase the batch token limit.
- Observe whether input throughput and time to first token improve.
- At the same time, monitor GPU memory usage and request failure rate.
- Then gradually increase concurrency and confirm whether the configuration is stable.
3.3 GPU Memory Utilization Is Already Near the Upper Limit
Current GPU memory utilization is approximately 0.91, and cache space is already close to full. At this point, continuing to increase concurrency may lead to more severe queuing and jitter. A production environment should not simply maximize GPU memory utilization; it also needs to reserve enough headroom for request fluctuations, context growth, and cache management overhead.
If the business priority is low-latency interaction, extremely long contexts and burst concurrency should be restricted first. If the business priority is offline batch processing, higher latency can be accepted, and higher total throughput can be achieved through batch scheduling.
4. Complex SQL Task Performance
Among 25 SQL tasks, 9 passed under strict evaluation, for a pass rate of 36%. All basic-level questions passed, one simple-level question passed, and no medium-level or difficult-level questions passed.
This result shows that the model is not completely lacking SQL capability. In fact, it can complete a relatively complex tool-calling workflow, including:
- Understanding a natural-language question.
- Generating an initial SQL query.
- Calling the database for execution.
- Reading the execution results.
- Judging whether the results meet the requirements.
- Continuing to modify the query based on errors.
For tasks involving multi-table joins, window functions, ranking, and cumulative share, the model was also able to generate structurally complete queries. Some tasks even correctly used lag calculations, grouped aggregation, and combinations of window functions.
However, “being able to write logically reasonable SQL” and “being able to pass strict automated evaluation” are two different things.
5. Main Sources of Lost Points: Format and Precision Constraints
The most prominent issue was that decimal precision handling was not strict. When a task explicitly required the use of ROUND(..., 2), the model often considered the underlying value close enough and omitted explicit rounding.
For human readers, such a result may be regarded as “basically correct.” Automated evaluation, however, usually requires first-row strings to match exactly. Even if the value has only a few extra decimal places, it will be judged as a failure.
Among the 25 tasks, about 15 were cases where “the logic was basically correct, but the format did not meet the requirements.” If the numeric error tolerance were relaxed to approximately 1e-6, the number of passed tasks could rise to about 22, for a pass rate near 88%. This suggests that the model’s core reasoning capability is not as poor as it may seem. What mainly limits its score is adherence to output specifications.
Therefore, SQL evaluation must include the following requirements in system instructions or task templates:
- Strictly apply the rounding method specified in the task.
- Preserve the required column order.
- Do not rename columns without authorization.
- Do not return extra debug fields.
- Explicitly check empty result sets.
- Recheck row and column counts before submitting the final result.
6. Typical Structural Errors
Some tasks failed not because of simple precision issues, but because the query structure itself deviated from the requirements.
For example, in a task involving multi-table joins and discount calculations, the model did construct a common table expression (CTE), but the final set of returned fields did not match the requirements, causing column-name validation to fail.
In a month-over-month or quarterly change task, the model tried to use window functions to calculate prior-period data, but due to incomplete grouping conditions, sorting fields, or join logic, the final result was an empty result set, and the returned field names also did not meet the requirements.
Another type of error came from misunderstanding the business definition. For example, when a task required calculating the share of a particular sales channel, the model selected another channel as the calculation object. The SQL syntax itself had no problem and the query could execute, but the object being measured had changed.
This shows that complex data analysis tasks test not only SQL syntax, but also the model’s overall understanding of metric definitions, filter conditions, aggregation granularity, and business semantics.
7. Token Consumption and Task Complexity
Basic and simple tasks required about 2 steps on average and consumed approximately 2.2K input and output tokens. Difficult tasks required about 6.1 steps on average. One individual task iterated up to 17 steps and consumed approximately 55.5K tokens, while another complex task also consumed approximately 55K tokens.
An increase in the number of tool calls directly affects three things:
- Longer response time.
- Higher inference cost.
- Accumulated probability of errors.
If each correction solves only one local issue, the model may fall into a loop of repeated execution and repeated modification. From an engineering perspective, a maximum number of tool calls should be set, and the error type should be recorded after each round of execution. For repeated empty results, column-name mismatches, or numeric inconsistencies, the process should be terminated in a timely manner and handed over to human review.
8. Improvement Recommendations
For this type of task, optimization can be carried out at three levels: prompts, task templates, and system architecture.
First, the system prompt should clearly specify that the final SQL must strictly follow the ROUND usage, field names, sorting method, and return structure specified in the task. The model should not simply be told to “generate correct SQL”; verifiable constraints should be listed item by item.
Second, standard examples should be provided for common tasks. In particular, for window functions, period-over-period calculations, multi-table joins, and empty-result handling, validated general templates can be provided to reduce the difficulty of constructing complex queries from scratch.
Third, an independent result validation layer should be added. After the model generates SQL, the results should not be returned directly to the user. Instead, a program should check:
- Whether column names match.
- Whether the column count is correct.
- Whether the row count meets expectations.
- Whether numeric precision meets the requirements.
- Whether null values or anomalous values are present.
Finally, performance testing and capability testing should be accepted separately. Fast speed does not mean reliable answers, and correct answers do not mean the service can withstand concurrency. Only when single-request quality, complex task success rate, concurrent throughput, and long-context latency all meet business requirements is the system suitable for production.
Overall, this test reveals an issue of broader significance: the practical usability of a large language model is often determined not by a single peak metric, but by inference service configuration, scheduling strategy, GPU memory resources, prompt constraints, and result validation mechanisms working together. For developers, the most important goal is not to pursue the highest speed in a single test, but to establish a repeatable, explainable, and automatically verifiable evaluation system.
