Lightweight LLM Selection: Benchmark Scores, Long-Run Stability, and Total Token Cost
This article explains how to choose a lightweight LLM by calculating total cost rather than comparing list prices alone. It covers how to read benchmark scores, how to test stability on long-running tasks, how to calculate total token cost with cache hit rates, common selection mistakes, and a four-step rollout process with monitoring thresholds.
1. The Selection Problem Shifts from “Choose the Cheapest” to “Calculate Total Cost”
In the past, choosing a lightweight model was simple: use whichever one was cheapest. Now vendors are lowering prices while improving the capabilities of small models. The question has become: which model has lower total cost and more reliable results in my tasks?
Looking only at list prices or leaderboards is not enough. A list price is only a unit price. Total cost also depends on how many tokens a task consumes, how many of those tokens hit the cache, and whether the model can complete long-running tasks reliably. This article breaks the process into four steps: read benchmark scores, judge long-run usability, recalculate total cost, and implement based on thresholds.
These methods apply to any lightweight model. For current prices, parameters, and capabilities of specific models, check the vendor’s official page, because prices and versions may change.
2. How to Read Benchmark Scores
Public benchmark scores show a model’s relative level on a certain type of task. They are useful for narrowing the candidate list, not for making a purchase decision directly. Before reading scores, confirm four things:
- Whether the data source is an official page or a traceable paper or report.
- Whether the evaluation date and model version number are clear.
- Whether the task set is close to your business.
- What prompts, decoding parameters, and context length were used during evaluation, and whether tool calling was enabled.
For example, a model that leads on a code benchmark does not necessarily lead on long-document organization or multi-step operations tasks. Context length, tool-calling method, and prompt wording can all change results.
If you want to use benchmark scores for internal comparison, record the following reproduction fields for each candidate model:
| Field | Description |
|---|---|
| Model name and version number | As shown on the release page |
| Evaluation date | Publication or update date of the benchmark page |
| Prompt template | Saved verbatim, without rewriting |
| Decoding parameters | Temperature, maximum output length, etc. |
| Context length | Actual input token limit |
| Tool-calling switch | Enabled or disabled, and how calls are made |
3. How to Judge Usability for Long-Running Tasks
Long-running tasks are work that lasts for a relatively long single interaction and includes multiple steps, such as batch document processing, step-by-step test execution, and cross-module code generation. During testing, run continuously for at least two hours and record three metrics.
The first is stability. Count the following events:
- Stream interruption: the request is interrupted midway, or the connection ends without an error message.
- Repeated output: the same passage or sentence appears three or more consecutive times in one response.
- Infinite loop: the same tool call or reasoning step repeats more than five times without progress.
The second is context consistency. Insert several confirmed facts, constraints, and intermediate conclusions midway through the task, then ask questions later. Each incorrect reference or instance of forgetting counts as one context error.
The third is resource constraints. Record whether the task was completed within budget, and how many times it was aborted because token consumption was too fast or the request timed out. The timeout criterion should match the team’s business requirements; for example, a single request exceeding a set number of seconds counts as one timeout.
Looking only at “whether it can finish” can easily overestimate a model, because many problems only appear late in testing. Regularly perform human scoring on output quality and record it together with automated counts.
4. How to Calculate Total Token Cost
API list price is only part of the cost. The total cost of a task can be divided into three parts:
Total cost = cached input tokens × cached input unit price + non-cached input tokens × non-cached input unit price + output tokens × output unit price
When calculating, count the three types of tokens separately. Cache hit rate = cached input tokens ÷ all input tokens. In most long-running workflows, input accounts for a high share, and most input comes from a fixed prefix, so the hit rate significantly changes total cost.
The following uses a set of hypothetical values for demonstration. Two models process the same task. Each task has 1 million input tokens and 50,000 output tokens, with units in CNY. These numbers are for demonstration only and do not correspond to the pricing of any real model.
- Model A: cached input CNY 0.2 per million tokens, non-cached input CNY 1.0 per million tokens, output CNY 4.0 per million tokens.
- Model B: cached input CNY 0.4 per million tokens, non-cached input CNY 0.6 per million tokens, output CNY 3.0 per million tokens.
| Cache hit rate | Model A total cost | Model B total cost | Lower-cost model |
|---|---|---|---|
| 20% | CNY 1.04 | CNY 0.71 | Model B |
| 50% | CNY 0.80 | CNY 0.65 | Model B |
| 80% | CNY 0.56 | CNY 0.59 | Model A |
Take Model A at a 50% hit rate as an example: the cached portion is 1 × 0.5 × 0.2 = CNY 0.10, the non-cached portion is 1 × 0.5 × 1.0 = CNY 0.50, and the output portion is 0.05 × 4.0 = CNY 0.20, for a total of CNY 0.80.
This example shows that cached input with a higher unit price is not necessarily more expensive. As the hit rate rises, cached input carries more weight in total cost, and the ranking of the two models may flip. Before selecting a model, calculate with real hit rates; do not compare only the unit price table.
5. Common Mistakes in Lightweight Model Selection
- Looking only at leaderboards. Leaderboard tasks are not necessarily close to your business, and a high benchmark score does not mean long-run stability.
- Ignoring cache hit rate. Calculating all input at the non-cached unit price will misjudge the relative cost of two models.
- Treating estimates as measurements. If the token counts of the comparison target are estimates, they can only be used as a reference, not as a basis for decisions.
- Testing only a single task. A one-hour test cannot represent continuous calls over several days.
- Ignoring version changes. Prices and capabilities may change after release, so record the version number and price page date at the time of the decision.
6. Rollout Steps and Monitoring Thresholds
To evaluate whether a model fits your business, follow these four steps.
- Run a minimal viable use case: cover the core business flow and record latency and error types.
- Cost simulation: use one month or one quarter of real call volume to calculate total spending under different cache hit rates.
- Long-run stress test: run continuously for at least two hours and record stream interruptions, repeated output, context errors, timeout counts, and token consumption.
- Version and roadmap evaluation: confirm the vendor’s update cadence, price adjustment records, and long-term support commitments.
Teams should set thresholds in advance. Models that exceed the thresholds do not enter the candidate list. Thresholds are determined by the team based on business risk; the following table can be used as a reference:
| Metric | Calculation |
|---|---|
| Stream interruption rate | Number of stream interruptions per 100 requests |
| Timeout rate | Timed-out requests as a share of total requests |
| Context error count | Number of errors per two-hour stress test |
| Per-task budget cap | Maximum total cost allowed per task |
The cost simulation table should include the following fields: date, task type, cached input tokens, non-cached input tokens, output tokens, cache hit rate, snapshot of the three unit prices, and total cost.
