How to Evaluate Large Language Models: Capability, Throughput, and Cost
Choosing an LLM is rarely about finding the single strongest model. This article lays out a practical, multi-dimensional evaluation framework covering four areas: capability (testing models against verifiable, task-representative evaluation sets instead of subjective impressions), performance (measuring time-to-first-token, output tokens per second, and end-to-end latency, and understanding why generation speed shapes the user experience), cost (modeling the true cost per unit of work, including hidden factors such as chain-of-thought tokens, accumulated context, retries, and long-output amplification), and deployment (comparing managed APIs against self-hosted inference and estimating the break-even point). It also shows how to match tasks to models through tiered routing, how to operationalize evaluation as a continuous process, and which common pitfalls to avoid—arguing that the goal is to find the most suitable model for each task, not the most expensive one.
1. The Starting Point: “Which Model Is the Best?” Is the Wrong Question
Discussions like these come up constantly in technical communities: one model is good at divergent thinking and suited to exploring solution spaces; another gives concise answers and stands out on math reasoning; and yet another is roughly on par in capability but generates output far faster. In practice, people find that almost no task genuinely requires one specific model.
This disagreement reveals the essence of model evaluation: model capability is not a single dimension, and model selection for a business is not a single goal. What users actually care about is not a leaderboard ranking, but “given my task mix, latency requirements, and budget constraints, which model fits best?” Judging superiority in the abstract rarely produces engineering value.
At minimum, a reliable LLM evaluation framework should answer four questions:
- Capability: Can it reliably produce correct, usable results on target tasks?
- Performance: Can its output speed and concurrency meet the business’s experience requirements?
- Cost: What does it cost to complete a unit of business, and is that controllable?
- Deployment: Should you use a managed API, self-hosted inference, or a mix of both?
I’ll take these one at a time.
2. Capability Evaluation: Replace Subjective Impressions with Verifiable Tasks
2.1 Subjective Impressions Are Easily Skewed by First Impressions
The experiences users share usually center on one or two vivid scenarios—say, high-quality brainstorming, or a math problem handled particularly well. Such feedback has value, but it carries three biases:
- Scenario bias: The scenario an individual uses most often may not be the business’s main scenario.
- Sampling bias: Model output is stochastic, so a single impressive answer doesn’t represent the average level.
- Perception bias: Fluent, confident-sounding answers easily lead people to overestimate their correctness.
Capability evaluation therefore has to shift from “does it feel good” to “is it actually correct.”
2.2 Designing the Evaluation Set: Match the Real Task Distribution
The quality of the evaluation set directly determines how much you can trust the conclusions. Recommended practices:
- Scenario stratification: Divide tasks by business share into high-frequency, critical, and long-tail tasks, and assign weights to each category.
- Difficulty grading: Set basic, intermediate, and expert-level questions to cover different regions of the model’s capability curve.
- Controlled sources: Draw questions from desensitized real business data and from a private set of hard problems written by experts, and rotate them regularly to reduce inflated scores from data contamination.
- Moderate scale: Use at least 50 questions per scenario so results are statistically meaningful.
2.3 Scoring: Prefer Tasks That Can Be Verified Automatically
Different task types call for different scoring methods:
| Task Type | Recommended Scoring Method |
|---|---|
| Code generation | Compilation, unit tests, static analysis |
| Math proofs | Answer comparison, formal verifier checks, expert step-by-step review |
| Structured writing | Format validation, key-point coverage, terminology consistency checks |
| Open-ended creation | Multi-reviewer blind scoring against a shared rubric |
It’s worth emphasizing that even when the prompt is a single sentence, generating a complete set of math lecture notes may require the model to perform a great deal of internal reasoning and consume a considerable number of tokens. The value of such tasks lies in reasoning quality rather than response speed, so they’re best judged on process correctness:
- If a proof already exists, check whether the model makes factual errors or merely piles up related results;
- If no proof exists yet, focus on whether the model can attempt to construct a proof strategy, identify the key steps, and honestly state when it cannot complete the proof.
For open-ended tasks, don’t fixate on the final artifact—the process matters too.
2.4 Stability and Consistency
The randomness of model output means evaluation must sample multiple times:
- Run each question at least 3–5 times, and report both the average score and the pass rate (e.g., passing at least 3 of 5 runs);
- Track both the average pass rate and the single-run pass rate so extreme samples don’t distort the judgment;
- Have multiple reviewers score independently and report inter-rater agreement;
- Run sensitivity tests over variables such as temperature and prompt format to observe how much results fluctuate.
Only after this kind of treatment does a conclusion graduate from “it happened to work well once” to “reliably usable.”
3. Performance Evaluation: Generation Speed Is a Hard Requirement for Production-Grade Experience
3.1 Key Performance Metrics
Inference for a conversational product typically splits into two phases:
- Prefill: Process the entire input at once; this determines time-to-first-token.
- Decode: Generate output token by token; this determines output speed.
Mapped to metrics users actually perceive:
- Time to First Token (TTFT): The time from sending a request to receiving the first token—directly affects whether the tool “feels laggy.”
- Output speed (Tokens/s): The number of tokens generated per unit of time—determines how long you wait for a complete answer.
- End-to-end latency: The time from request to the last token, roughly equal to TTFT plus “output length ÷ output speed.”
These metrics aren’t intrinsic properties of a model; they result from the model, the inference framework, the hardware, and concurrent load acting together. When selecting a model, measure it under conditions close to production—for example, fixing input and output lengths, simulating realistic concurrency, and recording both the average and the P95/P99 percentiles.
3.2 Why Speed Widens the Experience Gap
Imagine two options with similar capability but output speeds that differ by roughly 9x:
- A model at 300 tokens/s takes about 10 seconds to generate a 2,000-word answer (~3,000 tokens);
- A model at 30 tokens/s takes about 100 seconds for the same task.
When users wait more than half a minute, their attention easily drifts away from the task itself. At the engineering level, this gap compounds in two directions:
- Human review: In scenarios that require reviewers to check outputs one by one, a slow model directly slows the whole pipeline.
- Agent workflows: A single complex task often involves multiple rounds of tool calls and result verification, and latency accumulates with each round.
This explains a common phenomenon: when several models sit in the same capability tier, teams almost universally pick the faster one, because at that point the capability gap is hard to perceive through real tasks. So don’t blindly chase peak capability at the expense of speed when evaluating models—speed is itself a core capability.
3.3 Server-Side Techniques for Improving Throughput
An inference service can raise throughput and reduce latency through several general techniques:
- Continuous batching: New requests can dynamically join a batch in the gaps between other requests’ decode steps, avoiding a wait for the whole batch to finish.
- Paged memory management: Manage the KV cache in pages to reduce memory fragmentation.
- Prefix caching: Reuse computation results for identical system prompts or document prefixes.
- Speculative decoding: A lightweight draft model generates candidate tokens in sequence, which the target model then verifies in parallel.
- Weight quantization and low-precision compute: Reduce memory footprint and computation.
- Disaggregated prefill and decode: Scale the two phases independently so they don’t contend for resources.
These techniques substantially improve the “effective output per unit of hardware” and directly affect the self-hosted inference cost discussed later.
4. Cost Evaluation: From “Is It Expensive?” to “What Does a Unit of Work Cost?”
4.1 The Hidden Items in the Cost Structure
LLM services are typically priced by input and output token counts, and in most scenarios the output token price is higher than the input price. But the actual bill also involves hidden items:
- Chain-of-thought tokens: Reasoning models generate large amounts of internal thinking, usually billed as output consumption.
- Accumulated multi-turn context: Every turn re-sends the entire prior history.
- Tool calls and retries: In agent workflows, every call and every failed retry incurs cost.
- The amplification effect of long-form writing: The prompt for generating a long document may be only a few hundred words, while the output can run to tens of thousands of tokens.
Cost control therefore has to shift from “shortening prompts” to “managing total token consumption.”
4.2 The Unit-Task Cost Model
Comparing only the price per million tokens tends to underestimate the cost of high-frequency calls and misses the cost amplification of long-output tasks. A more practical approach is to build a cost model around “completing a unit of business”:
Cost per unit task = tokens per turn × price per token × average number of turns × retry amplification factor
where:
- tokens per turn = input tokens + output tokens + chain-of-thought tokens
- price per token = input share × input price + output share × output price
- average number of turns: agent applications typically make multiple calls per task
- retry amplification factor: determined by the failure rate and the maximum retry count—e.g., a 10% failure rate with at most 1 retry gives a factor of about 1.1
If you self-host inference, just replace “price per token” with “hardware cost per token” (see the calculation in 6.2) and the model still applies.
4.3 Example: Cost Comparison for a Document-Generation Task
The example below is hypothetical; the unit prices are illustrative values used only to explain the calculation method and do not represent the pricing of any actual service:
- High-quality reasoning model: input 0.005 CNY per 1K tokens, output 0.015 CNY per 1K tokens;
- High-speed general model: input 0.002 CNY per 1K tokens, output 0.006 CNY per 1K tokens.
Suppose a document task consumes on average 5,000 input tokens, 10,000 chain-of-thought tokens, and 5,000 formal output tokens—20,000 tokens in total, of which input is 25% and output is 75%. Ignoring retries, the cost of each option is:
- High-quality model: 25 × 0.005 + 75 × 0.015 = 1.25 CNY per document
- High-speed model: 25 × 0.002 + 75 × 0.006 = 0.50 CNY per document
If document tasks account for 30% of a team’s total task volume, switching just this workload can save about 45% of the related spending each month. A model’s value lies not in having the single highest capability, but in whether it matches the difficulty the task requires.
5. Scenario Matching: Most Tasks Don’t Need the “Strongest Model”
The goal of evaluation isn’t to pick the strongest model, but to establish rules that match tasks to models. Common categories:
- Exploratory tasks: Brainstorming, comparing approaches, breaking down problems—these value breadth and diversity of ideas and tolerate higher latency.
- Production tasks: Code completion, document writing, information extraction, classification and tagging—called frequently and sensitive to throughput and cost.
- High-difficulty reasoning tasks: Complex algorithm design, math proofs, cross-file refactoring—infrequent, with extremely high demands on the capability ceiling.
When most business traffic concentrates on production tasks, assigning the strongest model to every request means paying for capability you don’t use. A more sensible approach is tiered routing:
- Use a high-speed model as the default workhorse to handle most requests;
- When a task is judged high-difficulty (e.g., single-turn output exceeds a threshold, the first result fails validation, or the manual-sampling failure rate is high), escalate to a high-capability model;
- The high-capability model can also be used offline to produce a small volume of high-quality content, such as technical lecture notes or complex solution documents, without real-time latency constraints;
- If all candidate models fail, hand the task off to a human-processing queue.
Key design principles for the routing layer:
- Quantifiable escalation conditions: e.g., “not all unit tests passed,” “structural validation failed,” “confidence below a threshold”—avoid relying on subjective judgments that are hard to reproduce.
- Negligible routing overhead: The extra latency of a lightweight classifier or rule engine should stay within tens of milliseconds.
- Traceable fallback: Log model version, latency, and cost for every routing decision so the routing policy can be continuously optimized.
Here’s a pseudocode example:
def generate_with_routing(task, max_retry=1):# 1. Route the request to the high-speed general model by defaultresult = call_model(PROFILE_FAST, task)if verify(result, task):return result# 2. Validation failed: escalate to the high-capability reasoning modelresult = call_model(PROFILE_REASONING, task)if verify(result, task):return result# 3. Retry a limited number of times to keep cost and latency in checkfor _ in range(max_retry):result = call_model(PROFILE_REASONING, refine_prompt(task, result))if verify(result, task):return result# 4. All attempts failed: hand off to a human and raise an alertreturn fallback_to_human(task, last_result=result)
Here, verify is a task-specific automatic validation function—for example, running unit tests, executing structural validation, or performing a factual-consistency check.
6. Deployment Selection: The Break-Even Point Between Managed APIs and Self-Hosted Inference
Once the business reaches a certain scale, the deployment question becomes unavoidable.
It’s a common observation in the community that, with professional-grade inference servers offering high bandwidth and large memory, a single rack can push an open-weight model to output speeds of hundreds of tokens per second. If that efficiency holds, the value unlocked—whether for internal enterprise use or for offering inference as a service—can far exceed the licensing or subscription cost of the model itself. This is also why efficient inference is becoming core infrastructure in the LLM era.
6.1 The Cost Structure of Self-Hosted Inference
The total cost of self-hosted inference includes at least:
- Hardware depreciation: The monthly cost per server or accelerator card, depreciated over 3–5 years;
- Facilities and power: Colocation, cooling, and electricity;
- Bandwidth and networking;
- Operations staff: Model deployment, version upgrades, troubleshooting;
- Elastic headroom: Resources reserved for traffic peaks, which directly lowers average utilization.
Correspondingly, the hardware cost per token can be expressed as:
Cost per output token = monthly total cost per card ÷ (output speed × effective running seconds × concurrency utilization factor)
This formula reveals three decisive variables:
- Output speed: Determined jointly by model size, inference-optimization level, and hardware specs—higher speed means lower unit cost.
- Effective running seconds: The actual service time after deducting maintenance, failures, and idle time.
- Concurrency utilization factor: Continuous batching and dynamic autoscaling raise average GPU utilization, while an idle GPU still incurs depreciation and power costs.
6.2 Break-Even Calculation
Comparing the self-hosted unit cost per token against the managed API price lets you estimate the break-even point. Suppose the monthly total cost per card (including depreciation, power, facilities, and allocated operations) is 25,000 CNY, the expected output speed is 2,500 tokens/s, monthly effective runtime is 500,000 seconds, and the concurrency utilization factor is 1, then:
Self-hosted: 25,000 ÷ (2,500 × 500,000) ≈ 0.00002 CNY/token, i.e., about 20 CNY per million tokensManaged: input 10 CNY per million tokens, output 30 CNY per million tokens;with a 7:3 input-to-output ratio, roughly 16 CNY per million tokens blended
Under these assumptions, the self-hosted unit price is still slightly higher than the managed service. If the concurrency utilization factor drops to 0.6, the self-hosted unit cost rises to about 33.3 CNY per million tokens. The exact figures vary with hardware prices, electricity rates, and model size, but the conclusion is general: unit price is not the only deciding factor—utilization and operational cost are the real barriers to self-hosted inference.
Beyond that, self-hosted inference requires fixed investment and suits scenarios with stable traffic, sufficient scale, and high demands on data control. Managed services require no infrastructure operations and suit scenarios with volatile traffic and a need for rapid validation. In practice, a hybrid is common: core, stable traffic is handled by self-hosting, while elastic peaks and exploratory tasks go through managed services.
7. Operationalizing Evaluation: Turn It into a Continuous Mechanism
Models iterate quickly, and a one-off comparison goes stale fast. It’s worth embedding evaluation into the everyday development process:
- Version the evaluation set: Manage it alongside the code repository, automatically run regression tests on every model upgrade, and compare changes in key metrics.
- Monitor multi-dimensional metrics: Instrument the application layer to log success rate, P95 latency, cost per unit task, and human-intervention rate, broken down by model version and business scenario.
- Canary and rollback: Roll out a new model to a small share of traffic first, expand gradually once metrics meet targets, and roll back quickly on anomalies.
- Re-evaluate periodically: Update the evaluation set and routing rules each quarter in line with business changes, so past conclusions don’t constrain present choices.
8. Common Pitfalls
- Leaderboard-only thinking: Questions on public leaderboards may already be in training data and may not match your business distribution, so treat them only as reference.
- Parameter-count-only thinking: A large parameter count doesn’t mean strong performance on your target task—scenario fit matters more than scale.
- Lowest-price-only thinking: Choosing by token price while ignoring the hidden costs of call rounds, retries, and human review.
- Static conclusions: A comparison from six months ago may already be obsolete against a new model version.
- One-size-fits-all deployment: Routing everything to managed services, or self-hosting everything, tends to cost you in either cost or flexibility.
9. Conclusion
Evaluating an LLM is fundamentally a multi-objective trade-off among capability, performance, cost, and deployment:
- The capability ceiling determines what it can do;
- Output speed determines whether users will use it;
- The cost structure determines whether a business can keep using it;
- The deployment model determines how data and traffic are controlled.
Rather than asking “which model is the strongest,” it’s better to build an evaluation framework that is quantifiable, reproducible, and continuously updated, so that every task can find the “most suitable”—not the most expensive—model. For most teams, a high-speed workhorse model handling everyday traffic, a high-capability reasoning model tackling the hard problems, and automation via routing plus continuous regression is often the best answer for the money.
