指标:
- 代码评估
库名称: transformers
标签:
- 代码
模型索引:
- 名称: WizardCoder
结果:
- 任务:
类型: 文本生成
数据集:
类型: openai_humaneval
名称: HumanEval
指标:
- 名称: pass@1
类型: pass@1
值: 0.799
已验证: false
WizardCoder: 通过Evol-Instruct赋能代码大语言模型
🏠 主页
🤗 HF仓库 •🐱 Github仓库 • 🐦 Twitter
📃 [WizardLM] • 📃 [WizardCoder] • 📃 [WizardMath]
👋 加入我们的Discord
新闻
[2024/01/04] 🔥 我们发布了基于deepseek-coder-33b-base训练的WizardCoder-33B-V1.1,在EvalPlus排行榜上成为SOTA开源代码LLM,在HumanEval上达到79.9 pass@1,HumanEval-Plus上73.2 pass@1,MBPP上78.9 pass@1,MBPP-Plus上66.9 pass@1。
[2024/01/04] 🔥 WizardCoder-33B-V1.1在HumanEval和HumanEval-Plus pass@1上超越ChatGPT 3.5、Gemini Pro和DeepSeek-Coder-33B-instruct。
[2024/01/04] 🔥 WizardCoder-33B-V1.1在MBPP和MBPP-Plus pass@1上与ChatGPT 3.5相当,并超越Gemini Pro。
如何制作训练数据?
在Code-Aplaca数据上应用我们的Code Evol-Instruct。
❗ 数据污染检查:
在模型训练前,我们仔细严格检查了所有训练数据,并使用多种去重方法验证并防止HumanEval和MBPP测试集上的数据泄露。
🔥
❗关于模型系统提示使用的注意事项:
请严格使用与我们相同的系统提示,我们不保证量化版本的准确性。
默认版本:
"以下是一个描述任务的指令。请编写一个适当完成请求的响应。\n\n### 指令:\n{instruction}\n\n### 响应:"
如何复现WizardCoder-33B-V1.1的性能
我们在此提供所有代码here。
我们也提供所有生成的结果。
transformers==4.36.2
vllm==0.2.5
(1) HumanEval和HumanEval-Plus
代码生成(无加速)
model="WizardLM/WizardCoder-33B-V1.1"
temp=0.0
max_len=2048
pred_num=1
num_seqs_per_iter=1
output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
mkdir -p ${output_path}
echo '输出路径: '$output_path
echo '评估模型: '$model
index=0
gpu_num=8
for ((i = 0; i < $gpu_num; i++)); do
start_index=$((i * 21))
end_index=$(((i + 1) * 21))
gpu=$((i))
echo '运行进程 #' ${i} '从' $start_index '到' $end_index '在GPU' ${gpu}
((index++))
(
CUDA_VISIBLE_DEVICES=$gpu python humaneval_gen.py --model ${model} \
--start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
--num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --greedy_decode
) &
if (($index % $gpu_num == 0)); then wait; fi
done
代码生成(使用vllm加速)
model="WizardLM/WizardCoder-33B-V1.1"
temp=0.0
max_len=2048
pred_num=1
num_seqs_per_iter=1
output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
mkdir -p ${output_path}
echo '输出路径: '$output_path
echo '评估模型: '$model
CUDA_VISIBLE_DEVICES=0,1,2,3 python humaneval_gen_vllm.py --model ${model} \
--start_index 0 --end_index 164 --temperature ${temp} \
--num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --num_gpus 4 --overwrite
安装Eval-Plus基准测试。
git clone https://github.com/evalplus/evalplus.git
cd evalplus
export PYTHONPATH=$PYTHONPATH:$(pwd)
pip install -r requirements.txt
获取HumanEval和HumanEval-Plus分数。
output_path=preds/T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
echo '输出路径: '$output_path
python process_humaneval.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
evalplus.evaluate --dataset humaneval --samples ${output_path}.jsonl
(2) MBPP和MBPP-Plus
预处理的问题在mbppplus.json中提供。
代码生成(无加速)
model="WizardLM/WizardCoder-33B-V1.1"
temp=0.0
max_len