Evaluating and Selecting Open-Source LLMs: A Practical Guide

    This article walks through a practical framework for evaluating and selecting open-weight large language models. Using a preview-to-GA release comparison as a case study, it shows how accuracy, latency, token consumption, and cost move independently, explains the coupling between these four metrics, and outlines a reusable evaluation workflow with versioned configs, business-specific test slices, and Pareto-based comparison. It closes with engineering tactics for controlling token spend and latency through context compression, output constraints, tiered routing, and caching.

    1. Why Open Weights Make Evaluation Mandatory

    Once open-weight models entered the engineering stack, the authority over model selection shifted from vendors back to development teams. Accessible weights mean you can deploy in your own environment, tune inference parameters, and run continued training on business-specific corpora. They also mean that “someone said it’s good” is no longer a valid basis for a decision. Teams must answer three questions themselves: is it accurate enough on my task distribution; does its latency fit the interaction pattern; can the business margin absorb the cost per call.

    The iteration from preview to general availability is a typical sample of how all three questions get rewritten at once. A Chinese-language composite evaluation of roughly 15,000 questions showed the GA version reaching 70.9% overall accuracy versus 67.5% for the preview, a gain of 3.4 percentage points, moving the composite ranking from 22nd to 7th. Average latency per call dropped from 301 seconds to 225 seconds, an improvement of about 25%. But average token consumption per call rose from 3,202 to 3,897, an increase of about 21.7%, and cost per thousand calls climbed from CNY 72.5 to CNY 89.2, up about 23%.

    Read together, these four numbers yield a conclusion more useful than “it got stronger”: the gains of this generation came mainly from deeper reasoning and better scheduling efficiency, and the price was a higher token bill. Capability and cost did not move in the same direction, so selection cannot rest on a single dimension.

    2. What the Four Metrics Physically Mean and How They Couple

    Accuracy measures the capability ceiling, but it is an aggregate that depends heavily on question type. A 3.4-point composite gain may be unevenly distributed: education rose from 50.4% to 55.7%, a 5.3-point increase and the main driver, while law and public administration slipped slightly from 82.3% to 81.7%, down 0.6 points. This pattern of “overall improvement with local regression” shows that capability allocation involves trade-offs. If your business falls in a regressing category, a higher composite ranking means nothing to you.

    Response latency determines the product form. An average of 225 seconds is squarely in the deep-reasoning range: it cannot support instant-completion interactions, but it fully supports asynchronous scenarios such as offline batch processing, document review, and complex problem solving. The criterion is not the absolute value but the relative relationship to your business timeout budget.

    Token consumption is the vehicle through which capability is priced. A more thorough reasoning chain raises costs on both the input and output sides; the 21.7% increase is essentially trading compute for accuracy.

    Cost is the composite of the first three. Here the 23% increase is almost entirely explained by token growth, with unit price unchanged. That tells us the main lever for cost governance is context length and reasoning budget, not price negotiation.

    The relationship among the four can be approximated as:

    1. # Approximate cost model per call (illustrative, not any vendor's billing rule)
    2. cost_per_call = (in_tokens + out_tokens) / 1e6 * price_per_mtok
    3. total_cost = cost_per_call * qps * seconds_per_month
    4. # Selection objective: maximize business accuracy under latency and cost constraints
    5. score = accuracy_on_business_slice
    6. feasible = (p95_latency <= latency_budget) and (total_cost <= cost_budget)

    3. A Reusable Evaluation Workflow

    Step one is to build a business slice. General leaderboards are for horizontal positioning; decisions must rely on your own dataset. Sample in layers according to real traffic, keep the size in the low thousands of questions, and weight categories with high regression risk (such as law and public administration in this case) so they are not diluted by high-scoring categories.

    Step two is to fix the evaluation configuration. Temperature, maximum output length, structured output constraints, and the system prompt must be version-controlled, otherwise differences between versions cannot be attributed. Lock them with a config manifest:

    1. eval_config:
    2. dataset_version: biz-slice-2024Q2
    3. temperature: 0.0
    4. max_output_tokens: 2048
    5. prompt_version: sys-v7
    6. concurrency: 8
    7. repeats: 3 # multiple samples to estimate variance

    Step three is to collect all four metrics at once and retain raw responses. Record P50/P95 latency rather than the mean alone, since the mean hides the long tail; split tokens into input and output to locate the source of the increase; report accuracy per domain to surface trade-off points.

    Step four is normalized comparison. Apply min-max normalization to accuracy, latency, tokens, and cost separately, weight them by business priority to produce a single comparable score, then output the Pareto frontier. Keep both “more accurate but more expensive” and “cheaper but slightly weaker” candidates instead of converging on one conclusion too early.

    4. Engineering Cost and Latency Governance

    Given that token growth is already settled, actionable measures concentrate in four places. Context compression: in retrieval scenarios, cap the number of recalled chunks and the fragment length, and strip repeated template text. Output constraints: use structured output and length limits to suppress redundant reasoning. Tiered routing: send simple requests to a lightweight configuration and enable deep reasoning only for complex requests. This is the most direct way to push the 23% increase back within budget. Batching and caching: merge requests for offline tasks and apply semantic caching to high-frequency repeated questions.

    1. def route(prompt, rules):
    2. if rules.is_simple(prompt): # classification/extraction/short QA
    3. return light_config
    4. return deep_config # multi-step reasoning/long documents

    It is worth stressing that the high latency from deep reasoning is a feature, not a defect. Engineering should turn it into an acceptable interaction experience through asynchronous tasks, streaming feedback, and progress indicators, rather than cutting the reasoning budget to buy a false sense of speed.

    5. Conclusions and Action Checklist

    Across the preview-to-GA transition, three engineering signals stand out: capability gains concentrate in education and reasoning-intensive tasks; some categories regress, so validation against a business slice is mandatory; the cost increase is driven by tokens rather than unit price, putting the governance focus on context and routing.

    For implementation, proceed in this order: build a business evaluation set and version the configuration; collect complete metrics including P95 latency and split input/output tokens; run normalized weighting and Pareto filtering on candidate versions; ship tiered routing and caching to offset cost; set independent monitoring and alerts for regressing categories, and keep observing them within your logging and alerting stack. The freedom that open weights provide translates into engineering returns only when a self-built evaluation loop exists.