Evaluating LLM Mathematical Reasoning and Inference Throughput: A Capability-Engineering-Cost Framework
Selecting a large language model based on a single leaderboard or a one-off trial can easily lead to misjudgment. This article presents a capability-engineering-cost framework: evaluate mathematical reasoning quality and inference service throughput separately, then combine them for business decisions. It covers closed-form accuracy, open-ended exploration, chain-of-thought quality, stability and robustness; SLO-constrained throughput benchmarking; cost modeling for self-deployment and hosted inference; and practical evaluation and rollout recommendations.
In large language model selection, relying on a single leaderboard or a one-off trial can easily lead to misjudgment. Mathematical reasoning capability and inference service throughput are two different dimensions: the former determines whether a model can solve complex problems, while the latter determines whether it can be delivered stably at acceptable cost. A more reasonable approach is to build a three-dimensional framework of capability, engineering, and cost: first evaluate mathematical reasoning quality and service throughput separately, then combine them into business scenarios for decision-making.
1. Mathematical reasoning cannot be judged by leaderboards alone
Mathematical capability should be split into at least four types of indicators: closed-form accuracy, open-ended problem exploration, chain-of-thought quality, and stability and robustness.
Closed-form accuracy is foundational but not sufficient. For standardized math problems, prompt templates, sampling parameters, and evaluation runs should be fixed, and the mean, variance, and multi-sample consistency should be reported. Reporting only the highest single score can easily overestimate model stability. Data contamination risk also needs attention: whether the evaluation set overlaps with training corpora, whether problem wording has been memorized, and whether the model can still solve the problem after changing the numbers.
Open-ended math problems are a watershed for capability. Such problems often have no unique answer or involve long verification chains. The evaluation focus is not whether a conclusion is produced, but whether testable intermediate lemmas can be proposed, whether counterexamples can be constructed, whether the model can correct itself after failure, and whether the reasoning process is reviewable. A model that can handle closed-form problems but cannot maintain logical closure in open-ended problems is better suited to Q&A assistance than to deep research-style tasks.
Chain-of-thought quality matters more than length. A long chain of thought does not equal strong reasoning, and conciseness does not equal weak capability. Attention should be paid to effective reasoning steps, the proportion of redundant steps, error propagation paths, and auditability. An overly long chain of thought increases latency and cost, and also makes human review difficult; too short a chain may skip key arguments. The ideal state is traceable steps, explicit assumptions, and verifiable conclusions.
Stability and robustness determine production value. Tests can cover synonym paraphrasing, numerical perturbation, insertion of distracting information in long contexts, and tool-call failures. Only models with high consistency across multiple samples, explainable errors, and stable boundary-condition handling are suitable for production workflows. Whether writing is natural and readable is an auxiliary indicator, but in scenarios that require human review of mathematical processes, process readability directly affects review efficiency.
2. Inference throughput must be evaluated under SLO constraints
Inference service throughput cannot be judged only by peak values. It is recommended to record output tokens/s, total tokens/s, first-token latency, end-to-end latency, p95/p99 latency, concurrent sessions, batch size, VRAM or memory usage, power consumption, and all-in cost per million tokens.
Rack-level high-throughput solutions usually rely on software-hardware co-design, continuous batching, KV cache optimization, quantization, and parallelism strategies. However, high throughput often involves trade-offs with low latency and high precision: oversized batching may raise tail latency, and quantization may affect mathematical reasoning stability. Therefore, stress tests must be conducted under business SLO constraints, for example: “What is the sustainable concurrency and throughput when p95 first-token latency does not exceed a certain threshold?”
A reusable benchmarking pseudocode is as follows:
def benchmark(model, task_set, concurrency_levels, duration):warmup(model, task_set)for c in concurrency_levels:start = now()results = run_concurrent(model, task_set, concurrency=c, duration=duration)elapsed = now() - startthroughput = total_tokens(results) / elapsedp95_latency = percentile(latency(results), 95)quality = evaluate_math(results, sample_size=200)report(c, throughput, p95_latency, quality)
During benchmarking, note the following: fix the task set and prompt templates; warm up before sampling; increase concurrency gradually by level; run long enough to observe tail latency; and spot-check output quality to avoid a situation where throughput goes up while accuracy goes down.
3. Benefits of self-deployment and hosted services are not limited to interface sales
The benefits of self-deployment include data isolation, business embedding, custom optimization, and long-term cost control. When providing inference services externally, the benefit is also not limited to per-token billing. If a high-throughput rack can be fully consumed by business systems, it can amortize hardware depreciation, power, and O&M costs. However, high throughput does not equal low total cost: insufficient utilization, frequent model updates, and complex O&M can all erode benefits. It is recommended to build a cost model: hardware depreciation + power + O&M + idle loss, divided by effective business token volume, to obtain the true unit cost.
4. Engineering implementation recommendations
First, build a layered evaluation set: basic arithmetic, competition-style problems, open-ended problems, and real business problems should each account for a certain proportion, combining automatic metrics with human review. Second, after offline evaluation passes, conduct online canary rollout, together with monitoring and alerting, logging services, and rollback mechanisms. Third, in a cloud environment such as Baidu AI Cloud, general container platforms, monitoring and alerting, and logging services can be used to organize stress testing and observability, without relying on specific proprietary interfaces. Fourth, use a weighted decision matrix during model selection: assign weights to mathematical capability, stability, throughput and latency, unit cost, and operability, with different weights for different business scenarios.
Conclusion: evaluating a class of large models should not stop at “who ranks where.” A more professional approach is to break mathematical reasoning into verifiable capabilities, place inference throughput within an SLO and cost model, and validate through layered evaluation and canary rollout. Only when capability, engineering, and cost all meet requirements does a model truly have production value.
