Wizardcoder 33B V1.1
WizardCoder-33B-V1.1是基於deepseek-coder-33b-base訓練的開源代碼大語言模型,在HumanEval和MBPP等基準測試上表現優異,成為SOTA開源代碼LLM。
下載量 293
發布時間 : 1/4/2024
模型概述
WizardCoder是一個通過Evol-Instruct方法增強的代碼生成大語言模型,專注於代碼生成和編程任務。
模型特點
高性能代碼生成
在HumanEval上達到79.9 pass@1,超越ChatGPT 3.5和Gemini Pro
Evol-Instruct訓練方法
採用創新的Evol-Instruct方法增強模型能力
開源SOTA
當前開源代碼LLM中的最先進模型
模型能力
代碼自動補全
代碼生成
編程問題解答
代碼解釋
代碼重構
使用案例
軟件開發
自動化代碼生成
根據自然語言描述生成可運行的代碼
在HumanEval基準上達到79.9%的通過率
編程教育
幫助學生理解和學習編程概念
技術面試準備
編程題解答
生成編程面試題的解決方案
🚀 WizardCoder:通過Evol - Instruct賦能代碼大語言模型
WizardCoder是一款專注於代碼生成的大語言模型,藉助Evol - Instruct技術提升性能。它在多個代碼評估數據集上表現出色,為代碼生成領域帶來了新的解決方案。
關鍵信息
屬性 | 詳情 |
---|---|
模型類型 | WizardCoder |
評估指標 | code_eval |
訓練數據處理 | 對Code - Alpaca數據應用Code Evol - Instruct |
測試數據集 | openai_humaneval(HumanEval) |
pass@1指標值 | 0.799 |
項目鏈接
- 🏠 主頁
- 🤗 Hugging Face倉庫
- 🐱 GitHub倉庫
- 📃 WizardLM論文
- 📃 WizardCoder論文
- 📃 WizardMath論文
- 👋 加入Discord
📢 最新消息
- [2024/01/04] 🔥 我們發佈了基於deepseek - coder - 33b - base訓練的WizardCoder - 33B - V1.1,它是EvalPlus排行榜上的最優開源代碼大語言模型,在HumanEval上的pass@1達到0.799,在HumanEval - Plus上為0.732,在MBPP上為0.789,在MBPP - Plus上為0.669。
- [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。
模型性能對比
模型 | 檢查點 | 論文 | HumanEval | HumanEval+ | MBPP | MBPP+ | 許可證 |
---|---|---|---|---|---|---|---|
GPT - 4 - Turbo (Nov 2023) | - | - | 85.4 | 81.7 | 83.0 | 70.7 | - |
GPT - 4 (May 2023) | - | - | 88.4 | 76.8 | - | - | - |
GPT - 3.5 - Turbo (Nov 2023) | - | - | 72.6 | 65.9 | 81.7 | 69.4 | - |
Gemini Pro | - | - | 63.4 | 55.5 | 72.9 | 57.9 | - |
DeepSeek - Coder - 33B - instruct | - | - | 78.7 | 72.6 | 78.7 | 66.7 | - |
WizardCoder - 33B - V1.1 | 🤗 HF鏈接 | 📃 WizardCoder | 79.9 | 73.2 | 78.9 | 66.9 | MSFTResearch |
WizardCoder - Python - 34B - V1.0 | 🤗 HF鏈接 | 📃 WizardCoder | 73.2 | 64.6 | 73.2 | 59.9 | Llama2 |
WizardCoder - 15B - V1.0 | 🤗 HF鏈接 | 📃 WizardCoder | 59.8 | 52.4 | -- | -- | OpenRAIL - M |
WizardCoder - Python - 13B - V1.0 | 🤗 HF鏈接 | 📃 WizardCoder | 64.0 | -- | -- | -- | Llama2 |
WizardCoder - Python - 7B - V1.0 | 🤗 HF鏈接 | 📃 WizardCoder | 55.5 | -- | -- | -- | Llama2 |
WizardCoder - 3B - V1.0 | 🤗 HF鏈接 | 📃 WizardCoder | 34.8 | -- | -- | -- | OpenRAIL - M |
WizardCoder - 1B - V1.0 | 🤗 HF鏈接 | 📃 WizardCoder | 23.8 | -- | -- | -- | OpenRAIL - M |
📦 訓練數據製作
對Code - Alpaca數據應用我們的Code Evol - Instruct。
❗ 數據汙染檢查
在模型訓練前,我們仔細嚴格地檢查了所有訓練數據,並使用多種去重方法來驗證和防止在HumanEval和MBPP測試集上的數據洩露。
⚠️ 重要提示
請嚴格使用與我們相同的系統提示,我們不保證量化版本的準確性。
默認版本:
"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
💻 復現WizardCoder - 33B - V1.1的性能
依賴環境
transformers==4.36.2
vllm==0.2.5
代碼和結果
(1)HumanEval和HumanEval - Plus
步驟1:代碼生成(無加速)
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: '$output_path
echo 'Model to eval: '$model
# 164 problems, 21 per GPU if GPU=8
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 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on 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
步驟1:代碼生成(使用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: '$output_path
echo 'Model to eval: '$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
步驟2:獲取分數
安裝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: '$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中提供。
步驟1:代碼生成(無加速)
model="WizardLM/WizardCoder-33B-V1.1"
temp=0.0
max_len=2048
pred_num=1
num_seqs_per_iter=1
output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
mkdir -p ${output_path}
echo 'Output path: '$output_path
echo 'Model to eval: '$model
# 399 problems, 50 per GPU if GPU=8
index=0
gpu_num=8
for ((i = 0; i < $gpu_num; i++)); do
start_index=$((i * 50))
end_index=$(((i + 1) * 50))
gpu=$((i))
echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
((index++))
(
CUDA_VISIBLE_DEVICES=$gpu python mbppplus_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} --mbpp_path "mbppplus.json" --greedy_decode
) &
if (($index % $gpu_num == 0)); then wait; fi
done
步驟1:代碼生成(使用vllm加速)
model="WizardLM/WizardCoder-33B-V1.1"
temp=0.0
max_len=2048
pred_num=1
num_seqs_per_iter=1
output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
mkdir -p ${output_path}
echo 'Output path: '$output_path
echo 'Model to eval: '$model
CUDA_VISIBLE_DEVICES=0,1,2,3 python mbppplus_gen_vllm.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} --mbpp_path "mbppplus.json" --num_gpus 4
步驟2:獲取分數
安裝Eval - Plus基準測試:
git clone https://github.com/evalplus/evalplus.git
cd evalplus
export PYTHONPATH=$PYTHONPATH:$(pwd)
pip install -r requirements.txt
獲取MBPP和MBPP - Plus分數:
output_path=preds/MBPP_T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
echo 'Output path: '$output_path
python mbppplus_process_preds.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
evalplus.evaluate --dataset mbpp --samples ${output_path}.jsonl
📄 引用
如果您使用了本倉庫中的數據、方法或代碼,請引用該倉庫:
@article{luo2023wizardcoder,
title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct},
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},
journal={arXiv preprint arXiv:2306.08568},
year={2023}
}
Phi 2 GGUF
其他
Phi-2是微軟開發的一個小型但強大的語言模型,具有27億參數,專注於高效推理和高質量文本生成。
大型語言模型 支持多種語言
P
TheBloke
41.5M
205
Roberta Large
MIT
基於掩碼語言建模目標預訓練的大型英語語言模型,採用改進的BERT訓練方法
大型語言模型 英語
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基礎模型的蒸餾版本,在保持相近性能的同時更輕量高效,適用於序列分類、標記分類等自然語言處理任務。
大型語言模型 英語
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一個多語言大語言模型,針對多語言對話用例進行了優化,在常見的行業基準測試中表現優異。
大型語言模型 英語
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基於100種語言的2.5TB過濾CommonCrawl數據預訓練的多語言模型,採用掩碼語言建模目標進行訓練。
大型語言模型 支持多種語言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基於Transformer架構的英語預訓練模型,通過掩碼語言建模目標在海量文本上訓練,支持文本特徵提取和下游任務微調
大型語言模型 英語
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI發佈的開放預訓練Transformer語言模型套件,參數量從1.25億到1750億,旨在對標GPT-3系列性能,同時促進大規模語言模型的開放研究。
大型語言模型 英語
O
facebook
6.3M
198
1
基於transformers庫的預訓練模型,適用於多種NLP任務
大型語言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多語言大語言模型系列,包含8B、70B和405B參數規模,支持8種語言和代碼生成,優化了多語言對話場景。
大型語言模型
Transformers 支持多種語言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基礎版是由Google開發的文本到文本轉換Transformer模型,參數規模2.2億,支持多語言NLP任務。
大型語言模型 支持多種語言
T
google-t5
5.4M
702
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98