xl-zhao commited on
Commit
90eb469
·
verified ·
1 Parent(s): d6b89bd

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +72 -0
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3
3
+ language:
4
+ - en
5
+ ---
6
+ # SubgoalXL - Subgoal-Based Expert Learning for Theorem Proving
7
+
8
+ ## Model Description
9
+
10
+ SubgoalXL is an advanced model for formal theorem proving, leveraging subgoal-based expert learning to enhance LLMs' formal reasoning capabilities. It addresses the challenges of scarce theorem-proving data and multi-step reasoning by optimizing data efficiency and employing subgoal-level supervision. SubgoalXL iteratively refines formal statement, proof, and subgoal generators, allowing it to extract richer information from limited proofs and generate more precise formal proofs.
11
+
12
+ ### Example Usage
13
+
14
+ Below is an example code for using SubgoalXL with its custom prompt template for generating formal proofs:
15
+
16
+ ```python
17
+ from transformers import AutoModelForCausalLM, AutoTokenizer
18
+
19
+ # Load the model and tokenizer
20
+ tokenizer = AutoTokenizer.from_pretrained("xl-zhao/formal_proof_generator_v1_iter3")
21
+ model = AutoModelForCausalLM.from_pretrained("xl-zhao/formal_proof_generator_v1_iter3")
22
+
23
+ informal_statement = "" # Your informal statement here
24
+ formal_statement = "" # The formal statement generated by the model will be inserted here
25
+
26
+ # Define the prompt
27
+ prompt = f"### Problem:\n{informal_statement}\n\n### Proof:\n{formal_statement}"
28
+
29
+ # Tokenize and generate the formal proof
30
+ inputs = tokenizer(prompt, return_tensors="pt")
31
+ outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.8)
32
+
33
+ # Decode the output
34
+ formal_proof = tokenizer.decode(outputs[0], skip_special_tokens=True)
35
+ print(formal_proof)
36
+ ```
37
+
38
+ ## Intended Use
39
+
40
+ This model is intended for automated theorem proving, especially in environments that require high levels of mathematical rigor, such as Isabelle. By employing subgoal-based proof generation and expert learning, SubgoalXL is optimized for solving complex reasoning tasks in formal mathematics.
41
+
42
+ ## Performance
43
+
44
+ SubgoalXL sets a new state-of-the-art benchmark in formal theorem proving within the Isabelle environment, achieving an accuracy of 56.1% on the miniF2F dataset, an absolute improvement of 4.9% over previous approaches. The model has successfully solved the following problems:
45
+
46
+ - 41 AMC12 problems
47
+ - 9 AIME problems
48
+ - 3 IMO problems
49
+
50
+ For more information on the model's design and performance, please refer to the paper [SubgoalXL: Subgoal-Based Expert Learning for Theorem Proving](https://arxiv.org/abs/2408.11172).
51
+
52
+ ## Limitations
53
+
54
+ While SubgoalXL excels in formal theorem proving, its usage is tailored to this specific domain and may not generalize well to other tasks beyond formal logic and proof generation.
55
+
56
+ ## Citation
57
+
58
+ If you use SubgoalXL in your research, please cite our paper:
59
+
60
+ ```
61
+ @article{zhao2024subgoalxl,
62
+ title = {SubgoalXL: Subgoal-based Expert Learning for Theorem Proving},
63
+ author = {Zhao, Xueliang and Zheng, Lin and Bo, Haige and Hu, Changran and Thakker, Urmish and Kong, Lingpeng},
64
+ journal={arXiv preprint arXiv:2408.11172},
65
+ url={https://arxiv.org/abs/2408.11172},
66
+ year = {2024},
67
+ }
68
+ ```
69
+
70
+ ## Contact
71
+
72
+ For more information, please visit the project's [GitHub repository](https://github.com/zhaoxlpku/SubgoalXL) or reach out via email at [email protected].