Evaluating Local LLM Inference Performance and Optimizing Concurrency: A Practical Guide
A reliable evaluation of locally deployed large language models requires more than observing whether responses feel fast or accurate. This guide explains how to separate input processing from token generation, interpret concurrency degradation, investigate anomalous results, build reproducible benchmarks, measure answer quality, and optimize bottlenecks. It concludes with a deployment-boundary approach that connects latency, throughput, quality, workload, and resource requirements.
1. Turn “Poor Performance” into a Verifiable Engineering Problem
When evaluating a locally deployed large language model, developers often focus on two observations: whether generation feels smooth and whether the answers are accurate. These impressions are useful for identifying problems, but they are not sufficient for deployment decisions. A slow response may be caused by input processing, request queuing, longer outputs, or resource contention. A poor answer may instead be related to prompt design, task difficulty, or evaluation criteria.
A professional evaluation should therefore break the problem into three dimensions:
- Performance boundaries: What throughput and latency can the system provide under different input lengths, output lengths, and concurrency levels?
- Quality boundaries: Can the model meet acceptance requirements for business tasks such as knowledge question answering, logical reasoning, code generation, and information extraction?
- Deployment boundaries: How many computing resources are required to achieve the expected performance and quality? How many real users can the system support, and are there stability risks?
Existing observations provide partial measurements of speed, but not complete hardware configurations, runtime parameters, or quality-test details. They are therefore suitable for discussing evaluation methods and troubleshooting directions, but not for making definitive claims about the relative capability of a particular model.
2. Separate Input Processing from Incremental Generation
LLM inference generally consists of two major stages. Their performance characteristics and bottlenecks are different.
2.1 Input Processing: A Major Factor in Time to First Token
During input processing, the model computes the prompt tokens and builds the context state required for subsequent generation. A token is the basic unit processed by the model and is not equivalent to a Chinese character, an English word, or a byte.
The speed of this stage is usually measured in tokens per second. In the referenced observations, the peak input-processing speed under single-request concurrency was approximately 757.7 tokens per second, occurring at an input length of about 4,000 tokens. Across input lengths ranging from approximately 2,000 to 32,000 tokens, the observed speed was about 629–758 tokens per second.
These results suggest that, within the tested range, the processing rate per token did not show a sustained and obvious decline. However:
A stable token-processing rate does not mean that the waiting time for a long input remains stable.
Under simplified conditions:
Input processing time ≈ Number of input tokens ÷ Input-processing speed
Even if the number of tokens processed per second remains nearly constant, a longer prompt still increases processing time. Actual time to first token also includes queuing, request scheduling, and other execution overheads. This approximation cannot replace end-to-end measurement.
2.2 Generation: A Major Factor in the Streaming Experience
During generation, the model produces output tokens incrementally, usually based on the context state that has already been built. In the referenced observations, single-request generation speed was approximately 23.8–28.7 tokens per second, remaining relatively stable overall.
This metric primarily describes the output cadence after generation begins. For tasks that require long answers, generation speed can account for a substantial portion of total latency. For short answers, queuing and input processing may represent a larger share.
A complete response evaluation should therefore measure at least:
- Time from request submission to the first output token;
- The interval between adjacent generated tokens;
- Total time from request submission to response completion;
- High-percentile behavior for all of the above under peak load.
Recording only the average generation speed can conceal a serious issue: the system may take a long time to start producing output.
3. Concurrency Degradation: Do Not Look Only at Single-Request Speed
The referenced observations show a clear decline in input-processing speed as concurrency increases. At two concurrent requests, speed decreased by approximately 30%–45%; at four concurrent requests, it decreased by about 50%; and at six concurrent requests, it decreased by approximately 63%. In one data set involving an input of around 2,000 tokens, the speed fell from 688 tokens per second to 228 tokens per second.
Generation also degraded under concurrent workloads, with observed speeds of approximately 8–18 tokens per second. For combinations involving longer inputs and four to six concurrent requests, some results fell to 8–11 tokens per second.
These observations indicate that resource contention can significantly reduce per-request performance. Before drawing conclusions, however, the measurement definitions must be confirmed.
3.1 Per-Request Speed and System Throughput Are Different Metrics
Suppose generation speed per request decreases as concurrency increases, but the system serves more requests at the same time. Total output throughput may still increase.
A load-testing report should therefore distinguish between:
- Per-request throughput: The processing speed of an individual request during a specific stage;
- Total system throughput: The combined number of tokens completed by all requests during the measurement window;
- Request completion rate: The number of successfully completed requests per unit of time;
- Effective completion rate: The number of requests per unit of time that meet both quality and latency requirements.
Without these distinctions, a system may be incorrectly judged as having lower processing capacity simply because each user becomes slower. Conversely, an increase in total throughput may be mistaken for an improvement in every user’s experience.
The original observations do not fully explain how the measurements were aggregated. A formal analysis should clarify the metric definitions rather than directly comparing values with different scopes.
3.2 Concurrency Does Not Represent a Fixed Workload
Six concurrent requests can impose very different loads depending on whether they contain short or long inputs and produce short or long outputs.
Long inputs increase prefill computation and context-cache usage. Long outputs keep requests active for longer, causing other requests to wait. Concurrency must therefore be interpreted together with input length, output length, and request arrival patterns.
Fixed-concurrency tests are useful for observing resource contention, but they do not fully represent production traffic. Real workloads may include bursts, continuously arriving requests, and mixtures of short and long tasks. Queue growth and timeout behavior should be evaluated as well.
4. Re-Test Anomalous Rebounds Before Explaining Them
The reference material also contains a result that requires caution: for some inputs of approximately 32,000 tokens, generation speed increased to 20–28 tokens per second.
This does not prove that the system has a special optimization for longer inputs, nor does it show that longer inputs are faster than shorter ones. A more appropriate interpretation is that the result is an anomalous observation requiring verification.
Possible factors include:
- Different numbers of active requests during the measurement period;
- Some requests finishing early, reducing subsequent resource contention;
- Differences in output length and stopping position;
- Changes in cache state, warm-up status, or runtime scheduling;
- Variation in background load, device frequency, or resource utilization;
- Different metric scopes, such as whether queuing time was included.
These are investigation directions, not confirmed causes.
During re-testing, record timestamps for every request and repeat each condition over multiple runs. Reports should include dispersion and high-percentile latency, not just central values. If an anomaly occurs in only a small number of samples, it should not be presented as a stable system capability.
5. Build a Reproducible Performance Testing Process
5.1 Fix the Environment and Runtime Conditions
Before testing, record the compute device, available memory and VRAM, model numerical precision, deployment method, inference runtime, context limits, and scheduling settings.
Also document whether other compute-intensive tasks are running, whether context reuse is enabled, and whether the test includes initial model loading and warm-up. Measurements collected under different conditions may each be valid, but they must not be compared without explaining those differences.
When context reuse is involved, test repeated inputs and independent inputs separately. Otherwise, repeated prompts may produce results that do not represent the behavior of new requests in a real workload.
5.2 Build an Input-Length and Concurrency Matrix
Testing should not use only one input length and one concurrency level. Define short, medium, and long input categories based on common business workloads, then cover single-request, low-concurrency, and expected peak-concurrency conditions.
Within each test group, keep the output-length distribution as comparable as possible. If generation ends early, record the actual number of generated tokens rather than calculating speed from the target output length.
Also include mixed workloads containing both short and long requests. Pure long-input tests help identify resource limits, but mixed workloads are closer to real usage and are more likely to expose head-of-line blocking, where long tasks delay short interactions.
5.3 Test Both Steady-State and Burst Traffic
Fixed-concurrency testing is useful for observing behavior under sustained resource contention. Applying requests according to an arrival rate is better for determining whether the queue continues to grow.
If the system provides a good experience only at low concurrency, verify whether real business peaks exceed that boundary. A service without explicit admission controls may perform well under light load but develop long waits during traffic bursts.
5.4 Produce an Auditable Report
For every test condition, record at least:
- Number of requests;
- Success rate;
- Actual input and output lengths;
- Time to first token;
- End-to-end latency;
- Total system throughput.
Latency should include both the median and high-percentile values. Averages can hide extreme waits among a small number of requests, even though those requests may directly affect user experience and business timeout rates.
Per-request details are equally important. They help distinguish slow computation, long queueing, lengthy generation, and request failures.
6. Measure Answer Quality Independently
The reference material states that answer quality was unsatisfactory, but it does not provide test questions, reference answers, scoring criteria, or repeated evaluation results. Specific quality rankings therefore cannot be derived from it.
Quality evaluation should begin with business objectives rather than a single overall score.
6.1 Define Acceptance Criteria by Task
For knowledge question answering, evaluate factual accuracy, evidence support, and the expression of uncertainty.
For code generation, evaluate functional correctness, edge cases, and security risks.
For information extraction, evaluate field completeness, format compliance, and content consistency.
Long-form analysis should also be evaluated for coverage of key facts, relationships across sections, and omissions. A fluent answer does not necessarily complete the task the user requested.
6.2 Control Generation Conditions and Evaluation Bias
Record the prompt template, context, generation randomness, and output constraints. If these conditions vary, quality differences may come from the test design rather than the model itself.
For tasks requiring human judgment, anonymous scoring can be used, along with checks for evaluator consistency. Automated evaluation is appropriate for explicit requirements such as format, field values, and executable results. Complex answers should not be judged solely by surface-level text similarity.
6.3 Evaluate Quality and Latency as a Single Business Objective
A longer answer may provide a more complete explanation, but it may also increase waiting time and unnecessary content. Evaluation should measure the proportion of tasks that are completed correctly within the required business time limit, rather than optimizing only for faster output or a higher isolated score.
The most useful metric is the number of qualified business tasks completed per unit of time and per unit of computing resources.
7. Choose Optimization Strategies Based on the Bottleneck
7.1 Long Time to First Token: Address Input and Queuing First
First check whether the prompt contains repeated history, irrelevant documents, or excessive background information. Filtering for relevant material, removing redundant content, and managing conversation history can reduce the processing burden.
Input compression must not remove necessary evidence. Re-test answer quality before and after optimization to ensure that the performance improvement has not introduced information loss.
If queuing is the primary source of latency, consider admission control, queue limits, and timeout policies rather than continuing to increase concurrency without restriction.
7.2 Slower Generation: Check Caching and Resource Contention
Long contexts and high concurrency increase context-cache requirements. Use VRAM consumption, device utilization, and scheduling status to identify the bottleneck instead of inferring the cause from token speed alone.
Dynamic batching may improve resource utilization but can also increase waiting time. Adjusting numerical precision may change memory requirements and execution performance, while also requiring validation of quality and compatibility. Every optimization should be re-tested under the same workload; its benefits should not be assumed.
7.3 Interference Between Short and Long Tasks: Use Tiered Scheduling
Short interactive requests and long-form processing tasks can be placed in separate queues. Set reasonable input and output limits, and apply rate limiting or backpressure to burst traffic.
Streaming output allows users to see content earlier, but it does not automatically reduce total computation. It is an experience optimization, not a substitute for capacity management.
8. Use Deployment Boundaries Instead of Vague Performance Judgments
A reliable evaluation should answer four questions:
- Under what environment was the system tested?
- What workloads were covered?
- Which business requirements were satisfied?
- What factors remain unknown?
The existing observations show that single-request and multi-request performance differ significantly, that long-input workloads require focused validation, and that a small number of rebound results should be re-tested. However, the available hardware configuration, metric definitions, and quality evidence are incomplete. They are not sufficient to determine the causes of degradation or establish broadly applicable capability claims.
For developers and enterprise users, the valuable result is not simply that a system is “fast” or “slow.” It is a validated deployment boundary: the input sizes, request intensity, and resource budget under which the system can consistently deliver results that meet latency and quality requirements.
Testing and optimization around this boundary can turn scattered observations into reproducible, explainable, and actionable engineering decisions.
