Full Local Deployment of a Large Language Model: Inference Performance and Text-to-SQL Capability Evaluation

    This article presents a systematic, real-world evaluation of fully local deployment for an open-source large language model with roughly 1.6T parameters. It covers inference performance—including prefill throughput, decode speed, concurrency scaling, time to first token (TTFT), and resource bottlenecks—as well as task capability measured through an agentic Text-to-SQL workflow. Key findings show stable single-request performance but significant queuing-driven degradation under concurrency, while strict-format pass rates (36%) mask a much stronger ~88% pass rate when numeric tolerance is applied. The article concludes with practical tuning and evaluation recommendations for teams running large models on-premises.

    Background and Evaluation Goals

    In environments with strict data-compliance requirements, deploying large-parameter models with full weights on local infrastructure is moving from technical validation toward production use. However, a significant gap remains between “it runs” and “it’s usable and reliable.” This article documents a systematic, real-world evaluation of a fully local deployment of an open-source large language model with approximately 1.6T parameters, assessed along two dimensions:

    1. Inference performance: prefill throughput, decode speed, concurrency scaling, time to first token (TTFT), and resource bottlenecks.
    2. Task capability: using an agentic Text-to-SQL task as the test vehicle, examining the model’s ability to handle multi-step reasoning, code generation, and result self-verification.

    Evaluation methods and metrics follow industry-standard conventions to keep results reproducible and comparable.

    Test Environment and Methodology

    • Deployment: full official weights deployed locally, with no quantization or pruning.
    • Inference framework: a mainstream open-source inference framework supporting continuous batching and Paged KV cache, with key parameters including max-num-seqs (maximum sequences per batch) and max-num-batched-tokens (maximum tokens batched per step).
    • Test tooling: two separate automated test suites for speed and task quality, covering input lengths of 2k/4k/8k/16k/32k tokens and concurrency levels of 1/2/4/6.
    • Capability benchmark: 25 SQL problems requiring the model to autonomously complete the full tool-calling loop—generate SQL → call an embedded analytics engine for execution → verify row counts, column names, and results. Passing requires strict matching of row count, column count, column names, and the first row of results.

    It’s important to emphasize that performance numbers depend heavily on the specific hardware, framework version, and parameter configuration. Readers should focus on the methods and relative conclusions rather than absolute values.

    Inference Performance Results

    Prefill Throughput

    Peak single-request throughput was about 757 tok/s (4k input). Across input lengths from 2k to 32k tokens, throughput stayed in the 629–758 tok/s range with no significant degradation at longer contexts. This indicates that long-context attention computation scales efficiently in this framework, and prefill is not the primary bottleneck.

    Prefill Degradation Under Concurrency

    The impact of concurrency on prefill throughput is nonlinear and amplifies quickly:

    Concurrency Degradation vs. single request
    2 ~ -30% to -45%
    4 ~ -50%
    6 ~ -63% (at 2k input, dropping from 688 to 228 tok/s)

    This degradation is not due to insufficient compute; it is directly tied to scheduling behavior (see Section 3.5).

    Decode Speed

    Single-request decode speed was stable at 23.8–28.7 tok/s; under multi-request concurrency it ranged from 8–18 tok/s. With 16k/32k long prompts at 4–6 concurrent requests, speed briefly dropped to a low of 8–11 tok/s, then rebounded to 20–28 tok/s in the 32k scenario (with some data-point noise). Overall, decode speed is affected jointly by long-context attention overhead and batch scheduling; this fluctuation should be factored into production capacity planning as a margin of safety.

    Time to First Token (TTFT)

    TTFT rises approximately linearly with input length:

    • 32k input, single request: about 51.5 seconds.
    • 32k input, 6 concurrent requests: about 186.4 seconds.

    Further analysis shows that queuing is the dominant cause: when max-num-seqs is set to 2, requests beyond the second enter a waiting queue. Long-input prefills block one another, causing TTFT for later-arriving requests to deteriorate sharply.

    Bottleneck Analysis

    During testing, GPU memory utilization was about 0.91, with the KV cache close to its limit. When concurrent requests exceed max-num-seqs:

    1. Request arrives → requests beyond max-num-seqs queue → long prefills execute serially / block each other
    2. → TTFT worsens + average prefill throughput is diluted

    The improvement direction is therefore clear: moderately raising max-num-seqs and max-num-batched-tokens can improve high-concurrency throughput and TTFT, but must be balanced against memory. The remaining KV cache headroom is very small, so blindly tuning parameters risks OOM errors. Viable mitigations include reducing context length, adjusting batch scheduling policy, leveraging prefix caching to reuse repeated system prompts, or expanding KV cache capacity when resources allow.

    Task Capability Results

    Overall Pass Rate

    Of 25 problems, 9 passed—a pass rate of 36.0%. Difficulty distribution: trivial 8/8, easy 1/2, medium 0/2, hard 0/13.

    Tool-Calling and SQL Generation Quality

    Notably, all 25 problems were completed by the model through the full autonomous tool-calling loop (generate SQL → execute → verify → correct) without human intervention. Complex multi-table JOINs and window functions (LAG, ROW_NUMBER, cumulative-share calculations) were generated correctly. Only two problems (Q21, Q22) exhibited structural errors, such as mismatched final CTE column names or a QoQ window function returning zero rows.

    Primary Failure Mode: Formatting Precision, Not Logic Errors

    The most typical failure pattern was omitted ROUND precision: when the problem statement explicitly required ROUND(…, 2), the model often skipped this formatting step. Strict grading requires exact string matching of the first row, which caused 15 problems to fail despite logically correct results. When numeric grading is relaxed to a floating-point tolerance of 1e-6, the pass rate reaches approximately 88% (22/25).

    This finding has important practical implications: the model’s semantic capability and its adherence to output formatting need to be evaluated separately. In production, deterministic post-processing (uniformly applying ROUND/CAST outside the query, or formatting outputs) can serve as a safety net, rather than leaving formatting to the model.

    Token Consumption

    Simple problems were completed in an average of 2 steps (about 2.2k + 0.2k tokens); hard problems averaged 6.1 steps. Q10 took a maximum of 17 steps and consumed about 55.5k tokens, while Q25 took 14 steps and about 55k tokens. Long correction loops make error-fixing costly, so inference cost must be considered in task design.

    Optimization Recommendations

    1. Strengthen format constraints: explicitly require in the system prompt that output “must strictly follow the ROUND/formatting requirements stated in the problem,” and add format checking with automatic retry during verification.
    2. Provide example SQL: for window-function tasks (such as QoQ calculations), include a structural example in the prompt to significantly reduce structural error rates.
    3. Tune scheduling parameters: raise max-num-seqs and max-num-batched-tokens within the GPU memory budget to improve concurrent TTFT; monitor KV cache utilization to avoid OOM.
    4. Long-context strategies: reuse system-prompt prefixes via prefix caching and compress intermediate results to reduce prefill pressure.
    5. Evaluation design: report both “strict match” and “numeric tolerance” metrics to distinguish formatting adherence from logical correctness and avoid misjudging model capability.

    Conclusion

    The findings of this full local deployment evaluation can be summarized in three points:

    • Deployment is feasible but requires careful performance tuning: single-request prefill and decode are stable, but high concurrency shows significant degradation due to queuing and KV cache limits; scheduler parameters and caching strategies must be optimized.
    • Task capability is underestimated due to formatting issues: with relaxed numeric tolerance, the pass rate rose from 36% to 88%, showing that core reasoning and SQL generation capabilities are solid and the weakness lies in output-format adherence.
    • Evaluation methodology determines conclusions: only a combination of strict grading, multi-dimensional metrics (TTFT, concurrency, token consumption), and a stratified-difficulty benchmark can accurately reflect how a model performs in production.

    For technical teams planning to run large-parameter models locally, we recommend first establishing performance and quality baselines with a small benchmark, then applying the optimizations above to progressively approach production readiness.