LLM Selection Guide: Trade-Offs Between Inference Speed, Math Reasoning, and Cost
This article explains how to choose a large language model by defining the task first and comparing candidates under fixed test conditions, rather than relying on leaderboard scores. It distinguishes brainstorming from production workloads, outlines five evaluation metrics—inference speed, math and logical reasoning, chain-of-thought controllability, data compliance, and unit cost—and describes practical methods for testing math reasoning and measuring speed. It also covers API access versus self-hosting, elastic use of cloud resources, and why cost per successfully completed task matters more than a single API call price.
When choosing a large language model, many teams start with leaderboards. Leaderboard scores come from specific question sets and specific prompts, and they may not match your business scenario. A more reliable approach is to define the task first, compare candidate models under fixed test conditions, and record the results for later review. This article follows that approach and outlines evaluation dimensions, testing methods, and selection steps.
1. Distinguish Use Cases: Brainstorming vs Production Execution
The same team often uses large language models in two types of scenarios, and the evaluation criteria differ significantly.
Brainstorming
In brainstorming, the focus is on breadth of knowledge, diversity of ideas, and readability of output. Users can usually tolerate a wait of several seconds to tens of seconds, and they care more about whether the result brings new angles. At this stage, it is suitable to call multiple models in parallel and have people select usable ideas from the results. Differences between models are obvious here, so it is worth trying several models and keeping the ones that perform consistently.
Production Execution
Once a system enters production, it handles repeated, high-concurrency, time-bound requests. At this point, latency, throughput, per-call cost, and output format stability matter more than being “the smartest.” For tasks such as information extraction, classification, rewriting, and simple question answering, lightweight models with similar capabilities are often sufficient, and their response time may be several times faster.
The table below summarizes the priorities for the two scenarios:
| Dimension | Brainstorming | Production execution |
|---|---|---|
| Latency tolerance | High | Low, often with an explicit SLA |
| Core metrics | Output diversity and depth | TTFT, throughput, cost |
| Output requirements | Free text | Fixed format that programs can parse |
| Evaluation method | Human selection | Automated test set plus spot checks |
| Model strategy | Parallel comparison of multiple models | Fixed version with fallback |
2. Five Selection Metrics
It is advisable to use the following five metrics consistently and record the complete test conditions for every evaluation.
- Inference speed: This includes time to first token (TTFT), meaning the time from sending a request to receiving the first output token, and output throughput, meaning the number of tokens generated per second. Both figures must specify input length, output length, concurrency, and runtime region; otherwise, the numbers are not comparable.
- Math and logical reasoning: Measure accuracy on a question set relevant to the business. For proof tasks, also check whether the derivation is complete, whether notation is correct, and whether formulas compile.
- Chain-of-thought controllability: Check whether prompts can control reasoning depth, whether output contains verifiable intermediate steps, and whether the model consumes a large number of tokens on irrelevant content.
- Data compliance: Check whether data will be used for training, how long the provider retains data, and whether data localization requirements can be met.
- Unit cost: Calculate cost per successfully completed task. The price of a single API call is only one part of the total. Failed requests and retries also count toward cost.
The cost of a single API call can be estimated as follows:
Request cost = number of input tokens × input price per token + number of output tokens × output price per token
If the task requires retries, include the number of retries. Cost per correctly completed task = total spend ÷ number of correctly completed tasks. This figure reflects real expenditure better than the unit price alone.
3. Math Reasoning: How to Judge Reliably
Math capability is the easiest metric to misjudge. Public benchmark scores may be affected by training data contamination, and they cannot show how a model performs on your questions. The following evaluation process is recommended.
Fixed Evaluation Set and Prompts
Prepare a set of business-related questions covering different difficulty levels. Keep prompts, temperature parameters, and maximum output length the same across all candidate models. Run each question k times and report pass@k, the proportion of questions for which at least one of the k runs is correct. Also record the model version used in each run for later review.
Checking Proof Tasks
For proof tasks that require LaTeX-formatted write-ups, check three layers:
- Compilation layer: Whether the output passes a LaTeX compiler, whether environments are complete, and whether formula syntax is correct.
- Logic layer: Whether each step is justified, whether there are skipped steps, circular reasoning, or inconsistent notation.
- Citation layer: Whether the output cites nonexistent theorems or literature.
Logic-layer review needs to be done by people with a math background. Automated tools can find compilation errors and formatting issues, but they have difficulty judging whether a proof is valid.
Long Chain-of-Thought Does Not Equal Stronger Capability
The longer the chain of thought, the more tokens it consumes and the higher the latency. A long chain can sometimes compensate for weak single-step reasoning, but it may also simply be repeated attempts that produce a large amount of useless output. To judge reasoning quality, look at the number of tokens consumed per correct answer and whether the intermediate steps can be independently verified. If a long chain of thought ends in an incorrect conclusion, it has only added cost.
4. Inference Speed and Compute Deployment
Inference speed is affected by multiple factors, including model size, quantization method, batching strategy, KV cache management, and hardware type. These factors interact, so looking at a single parameter is not enough to reach a conclusion.
API Access vs Self-Hosting
Calling a third-party API has the advantage of a fast start and no hardware maintenance. The disadvantages are that data must leave the local environment, and pricing and rate limits are controlled by the provider. Self-hosting an open-source or commercially usable model can keep data on the internal network and allow the number of instances to be adjusted according to load, but it requires bearing GPU purchase or rental costs, operations staffing, and model update work.
Whether to self-host can be judged by the following questions:
- Does the data contain sensitive information that cannot be sent outside?
- Is daily request volume high enough to amortize fixed costs?
- Does the team have the ability to maintain an inference service, including monitoring, autoscaling, and failure recovery?
If two or more answers are yes, consider self-hosting. Otherwise, prioritize API services that have passed compliance review, and evaluate migration after scale grows.
Elastic Use of Cloud Resources
Most mainstream cloud providers offer GPU instances, container platforms, and managed inference services. When choosing, pay attention to instance memory capacity, network bandwidth, autoscaling policies, and the price difference between on-demand billing and reserved or monthly subscription pricing. For workloads with volatile traffic, on-demand billing plus autoscaling is usually more economical; stable batch jobs are better suited to reserved instances, which have a lower unit price.
