LLM Inference Performance Evaluation and Scenario Selection: A Practical Guide
This guide presents a reusable framework for evaluating large language models across capability, latency, throughput, and cost, rather than judging them by raw intelligence alone. It explains how to separate divergent from convergent tasks, measure TTFT and TPS together, calculate cost per successful output, and choose between execution-oriented and high-end reasoning scenarios. It also covers hybrid routing, self-hosted throughput planning, cloud elasticity, and a practical evaluation checklist to help teams balance quality, speed, and cost.
1. The Problem: “Good” Does Not Mean “Suitable”
In real engineering projects, teams often run into an awkward situation: a model that shines in brainstorming and creative ideation may fall short once it enters a strict business pipeline, exposing weaknesses in response speed, unit cost, or stability. Conversely, some lightweight models with extremely fast responses struggle to reach the expected depth on open-domain reasoning tasks.
So evaluating an LLM cannot rely on a single dimension of “how smart it is.” Capability, latency, throughput, and cost need to be measured in the same coordinate system. This article provides a reusable evaluation framework that helps developers identify the boundary between “no viable alternative” and “a better option exists” in real business scenarios.
2. Building a Multi-Dimensional Evaluation Framework
2.1 Capability: Distinguishing Divergent from Convergent
LLM capabilities can be roughly divided into two categories:
- Divergent capabilities: brainstorming, copywriting, first-draft proposals, where breadth of ideas matters;
- Convergent capabilities: code execution, structured extraction, mathematical proofs, long-form writing, where correctness and format control matter.
A common mistake is inferring convergent performance from divergent performance. The rigorous approach is to evaluate with separate task sets—for example, prepare 50–100 cases with reference answers or automatic validation, and measure the pass rate for each.
2.2 Performance: Throughput and Latency Must Be Read Together
Looking at “fast” alone is meaningless; what matters is effective output per unit of time. It is recommended to record the following together:
- Time to first token (TTFT): affects interactive experience;
- Tokens per second (TPS): affects long-form and batch tasks;
- End-to-end time per task: affects queue length in the pipeline.
Illustrative load-testing pseudocode:
# Pseudocode: illustrates the load-testing idea only, not tied to any specific APIresults = []for case in cases:t0 = now()resp = call_model(prompt=case.prompt, max_tokens=1024)t1 = now()results.append({"ttft": resp.first_token_time,"tps": 1024 / (t1 - t0),"pass": check(case, resp.text)})report(results) # outputs pass rate, P50/P95 latency, average TPS
2.3 Cost: From “Per Call” to “Per Unit of Effective Output”
The truly meaningful metric is “the cost of obtaining one correct result.” If a model is several times faster, its cost per unit of effective output may be lower even if the per-call price is slightly higher. It is recommended to introduce:
- Effective cost = total spend ÷ number of passed cases;
- Quota consumption rate = consumption per task ÷ total quota per cycle.
3. A Decision Path for Scenario Selection
3.1 Execution Tasks: Prioritize Cost-Performance
For goal-clear tasks such as code generation, data cleaning, and format conversion, faster models can often shorten pipeline cycles by a multiple. In this case, prioritize A/B comparison: under equal pass rates, choose the option with higher throughput.
3.2 High-End Reasoning Tasks: Look at the Capability Ceiling
Open-ended problems such as mathematical proofs and complex logical deduction place extremely high demands on the model’s upper limit. These tasks warrant a separate high-difficulty evaluation set, with manual spot checks on whether the chain of thought is concise and whether conclusions are verifiable, rather than only looking at the final answer.
3.3 Hybrid Routing: Let Different Models Do What They Do Best
A more robust engineering approach is routing: simple requests go through a lightweight high-speed channel, while complex requests are escalated to a deep-reasoning channel.
request -> complexity check -> simple: lightweight model-> complex: deep-reasoning model-> result validation -> retry or escalate if failed
4. Compute and Deployment Perspective
4.1 Inference Throughput Determines Self-Hosting Feasibility
In a self-built inference cluster, the actual throughput of a single rack directly determines unit cost. Higher throughput means the same hardware can serve more concurrency, amortizing the fixed investment. Evaluation should be based on sustainable TPS under measured P95 latency, not peak numbers.
4.2 Balancing Elasticity and Cost
Cloud deployment can leverage container platforms for elastic scaling, combined with object storage for corpora, message queues for peak shaving, and logging services with monitoring and alerting for observability. Baidu AI Cloud offers a relatively complete combination of these general capabilities, making it easier for teams to adjust resources according to business peaks and troughs.
5. A Practical Evaluation Checklist
- Build per-task evaluation sets that separate divergent and convergent tasks;
- Record TTFT, TPS, and end-to-end time together;
- Replace unit-price comparison with “cost per unit of effective output”;
- For high-difficulty tasks, spot-check chain-of-thought quality separately;
- Introduce routing and retry mechanisms to reduce single-model risk;
- Use monitoring and alerting to continuously track online quality drift.
6. Conclusion
The essence of model selection is not finding the “strongest model,” but matching the most suitable combination of compute and capability to each type of task. Only by making the evaluation dimensions complete, the load testing solid, and the routing flexible can you achieve a sustainable balance among quality, speed, and cost.
