Evaluating Local LLM Deployment: A Methodology for Benchmarking Inference Performance and Task Accuracy

    This article presents a practical methodology for evaluating locally deployed large language models across two independent dimensions: inference serving performance and task-solving quality. It defines key metrics such as prefill and decode throughput, TTFT, and concurrency degradation, then shows how queuing—not model slowdown—drives latency under load. On the quality side, it uses a tool-calling loop that generates SQL, executes it in an embedded analytics database, and validates results, revealing that most failures stem from precision and formatting rather than logic. It closes with a reusable evaluation checklist covering constraint definition, layered load testing, bottleneck attribution, dual-track quality scoring, prompt reinforcement, and cost accounting.

    1. Why a “Full Release” Is Not the Same as a Complete Upgrade

    Every time a new full version of a large model is released, the community’s most common reaction is to run a few test cases and draw a conclusion. But such conclusions usually suffer from two problems: first, the test scenarios are too narrow; second, they treat “some metrics fall short of the lightweight version” as equivalent to “an overall regression.” In reality, evaluating model capability must be split into two non-substitutable tracks: inference serving performance (throughput, latency, concurrency stability) and task-solving quality (correctness, format compliance, tool-calling closure). The two are governed by different factors and cannot be summarized by a single score.

    From an engineering standpoint, the full version typically offers higher capability density but also brings heavier compute and memory overhead, while the lightweight version is friendlier in terms of latency and concurrency. Therefore, the first principle of evaluation is: define the business constraints first (latency-first or quality-first), then choose the metric weights.

    2. Performance Evaluation: Separate Throughput from Latency

    2.1 Key Metric Definitions

    • Prefill throughput: The number of tokens generated per second during the input-prompt processing stage; it sets the upper bound on time to first token.
    • Decode throughput: The rate during the token-by-token generation stage; it determines the reading experience.
    • TTFT (Time To First Token): The time from request submission to the return of the first token; under long prompts it is easily amplified by queuing.
    • Concurrency degradation: The drop in single-request throughput as concurrency rises; it is the core basis for capacity planning.

    2.2 Typical Observed Patterns

    In a local-deployment measurement, single-concurrency prefill peaked at about 757 tok/s and stayed within 629–758 tok/s across the 2k–32k range, indicating that length itself has limited impact on prefill throughput. But performance changes markedly once concurrency kicks in: at 2 concurrency it drops by about 30%–45%, at 4 concurrency about 50%, and at 6 concurrency up to 63% (a 2k input falls from 688 to 228). Decode stayed stable at 23.8–28.7 tok/s under single concurrency, fell below 18 at 8 concurrency, and dropped to a low of 8–11 tok/s when long prompts were combined with 4–6 concurrency.

    TTFT rises roughly linearly with length: a 32k input took about 51.5s under single concurrency and ballooned to 186.4s at 6 concurrency. The key judgment here is that queuing is the main cause, not the model itself slowing down.

    2.3 Bottleneck Identification and Tuning Approach

    A common root cause is that the inference framework sets the maximum number of concurrent sequences too low (for example, to 2), causing concurrent requests to queue and long prefills to block each other, so throughput gets averaged out. Possible improvement directions include:

    1. # Example: concurrency and batching-related settings (exact fields depend on the framework used)
    2. max_num_seqs: 2 -> 8
    3. max_num_batched_tokens: increase, but evaluate memory usage
    4. gpu_memory_utilization: 0.91 (KV cache is already near its limit, proceed with caution)

    It must be emphasized that raising the concurrency limit must be coordinated with the memory budget. When the KV cache is already nearly full, blindly enlarging the batch will only trigger swapping or fragmentation and instead push up tail latency. A more reliable approach is to first stress-test the safe boundary between memory and concurrency, then gradually raise the concurrency tier, and monitor P99 latency with alerting in place.

    3. Quality Evaluation: Format Compliance Is the Real Dividing Line

    3.1 Evaluation Design

    The quality side uses a tool-calling loop of “generate SQL → execute it in an embedded analytics database → validate the result,” with 25 questions in total, divided by difficulty into trivial / easy / medium / hard. The pass criteria are strict: a question passes only when the row count, column count, column names, and first-row content all match.

    The result was 9/25 passing (36.0%): trivial 8/8, easy 1/2, medium 0/2, hard 0/13.

    3.2 Failure Structure

    Interestingly, the main failures did not come from logic errors but from precision and formatting. The model often omitted the two-decimal rounding required by the prompt, causing strict first-row string comparison to fail; 15 of the 25 questions were “logic correct, format off by a bit.” If precision is relaxed to 1e-6, the pass rate can rise to about 22/25 (88%).

    There were only a few genuinely structural failures: column names did not match when multi-table joins were combined with a discount CTE; a window-function-based period-over-period question returned 0 rows with mismatched column names; and there was a channel-caliber misunderstanding (computing the share of a non-target channel as the target channel).

    3.3 Cost-Side Observations

    Token consumption is strongly correlated with difficulty: easy questions averaged 2 steps and about 2.4k tokens; hard questions averaged 6.1 steps, with individual questions reaching 14–17 steps and on the order of 55k tokens. This means quality improvement often comes at the cost of inference expense, so the evaluation should record both step count and token consumption.

    4. A Reusable Evaluation Checklist

    1. Define constraints first: Clarify the latency SLA, concurrency scale, and memory ceiling.
    2. Layered load testing: Single-concurrency baseline → 2/4/6/8 concurrency → long-prompt stacking, recording throughput, TTFT, and P99.
    3. Bottleneck attribution: Distinguish “queuing” from “insufficient compute,” and check the queue and batching configuration first.
    4. Dual-track quality scoring: Use strict mode to assess format compliance and loose mode to assess logical correctness, and report both.
    5. Prompt reinforcement: Explicitly state in the system prompt that output “must strictly follow the precision and column-name requirements in the prompt.”
    6. Cost accounting: Include step count and token consumption in regression metrics so that quality gains are not swallowed by cost.

    5. Conclusion

    A reasonable evaluation of the full version should be: higher capability density, but format compliance and high-concurrency throughput require additional tuning. In engineering terms, performance problems mostly stem from concurrency and batching configuration and the memory budget, not model degradation; quality problems concentrate on precision and the output contract. Measuring and addressing these two categories of problems separately is what yields reproducible, comparable conclusions that can guide capacity planning.