Evaluating LLM Math Reasoning and Calculating Costs for High-Throughput Per-Rack Deployment
This article explains how to evaluate large language models on open-ended mathematical reasoning using reproducible datasets and scoring rules, then compares the cost structures of long and short chain-of-thought. It also shows how to calculate unit token cost for high-throughput per-rack inference, including TPS assumptions, utilization, formulas, deployment checks, and risks.
The conclusion is straightforward: to evaluate a large language model’s mathematical ability, use a reproducible evaluation set and consistent scoring rules rather than relying on a single leaderboard score. To deploy high-throughput inference, calculate the unit token cost before discussing TPS. The sections below cover three areas.
How Should Open-Ended Mathematical Reasoning Be Evaluated?
Some comparisons divide mainstream models into tiers without providing model names, evaluation sets, or sample sizes, so readers cannot verify the results. This article does not use that type of tiering. A reproducible evaluation should include at least the following elements.
- Evaluation set: Choose datasets that contain open-ended proof problems or multi-step derivation problems, such as MATH and AIME competition sets. Deduplicate evaluation questions against model training data to avoid inflated scores caused by memorization.
- Scoring dimensions: Record final-answer accuracy, whether the reasoning steps are self-consistent, and whether circular reasoning or unsupported assertions appear.
- Sample size and repetitions: Sample each question multiple times and report the mean and standard deviation. Sampling temperature changes results, so a single run has limited reference value.
- Experimental setup: Record the model version, sampling temperature, maximum output length, system prompt, and whether external tools are enabled.
The following comparison table can be used during model selection.
| Evaluation item | Recommended metric | Notes |
|---|---|---|
| Final accuracy | Correct questions divided by total questions | Report results stratified by question difficulty |
| Reasoning quality | Step error rate | Spot-check by humans or a judge model; a sampling ratio of at least 10% is recommended |
| Stability | Standard deviation across multiple samples | Models with large fluctuations are not suitable for direct integration into automated pipelines |
| Output parseability | Parse success rate for structured answers | Directly affects whether downstream code can correctly consume results |
What Are the Costs of Long vs. Short Chain-of-Thought?
Chain-of-thought is the intermediate reasoning text a model generates before giving the final answer. Different lengths have different cost structures. First, define the terms used below.
- TTFT (time to first token): The time from when a request is sent until the first output token is received.
- TPOT (time per output token): The average time to generate each subsequent output token.
- KV Cache: Stores attention intermediate results for processed tokens to avoid recomputation, but it consumes GPU memory.
Long chain-of-thought usually includes more self-checking and branch exploration. It has stronger fault tolerance on problems such as topological proofs and multivariable derivations. The costs are also clear. More output tokens means decoding time increases approximately linearly with output length. Each generated token adds another KV Cache record, so memory usage grows with the total input-plus-output length and concurrency. Attention computation during the prefill phase grows quadratically with input length. The claim that compute consumption rises exponentially is inaccurate; it is closer to the linear and quadratic relationships described above. In addition, if the answer must wait until the entire reasoning process has been generated before it is displayed, the time before the user sees the first visible answer token is also later.
Short chain-of-thought uses fewer output tokens, has lower latency and memory usage, and produces a more stable output format that is easier to parse. The risk is that it skips more steps, so accuracy may decrease on highly difficult problems. The trade-off between the two must be confirmed with measured data. The table below lists metrics to collect and the measurement conditions.
| Metric | Long chain-of-thought | Short chain-of-thought | Measurement conditions |
|---|---|---|---|
| Average output tokens | More | Fewer | Counted on the same question set |
| Total latency per request | Longer | Shorter | Fixed batch and concurrency; record P50 and P95 |
| KV Cache memory | Grows noticeably with length | Lower usage | Compare peak memory at the same context length |
| Hard-problem accuracy | Often assumed to be higher; must be measured | May decrease | Stratified by difficulty |
| Parse success rate | Depends on format constraints | Usually higher | Counted after unifying the output format |
| Per-request cost | Higher | Lower | Converted from hardware depreciation and electricity price |
For latency-sensitive online services, such as coding assistants and real-time data analytics platforms, short chain-of-thought versions should be tested first. For offline tasks with high accuracy requirements, longer reasoning time can be acceptable.
How Should Per-Rack High-Throughput Deployment Be Costed, and What Assumptions Are Needed?
TPS (tokens generated per second) is a throughput metric, but it has no fixed meaning by itself. On the same rack, different model sizes, quantization precisions, input/output lengths, batch sizes, and concurrency levels can produce TPS measurements that differ by several times. Mentions of “hundreds of TPS” without these conditions cannot directly support an investment decision.
To judge whether self-deployment is cost-effective, use the following formulas to calculate unit cost.
- Annual effective output tokens = sustained TPS × 31,536,000 seconds × average utilization
- Unit cost (CNY per million tokens) = annual total cost ÷ annual effective output tokens × 1,000,000
Assume an annual total cost of CNY 1 million (including hardware depreciation, electricity, data center, and operations and maintenance), sustained TPS of 300, and average utilization of 40%. Annual effective output is approximately 3.78 billion tokens, and unit cost is approximately CNY 265 per million tokens. If utilization is only 20%, unit cost doubles to approximately CNY 530 per million tokens. Return on investment therefore mainly depends on whether the hardware can run at high utilization over the long term.
When providing external services, cost also depends on utilization and pricing. The idea of “low-cost or free basic service plus high-premium mathematical reasoning capability” holds only when user volume is large enough and unit cost is controllable. Providers should compare their own API pricing and usage forecasts rather than directly applying assumptions.
Before deployment, check the following items.
- Hardware model, memory capacity, and inter-chip interconnect bandwidth
- Parallel strategy (tensor parallelism and pipeline parallelism) and its communication overhead
- KV Cache management and the maximum supported context length
- Stress-test metrics: TTFT, TPOT, TPS, P95 latency, and error rate
- Rollback plan: retain the previous version of model weights and service configuration
Also consider the following risks. Insufficient memory will cause long-context requests to fail. Hardware failures, power supply, and cooling issues will directly reduce available throughput. After a model update, rerun the evaluation set to confirm that mathematical reasoning capability has not regressed. If the service involves user data, also confirm that data storage and transmission comply with relevant requirements.
What Questions Should Be Answered Before Model Selection and Deployment?
Model selection should start with evaluation data, not leaderboard rankings. Deployment should start with unit cost, not only TPS numbers. A model’s chain-of-thought style should match the latency, accuracy, and cost requirements of the business. Only by putting evaluation, cost, and stress-test data together can a team judge whether a solution truly fits its scenario.
