Update README.md
Browse files
README.md
CHANGED
@@ -1,199 +1,83 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
tags: []
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
|
|
|
10 |
|
|
|
|
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
<!-- Provide a longer summary of what this model is. -->
|
17 |
-
|
18 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
-
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
|
169 |
-
|
170 |
|
171 |
-
|
172 |
|
173 |
-
|
174 |
|
175 |
-
|
|
|
|
|
|
|
176 |
|
177 |
-
|
178 |
|
179 |
-
|
180 |
|
181 |
-
|
182 |
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
-
|
186 |
|
187 |
-
|
188 |
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
-
|
192 |
|
193 |
-
##
|
194 |
|
195 |
-
|
196 |
|
197 |
-
##
|
198 |
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
tags: []
|
4 |
+
pipeline_tag: text-generation
|
5 |
+
license: mit
|
6 |
+
base_model:
|
7 |
+
- deepseek-ai/DeepSeek-R1-Distill-Qwen-32B
|
8 |
---
|
9 |
|
10 |
+
**Repository for:**
|
11 |
|
12 |
+
**ThinkEdit-deepseek-qwen-32b**
|
13 |
|
14 |
+
(We also release ThinkEdit versions for ThinkEdit-deepseek-qwen-1.5b, ThinkEdit-deepseek-llama3-8b, and ThinkEdit-deepseek-qwen-14b.)
|
15 |
|
16 |
+
**Authors**: Chung-En Sun, Ge Yan, Tsui-Wei Weng
|
17 |
+
**Paper**: [ThinkEdit: Interpretable Weight Editing to Mitigate Overly Short Thinking in Reasoning Models](https://arxiv.org/abs/2503.22048)
|
18 |
|
19 |
+
Github: https://github.com/Trustworthy-ML-Lab/ThinkEdit
|
20 |
|
21 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
## Introduction
|
24 |
|
25 |
+
Reasoning-augmented models sometimes fail by generating **overly short**, abstract chain-of-thought (CoT) reasoning, hurting their accuracy.
|
26 |
|
27 |
+
**ThinkEdit** is a lightweight weight-editing method that:
|
28 |
|
29 |
+
- Identifies ~4% of "short reasoning" attention heads
|
30 |
+
- Edits only ~0.2% of total parameters
|
31 |
+
- Removes the "short reasoning" direction from their output
|
32 |
+
- Boosts performance, especially on cases with short reasoning traces
|
33 |
|
34 |
+
---
|
35 |
|
36 |
+
## Full Performance Results
|
37 |
|
38 |
+
### 1. Overall Accuracy
|
39 |
|
40 |
+
| Model | GSM8K | MMLU Elementary Math | MATH-Level1 | MATH-Level5 | MATH-500 |
|
41 |
+
|---------------------------------|---------------------|----------------------|---------------------|---------------------|---------------------|
|
42 |
+
| deepseek-qwen-32b | 92.97 ± 0.39 | 95.93 ± 0.83 | **96.41 ± 0.45** | 91.27 ± 0.53 | **91.62 ± 0.58** |
|
43 |
+
| **ThinkEdit-deepseek-qwen-32b** | **95.25 ± 0.25** | **98.02 ± 0.31** | 96.02 ± 0.42 | **91.31 ± 0.50** | 91.60 ± 0.65 |
|
44 |
+
| deepseek-qwen-14b | 90.80 ± 0.36 | 95.08 ± 0.65 | 96.32 ± 0.35 | 90.25 ± 0.72 | 91.48 ± 0.55 |
|
45 |
+
| **ThinkEdit-deepseek-qwen-14b** | **93.78 ± 0.50** | **96.56 ± 0.84** | **96.38 ± 0.52** | **91.03 ± 0.44** | **91.92 ± 0.63** |
|
46 |
+
| deepseek-llama3-8b | 82.26 ± 0.91 | 96.01 ± 0.62 | 93.46 ± 0.84 | 85.49 ± 0.83 | 87.26 ± 1.16 |
|
47 |
+
| **ThinkEdit-deepseek-llama3-8b**| **89.44 ± 0.55** | **96.19 ± 0.73** | **94.44 ± 0.31** | **86.49 ± 0.54** | **88.06 ± 1.09** |
|
48 |
+
| deepseek-qwen-1.5b | 79.15 ± 1.08 | 68.52 ± 1.56 | 93.00 ± 0.33 | **75.48 ± 0.90** | 82.22 ± 1.29 |
|
49 |
+
| **ThinkEdit-deepseek-qwen-1.5b**| **84.56 ± 0.79** | **90.66 ± 0.97** | **93.66 ± 0.62** | 75.05 ± 0.82 | **82.24 ± 0.89** |
|
50 |
|
51 |
+
---
|
52 |
|
53 |
+
### 2. Accuracy on Short Reasoning Cases (Top 5% / 10% / 20%)
|
54 |
|
55 |
+
| Model | GSM8K | MMLU Elementary Math | MATH-Level1 | MATH-Level5 | MATH-500 |
|
56 |
+
|---------------------------------|---------------------------------|----------------------------------|----------------------------------|----------------------------------|----------------------------------|
|
57 |
+
| deepseek-qwen-32b | 98.31 / 97.18 / 96.20 | 97.78 / 97.03 / 95.87 | 100.00 / 100.00 / **98.97** | 93.03 / 96.36 / 97.35 | 86.40 / 92.00 / 94.00 |
|
58 |
+
| **ThinkEdit-deepseek-qwen-32b** | **98.92** / **97.71** / **97.83** | **97.78** / **97.57** / **97.20** | **100.00** / **100.00** / 98.74 | **98.03** / **98.64** / **97.99** | **92.00** / **94.40** / **95.80** |
|
59 |
+
| deepseek-qwen-14b | **96.31** / 95.65 / 92.93 | 93.89 / **96.22** / 95.60 | 99.52 / **99.30** / 97.70 | 89.39 / 94.32 / 96.25 | 86.40 / 91.40 / 93.50 |
|
60 |
+
| **ThinkEdit-deepseek-qwen-14b** | **96.31** / **96.18** / **96.77** | **97.78** / 95.14 / **96.53** | **99.53** / 98.62 / **98.67** | **96.67** / **97.88** / **98.11** | **91.20** / **93.20** / **95.00** |
|
61 |
+
| deepseek-llama3-8b | 88.92 / 87.18 / 85.82 | 97.22 / 96.49 / 96.80 | 97.14 / 94.88 / 94.83 | 78.64 / 88.79 / 93.41 | 82.00 / 81.40 / 88.30 |
|
62 |
+
| **ThinkEdit-deepseek-llama3-8b**| **97.08** / **95.27** / **93.95** | **97.78** / **98.65** / **97.87** | **100.00** / **99.30** / **98.62** | **95.61** / **96.89** / **97.12** | **92.80** / **93.60** / **94.40** |
|
63 |
+
| deepseek-qwen-1.5b | 88.46 / 87.48 / 85.02 | 62.78 / 62.16 / 60.53 | **97.62** / 95.12 / 93.91 | 91.52 / 95.00 / 95.72 | 82.40 / 89.80 / 93.40 |
|
64 |
+
| **ThinkEdit-deepseek-qwen-1.5b**| **92.62** / **92.90** / **92.32** | **87.78** / **88.11** / **88.67** | 95.71 / **95.58** / **96.44** | **95.15** / **96.59** / **97.27** | **90.80** / **92.00** / **94.20** |
|
65 |
|
66 |
+
---
|
67 |
|
68 |
+
## Usage
|
69 |
|
70 |
+
The usage of ThinkEdit models is exactly the same as the original deepseek-distilled models.
|
71 |
|
72 |
+
## Citation
|
73 |
|
74 |
+
```bibtex
|
75 |
+
@misc{sun2025thinkedit,
|
76 |
+
title={ThinkEdit: Interpretable Weight Editing to Mitigate Overly Short Thinking in Reasoning Models},
|
77 |
+
author={Chung-En Sun and Ge Yan and Tsui-Wei Weng},
|
78 |
+
year={2025},
|
79 |
+
eprint={2503.22048},
|
80 |
+
archivePrefix={arXiv},
|
81 |
+
primaryClass={cs.CL},
|
82 |
+
url={https://arxiv.org/abs/2503.22048},
|
83 |
+
}
|