ChuckMcSneed commited on
Commit
8bba2bc
1 Parent(s): b8590a7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +237 -1
README.md CHANGED
@@ -28,4 +28,240 @@ May or may not be deleted wizardcoder-33b-v1.1.
28
 
29
  ### Response:
30
 
31
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  ### Response:
30
 
31
+ ```
32
+
33
+ # Original model card: WizardLM's Wizardcoder 33B V1.1
34
+
35
+
36
+ ## WizardCoder: Empowering Code Large Language Models with Evol-Instruct
37
+
38
+ <p style="font-size:28px;" align="center">
39
+ 🏠 <a href="https://wizardlm.github.io/" target="_blank">Home Page</a> </p>
40
+ <p align="center">
41
+ <p align="center">
42
+ 🤗 <a href="https://huggingface.co/WizardLM" target="_blank">HF Repo</a> •🐱 <a href="https://github.com/nlpxucan/WizardLM" target="_blank">Github Repo</a> • 🐦 <a href="https://twitter.com/WizardLM_AI" target="_blank">Twitter</a> </p>
43
+ <p align="center">
44
+ 📃 <a href="https://arxiv.org/abs/2304.12244" target="_blank">[WizardLM]</a> • 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> • 📃 <a href="https://arxiv.org/abs/2308.09583" target="_blank">[WizardMath]</a> <br>
45
+ </p>
46
+ <p align="center">
47
+ 👋 Join our <a href="https://discord.gg/VZjjHtWrKs" target="_blank">Discord</a>
48
+ </p>
49
+
50
+ ## News
51
+
52
+ [2023/01/04] 🔥 We released **WizardCoder-33B-V1.1** trained from deepseek-coder-33b-base, the **SOTA OSS Code LLM** on [EvalPlus Leaderboard](https://evalplus.github.io/leaderboard.html), achieves **79.9 pass@1** on HumanEval, **73.2 pass@1** on HumanEval-Plus, **78.9 pass@1** on MBPP, and **66.9 pass@1** on MBPP-Plus.
53
+
54
+ [2023/01/04] 🔥 **WizardCoder-33B-V1.1** outperforms **ChatGPT 3.5**, **Gemini Pro**, and **DeepSeek-Coder-33B-instruct** on HumanEval and HumanEval-Plus pass@1.
55
+
56
+ [2023/01/04] 🔥 **WizardCoder-33B-V1.1** is comparable with **ChatGPT 3.5**, and surpasses **Gemini Pro** on MBPP and MBPP-Plus pass@1.
57
+
58
+ | Model | Checkpoint | Paper | HumanEval | HumanEval+ | MBPP | MBPP+ | License |
59
+ | ----- |------| ---- |------|-------| ----- | ----- |----- |
60
+ | GPT-4-Turbo (Nov 2023) | - | - | 85.4 | 81.7 | 83.0 | 70.7 |-|
61
+ | GPT-4 (May 2023) | - | - | 88.4 | 76.8 | - | - |-|
62
+ | GPT-3.5-Turbo (Nov 2023) | - | - | 72.6 | 65.9 | 81.7 | 69.4 |-|
63
+ | Gemini Pro | - | - | 63.4 | 55.5 | 72.9 | 57.9 |-|
64
+ | DeepSeek-Coder-33B-instruct | - | - | 78.7 | 72.6 | 78.7 | 66.7 |-|
65
+ | **WizardCoder-33B-V1.1** | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-33B-V1.1" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 79.9 | 73.2 | 78.9 | 66.9 | <a href="https://huggingface.co/WizardLM/WizardMath-7B-V1.1/resolve/main/LICENSE" target="_blank">MSFTResearch</a> |
66
+ | WizardCoder-Python-34B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 73.2 | 64.6 | 73.2 | 59.9 | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
67
+ | WizardCoder-15B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-15B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 59.8 | 52.4 | -- | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
68
+ | WizardCoder-Python-13B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 64.0 | -- | -- | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
69
+ | WizardCoder-Python-7B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-Python-7B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 55.5 | -- | -- | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
70
+ | WizardCoder-3B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-3B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 34.8 | -- | -- | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
71
+ | WizardCoder-1B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-1B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 23.8 | -- | -- | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
72
+
73
+
74
+ ## ❗ Data Contamination Check:
75
+
76
+ Before model training, we carefully and rigorously checked all the training data, and used multiple deduplication methods to verify and prevent data leakage on HumanEval and MBPP test set.
77
+
78
+ 🔥
79
+ ❗<b>Note for model system prompts usage:</b>
80
+
81
+ Please use **the same systems prompts strictly** with us, and we do not guarantee the accuracy of the **quantified versions**.
82
+
83
+ **Default version:**
84
+
85
+ ```
86
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
87
+ ```
88
+
89
+
90
+ ## How to Reproduce the Performance of WizardCoder-33B-V1.1
91
+
92
+ We provide all codes [here](https://github.com/nlpxucan/WizardLM/tree/main/WizardCoder/src).
93
+
94
+ We also provide all generated [results](https://github.com/nlpxucan/WizardLM/blob/main/WizardCoder/data/humaneval_mbpp_wizardcoder33b_v1.1_results.zip).
95
+
96
+ ```
97
+ transformers==4.36.2
98
+ vllm==0.2.5
99
+ ```
100
+
101
+ (1) HumanEval and HumanEval-Plus
102
+
103
+ - Step 1
104
+
105
+ Code Generation (w/o accelerate)
106
+ ```bash
107
+ model="WizardLM/WizardCoder-33B-V1.1"
108
+ temp=0.0
109
+ max_len=2048
110
+ pred_num=1
111
+ num_seqs_per_iter=1
112
+
113
+ output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
114
+
115
+ mkdir -p ${output_path}
116
+ echo 'Output path: '$output_path
117
+ echo 'Model to eval: '$model
118
+
119
+ # 164 problems, 21 per GPU if GPU=8
120
+ index=0
121
+ gpu_num=8
122
+ for ((i = 0; i < $gpu_num; i++)); do
123
+ start_index=$((i * 21))
124
+ end_index=$(((i + 1) * 21))
125
+
126
+ gpu=$((i))
127
+ echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
128
+ ((index++))
129
+ (
130
+ CUDA_VISIBLE_DEVICES=$gpu python humaneval_gen.py --model ${model} \
131
+ --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
132
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --greedy_decode
133
+ ) &
134
+ if (($index % $gpu_num == 0)); then wait; fi
135
+ done
136
+ ```
137
+
138
+ Code Generation (w/ vllm accelerate)
139
+ ```bash
140
+ model="WizardLM/WizardCoder-33B-V1.1"
141
+ temp=0.0
142
+ max_len=2048
143
+ pred_num=1
144
+ num_seqs_per_iter=1
145
+
146
+ output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
147
+
148
+ mkdir -p ${output_path}
149
+ echo 'Output path: '$output_path
150
+ echo 'Model to eval: '$model
151
+
152
+ CUDA_VISIBLE_DEVICES=0,1,2,3 python humaneval_gen_vllm.py --model ${model} \
153
+ --start_index 0 --end_index 164 --temperature ${temp} \
154
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --num_gpus 4 --overwrite
155
+ ```
156
+
157
+ - Step 2: Get the score
158
+
159
+ Install [Eval-Plus](https://github.com/evalplus/evalplus) benchmark.
160
+ ```bash
161
+ git clone https://github.com/evalplus/evalplus.git
162
+ cd evalplus
163
+ export PYTHONPATH=$PYTHONPATH:$(pwd)
164
+ pip install -r requirements.txt
165
+ ```
166
+ Get HumanEval and HumanEval-Plus scores.
167
+ ```bash
168
+ output_path=preds/T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
169
+
170
+ echo 'Output path: '$output_path
171
+ python process_humaneval.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
172
+
173
+ evalplus.evaluate --dataset humaneval --samples ${output_path}.jsonl
174
+ ```
175
+
176
+ (2) MBPP and MBPP-Plus
177
+
178
+ The preprocessed questions are provided in [mbppplus.json](https://github.com/nlpxucan/WizardLM/blob/main/WizardCoder/data/mbppplus.json).
179
+
180
+ - Step 1
181
+
182
+ Code Generation (w/o accelerate)
183
+ ```bash
184
+ model="WizardLM/WizardCoder-33B-V1.1"
185
+ temp=0.0
186
+ max_len=2048
187
+ pred_num=1
188
+ num_seqs_per_iter=1
189
+
190
+ output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
191
+
192
+ mkdir -p ${output_path}
193
+ echo 'Output path: '$output_path
194
+ echo 'Model to eval: '$model
195
+
196
+ # 399 problems, 50 per GPU if GPU=8
197
+ index=0
198
+ gpu_num=8
199
+ for ((i = 0; i < $gpu_num; i++)); do
200
+ start_index=$((i * 50))
201
+ end_index=$(((i + 1) * 50))
202
+
203
+ gpu=$((i))
204
+ echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
205
+ ((index++))
206
+ (
207
+ CUDA_VISIBLE_DEVICES=$gpu python mbppplus_gen.py --model ${model} \
208
+ --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
209
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --mbpp_path "mbppplus.json" --greedy_decode
210
+ ) &
211
+ if (($index % $gpu_num == 0)); then wait; fi
212
+ done
213
+ ```
214
+
215
+ Code Generation (w/ vllm accelerate)
216
+ ```bash
217
+ model="WizardLM/WizardCoder-33B-V1.1"
218
+ temp=0.0
219
+ max_len=2048
220
+ pred_num=1
221
+ num_seqs_per_iter=1
222
+
223
+ output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
224
+
225
+ mkdir -p ${output_path}
226
+ echo 'Output path: '$output_path
227
+ echo 'Model to eval: '$model
228
+
229
+ CUDA_VISIBLE_DEVICES=0,1,2,3 python mbppplus_gen_vllm.py --model ${model} \
230
+ --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
231
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --mbpp_path "mbppplus.json" --num_gpus 4
232
+ ```
233
+
234
+ - Step 2: Get the score
235
+
236
+ Install [Eval-Plus](https://github.com/evalplus/evalplus) benchmark.
237
+ ```bash
238
+ git clone https://github.com/evalplus/evalplus.git
239
+ cd evalplus
240
+ export PYTHONPATH=$PYTHONPATH:$(pwd)
241
+ pip install -r requirements.txt
242
+ ```
243
+ Get HumanEval and HumanEval-Plus scores.
244
+ ```bash
245
+ output_path=preds/MBPP_T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
246
+
247
+ echo 'Output path: '$output_path
248
+ python mbppplus_process_preds.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
249
+
250
+ evalplus.evaluate --dataset mbpp --samples ${output_path}.jsonl
251
+ ```
252
+
253
+
254
+ ## Citation
255
+
256
+ Please cite the repo if you use the data, method or code in this repo.
257
+
258
+ ```
259
+ @article{luo2023wizardcoder,
260
+ title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct},
261
+ author={Luo, Ziyang and Xu, Can and Zhao, Pu and Sun, Qingfeng and Geng, Xiubo and Hu, Wenxiang and Tao, Chongyang and Ma, Jing and Lin, Qingwei and Jiang, Daxin},
262
+ journal={arXiv preprint arXiv:2306.08568},
263
+ year={2023}
264
+ }
265
+ ```
266
+
267
+ <!-- original-model-card end -->