Local Deployment of Medium-Sized LLMs: Performance Evaluation and Model Selection

    This article explains how to evaluate locally deployed medium-sized LLMs beyond raw decoding speed. It covers scenario-based metrics such as time to first token, stable decoding throughput, long-context capability, concurrent aggregate throughput, task quality, instruction following, multimodal understanding, VRAM usage, tuning cost, and total cost of ownership. It also examines quantization, KV-cache optimization, multi-token prediction, dense versus sparse models, quality evaluation, verbose reasoning and repetition loops, cost accounting, and a practical selection checklist. Readers get a structured framework for testing and choosing local models under constrained single-GPU hardware.

    Evaluating the performance of a locally deployed medium-sized LLM should not rely on decoding speed alone. A more reasonable approach should cover time to first token (TTFT), stable decoding throughput, long-context capability, concurrent aggregate throughput, task quality, instruction following, multimodal understanding, VRAM usage, tuning cost, and total cost of ownership (TCO). The core change reflected in practical deployments is that, with a single consumer or modified GPU with about 22 GB of VRAM and a single-card hardware cost in the roughly CNY 2,000 range, medium-sized models already have the potential to be “usable for daily work.” However, there is still a clear gap between “it can run” and “it is stable and useful,” especially in verbose reasoning, repetition loops, instruction-following variance after low-bit quantization, and VRAM management under long context and concurrency.

    1. Move from single-point benchmarks to scenario-based metrics

    The local inference experience is determined by multiple stages. Decoding throughput is usually measured in generated tokens per second, but it only represents the generation stage. TTFT is also affected by the prefill stage, context length, batch size, and KV-cache layout. For coding assistance, agent tasks, and long-dialogue applications, TTFT, context-switching stability, and tool-call success rate are often more important than peak decoding speed. In practical reports, a dense model with about 27B parameters, 4-bit weight quantization, 8-bit KV-cache quantization, and a single GPU with about 22 GB of VRAM reached about 30 tokens/s for short-context decoding, about 25 to 26 tokens/s in routine coding-assistance scenarios, and about 40 tokens/s in aggregate under dual concurrency. It still maintained about 23 tokens/s at a context of about 100K tokens. Another sparse model with about 35B total parameters and a smaller number of active parameters reached about 97 tokens/s with 3-bit weight quantization and supported a context of about 256K tokens. These figures should be understood as practical signals under specific hardware, specific inference-framework builds, and specific sampling configurations, not as universal guarantees. During model selection, they should be re-tested on the target task, context length, concurrency level, and quantization setting.

    2. Quantization, KV cache, and multi-token prediction are key levers for local usability

    4-bit or 3-bit weight quantization significantly reduces VRAM usage and brings medium-sized models into the range of a single small-VRAM GPU. The cost is that quantization error may affect instruction following, long-chain reasoning, and performance in low-resource languages. 8-bit KV-cache quantization is especially important for long context, because the KV cache grows linearly with sequence length. It can be roughly expressed as: layers × KV heads × head dimension × sequence length × batch size × bytes per element. Long context, multimodal input, and concurrency together amplify VRAM pressure. Multi-token prediction (MTP) improves throughput by predicting multiple tokens at once during decoding, but its benefit depends on model support, inference-framework implementation, sampling strategy, and batching. It cannot simply be equated with a proportional reduction in end-to-end latency. The following capacity-planning examples are illustrative only and express configuration dimensions, not a specific product interface:

    1. # Capacity planning illustration only; not a specific product interface
    2. workload_profile:
    3. model_shape: dense_medium
    4. weight_quant: int4
    5. kv_cache_quant: int8
    6. max_context_tokens: 100000
    7. multimodal: true
    8. concurrency: 1
    9. note: "Practical report value under specific hardware and configuration; re-test independently"
    1. workload_profile:
    2. model_shape: sparse_moe_medium
    3. weight_quant: int3
    4. kv_cache_quant: int8
    5. max_context_tokens: 256000
    6. multimodal: true
    7. concurrency: 1

    3. Choose dense and sparse-active models according to task requirements

    A dense model covers all parameters in the computation path for every token, so quality is usually more stable. It is suitable for coding assistance, agent tasks, creative writing, and long role-play dialogues that require strong instruction following. However, its decoding speed is limited by parameter size and memory bandwidth. A sparse-active model has a larger total parameter count but fewer active parameters per token, giving it an obvious decoding-speed advantage. It is suitable for daily Q&A, light coding assistance, and low-latency interaction. Nevertheless, its total VRAM usage, routing stability, long-context KV cache, and quality after low-bit quantization still need validation. In practical reports, a dense model with about 27B parameters approached the level of a closed-source mid-to-high-end model in agent-task evaluation, and reached a usable level in creative writing and long role-play dialogues. A sparse model with about 35B total parameters was faster but slightly weaker in quality. The conclusion here is not that “one model fully replaces another,” but rather a layered selection strategy: “dense models preserve quality, sparse models preserve throughput.”

    4. Quality evaluation should cover agents, code, multimodality, and safety boundaries

    The value of a local model is not limited to chat. Agent tasks require multi-step planning, tool calls, error recovery, and long-context memory. Coding assistance requires accurate completion, clear explanations, and controllable refactoring. Multimodal image understanding requires coordination between visual encoding and textual reasoning. Creative writing and long role-play dialogues require persona consistency, instruction following, and content-boundary control. Low-bit quantization may let a model perform normally on simple tasks while drifting on complex instructions, format constraints, and tool calls. Therefore, a small evaluation set that covers key scenarios should be established, recording task success rate, format-compliance rate, manual spot-check pass rate, average number of output tokens, and repetition-loop rate. For creative-writing scenarios with looser content boundaries, safety filtering, prompt constraints, and log auditing should also be used; model alignment alone should not be relied upon.

    5. Verbose reasoning and repetition loops are current major weaknesses

    Practical feedback shows that some reasoning-oriented models tend to overthink complex questions or brainteasers. They may generate reasoning chains of thousands of tokens and even repeatedly confirm after an answer has already been reached. Simple logic puzzles may also trigger long loops. The phenomenon is more obvious with smaller models, especially models below about 9B parameters. The cause may be related to training that lengthens reasoning chains to improve benchmark performance, and may also be related to sampling parameters, repetition penalties, stop conditions, and maximum thinking-budget settings. Recommended controls include: setting a maximum thinking-token budget; enabling a shorter reasoning mode for deterministic tasks; adjusting repetition penalty, presence penalty, frequency penalty, and n-gram deduplication; configuring explicit stop words; adding answer-convergence checks and timeout fallback for agent tasks; and using gray-scale evaluation to compare different quantization levels and sampling configurations. Parameter tuning is not a one-time task; it should form a closed loop of “evaluation set—parameter sweep—manual spot check—regression.”

    6. The cost advantage is real, but it must be calculated on a TCO basis

    A used single-card hardware setup in the roughly CNY 2,000 range with about 22 GB of VRAM can indeed run medium-sized models, significantly reducing the marginal invocation cost of local inference. This is especially suitable for high-frequency calls, privacy-sensitive data, offline environments, and fixed workloads. However, TCO also includes the full machine’s power supply, cooling, storage, electricity, hardware failure, backup, operations labor, model updates, and security compliance. A low single-card threshold does not equal enterprise-grade high availability. Production environments also need multi-instance redundancy, monitoring and alerting, log auditing, canary release, and rollback. For burst traffic, very large models, managed operations, and compliance-audit requirements, general-purpose cloud capabilities such as Baidu AI Cloud can still serve as a complementary option. Local deployment and cloud services are not a simple replacement relationship: local deployment handles high-frequency, privacy-sensitive, low-latency, and fixed workloads, while the cloud handles elastic scaling, very large models, managed operations, and cross-region services.

    7. Model-selection checklist

    Evaluate in the following order. First, define the task type and quality floor, distinguishing daily Q&A, coding assistance, agents, multimodality, and creative writing. Second, estimate the VRAM budget, calculating weights, KV cache, multimodal encoder, and concurrency headroom separately. Third, choose a quantization level and re-test instruction following and long-context stability. Fourth, test TTFT, stable decoding throughput, and dual-concurrency aggregate throughput. Fifth, validate multimodal image understanding, long-context retrieval, and tool calls. Sixth, establish monitoring for repetition loops, overlong thinking, and format drift. Seventh, calculate the three-year TCO and compare it with cloud pay-as-you-go options. Eighth, define security compliance, log auditing, and rollback strategies.

    The conclusion is that locally deployed medium-sized models have moved from the demonstration stage to the usable stage. Under specific configurations, dense models can reach stable decoding of about 20 to 30 tokens/s, while sparse models can reach throughput on the order of about 100 tokens/s. Long context and multimodality are usable with quantization and KV-cache optimization. Agent, coding-assistance, and creative-writing scenarios already have practical value. However, performance evaluation must be scenario-based; a single peak speed cannot replace end-to-end experience. Verbose reasoning, repetition loops, low-bit quantization drift, and tuning cost remain major risks. For developers and enterprises, a reasonable path is a layered architecture of “local high-frequency workloads + cloud elasticity and managed services,” driven by an evaluation loop that continuously optimizes models, quantization, and parameter configurations.