Open-Source LLM Selection: Beyond Benchmarks — A Layered Deployment Strategy

    When evaluating open-source large language models, relying solely on leaderboard scores often leads to skewed decisions. A model family typically includes multiple sizes, each suited to very different scenarios. This article covers five key aspects of model selection — licensing, on-device deployment, MoE vs. Dense trade-offs, performance testing methodology, and layered selection — to help teams make decisions based on their actual conditions rather than headline benchmarks.

    The specifications and data mentioned in this article should be verified against the official model cards and license files published by the model providers. They were not individually re-validated during writing.

    When evaluating open-source large language models, relying solely on leaderboard scores often leads to skewed decisions. A model family typically includes multiple sizes, each suited to very different scenarios. This article covers five key aspects of model selection — licensing, on-device deployment, MoE vs. Dense trade-offs, performance testing methodology, and layered selection — to help teams make decisions based on their actual conditions rather than headline benchmarks.

    1. Check the License First, Before Any Commercial Plans

    The license determines whether a model can legally enter a commercial product, so it should be the very first step in selection. Apache 2.0 is a widely used permissive license in the industry: it allows commercial use, modification, and redistribution, and includes a patent grant clause. Many corporate legal teams already have established review processes for this type of license, which keeps compliance costs relatively low.

    The license name is only the starting point. Teams need to verify three things: first, whether the license file corresponding to the specific release version being used is consistent; second, whether the model card or release notes contain additional usage terms, such as restrictions on user scale or specific industries; third, whether the training data and third-party components carry other licensing requirements. If the legal team has concerns, their opinion takes precedence — technical articles cannot substitute for legal judgment.

    2. Small Models: Feasibility and Boundaries of On-Device Deployment

    Small models at roughly the 2B and 4B scale are the workhorses of on-device deployment. For structured output, multi-turn conversation, and simple tool-calling scenarios, these models can already handle tasks such as intent recognition, local instruction execution, and formatted data extraction. For applications that prefer not to upload user data to the cloud, local inference also reduces privacy risks and network dependency.

    On-device deployment has two core constraints: memory footprint and inference latency. Quantization can significantly reduce the memory occupied by weights, but the final memory figure depends on quantization bit-width, context length, KV cache size, and the runtime framework. The same model can perform very differently across devices. Therefore, you should not directly reuse numbers measured on someone else’s hardware for capacity planning — measure on your target device instead.

    Agentic workflows place even higher demands on on-device models. A single task may involve long inputs, multiple tool calls, and intermediate results. It is recommended to stress-test with the input lengths and call counts of your real workload, and record end-to-end latency rather than focusing only on per-generation speed.

    3. MoE vs. Dense: You Save Compute, Not VRAM

    The defining feature of MoE (Mixture of Experts) architecture is a large total parameter count with only a fraction of parameters activated per token. Take a model labeled “26B A4B” as an example: 26B refers to the total parameter count, while A4B means roughly 4B parameters are activated per token. This means the per-step forward computation is close to that of a ~4B model, while the knowledge capacity approaches that of a much larger model.

    There is a commonly overlooked issue here: MoE saves compute, not VRAM. During inference, all expert weights must still reside in VRAM or system memory. As a result, an MoE model is not necessarily more resource-efficient on memory-constrained devices than a Dense model with the same activated parameter count. Selection should consider both compute and memory footprint.

    The table below provides a qualitative comparison. Specific figures should be based on official model cards and your own measurements.

    Dimension Small Dense Mid-size MoE Large Dense
    Compute per token Low Low to medium High
    Weight memory footprint Low Medium to high High
    Long-context memory pressure Low Medium High
    Typical bottleneck Capability ceiling Memory capacity and routing overhead Generation speed and memory
    Best-fit scenarios On-device, intent recognition High-concurrency cloud services Offline accuracy-first tasks

    In some public comprehensive evaluations, mid-size MoE and large Dense models may score very close to each other. However, a gap on a single benchmark cannot be directly extrapolated to a gap in production. Metrics such as code generation, long-chain reasoning, and hallucination rate are highly sensitive to tasks and prompts, and must be validated on your own datasets.

    4. How to Test MoE Inference Throughput and Code Quality

    Test results are only meaningful when conditions are transparent. A reproducible test report should record at least the following:

    1. Hardware model, memory capacity, driver and CUDA versions;
    2. Inference framework and its version number;
    3. Quantization method and bit-width;
    4. Batch size, concurrency level, and request arrival pattern;
    5. Input and output token lengths, especially context length;
    6. Prefill speed and decode speed reported separately;
    7. Number of repeated runs, plus mean and percentile values (e.g., P95).

    Prefill speed is mainly bound by compute capability, while decode speed is often limited by memory bandwidth. The two should be reported separately; otherwise, it is hard to identify where the bottleneck lies.

    Code quality should be evaluated with task-relevant benchmarks. A recommended approach is to extract a set of examples from real requirements and define pass criteria — for example, unit test pass rate, compilation success rate, and human-reviewed correctness scores. For complex logic generation, human review remains necessary. If a model underperforms on such tasks, record the specific failure modes, such as missing edge cases or state management errors, so you can later improve prompts or switch models.

    5. Layered Selection: Decide by Conditions, Not by Size

    Enterprise model selection can be layered by deployment location. The following checklist is a starting point; thresholds should be adjusted to your business goals.

    On-device and edge nodes:

    • After loading the model, the target device should retain enough VRAM or memory for the KV cache and system processes;
    • Time-to-first-token and end-to-end latency must reach a business-acceptable level on typical tasks;
    • Prefer small models for intent recognition, local instructions, and structured extraction.

    High-concurrency cloud services:

    • Calculate per-request cost based on cost per thousand tokens and target latency, and compare total cost of ownership across models;
    • Stress-test P95 latency at target concurrency, and confirm that auto-scaling policies can cover traffic peaks;
    • Mid-size MoE models can serve as default candidates, but verify that the deployment platform supports loading and scheduling of large-parameter weights.

    Offline accuracy-first tasks:

    • Longer inference times are acceptable, but result validation and manual spot-checking mechanisms must be in place;
    • The memory budget must cover the longest context and the largest batch;
    • Large Dense models can be candidates, but should be compared against other models on the same evaluation set.

    In addition, it is advisable to set up a fallback mechanism. For example, when a small model’s structured output fails format validation, the request is forwarded to a larger model. The fallback strategy should log the trigger rate, so you can judge whether the small model truly meets requirements.

    6. Conclusion

    The value of a model matrix lies in letting teams choose flexibly by task and hardware, rather than chasing a single “strongest” model. The license determines whether commercial use is possible, small models determine whether on-device deployment is feasible, and the MoE vs. Dense trade-off determines the balance between cloud cost and accuracy. Whichever option you choose, complete real-world testing on the target device, with realistic workloads and your own datasets, before making the final decision.