InternLM-Math
commited on
Commit
•
9cb19fb
1
Parent(s):
ea4b995
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pipeline_tag: text-generation
|
3 |
+
license: other
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
tags:
|
7 |
+
- math
|
8 |
+
datasets:
|
9 |
+
- internlm/Lean-Workbook
|
10 |
+
- internlm/Lean-Github
|
11 |
+
---
|
12 |
+
|
13 |
+
# InternLM2.5-Step-Prover
|
14 |
+
|
15 |
+
<div align="center">
|
16 |
+
|
17 |
+
<img src="https://raw.githubusercontent.com/InternLM/InternLM/main/assets/logo.svg" width="200"/>
|
18 |
+
<div> </div>
|
19 |
+
<div align="center">
|
20 |
+
<b><font size="5">InternLM-Math</font></b>
|
21 |
+
<sup>
|
22 |
+
<a href="https://internlm.intern-ai.org.cn/">
|
23 |
+
<i><font size="4">HOT</font></i>
|
24 |
+
</a>
|
25 |
+
</sup>
|
26 |
+
<div> </div>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
A state-of-the-art LEAN4 step prover.
|
30 |
+
|
31 |
+
[💻 Github](https://github.com/InternLM/InternLM-Math) [📊Dataset](https://huggingface.co/datasets/internlm/Lean-Github) [📖 Paper](https://arxiv.org/abs/2410.15700)
|
32 |
+
</div>
|
33 |
+
|
34 |
+
InternLM2.5-Step-Prover is a 7B language model which achieves state-of-the-art performances on MiniF2F, ProofNet, and Putnam math benchmarks, showing its formal math proving ability in multiple domains.
|
35 |
+
|
36 |
+
# Dialogue Example
|
37 |
+
```
|
38 |
+
### Input template
|
39 |
+
f"---\nNAME: {theorem.full_name}\n\n"
|
40 |
+
f"---\nPROOF_BEFORE: {proof_before}\n\n"
|
41 |
+
f"---\nSTATE_BEFORE: {state}\n\n"
|
42 |
+
f"---\nTACTIC: "
|
43 |
+
### Input example
|
44 |
+
---
|
45 |
+
NAME: square_sub_one_divisible_eight
|
46 |
+
---
|
47 |
+
PROOF_BEFORE: rw [h, pow_two]
|
48 |
+
---
|
49 |
+
STATE_BEFORE: m n : N
|
50 |
+
h : n = 2 * m + 1
|
51 |
+
⊢ 8 | (2 * m + 1) * (2 * m + 1) - 1
|
52 |
+
---
|
53 |
+
TACTIC:
|
54 |
+
### Output example
|
55 |
+
rw [← Nat.mod_add_div (2 * m + 1) 8]
|
56 |
+
```
|
57 |
+
If you want to use critic model, please refer critic's model page.
|
58 |
+
|
59 |
+
# Performance
|
60 |
+
|
61 |
+
## MiniF2F
|
62 |
+
| Method | Model size | Pass | miniF2F-valid | miniF2F-test |
|
63 |
+
|--------|------------|------|---------------|--------------|
|
64 |
+
| **Whole-Proof Generation Methods** |
|
65 |
+
| GPT-4-turbo 0409 | - | 64 | 25.4% | 23.0% |
|
66 |
+
| DeepSeekMath-Base | 7B | 128 | 25.4% | 27.5% |
|
67 |
+
| DeepSeek-Prover | 7B | 1 | - | 30.0% |
|
68 |
+
| | | 64 | - | 46.3% |
|
69 |
+
| | | 128 | - | 46.3% |
|
70 |
+
| | | 8192 | - | 48.8% |
|
71 |
+
| | | 65536 | - | 50.0% |
|
72 |
+
| | | cumulative | *60.2%* | *52.0%* |
|
73 |
+
| DeepSeek-Prover-1.5 | 7B | 32 | - | 63.5% |
|
74 |
+
| TheoremLlama | - | cumulative | 36.5% | 33.6% |
|
75 |
+
| **Tree Search Methods** |
|
76 |
+
| COPRA (GPT-3.5) | - | 1 | - | 9.0% |
|
77 |
+
| COPRA (GPT-4) | - | 1 | - | 26.6% |
|
78 |
+
| DSP(Isabelle) | 540B | 100 | 42.6% | 38.9% |
|
79 |
+
| Proof Artifact Co-Training | 837M | 1 | 23.9% | 24.6% |
|
80 |
+
| | | 8 | 29.3% | 29.2% |
|
81 |
+
| ReProver | 229M | 1 | - | 25.0% |
|
82 |
+
| Llemma | 7B | 1 | 26.2% | 26.2% |
|
83 |
+
| Llemma | 34B | 1 | 27.9% | 25.8% |
|
84 |
+
| Curriculum Learning | 837M | 1 | 33.6% | 29.6% |
|
85 |
+
| | | 8 | 41.2% | 34.5% |
|
86 |
+
| | | 64 | 47.3% | 36.6% |
|
87 |
+
| Hypertree Proof Search | 600M | cumulative | 58.6% | - |
|
88 |
+
| | | 64 | - | 41.0% |
|
89 |
+
| Lean-STaR | 7B | 64 | - | 46.3% |
|
90 |
+
| InternLM2-Math | 7B | 1 | 29.9% | 30.3% |
|
91 |
+
| InternLM2-Math-Plus | 7B | 1 | - | 43.4% |
|
92 |
+
| InternLM2-Step-Prover | 7B | 1 | 59.8% | 48.8% |
|
93 |
+
| InternLM2.5-Step-Prover | 7B | 1 | 55.4% | 47.3% |
|
94 |
+
| InternLM2.5-Step-Prover+Critic | 7B | 256 | **69.6%** | **65.9%** |
|
95 |
+
|
96 |
+
|
97 |
+
## Proofnet & Putnam
|
98 |
+
| Method | Model size | Pass | result |
|
99 |
+
|--------|------------|------|--------|
|
100 |
+
| **ProofNet benchmark** |
|
101 |
+
| ReProver | 229M | 1 | 13.8% |
|
102 |
+
| InternLM2-Step-Prover | 7B | 1 | 18.1% |
|
103 |
+
| InternLM2.5-Step-Prover | 7B | 256 | **27.0%** |
|
104 |
+
| **Putnam benchmark** |
|
105 |
+
| GPT-4 | - | 10 | 1/640 |
|
106 |
+
| COPRA (GPT-4) | - | 10 | 1/640 |
|
107 |
+
| DSP(Isabelle) | 540B | 10 | 4/640 |
|
108 |
+
| ReProver | 229M | 1 | 0/640 |
|
109 |
+
| InternLM2-Step-Prover | 7B | 1 | 5/640 |
|
110 |
+
| InternLM2.5-Step-Prover | 7B | 1 | **6/640** |
|
111 |
+
|
112 |
+
|
113 |
+
# Citation and Tech Report
|
114 |
+
```
|
115 |
+
@misc{wu2024internlm25stepproveradvancingautomatedtheorem,
|
116 |
+
title={InternLM2.5-StepProver: Advancing Automated Theorem Proving via Expert Iteration on Large-Scale LEAN Problems},
|
117 |
+
author={Zijian Wu and Suozhi Huang and Zhejian Zhou and Huaiyuan Ying and Jiayu Wang and Dahua Lin and Kai Chen},
|
118 |
+
year={2024},
|
119 |
+
eprint={2410.15700},
|
120 |
+
archivePrefix={arXiv},
|
121 |
+
primaryClass={cs.AI},
|
122 |
+
url={https://arxiv.org/abs/2410.15700},
|
123 |
+
}
|
124 |
+
```
|