How to Evaluate LLMs: A Practical Methodology for Math Reasoning and Deployment Cost
Model selection shouldn't rely on version numbers, parameter counts, or community hearsay. This article presents a hands-on evaluation methodology for large language models covering four areas: mathematical reasoning ability, reasoning chain length, throughput, and cost. It includes test set construction rules, metrics to record, a cost formula for API versus self-hosted deployment, a five-dimension scoring framework, and the limits of formal verification with proof assistants like Lean or Coq. The goal is to help developers build their own benchmarks and cost ledgers before committing to a model.
Introduction: Don’t Select a Model by Version Number
Competition among large language models has shifted from casual conversation to complex reasoning, multi-step proofs, and code generation. Yet many developers still select models based on version numbers, parameter counts, or community reputation—conclusions that are hard to reproduce. This article provides a practical evaluation methodology covering four areas: mathematical reasoning ability, reasoning chain length, throughput, and cost. Some model codenames and figures mentioned here come from community discussions and cannot be verified against public sources, so this article offers no rankings—only methods for measurement.
1. How to Measure Mathematical Reasoning
The main problem with traditional question banks is that a model may have memorized the answers. More meaningful test items are propositions without ready-made answers—for example, theorems left as exercises in public textbooks, or unproven assertions in open-source projects. The model must derive results from known axioms and output them in a checkable form, such as a LaTeX write-up.
Requirements for constructing the test set:
- At least 50 problems. With too small a sample, conclusions fluctuate wildly. For an 80% accuracy rate, the 95% confidence interval over 50 problems is roughly ±11 percentage points.
- Cover computation problems, direct proofs, proofs by contradiction, and constructive proofs—don’t rely solely on multiple choice.
- Avoid content that appears heavily in public training data, and keep a portion of the problems private.
- Have two graders score independently, with a third party arbitrating disagreements.
2. Reasoning Chain Length: Long and Short Both Cost Money
Models differ markedly in their chain-of-thought style. Some skip steps, making them fast to verify; others expand every step—rigorous, but with longer output and higher latency. Neither style is absolutely better. The real criterion is: how many correct conclusions does each output token buy?
Record three metrics together: output token count, accuracy, and per-problem latency. If two models have similar accuracy, the one with fewer output tokens is usually cheaper. If one model is significantly more accurate, you need to weigh whether the extra tokens are worth it.
3. Deployment Throughput: Standardize the Terms First
Rumors circulate that a cloud vendor’s next-generation GPU rack can push a certain model’s throughput to about 700 tokens/s. That figure comes with no test conditions attached and cannot be verified—it must not be used for quotes or budgeting.
In the LLM context, TPS usually means tokens generated per second, but in other systems it may mean transactions per second. When discussing throughput, always specify:
- Model name and precision, e.g., FP16 or INT8 quantization;
- Input and output lengths—throughput differs greatly between long documents and short Q&A;
- Batch size and concurrency;
- Hardware model, GPU count, and inference framework version;
- Latency metrics such as P50 and P99, not just averages.
A throughput figure missing these conditions is only a directional reference.
4. Cost Formulas: Self-Host or Buy API
Per-task cost via API can be calculated as:
Per-task cost = input tokens × input unit price + output tokens × output unit price
Self-hosted per-token cost can be written as:
Per-token cost = (hardware depreciation + electricity + operations labor) ÷ effective output tokens
The critical variable is “effective.” If GPU utilization is only 20%, the same hardware is amortized over one-fifth of the tokens, multiplying the unit price several times over. Self-hosting typically pays off only when traffic is stable, utilization is high, or data residency requirements rule out external APIs.
As an example, assume a task averages 2,000 input tokens and 6,000 output tokens. With an API input price of 2 per million tokens and output price of 8 per million tokens, per-task cost is about 0.052. These prices are only for demonstrating the calculation and do not represent any real platform.
5. A Selection Framework: Score Five Dimensions
Score each candidate model from 1 to 5 on the following dimensions, then compute a weighted sum:
| Dimension | Description | Example Weight |
|---|---|---|
| Task fit | Is the target scenario proofs, code, summarization, or dialogue | 30% |
| Reasoning accuracy | Accuracy on your own test set | 30% |
| Latency and throughput | P99 latency and performance under concurrency | 15% |
| Cost efficiency | Total per-task cost | 15% |
| Ecosystem and tooling | Support for function calling, structured output, context caching, etc. | 10% |
Adjust weights by business priority. For offline batch processing, for example, the latency weight can drop to nearly zero.
6. User Feedback: Credit Consumption and Queuing
Some users report that enabling a new model drains their subscription credits quickly. The cause: per-request token consumption is higher than expected, compounded by noticeable queuing at peak hours. Such feedback reflects only individual experience, but it points to two things worth checking:
- Review the platform’s published token billing coefficients per model, and compute the actual cost of the same task across different models;
- Measure latency once during peak hours and once during off-peak hours to confirm whether queuing affects your business.
For enterprise users, batch offline inference and off-peak scheduling are usually effective ways to control cost.
7. Lessons from an Anonymous Case
One user anonymously reported consuming about 2% of a monthly subscription quota to generate a complete LaTeX write-up, including a proof of a previously unproven proposition. This case suggests that medium-difficulty math tasks are already feasible on some models. But it provides no input length, no description of human verification, and no failure count—so it cannot serve as evidence of general capability.
A valuable record should include: input and output lengths, the full number of dialogue turns, human verification results at each step, and the failure cases.
8. Formal Verification: Catches Errors, but Has Boundaries
Having a model output scripts checkable by proof assistants such as Lean or Coq is one route to reducing faulty proofs. The proof assistant verifies whether derivation steps are valid—but only for the formalized proposition. If the proposition itself is mistranslated, the prover will faithfully prove the wrong statement. Additionally, theorems missing from the formalization library must be supplied first, or the model will fail repeatedly.
Formal verification therefore works best as the final correctness check; it cannot replace human review.
9. Conclusion
When evaluating large language models, the most reliable evidence is your own test set and your own cost ledger. Version numbers, parameter counts, and community rumors can serve as leads, but they cannot replace actual measurement. Start by running the full pipeline on 50 or more problems, recording accuracy, token consumption, and latency—then decide whether to invest further.
