Improve SuperCorrect-7B model card

#1
by nielsr HF staff - opened
Files changed (1) hide show
  1. README.md +28 -44
README.md CHANGED
@@ -1,16 +1,18 @@
1
  ---
2
- license: apache-2.0
 
3
  language:
4
  - en
 
 
5
  metrics:
6
  - accuracy
7
- base_model:
8
- - Qwen/Qwen2.5-Math-7B-Instruct
9
- library_name: transformers
10
  ---
 
11
  ## SuperCorrect: Supervising and Correcting Language Models with Error-Driven Insights
12
 
13
- > [SuperCorrect: Supervising and Correcting Language Models with Error-Driven Insights](link)
14
  > [Ling Yang\*](https://yangling0818.github.io/), [Zhaochen Yu*](https://github.com/BitCodingWalkin), [Tianjun Zhang](https://tianjunz.github.io/), [Minkai Xu](https://minkaixu.com/), [Joseph E. Gonzalez](https://people.eecs.berkeley.edu/~jegonzal/),[Bin Cui](https://cuibinpku.github.io/), [Shuicheng Yan](https://yanshuicheng.info/)
15
  >
16
  > Peking University, Skywork AI, UC Berkeley, Stanford University
@@ -20,46 +22,23 @@ library_name: transformers
20
  <img src='https://img.shields.io/badge/Arxiv-2410.09008-A42C25?style=flat&logo=arXiv&logoColor=A42C25'></a>
21
  </p>
22
 
23
- ## Introduction
24
-
25
- ![image](intro.png)
26
 
27
- This repo provides the official implementation of **SuperCorrect** a novel two-stage fine-tuning method for improving both reasoning accuracy and self-correction ability for LLMs.
28
 
29
- Notably, our **SupperCorrect-7B** model significantly surpasses powerful **DeepSeekMath-7B by 7.8%/5.3% and Qwen2.5-Math-7B by 15.1%/6.3% on MATH/GSM8K benchmarks**, achieving new SOTA performance among all 7B models.
30
 
31
- <div align="left">
32
- 🚨 Unlike other LLMs, we incorporate LLMs with our pre-defined hierarchical thought template ([Buffer of Thought (BoT)](https://github.com/YangLing0818/buffer-of-thought-llm)) to conduct more deliberate reasoning than conventional CoT. It should be noted that our evaluation methods relies on pure mathematical reasoning abilities of LLMs, instead of leverage other programming methods such as PoT and ToRA.
33
- </div>
34
-
35
- ## Examples
36
 
37
- ![image](example1.png)
38
 
39
- <div align="left">
40
- <b>
41
- 🚨 For more concise and clear presentation, we omit some XML tags.
42
- </b>
43
- </div>
44
 
45
- ### Model details
46
- *You can check our [Github repo](https://github.com/YangLing0818/SuperCorrect-llm) for more details.*
47
 
48
  ## Quick Start
49
 
50
- ### Requirements
51
-
52
- * Since our current model is based on Qwen2.5-Math series, `transformers>=4.37.0` is needed for Qwen2.5-Math models. The latest version is recommended.
53
-
54
- > [!Warning]
55
- >
56
- > <div align="center">
57
- > <b>
58
- > 🚨 This is a must because `transformers` integrated Qwen2 codes since `4.37.0`.
59
- > </b>
60
- > </div>
61
 
62
- ### Inference
63
 
64
  #### 🤗 Hugging Face Transformers
65
 
@@ -103,29 +82,34 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
103
  print(response)
104
  ```
105
 
106
- ## Performance
107
 
108
- We evaluate our SupperCorrect-7B on two widely used English math benchmarks GSM8K and MATH. All evaluations are tested with our evaluation method which is zero-shot hierarchical thought based prompting.
 
 
 
 
109
 
110
- ![image](table.png)
111
 
112
  ## Citation
113
 
114
  ```bash
115
- @article{yang2024supercorrect,
116
- title={SuperCorrect: Supervising and Correcting Language Models with Error-Driven Insights}
117
  author={Yang, Ling and Yu, Zhaochen and Zhang, Tianjun and Xu, Minkai and Gonzalez, Joseph E and Cui, Bin and Yan, Shuicheng},
118
- journal={arXiv preprint arXiv:2410.09008},
119
- year={2024}
120
  }
 
121
  @article{yang2024buffer,
122
  title={Buffer of Thoughts: Thought-Augmented Reasoning with Large Language Models},
123
  author={Yang, Ling and Yu, Zhaochen and Zhang, Tianjun and Cao, Shiyi and Xu, Minkai and Zhang, Wentao and Gonzalez, Joseph E and Cui, Bin},
124
- journal={arXiv preprint arXiv:2406.04271},
125
  year={2024}
126
  }
127
  ```
128
 
129
  ## Acknowledgements
130
 
131
- Our SuperCorrect is a two-stage fine-tuning model which based on several extraordinary open-source models like [Qwen2.5-Math](https://github.com/QwenLM/Qwen2.5-Math), [DeepSeek-Math](https://github.com/deepseek-ai/DeepSeek-Math), [Llama3-Series](https://github.com/meta-llama/llama3). Our evaluation method is based on the code base of outstanding works like [Qwen2.5-Math](https://github.com/QwenLM/Qwen2.5-Math) and [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). We also want to express our gratitude for amazing works such as [BoT](https://github.com/YangLing0818/buffer-of-thought-llm) which provides the idea of thought template.
 
1
  ---
2
+ base_model:
3
+ - Qwen/Qwen2.5-Math-7B-Instruct
4
  language:
5
  - en
6
+ library_name: transformers
7
+ license: apache-2.0
8
  metrics:
9
  - accuracy
10
+ pipeline_tag: question-answering
 
 
11
  ---
12
+
13
  ## SuperCorrect: Supervising and Correcting Language Models with Error-Driven Insights
14
 
15
+ > [SuperCorrect: Supervising and Correcting Language Models with Error-Driven Insights](https://arxiv.org/abs/2410.09008)
16
  > [Ling Yang\*](https://yangling0818.github.io/), [Zhaochen Yu*](https://github.com/BitCodingWalkin), [Tianjun Zhang](https://tianjunz.github.io/), [Minkai Xu](https://minkaixu.com/), [Joseph E. Gonzalez](https://people.eecs.berkeley.edu/~jegonzal/),[Bin Cui](https://cuibinpku.github.io/), [Shuicheng Yan](https://yanshuicheng.info/)
17
  >
18
  > Peking University, Skywork AI, UC Berkeley, Stanford University
 
22
  <img src='https://img.shields.io/badge/Arxiv-2410.09008-A42C25?style=flat&logo=arXiv&logoColor=A42C25'></a>
23
  </p>
24
 
25
+ ## Abstract
 
 
26
 
27
+ Large language models (LLMs) like GPT-4, PaLM, and LLaMA have shown significant improvements in various reasoning tasks. However, smaller models such as Llama-3-8B and DeepSeekMath-Base still struggle with complex mathematical reasoning because they fail to effectively identify and correct reasoning errors. Recent reflection-based methods aim to address these issues by enabling self-reflection and self-correction, but they still face challenges in independently detecting errors in their reasoning steps. To overcome these limitations, we propose SuperCorrect, a novel two-stage framework that uses a large teacher model to supervise and correct both the reasoning and reflection processes of a smaller student model. In the first stage, we extract hierarchical high-level and detailed thought templates from the teacher model to guide the student model in eliciting more fine-grained reasoning thoughts. In the second stage, we introduce cross-model collaborative direct preference optimization (DPO) to enhance the self-correction abilities of the student model by following the teacher's correction traces during training. This cross-model DPO approach teaches the student model to effectively locate and resolve erroneous thoughts with error-driven insights from the teacher model, breaking the bottleneck of its thoughts and acquiring new skills and knowledge to tackle challenging problems. Extensive experiments consistently demonstrate our superiority over previous methods. Notably, our SuperCorrect-7B model significantly surpasses powerful DeepSeekMath-7B by 7.8%/5.3% and Qwen2.5-Math-7B by 15.1%/6.3% on MATH/GSM8K benchmarks, achieving new SOTA performance among all 7B models. Code: https://github.com/YangLing0818/SuperCorrect-llm
28
 
 
29
 
30
+ ## Introduction
 
 
 
 
31
 
32
+ ![image](imgs/intro.png)
33
 
34
+ This repo provides the official implementation of **SuperCorrect**, a novel two-stage fine-tuning method for improving both reasoning accuracy and self-correction ability for LLMs. We incorporate LLMs with our pre-defined hierarchical thought template ([Buffer of Thought (BoT)](https://github.com/YangLing0818/buffer-of-thought-llm)) to conduct more deliberate reasoning than conventional CoT.
 
 
 
 
35
 
 
 
36
 
37
  ## Quick Start
38
 
39
+ **(See the Github README for more detailed installation and usage instructions.)**
 
 
 
 
 
 
 
 
 
 
40
 
41
+ ### Inference with Different Libraries
42
 
43
  #### 🤗 Hugging Face Transformers
44
 
 
82
  print(response)
83
  ```
84
 
85
+ #### 🔥 vLLM
86
 
87
+ ```python
88
+ # (See Github README for vLLM inference example)
89
+ ```
90
+
91
+ ## Evaluation
92
 
93
+ **(See the Github README for the most up-to-date evaluation results and instructions.)**
94
 
95
  ## Citation
96
 
97
  ```bash
98
+ @inproceedings{yang2025supercorrect,
99
+ title={SuperCorrect: Supervising and Correcting Language Models with Error-Driven Insights},
100
  author={Yang, Ling and Yu, Zhaochen and Zhang, Tianjun and Xu, Minkai and Gonzalez, Joseph E and Cui, Bin and Yan, Shuicheng},
101
+ booktitle={International Conference on Learning Representations},
102
+ year={2025}
103
  }
104
+
105
  @article{yang2024buffer,
106
  title={Buffer of Thoughts: Thought-Augmented Reasoning with Large Language Models},
107
  author={Yang, Ling and Yu, Zhaochen and Zhang, Tianjun and Cao, Shiyi and Xu, Minkai and Zhang, Wentao and Gonzalez, Joseph E and Cui, Bin},
108
+ journal={Advances in Neural Information Processing Systems},
109
  year={2024}
110
  }
111
  ```
112
 
113
  ## Acknowledgements
114
 
115
+ Our SuperCorrect is a two-stage fine-tuning model based on several extraordinary open-source models like [Qwen2.5-Math](https://github.com/QwenLM/Qwen2.5-Math), [DeepSeek-Math](https://github.com/deepseek-ai/DeepSeek-Math), [Llama3-Series](https://github.com/meta-llama/llama3). Our evaluation method is based on the code base of outstanding works like [Qwen2.5-Math](https://github.com/QwenLM/Qwen2.5-Math) and [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). We also want to express our gratitude for amazing works such as [BoT](https://github.com/YangLing0818/buffer-of-thought-llm) which provides the idea of thought template.