Local Inference for Mid-Sized LLMs: Performance Evaluation and Tuning Practice

    This article presents a reproducible engineering framework for evaluating and tuning local inference of mid-sized LLMs on single-card consumer hardware. It covers the key variables of hardware, quantization, runtime, and task workload; throughput and latency metrics; weight and KV-cache quantization; sparse activation and multi-token prediction; long-context and multimodal overhead; concurrency scaling; agent and long-dialogue quality; cost boundaries and cloud-edge collaboration; common tuning issues; and an illustrative capacity-planning profile. The goal is to help developers treat local inference as a measurable, tunable, and regression-testable system rather than a single benchmark result.

    Recently, the local inference performance of mid-sized parameter models has become a focus of discussion in developer communities. The core issue is not a specific product, but a reproducible engineering question: on a single consumer-grade card with limited VRAM and a limited budget, can weight quantization, KV-cache quantization, sparse activation, multi-token prediction, and multimodal input support achieve an acceptable balance among throughput, long context, and task quality? This article does not target any specific brand or product. Instead, it abstracts the phenomenon into a general performance evaluation and tuning method for local deployment, edge inference, and private deployment scenarios.

    1. From Isolated Measurements to Reproducible Evaluation

    The original discussion included many “best case,” “average case,” and “dual-concurrency combined” data points. These are useful references, but treating them directly as conclusions can easily ignore differences in test environments. A professional evaluation should first divide the problem into four layers: hardware, quantization, runtime, and task.

    The hardware layer focuses on VRAM capacity, VRAM bandwidth, compute capability, and thermal stability. The quantization layer focuses on weight bit width, KV-cache bit width, and activation precision. The runtime layer focuses on batching strategy, concurrency scheduling, context management, and whether multi-token prediction is enabled. The task layer focuses on different workloads such as short question answering, long documents, agent tool calls, multimodal understanding, and long role-play dialogue. Only when these four layers of variables are fixed do performance data become comparable.

    From existing measured samples, on a single consumer-grade modified card with about 22GB of VRAM and a single-card cost in the roughly RMB 2,000 range, a dense model with about 27B parameters using 4-bit weights and 8-bit KV-cache quantization, with multimodal input enabled, can maintain about 23 tokens per second while supporting 100K-class context. A sparse model with about 30B total parameters and about 3B active parameters using 3-bit weights and 8-bit KV-cache quantization can reach nearly 100 tokens per second and support 250K-class context. In a dual-concurrency scenario, the combined throughput of the dense model can reach about 40 tokens per second. These data points show that local mid-sized models have moved from “can run” into the “usable” range. However, they must be labeled as measurements under specific environments, specific quantization combinations, and specific input lengths, and cannot be extrapolated unconditionally.

    2. Key Metrics: Do Not Look Only at Tokens per Second

    A local inference evaluation should include at least six types of metrics.

    First is generation throughput, meaning tokens per second during stable decoding, which reflects interaction fluency. Second is time to first token (TTFT), meaning the time from request arrival to the first output token; in long-context scenarios, it affects perceived experience more than generation throughput. Third is peak and resident VRAM usage, which determines maximum context and concurrency. Fourth is long-context degradation, meaning how throughput and VRAM change as context grows from 10K to 50K, 100K, and 250K. Fifth is concurrency scalability. High single-concurrency throughput does not mean high multi-concurrency total throughput; scheduling strategy and KV-cache management can significantly affect combined throughput. Sixth is task quality, including instruction following, tool-call success rate, long-horizon planning stability, and multimodal understanding accuracy.

    Many evaluations report only “best-case” generation speed while ignoring TTFT and VRAM fluctuation under long context. In real production environments, users often perceive TTFT first and generation speed second. Agent scenarios depend more on tool-call success rate and multi-turn stability. Therefore, it is advisable to build a test matrix: short input and short output, long input and short output, long input and long output, multi-turn dialogue, tool calls, image input, dual concurrency, and four-way concurrency. For each category, record throughput, latency, peak VRAM, and failure rate to form a complete profile.

    3. Quantization Combinations: Weights and KV Cache Should Be Evaluated Separately

    Weight quantization mainly reduces model parameter footprint. 4-bit quantization is usually the balance point between quality and size, while 3-bit quantization can free additional VRAM but introduces quality risk. KV-cache quantization mainly reduces cache usage during long-context and decoding phases. 8-bit KV cache is usually more stable than 4-bit, especially in long-context and multi-turn dialogue.

    The combinations in the original discussion—“4-bit weights + 8-bit KV cache + 100K context” and “3-bit weights + 8-bit KV cache + 250K context”—reflect an important principle: weight bit width and cache bit width should be tuned separately and should not be lumped together as a single “quantized version.”

    In practice, it is advisable to first fix the weight bit width, then test the impact of KV-cache bit width on long-context throughput and VRAM usage; next, test the additional VRAM and latency introduced by enabling the multimodal encoder; finally, test cache allocation strategies under concurrency. For daily interaction, 4-bit weights plus 8-bit KV cache is usually more reliable. For extreme long context or low-cost sparse models, 3-bit weights plus 8-bit KV cache can be a candidate, but regression testing for instruction following and factual consistency is mandatory. Lower-bit quantization is not always better; low-bit quantization on smaller models is more likely to amplify repetitive generation and instruction drift.

    4. Acceleration Boundaries of Sparse Activation and Multi-Token Prediction

    A sparse mixture-of-experts model with about 30B total parameters and about 3B active parameters activates only part of its parameters during decoding, so the compute per token is significantly lower than that of a dense model with the same total parameter count. This explains why, on similar hardware, the sparse model can reach nearly 100 tokens per second while the dense model stays in the 20–30 tokens-per-second range. However, the sparse model is not unconditionally faster: routing jitter, uneven expert load, batching efficiency, and small-batch decoding can all weaken the advantage. During evaluation, test single-concurrency, dual-concurrency, and four-way concurrency separately, and observe whether throughput scales linearly or is held back by routing and cache management.

    Multi-token prediction acceleration predicts multiple future tokens in one forward pass, reducing the number of decoding loops and thereby improving throughput. Its benefit is strongly task-dependent: it is high for predictable text, code, and structured output; for tasks requiring fine reasoning and repeated confirmation, the benefit may be offset by verification overhead. After enabling multi-token prediction, TTFT, repetition rate, and quality regression must be retested rather than looking only at generation speed improvement.

    5. Real Overhead of Long Context and Multimodal Input

    The core bottleneck of long context is the KV cache. 100K-class context and 250K-class context impose different requirements on VRAM bandwidth, cache management, and scheduling strategy. Even if the model fits into VRAM after quantization, TTFT and generation throughput will decline as context grows. Multimodal input also introduces additional computation and VRAM usage for the image encoder and cross-modal projection, and image resolution, image count, and image-text interleaving patterns all affect latency. Therefore, “supports multimodal input” and “maintains high throughput under multimodal input” are two different propositions.

    For capacity planning, a layered strategy is recommended: daily short conversations use shorter context and higher concurrency; long-document analysis uses single concurrency, longer context, and higher KV-cache bit width; multimodal requests are assigned a separate resource pool to avoid image encoding crowding out text decoding cache. If a single card simultaneously handles multimodal input, long context, and high concurrency, request queues and context limits should be set to prevent peak VRAM from triggering swapping or failures.

    6. Concurrency and Throughput: Fast Single-Concurrency Does Not Equal Strong Service Capacity

    Single-concurrency throughput reflects single-user experience, while multi-concurrency combined throughput reflects service capacity. In measurements, dual-concurrency combined throughput can exceed single-concurrency throughput, but it does not grow linearly. Reasons include KV-cache sharding, batching scheduling overhead, VRAM bandwidth contention, and decoding-phase synchronization. For local services, stress testing should use the four-tuple of concurrency count, combined throughput, TTFT, and failure rate. If dual-concurrency combined throughput is about 40 tokens per second while single-concurrency throughput is about 25 tokens per second, concurrency provides a benefit but with diminishing returns. If four-way concurrency causes TTFT to rise significantly, concurrency should be limited or request queuing enabled.

    Productionization should also focus on long-term stability: whether clock throttling occurs after several hours of continuous operation, whether VRAM becomes fragmented, and whether short requests are slowed after long-context requests. Record P50, P95, and P99 latency rather than only averages.

    7. Task Quality: Agents and Long Dialogue Need Separate Regression

    Mid-sized models can approach the mid-tier performance of higher-tier closed models on some agent tasks, but such conclusions depend heavily on the evaluation set, tool-call format, and prompt engineering. Agent capability should be split into tool selection accuracy, parameter filling correctness, multi-step planning completion rate, error recovery capability, and long-horizon consistency. Long dialogue and role-play scenarios focus more on instruction following, context memory, and repetition control. The original discussion mentioned that some fine-tuned or quantized versions differ in instruction following, which highlights the need for version-matrix testing: different quantization and fine-tuning combinations of the same base model may perform noticeably differently, and overall capability cannot be inferred from a single version.

    Multimodal image understanding also needs separate evaluation: simple description, fine-grained counting, chart reading, and document screenshot understanding have different levels of difficulty. If the model is mainly used for daily assistance, some error may be acceptable; if it is used for production decisions, human review and failure fallback must be added.

    8. Cost Boundaries and Cloud-Edge Collaboration

    A single card with a cost in the roughly RMB 2,000 range can run mid-sized models locally, significantly reducing marginal inference cost. For high-frequency, low-sensitivity, and privately deployable scenarios, local inference can reduce ongoing token-billing expenses. For occasional use, very large models, strong compliance requirements, or elastic peak scenarios, the cloud still offers elasticity and operational advantages. A reasonable architecture is not “local replaces cloud,” but “local handles normal load while cloud handles peaks and very large model tasks”—that is, cloud-edge collaboration. Evaluation should calculate total cost of ownership: hardware purchase, power, cooling, operations, model updates, fault redundancy, and security compliance. It should not look only at the single-card price.

    Local deployment also changes product economics: when users can obtain usable capability on their own hardware at low marginal cost, token-billed services must move toward higher-value tasks, stronger models, lower operational burden, and compliance assurance. This is a natural result of changes in technology cost, not the victory or defeat of a single product.

    9. Typical Issues and Tuning

    A prominent issue with current mid-sized local models is that chains of thought can be too verbose. On complex questions or brain-teaser-style tasks, the model may repeatedly confirm after reaching an answer, with thinking tokens exceeding several thousand for a single question, or even entering a loop. Mitigation methods include setting a thinking budget, limiting maximum reasoning length, enabling early stopping, adjusting repetition penalty and temperature, using structured output constraints, and explicitly stating in the prompt to “stop after giving the conclusion.” Repetitive generation is more obvious on smaller models; repetition penalty, top-p, and temperature should be adjusted according to model card recommendations, with multi-turn regression testing.

    Another issue is that tasks which can be answered correctly without thinking are slowed down by excessive reasoning. Task routing can be applied: disable or shorten the thinking chain for simple question answering, retain longer thinking for complex planning, and add tool-call validation and failure retry limits for agent tasks. After tuning, throughput, latency, and quality should be retested to avoid sacrificing stability for speed.

    10. Illustrative Configuration and Capacity Planning

    The following is a general configuration template for methodological illustration only and does not represent any specific product interface:

    1. profile = {
    2. model_class: "dense_27b_or_sparse_30b_a3b",
    3. weight_quant_bits: 4,
    4. kv_cache_quant_bits: 8,
    5. context_tokens: 100000,
    6. concurrency: 2,
    7. multi_token_prediction: true,
    8. multimodal_input: true,
    9. runtime_backend: "local_graph_runtime",
    10. max_thinking_tokens: 2048,
    11. repetition_penalty: "tune by regression per model card recommendations"
    12. }

    For capacity planning, start from a single-concurrency baseline, then gradually increase concurrency and context, recording peak VRAM and P95 latency. If the goal is daily interaction, prioritize TTFT and stable throughput. If the goal is long-document analysis, prioritize context limit and KV-cache stability. If the goal is agent service, prioritize tool-call success rate and failure recovery. Any performance data should be adopted only after it has been reproduced under a fixed test set, fixed quantization combination, and fixed runtime configuration.

    11. Conclusion

    Local inference of mid-sized LLMs has entered the usable range. On a single consumer-grade large-VRAM card, a reasonable combination of weight quantization, KV-cache quantization, sparse activation, multi-token prediction, and multimodal support can cover daily interaction, long-document analysis, agent assistance, and content creation within a throughput range of 20–100 tokens per second. However, “usable” does not mean “unconditionally production-ready.” A multi-dimensional evaluation matrix must be established, with attention to TTFT, long-context degradation, concurrency scaling, task quality, and long-term stability. The risks of verbose chains of thought, repetitive generation, instruction drift, and low-bit quantization quality must be addressed directly. Economic judgments must use total cost of ownership rather than single-card price. For developers, the most important thing is not to chase isolated benchmark scores, but to build local inference as a measurable, tunable, and regression-testable engineering system.