Evaluating Large Models for Mathematical Reasoning and Execution Efficiency: A Reproducible Selection Framework
This article provides a practical, reproducible method for evaluating large language models (LLMs) when balancing deep mathematical reasoning against everyday execution speed. It covers test design for open-ended math problems, metrics for chain-of-thought quality, benchmarking of routine tasks like code generation and data extraction, interpretation of throughput data, and deployment-related risks. A step-by-step checklist helps teams make informed, cost-aware model selection decisions.
When selecting a large language model, engineering teams often face a trade-off between two goals: the depth of reasoning on complex problems and the speed of response for routine tasks. These two qualities do not always move in the same direction. A model that performs well in open-ended discussions may not be the best choice for batch code generation or structured data extraction. This article does not evaluate any specific product; instead, it offers a reproducible evaluation methodology, including test design, metric definitions, model selection workflow, and deployment checks.
1. Designing Open-Ended Math Tests
Open-ended math problems test the logical upper bound of a model. These problems typically have no single standard answer, or they require a proof that cannot be found verbatim in public resources. When building such tests, consider the following four points.
Source traceability: Problems should come from unpublished lecture notes, researcher-created questions, or human-verified question banks. Before testing, verify that the problem has not appeared in its complete form in public resources. Otherwise, the model’s answer may simply be memorized content, not evidence of reasoning ability.
Fixed prompt: Use the same prompt template for all models. For example, require “provide a complete derivation, output in LaTeX.” Also standardize the temperature, max output tokens, and system prompt, and record the version number of each model.
Separate scoring dimensions: Record at least four scores: step correctness (whether each step can be independently verified), citation correctness (whether the conditions for the cited theorem are satisfied), hallucination rate (proportion of fabricated theorems or references), and LaTeX compilability. Score each on a 0-to-1 scale. Avoid giving only a single overall score, because that masks specific weaknesses.
Multiple sampling: Run each problem at least five times and count the consistency rate of the conclusions. If the same model produces contradictory proofs across different samples, mark the problem as unstable and do not use it as the sole basis for model selection.
2. Quantifying Chain-of-Thought Quality
A longer chain of thought is not inherently bad; what matters is whether redundant content slows down the response or reduces correctness. Use three metrics:
- Effective step ratio: number of independently verifiable derivation steps divided by the total number of steps.
- Redundant token ratio: number of output tokens unrelated to the final conclusion divided by total output tokens.
- Logic gap rate: number of steps judged (by human annotators or a separate model) as skipped or contradictory, divided by the total number of steps.
Thresholds should be calibrated against your own workload. For example, if the effective step ratio is below 0.6 or the logic gap rate is above 0.1, consider requiring human review for that model on this type of problem. These numbers are only starting points; re-determine them with your own sample set.
3. Comparing Routine Execution Tasks
Routine tasks include code snippet generation, document summarization, and structured data extraction. These tasks typically require outputs that are directly usable and that come with predictable latency. For model selection, compare the following metrics:
| Metric | Definition | Measurement method |
|---|---|---|
| Accuracy | Proportion of outputs that pass acceptance test cases | Run a fixed sample set and validate automatically |
| P50 / P95 latency | Completion time for 50% and 95% of requests | Record end-to-end latency for each request |
| Cost per 1k tokens | Combined price of input and output tokens | Convert according to the provider’s billing rules |
| Concurrent throughput | Number of requests completed per unit time | Load test at the target concurrency level |
The selection workflow has five steps. First, write a clear acceptance criterion for the task. Second, choose two or three candidate models. Third, test accuracy on a small sample. Fourth, run latency and throughput stress tests under the target concurrency. Fifth, calculate the total cost. If two models have similar accuracy, prefer the one with lower latency and lower cost.
4. Interpreting Compute and Throughput Data
Vendor-claimed TPS (tokens per second) can be misleading. It depends heavily on hardware type, batch size, input/output length, concurrency, and numerical precision. Without these conditions, the numbers cannot be compared across configurations. Therefore, before procurement, ask the vendor for the complete test conditions, and re-measure throughput with your own workload.
Some inference frameworks improve throughput through techniques such as continuous batching and PagedAttention. Whether these techniques deliver real benefits depends on the request length distribution and concurrency pattern; they need to be validated on real traffic.
Cost can be estimated with the following formula:
Monthly cost = (per-request cost × monthly request volume) + fixed costs (e.g., instance leasing, storage, and operations)
To determine the break-even point between self-hosting and using a cloud inference service, plug your own request volume and unit prices into the formula; comparing only unit prices is insufficient.
5. Network Access and Compliance Risks
Some teams access cross-region model services through proxies or other indirect paths. This approach usually introduces four types of risks:
- Compliance risk: Data leaving the jurisdiction may violate industry or regional regulations. Confirm requirements with legal counsel before going live.
- Security risk: Intermediate nodes may leak request content or API keys. Keys should never be written into code or logs.
- Stability risk: Each additional hop raises latency variance and the likelihood of interruption.
- Maintainability risk: Unofficial access paths can become unavailable at any time, increasing troubleshooting costs.
Where compliance permits, prefer official APIs, same-region private network calls, or deploying the model on your own compute infrastructure.
6. Summary: An Executable Checklist
- Before testing, confirm that the problems have not appeared in public resources, and fix the prompt and sampling parameters.
- Score mathematical ability separately on step correctness, citation correctness, hallucination rate, and LaTeX compilability. Run each problem at least five times.
- For routine tasks, select models using four metrics: accuracy, P95 latency, cost per 1k tokens, and concurrent throughput.
- Before procurement, request the vendor’s test conditions and re-measure throughput with your own workload.
- Before deployment, check data compliance, key management, and access-path stability, and review costs monthly.
