Update README.md
Browse files
README.md
CHANGED
|
@@ -6,6 +6,125 @@ base_model:
|
|
| 6 |
- deepseek-ai/DeepSeek-R1-0528-Qwen3-8B
|
| 7 |
---
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# OPC-R1-8B
|
| 10 |
|
| 11 |
-
We
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- deepseek-ai/DeepSeek-R1-0528-Qwen3-8B
|
| 7 |
---
|
| 8 |
|
| 9 |
+
<div align="center">
|
| 10 |
+
<img src="https://github.com/eth-sri/matharena/blob/main/images/matharena_icon.png?raw=true" width="20%" alt="MathArena" />
|
| 11 |
+
</div>
|
| 12 |
+
<hr>
|
| 13 |
+
<div align="center" style="line-height: 1;">
|
| 14 |
+
<a href="https://proofcorpus.ai/" target="_blank" style="margin: 2px;">
|
| 15 |
+
<img alt="Homepage" src="https://img.shields.io/badge/Homepage-OPC-ffc107?color=00c107&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 16 |
+
</a>
|
| 17 |
+
<a href="https://github.com/insait-institute/open-proof-corpus/" target="_blank" style="margin: 2px;">
|
| 18 |
+
<img alt="GitHub" src="https://img.shields.io/badge/GitHub-OPC-ffc107?logo=github&color=c10000&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 19 |
+
</a>
|
| 20 |
+
<a href="https://huggingface.co/collections/INSAIT-Institute/open-proof-corpus-6856d1279a7b6f12b83dc886" target="_blank" style="margin: 2px;">
|
| 21 |
+
<img alt="OPC HuggingFace" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-OPC-ffc107?color=ffc107&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 22 |
+
</a>
|
| 23 |
+
<a href="https://github.com/insait-institute/open-proof-corpus/blob/master/LICENSE.md" style="margin: 2px;">
|
| 24 |
+
<img alt="License" src="https://img.shields.io/badge/license-Apache%20License%202.0-blue" style="display: inline-block; vertical-align: middle;"/>
|
| 25 |
+
</a>
|
| 26 |
+
</div>
|
| 27 |
+
|
| 28 |
+
|
| 29 |
# OPC-R1-8B
|
| 30 |
|
| 31 |
+
We introduce the Open Proof Corpus (OPC)—the world’s first large-scale, open-source dataset of human-verified solutions to advanced mathematics problems. With over 5,000 solutions spanning 1,000+ challenging problems, the OPC is specifically designed for broad applicability and downstream usage in proof generation research and is the first to include a substantial number of correct, LLM-generated solutions to problems from prestigious mathematics competitions such as the USAMO and IMO.
|
| 32 |
+
|
| 33 |
+
Leverage OPC to tackle pressing research questions in automated proof generation:
|
| 34 |
+
(1) How do natural language and formal proof generation compare?
|
| 35 |
+
(2) How often do models that produce correct final answers truly reason their way to valid proofs?
|
| 36 |
+
(3) By what margin do best-of-n selection methods improveme proof quality?
|
| 37 |
+
|
| 38 |
+
WBuilding on this breakthrough resource, we present **OPC-R1-8B** - an open-source model for proof correctness judging that matches state-of-the-art performance. OPC-R1-8B ouperforms the majority of leading closed-source models, reaching an impressive 88.1% accuracy on verifying LLM-generated proofs.
|
| 39 |
+
|
| 40 |
+
## Introduction
|
| 41 |
+
|
| 42 |
+
**OPC-R1-8B** is a specialized, open-source model fine-tuned for proof evaluation. We finetuned *DeepSeek R1 Distill Qwen3 8B (05/28)* using GRPO reward signals from judgment accuracy, using the "LLM-as-judge" prompt detailed in our paper.
|
| 43 |
+
|
| 44 |
+
## Evaluation results
|
| 45 |
+
|
| 46 |
+
To benchmark LLMs as judges for proofs, we took 293 solutions from the OPC, containing human-labeled ground truths. **OPC-R1-8B** achieves a notable 88.1% maj@5 accuracy, matching the top-performing **Gemini 2.5 Pro**, and outperforming all other closed- and open-source alternatives by a clear margin. Notably, OPC-R1-8B outpaces its base model by a full *17%*, highlighting the downstream impact of the high-quality data in the OPC
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
| **Judge** | **pass@1** | **maj@5** | **Cost (USD)** |
|
| 50 |
+
|--------------------|:----------:|:---------:|:--------------:|
|
| 51 |
+
| Human | 90.4 | - | N/A |
|
| 52 |
+
| Gemini 2.5 Pro | 85.4 | 88.1 | 135.47 |
|
| 53 |
+
| **OPC-R1-8B** | 83.8 | 88.1 | N/A |
|
| 54 |
+
| o4-mini | 83.8 | 85.3 | 29.57 |
|
| 55 |
+
| o3 | 83.1 | 84.3 | 93.3 |
|
| 56 |
+
| Gemini 2.5 Flash | 82.7 | 86.0 | 86.95 |
|
| 57 |
+
| Qwen3 235B-A22B | 81.8 | 84.6 | 3.79 |
|
| 58 |
+
| DeepSeek R1 (05/28)| 80.9 | 82.6 | 27.35 |
|
| 59 |
+
| Qwen3 30B-A3B | 74.0 | 75.4 | N/A |
|
| 60 |
+
| DeepSeek R1 Distill 8B| 70.7 | 71.3 | N/A |
|
| 61 |
+
| Claude 4.0 Sonnet | 70.6 | 75.0 | 28.21 |
|
| 62 |
+
| Qwen3-8B | 64.4 | 63.6 | N/A |
|
| 63 |
+
| GPT-4.1 | 61.4 | 60.8 | 20.33 |
|
| 64 |
+
|
| 65 |
+
## Usage
|
| 66 |
+
|
| 67 |
+
You can run our model following the example below:
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 71 |
+
|
| 72 |
+
model_name = "INSAIT-Institute/OPC-R1-8B"
|
| 73 |
+
|
| 74 |
+
# load the tokenizer and the model
|
| 75 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 76 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 77 |
+
model_name,
|
| 78 |
+
torch_dtype="auto",
|
| 79 |
+
device_map="auto"
|
| 80 |
+
)
|
| 81 |
+
|
| 82 |
+
# prepare the model input
|
| 83 |
+
|
| 84 |
+
problem = "Compute the number of real solutions of the equation $x^2 + 2x + 2 = 0$."
|
| 85 |
+
solution = "The equation can be factored in as $x^2 + 2x + 2 = (x+1)^2 + 1$. Because $(x+1)^2 \\geq 0$, then $x^2 + 2x + 2 \\geq 1 > 0$. Therefore, there are \\boxed{0} real solutions."
|
| 86 |
+
|
| 87 |
+
prompt = "<substitute the evaluation prompt template from the paper>"
|
| 88 |
+
messages = [
|
| 89 |
+
{"role": "user", "content": prompt.format(problem=problem, solution=solution)}
|
| 90 |
+
]
|
| 91 |
+
text = tokenizer.apply_chat_template(
|
| 92 |
+
messages,
|
| 93 |
+
tokenize=False,
|
| 94 |
+
add_generation_prompt=True,
|
| 95 |
+
enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
|
| 96 |
+
)
|
| 97 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 98 |
+
|
| 99 |
+
# conduct text completion
|
| 100 |
+
generated_ids = model.generate(
|
| 101 |
+
**model_inputs,
|
| 102 |
+
max_new_tokens=32768
|
| 103 |
+
)
|
| 104 |
+
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
|
| 105 |
+
|
| 106 |
+
content = tokenizer.decode(output_ids, skip_special_tokens=True).strip("\n")
|
| 107 |
+
|
| 108 |
+
print("content:", content)
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
You can also run the model using the inference pipeline in our <a href="https://github.com/insait-institute/open-proof-corpus" style="margin: 2px;">GitHub repository</a>.
|
| 112 |
+
|
| 113 |
+
## Dataset
|
| 114 |
+
|
| 115 |
+
We have open-sourced the OPC dataset, where we answer many open questions regarding the LLMs’ proof capabilities.
|
| 116 |
+
|
| 117 |
+
<div align="center">
|
| 118 |
+
|
| 119 |
+
| **Dataset** | **Download** |
|
| 120 |
+
| :-----------------------------: | :----------------------------------------------------------: |
|
| 121 |
+
| OPC | [🤗 HuggingFace](https://huggingface.co/datasets/INSAIT-Institute/OPC) |
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
## License
|
| 125 |
+
|
| 126 |
+
**OPC-R1-8B** is released under the permissive Apache 2.0 license. Please review and respect the license when using the model.
|
| 127 |
+
|
| 128 |
+
## Citation
|
| 129 |
+
|
| 130 |
+
TODO
|