Reproducible Evaluation for LLM Mathematical Reasoning and Private Deployment
A practical framework for evaluating large language models on mathematical proofs and estimating private-deployment costs. It covers fixed test conditions, dataset design, scoring consistency, throughput measurement, cost formulas, comparison requirements, deployment checks, and a step-by-step model selection process.
1. Why Reproducible Evaluation Matters
Many comparison articles report only a single score or throughput figure, making it difficult for readers to determine whether the result applies to their own environment. Three common problems are:
- The test questions are not disclosed.
- Hardware and numerical precision are not specified.
- Cost calculations include only GPU prices and ignore utilization and operations.
This article presents a reproducible workflow and explains what should be recorded at each step.
2. Fix the Test Conditions Before Evaluation
Before testing begins, record the following:
- Model name, exact version, release date, and access method, such as local weights or a public API;
- Hardware model, VRAM capacity, driver version, and inference framework version;
- Numerical precision, such as FP16, BF16, INT8, or INT4, and the quantization method;
- Decoding parameters, including temperature, top_p, maximum output length, and whether the chain-of-thought length is limited;
- The complete system and user prompts, with their versions preserved;
- Concurrency, batch size, and average input and output lengths.
If any of these items is missing, the result should be treated as an internal reference only and should not be directly compared with figures reported by others.
3. Scoring Mathematical Proof能力
3.1 Build the Question Set
The question set should contain at least 30 problems and be divided into three difficulty levels:
- Proofs of basic theorems;
- Intermediate algebra or analysis proofs;
- Open-ended problems that require constructing new lemmas.
For each problem, record its source, a standard answer or reference proof, and whether the problem is publicly available. Public questions may already appear in training data, so they should be reported separately from internally created questions.
3.2 Scoring Rubric
A five-part rubric is recommended. Each category is worth 20 points, for a total of 100 points:
- Conclusion correctness: Whether the final conclusion is valid and the proof contains any fatal errors;
- Logical completeness: Whether each step is justified and key lemmas are cited or applied correctly;
- Condition handling: Whether implicit conditions are identified and assumptions are stated when the problem is ambiguous;
- Conciseness: Whether unnecessary intermediate steps are avoided and the length is appropriate for the information provided;
- Format usability: Whether the LaTeX compiles directly and notation is defined consistently.
3.3 Evaluation Procedure
Two reviewers should score each response independently. If their scores differ by more than 10 points, they should review the case together. Scoring agreement can be measured with Cohen’s kappa or an intraclass correlation coefficient.
When agreement is low, revise the rubric before continuing. Preserve the original output for every failed case so that it can be reviewed later.
4. Measuring Inference Throughput and Cost
4.1 Define the Throughput Metric
Throughput is calculated as:
Throughput = total output tokens ÷ total elapsed time
The unit is tokens per second. The result must also include the input length, output length, and concurrency level.
The same model can produce very different results with short inputs and a single user compared with long contexts and high concurrency. Use the benchmarking tools provided by the inference framework when possible, run the test multiple times, and report the median.
4.2 Cost Formula for Private Deployment
The unit cost is:
Unit cost = annualized total cost ÷ annual effective output tokens
Where:
- Annualized total cost = hardware purchase cost ÷ depreciation period + annual electricity cost + annual data-center and network costs + annual operations labor cost;
- Annual effective output tokens = theoretical throughput in tokens per second × seconds per year × average utilization.
For a public API:
Annual API cost = price per million tokens × annual output tokens ÷ 1,000,000
4.3 Example Calculation
The following figures are hypothetical and are provided only to demonstrate the calculation method. They do not represent measured results.
Assume that:
- Annualized total cost is 300,000;
- Theoretical throughput is 500 tokens per second;
- Average utilization is 30%.
There are approximately 31.536 million seconds in a year, producing about 4.73 billion effective output tokens annually. The unit cost is approximately 63 per million tokens.
If utilization falls to 10%, the unit cost increases to approximately 190 per million tokens.
In this example, utilization has a greater effect on unit cost than a small change in hardware pricing. Whether private deployment is economically viable therefore depends primarily on the stability of the workload.
5. Designing Cross-Model Comparisons
A cross-model comparison should satisfy three conditions:
- The sample can be reproduced;
- The results can be traced back to their source;
- Differences are supported by statistical evidence.
The specific requirements are as follows:
| Item | Requirement |
|---|---|
| Sample size | At least 30 problems per model, with each problem run at least three times |
| Question set | A tiered set aligned with the scoring rubric; public and self-created questions reported separately |
| Scoring rules | Independent scoring by two reviewers, with the rubric and disagreement records included |
| Failure cases | Categorized by error type, such as logical jumps, omitted conditions, or notation errors |
| Version and date | Record the model version and test date; repeat the evaluation after model updates |
| Test environment | Keep hardware, precision, decoding parameters, and prompts consistent |
If two models produce different average numbers of reasoning steps, report the mean, standard deviation, and sample size for both. When the difference is not statistically significant, it should not be used as a conclusion.
If model names cannot be disclosed because of licensing or compliance restrictions, specify the parameter range, version range, and test period. Readers need this information to judge whether the results are comparable.
6. Private Deployment Checklist
- Data: Classify data by sensitivity, define which data may enter the model, and complete de-identification where required;
- Access control: Manage access by role, record invocation logs, and ensure that logs do not contain keys or personal information;
- Model provenance: Verify weight-file checksums and license terms;
- Monitoring: Track time to first token, total latency, error rate, VRAM usage, and queue length;
- Updates: Retain older versions, validate new versions in a staging or canary environment, and maintain a rollback path;
- Backups: Back up model files, configurations, and prompt templates, and regularly test recovery;
- Security: Keep the inference framework and system patches up to date, and expose only the ports that are necessary;
- Ownership: Assign an operations owner and an emergency contact.
7. An Execution Plan for Model Selection
- List the business tasks, such as lecture-note generation, theorem proving, or internal document question answering;
- Build the question set and scoring rubric described in Section 3;
- Measure throughput as described in Section 4 and calculate the unit cost of both deployment options;
- Run a small-scale pilot with real traffic for two to four weeks and record utilization fluctuations;
- Make the deployment decision based on quality, cost, and compliance requirements.
The following weighting can be used as an initial reference:
- Reasoning quality: 40%;
- Deployment flexibility: 30%;
- Cost efficiency: 20%;
- Ecosystem and support: 10%.
These weights should be adjusted according to business priorities. The selection report should explain the reasons for any changes.
8. Conclusion
Evaluating an LLM’s mathematical reasoning and private-deployment capabilities requires fixed test conditions, transparent scoring rules, and cost calculations based on utilization and real workloads. A result from a single test describes performance only under that specific set of conditions.
Technical decision-makers can first run the complete workflow on their own questions and hardware, then decide whether to make a larger investment.
