Evaluating Local Quantized LLM Inference Speed and Multi-Scenario Performance

    This article explores the practical evaluation of locally deployed, medium-sized quantized large language models (LLMs). It emphasizes the importance of separating inference speed from model capability, defining clear throughput metrics, and establishing a consistent testing environment. Additionally, it discusses the impact of 4-bit quantization and sparse architectures, strategies for navigating open-source model releases, and evaluation frameworks for multimodal prompt generation and semantic alignment.

    1. Background: Separating Speed and Capability in Local Medium-Sized Model Deployment

    Deploying medium-sized parameter LLMs locally or in private environments has become a common practice for developers to validate model capabilities, maintain data boundaries, and reduce trial-and-error costs. Particularly with 4-bit quantization, the significant reduction in VRAM usage makes single-machine deployment and daily scenario testing much more accessible. However, the most frequently asked question remains: what is the actual inference speed in tokens/s? While seemingly straightforward, this metric is heavily influenced by hardware, quantization format, context length, batch size, sampling parameters, and the inference backend. Discussing throughput without specifying testing conditions offers little reference value.

    Therefore, when evaluating local models, it is crucial to separate “speed” from “capability.” Speed determines suitability for interactive use, while capability dictates whether the model can handle specific tasks. For medium-sized models utilizing sparse activation architectures, total or activated parameter counts alone cannot accurately predict the real-world experience. Measurements must be conducted in a fixed environment with consistent input/output lengths and reproducible scripts.

    2. Inference Throughput Measurement: Define Metrics Before Quoting tokens/s

    2.1 Distinguishing Prefill and Decoding Phases

    LLM inference is generally divided into the prefill phase and the decoding phase. The prefill phase processes the input context in parallel and is constrained by both compute power and memory bandwidth. The decoding phase generates tokens sequentially and is more heavily influenced by memory bandwidth, KV Cache management, and batch processing strategies. The commonly referenced tokens/s could refer to total output throughput, single-request decoding speed, or concurrent throughput. Failing to distinguish between these can lead to discrepancies where benchmark numbers appear high, but actual interactive performance feels sluggish.

    It is recommended to track at least the following metrics: time-to-first-token (TTFT), single-request decoding tokens/s, total concurrent throughput, peak VRAM usage, and throughput degradation under long contexts. For scenarios like daily conversation, code completion, and prompt generation, both TTFT and decoding speed are equally critical.

    2.2 Fixing Test Conditions to Avoid “Benchmark Illusions”

    Reproducible tests should fix the following variables: GPU model and quantity, quantization precision, context length, output length, batch size, sampling parameters, warmup rounds, and repeat counts. It is advisable to run several warmup rounds before repeating the test multiple times to capture the median and P95 values, avoiding the impact of initial loading and cold cache starts. Pseudocode is as follows:

    1. def measure_throughput(model, prompts, max_new_tokens, warmup=3, repeat=5):
    2. for _ in range(warmup):
    3. model.generate(prompts[0], max_new_tokens=max_new_tokens)
    4. records = []
    5. for _ in range(repeat):
    6. start = now()
    7. outputs = model.generate(prompts, max_new_tokens=max_new_tokens)
    8. elapsed = now() - start
    9. records.append(total_output_tokens(outputs) / elapsed)
    10. return median(records), p95(records)

    When testing long contexts, set short, medium, and long input lengths separately and record the throughput variation curve. When testing concurrency, fix the total number of requests and the concurrency level to observe the trade-off between total throughput and single-request latency. Conclusions drawn this way can be effectively used for capacity planning and interactive experience evaluation.

    3. Quantization and Sparse Architectures: Look Beyond Parameter Count

    The core benefit of 4-bit quantization is reducing VRAM usage and memory bandwidth pressure, making it easier to run medium-sized models on a single machine. However, quantization also introduces precision loss, especially in long-chain reasoning, structured output, multilingual, and fine-grained instruction-following tasks. During actual model selection, one should observe task pass rates, output stability, and format compliance before and after quantization, rather than focusing solely on throughput improvements.

    For sparse activation architectures, “total parameter count” and “activated parameter count per inference” do not directly equate to actual speed. Routing overhead, expert distribution, batch efficiency, and memory access patterns all affect performance. Some models may respond quickly with short prompts and low concurrency but exhibit significant throughput degradation under long contexts or high concurrency. Therefore, evaluations should include a stability dimension: whether the results of running the same prompt multiple times are consistent, whether constraints are maintained in long contexts, and whether structured outputs remain parseable.

    From a usage perspective, local medium-sized models are better suited for practical, deterministic tasks such as format conversion, information extraction, prompt formatting, test case generation, and fixed workflow execution. Creative divergence is not their strong suit and should not be the sole evaluation criterion. A stable, controllable, and testable model is often more suitable for engineering applications than one that occasionally produces brilliant but inconsistent outputs.

    4. Open-Source Release Cadence and Commercial Strategy: Building a Scenario Matrix Matters More Than Chasing Leaderboards

    Cloud providers and platforms continuously release open-source models, driven by ecosystem building, developer outreach, managed service traffic, and technical branding. Faced with this high-frequency release cadence, developers can easily fall into the fatigue of “testing every new model.” A more rational approach is to build a scenario matrix: categorize tasks into structured output, long-document understanding, code assistance, multimodal prompt generation, knowledge QA, and tool calling, and set fixed test sets and pass criteria for each category.

    Commercially, open-source and managed services are not mutually exclusive. Open-source models lower the barrier for trial, while managed services provide elasticity, operational support, and compliance. For developers, the key is to avoid being misled by a single leaderboard or a one-off demo. A model’s outstanding performance on a specific test might stem from training data distribution, prompt formatting, or benchmark adaptation, which does not necessarily guarantee stability in daily scenarios. Multi-round regression testing should be used to observe generalization capabilities, particularly with boundary inputs, interfering information, and long-context constraints.

    5. Multimodal Prompt Generation and Semantic Alignment Evaluation

    In image generation assistance scenarios, natural language prompt generation is a typical task: the user provides a vague idea, and the model must break it down into modular prompts before synthesizing an executable description. The evaluation focus is not just “how well it reads,” but semantic alignment: whether clear responsibilities are assigned to images or regions, whether there are conflicts among subjects, styles, composition, lighting, and backgrounds, and whether there is ambiguous reference between multiple objects.

    An actionable evaluation framework includes:

    1. Intent Fidelity: Whether the prompt covers the user’s core needs and omits critical constraints.
    2. Regional Responsibility: In multi-image or multi-region generation, whether each part clearly “knows what it is responsible for” to avoid semantic overlap.
    3. Structural Stability: Whether the output can be parsed into fixed fields for downstream pipeline consumption.
    4. Conflict Detection: Whether style, quantity, or spatial relationships contradict each other.
    5. Regression Consistency: Whether key constraints are stably preserved across multiple generations of the same input.

    If the model can explicitly form a plan during its reasoning trajectory—such as “this part handles the subject, another part handles the background or style”—and implement it into the prompt structure, it demonstrates strong semantic alignment capabilities. This ability holds more engineering value than occasionally generating “more creative” outputs because it is testable, controllable, and reproducible.

    6. Conclusion

    When deploying medium-sized, 4-bit quantized models locally, tokens/s must be measured under explicit conditions, with simultaneous attention to time-to-first-token, long-context degradation, and concurrent throughput. Sparse architectures and quantization alter the speed curve, meaning parameter count alone is insufficient to judge user experience. Daily scenario evaluations should establish fixed test sets, scoring tables, and regression processes, incorporating stability, format compliance, and semantic alignment as core metrics. Amidst the high frequency of open-source releases, developers should focus on their own scenario matrices and reproducible benchmarks rather than being swayed by a single leaderboard.